diff --git a/Gemfile b/Gemfile index 0f529fa50..ba41f35c7 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,6 @@ gem 'nokogiri', '~> 1.8.1' gem 'diffy', '~> 3.2', '>= 3.2.1' gem 'commonmarker', '~> 0.17.9' gem 'iso8601', '~> 0.9.0' -gem 'patron', '~> 0.13.1', require: false gem 'maremma', '>= 4.1' gem 'bolognese', '~> 1.0' gem 'dalli', '~> 2.7', '>= 2.7.6' diff --git a/Gemfile.lock b/Gemfile.lock index d8374312a..aaab7a8f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,7 +55,7 @@ GEM api-pagination (4.8.2) arel (9.0.0) aws-eventstream (1.0.1) - aws-partitions (1.127.0) + aws-partitions (1.128.0) aws-sdk-core (3.44.1) aws-eventstream (~> 1.0) aws-partitions (~> 1.0) @@ -166,7 +166,7 @@ GEM database_cleaner (1.7.0) debug_inspector (0.0.3) diff-lcs (1.3) - diffy (3.2.1) + diffy (3.3.0) docile (1.1.5) docopt (0.6.1) domain_name (0.5.20180417) @@ -230,12 +230,12 @@ GEM tilt hamster (3.0.0) concurrent-ruby (~> 1.0) - hashdiff (0.3.7) + hashdiff (0.3.8) hashie (3.6.0) htmlentities (4.3.4) http-cookie (1.0.3) domain_name (~> 0.5) - i18n (1.3.0) + i18n (1.4.0) concurrent-ruby (~> 1.0) i18n_data (0.8.0) iso8601 (0.9.1) @@ -318,7 +318,6 @@ GEM oj (2.18.5) oj_mimic_json (1.0.1) pandoc-ruby (2.0.2) - patron (0.13.1) postrank-uri (1.0.23) addressable (>= 2.3.0, < 2.6) nokogiri (>= 1.6.1, < 1.9) @@ -367,7 +366,7 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) - rdf (3.0.7) + rdf (3.0.9) hamster (~> 3.0) link_header (~> 0.0, >= 0.0.8) rdf-aggregate-repo (2.2.1) @@ -535,7 +534,6 @@ DEPENDENCIES nokogiri (~> 1.8.1) oj (>= 2.8.3) oj_mimic_json (~> 1.0, >= 1.0.1) - patron (~> 0.13.1) premailer (~> 1.11, >= 1.11.1) pwqgen.rb (~> 0.1.0) rack-cors (~> 1.0, >= 1.0.2) diff --git a/app/serializers/client_serializer.rb b/app/serializers/client_serializer.rb index c77bf4976..47e32759e 100644 --- a/app/serializers/client_serializer.rb +++ b/app/serializers/client_serializer.rb @@ -3,6 +3,7 @@ class ClientSerializer set_key_transform :camel_lower set_type :clients set_id :uid + cache_options enabled: true, cache_length: 24.hours attributes :name, :symbol, :year, :contact_name, :contact_email, :description, :domains, :url, :created, :updated diff --git a/app/serializers/doi_serializer.rb b/app/serializers/doi_serializer.rb index b7089d63b..4f1762077 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -3,6 +3,7 @@ class DoiSerializer set_key_transform :camel_lower set_type :dois set_id :uid + # don't cache dois, as works are cached using the doi model attributes :doi, :prefix, :suffix, :identifiers, :creators, :titles, :publisher, :container, :publication_year, :subjects, :contributors, :dates, :language, :types, :related_identifiers, :sizes, :formats, :version, :rights_list, :descriptions, :geo_locations, :funding_references, :xml, :url, :content_url, :metadata_version, :schema_version, :source, :is_active, :state, :reason, :landing_page, :created, :registered, :updated attributes :prefix, :suffix, if: Proc.new { |object, params| params && params[:detail] } diff --git a/app/serializers/provider_prefix_serializer.rb b/app/serializers/provider_prefix_serializer.rb index b89aaf335..470ab51d2 100644 --- a/app/serializers/provider_prefix_serializer.rb +++ b/app/serializers/provider_prefix_serializer.rb @@ -4,6 +4,7 @@ class ProviderPrefixSerializer set_type "provider-prefixes" set_id :uid attributes :created, :updated + cache_options enabled: true, cache_length: 24.hours belongs_to :provider, record_type: :providers belongs_to :prefix, record_type: :prefixes diff --git a/app/serializers/provider_serializer.rb b/app/serializers/provider_serializer.rb index 65aad32aa..fc46d31c1 100644 --- a/app/serializers/provider_serializer.rb +++ b/app/serializers/provider_serializer.rb @@ -3,6 +3,7 @@ class ProviderSerializer set_key_transform :camel_lower set_type :providers set_id :uid + cache_options enabled: true, cache_length: 24.hours attributes :name, :symbol, :website, :contact_name, :contact_email, :phone, :description, :region, :country, :logo_url, :organization_type, :focus_area, :is_active, :has_password, :joined, :created, :updated diff --git a/app/serializers/work_serializer.rb b/app/serializers/work_serializer.rb index f5a216793..644817b94 100644 --- a/app/serializers/work_serializer.rb +++ b/app/serializers/work_serializer.rb @@ -3,6 +3,7 @@ class WorkSerializer set_key_transform :dash set_type :works set_id :identifier + cache_options enabled: true, cache_length: 24.hours attributes :doi, :identifier, :url, :author, :title, :container_title, :description, :resource_type_subtype, :data_center_id, :member_id, :resource_type_id, :version, :license, :schema_version, :results, :related_identifiers, :published, :registered, :checked, :updated, :media, :xml diff --git a/config/initializers/_version.rb b/config/initializers/_version.rb index f3025678e..8043845fe 100644 --- a/config/initializers/_version.rb +++ b/config/initializers/_version.rb @@ -1,5 +1,5 @@ module Lupo class Application - VERSION = "2.3" + VERSION = "2.3.1" end end \ No newline at end of file diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb index 0dbbcb378..a2ee09c2d 100644 --- a/config/initializers/elasticsearch.rb +++ b/config/initializers/elasticsearch.rb @@ -9,7 +9,7 @@ } } Elasticsearch::Model.client = Elasticsearch::Client.new(host: ENV['ES_HOST'], user: "elastic", password: ENV['ELASTIC_PASSWORD']) do |f| - f.adapter Faraday.default_adapter + f.adapter :excon end else Elasticsearch::Model.client = Elasticsearch::Client.new(host: ENV['ES_HOST'], port: '80', scheme: 'http') do |f| @@ -18,6 +18,6 @@ service: 'es', region: ENV['AWS_REGION'] - f.adapter Faraday.default_adapter + f.adapter :excon end end \ No newline at end of file