diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/environments/test.rb | 4 | ||||
-rw-r--r-- | config/initializers/10-patches.rb | 36 | ||||
-rw-r--r-- | config/routes.rb | 24 |
3 files changed, 28 insertions, 36 deletions
diff --git a/config/environments/test.rb b/config/environments/test.rb index 249910443..4e5057dd7 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -29,5 +29,7 @@ Rails.application.configure do # Print deprecation notices to stderr and the Rails logger. config.active_support.deprecation = [:stderr, :log] - config.secret_token = 'a secret token for running the tests' + config.secret_key_base = 'a secret token for running the tests' + + config.active_support.test_order = :random end diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index e01b4c2d7..5c2f913b0 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -146,6 +146,16 @@ module ActionMailer end end +# #deliver is deprecated in Rails 4.2 +# Prevents massive deprecation warnings +module ActionMailer + class MessageDelivery < Delegator + def deliver + deliver_now + end + end +end + module ActionController module MimeResponds class Collector @@ -163,32 +173,8 @@ module ActionController # TODO: remove it in a later version def self.session=(*args) $stderr.puts "Please remove config/initializers/session_store.rb and run `rake generate_secret_token`.\n" + - "Setting the session secret with ActionController.session= is no longer supported in Rails 3." + "Setting the session secret with ActionController.session= is no longer supported." exit 1 end end end - -if Rails::VERSION::MAJOR < 4 && RUBY_VERSION >= "2.1" - module ActiveSupport - class HashWithIndifferentAccess - def select(*args, &block) - dup.tap { |hash| hash.select!(*args, &block) } - end - - def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block) } - end - end - - class OrderedHash - def select(*args, &block) - dup.tap { |hash| hash.select!(*args, &block) } - end - - def reject(*args, &block) - dup.tap { |hash| hash.reject!(*args, &block) } - end - end - end -end diff --git a/config/routes.rb b/config/routes.rb index 8eb9b4d27..4b9cc77aa 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -217,15 +217,16 @@ Rails.application.routes.draw do get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats' get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph' - get 'projects/:id/repository/:repository_id/changes(/*path(.:ext))', - :to => 'repositories#changes' + get 'projects/:id/repository/:repository_id/changes(/*path)', + :to => 'repositories#changes', + :format => false get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision' post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions' - get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))', + get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path)', :controller => 'repositories', :format => false, :constraints => { @@ -236,27 +237,30 @@ Rails.application.routes.draw do get 'projects/:id/repository/statistics', :to => 'repositories#stats' get 'projects/:id/repository/graph', :to => 'repositories#graph' - get 'projects/:id/repository/changes(/*path(.:ext))', - :to => 'repositories#changes' + get 'projects/:id/repository/changes(/*path)', + :to => 'repositories#changes', + :format => false get 'projects/:id/repository/revisions', :to => 'repositories#revisions' get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/revision', :to => 'repositories#revision' post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue' delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' - get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))', + get 'projects/:id/repository/revisions/:rev/:action(/*path)', :controller => 'repositories', :format => false, :constraints => { :action => /(browse|show|entry|raw|annotate|diff)/, :rev => /[a-z0-9\.\-_]+/ } - get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))', + get 'projects/:id/repository/:repository_id/:action(/*path)', :controller => 'repositories', - :action => /(browse|show|entry|raw|changes|annotate|diff)/ - get 'projects/:id/repository/:action(/*path(.:ext))', + :action => /(browse|show|entry|raw|changes|annotate|diff)/, + :format => false + get 'projects/:id/repository/:action(/*path)', :controller => 'repositories', - :action => /(browse|show|entry|raw|changes|annotate|diff)/ + :action => /(browse|show|entry|raw|changes|annotate|diff)/, + :format => false get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil get 'projects/:id/repository', :to => 'repositories#show', :path => nil |