Skip to content

Commit

Permalink
Removed rails-settings-ui but kept rails-settings-cached
Browse files Browse the repository at this point in the history
  • Loading branch information
Dantemss committed Oct 4, 2024
1 parent 861e54f commit df4a172
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 47 deletions.
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ gem 'awesome_print'
gem 'whenever', require: false

# Admin toggles
# gem 'rails-settings-ui', '1.3.4'

# gem 'rails-settings-cached', '0.7.2'
# gem 'dry-validation'
gem 'rails-settings-cached'

# Respond to ELB healthchecks in /ping and /ping/
gem 'openstax_healthcheck'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ GEM
rails-i18n (7.0.9)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
rails-settings-cached (2.9.4)
activerecord (>= 5.0.0)
railties (>= 5.0.0)
railties (6.0.6.1)
actionpack (= 6.0.6.1)
activesupport (= 6.0.6.1)
Expand Down Expand Up @@ -867,6 +870,7 @@ DEPENDENCIES
rails-controller-testing
rails-erd
rails-i18n
rails-settings-cached
redis-rails
render_anywhere
representable (~> 3.0.0)
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/3-settings.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# We need to require settings here so we guarantee they are available
# before other initialization code.

#require 'settings'
require 'settings'
30 changes: 0 additions & 30 deletions config/initializers/rails_settings_ui.rb_

This file was deleted.

2 changes: 0 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@
resources :external_ids, only: [:destroy]

mount Blazer::Engine, at: "blazer", as: 'blazer_admin'

#mount RailsSettingsUi::Engine, at: 'settings'
end

namespace 'dev' do
Expand Down
10 changes: 0 additions & 10 deletions lib/settings.rb_ → lib/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
module Settings
module Db
class Store < RailsSettings::Base
source Rails.root.join("config/app.yml")
namespace Rails.env

# Workaround (this method missing in current implementation, but RailsSettings-UI
# expects it -- doesn't really need to use it any more b/c RailsSettingsCached
# deals with defaults internally)
def self.defaults
result = RailsSettings::Default.enabled? ? RailsSettings::Default.instance : {}
result.with_indifferent_access
end
end

mattr_accessor :store
Expand Down

0 comments on commit df4a172

Please sign in to comment.