diff --git a/Gemfile b/Gemfile index 18b55cb..792c788 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" gem "rails", "~> 7.1", ">= 7.1.3" -gem "bootsnap", "~> 1.4" +gem "bootsnap", "~> 1.4", ">= 1.4.4", require: false gem "mysql2", "~> 0.5.3" gem "dotenv" gem "oj", ">= 2.8.3" @@ -11,7 +11,7 @@ gem "nokogiri", "~> 1.16", ">= 1.16.4" gem "iso8601", "~> 0.12.1" gem "maremma", "~> 5.0" gem "dalli", "~> 3.2", ">= 3.2.8" -gem "lograge", "~> 0.11.2" +gem "lograge", "~> 0.14.0" gem "logstash-event", "~> 1.2", ">= 1.2.02" gem "logstash-logger", "~> 0.26.1" gem "active_model_serializers", "~> 0.10.10" @@ -35,11 +35,11 @@ gem "sprockets", "~> 3.7", ">= 3.7.2" gem "kt-paperclip", "~> 6.4.1" group :development, :test do - gem "rspec-rails", "~> 3.8" - gem "rubocop-rspec", "~> 1.35" - gem "rubocop", "~> 0.77.0" + gem "rspec-rails", "~> 6.1", ">= 6.1.1" + gem "rubocop-rspec", "~> 2.0", require: false + gem "rubocop", "~> 1.3", ">= 1.3.1" gem "rubocop-performance", "~> 1.5", ">= 1.5.1" - gem "rubocop-rails", "~> 2.4" + gem "rubocop-rails", "~> 2.8", ">= 2.8.1" gem "binding_of_caller" gem "byebug", platforms: [:mri, :mingw, :x64_mingw] end @@ -48,7 +48,6 @@ group :development do gem "listen", "~> 3.9" gem "spring" gem "spring-watcher-listen", "~> 2.0.0" - gem "httplog", "~> 1.3" end group :test do diff --git a/config/application.rb b/config/application.rb index 8889e4c..b24ca98 100644 --- a/config/application.rb +++ b/config/application.rb @@ -78,10 +78,11 @@ class Application < Rails::Application config.logger = config.lograge.logger config.log_level = ENV["LOG_LEVEL"].to_sym - config.lograge.ignore_actions = ["HeartbeatController#index", "IndexController#index"] - config.lograge.ignore_custom = lambda do |event| - event.payload.inspect.length > 100000 - end + # config.lograge.ignore_actions = ["HeartbeatController#index", "IndexController#index"] + # config.lograge.ignore_custom = lambda do |event| + # event.payload.inspect.length > 100000 + # end + config.lograge.base_controller_class = "ActionController::API" config.lograge.custom_options = lambda do |event| diff --git a/config/environments/development.rb b/config/environments/development.rb index 719714b..86f13ae 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -30,13 +30,6 @@ config.action_controller.perform_caching = true config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"], { namespace: ENV["APPLICATION"] } - HttpLog.configure do |config| - config.enabled = false - config.logger = LogStashLogger.new(type: :stdout) - config.url_blacklist_pattern = /sqs\.eu-west-1\.amazonaws\.com/ - config.filter_parameters = %w(client_id access_token orcid_token) - end - # Don't care if the mailer can't send. # config.action_mailer.raise_delivery_errors = false diff --git a/config/routes.rb b/config/routes.rb index 799eb14..4040ab0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,14 +2,12 @@ root :to => 'index#index' resources :heartbeat, only: [:index] resources :index, path: '/', only: [:index] - # resources :index, only: [:index] def add_swagger_route http_method, path, opts = {} full_path = path.gsub(/{(.*?)}/, ':\1') match full_path, to: "#{opts.fetch(:controller_name)}##{opts[:action_name]}", via: http_method end - # add_swagger_route 'GET', '//reports/publishers', controller_name: 'publishers', action_name: 'index' add_swagger_route 'DELETE', '//publishers/{id}', controller_name: 'publishers', action_name: 'destroy' add_swagger_route 'PUT', '//publishers/{id}', controller_name: 'publishers', action_name: 'update' add_swagger_route 'POST', '//publishers', controller_name: 'publishers', action_name: 'create' @@ -25,7 +23,9 @@ def add_swagger_route http_method, path, opts = {} get 'repositories-usage-reports/:id', :to => 'publishers#show', constraints: { :id => /.+/ } - resources :publishers, constraints: { :id => /.+/ }, format: false, defaults: { format: false } resources :repositories_usage_reports, constraints: { :id => /.+/ }, format: false, defaults: { format: false } + + get '/public/favicon.ico', to: redirect('/public/favicon.ico') + get '/favicon.ico', to: redirect('/public/favicon.ico') end diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..8cd1a80 Binary files /dev/null and b/public/favicon.png differ