lib/checkpoint/railtie.rb in checkpoint-1.0.2 vs lib/checkpoint/railtie.rb in checkpoint-1.0.3

- old
+ new

@@ -69,12 +69,10 @@ case Rails.env when "development" config[:opts] = { adapter: 'sqlite', database: 'db/checkpoint_development.sqlite3' } when "test" config[:opts] = { adapter: 'sqlite' } - else - raise "Checkpoint::DB.config must be configured." end end Railtie.before_blocks.each do |block| block.call(config.to_h) @@ -82,9 +80,10 @@ end # This runs after everything in 'config/initializers' runs. initializer "checkpoint.after_initializers", after: :load_config_initializers do config = Checkpoint::DB.config + raise "Checkpoint::DB.config must be configured." unless config.url || config.opts Railtie.after_blocks.each do |block| block.call(config.to_h) end Checkpoint::DB.initialize! unless Railtie.under_rake?