Skip to content

Commit 4622929

Browse files
committedFeb 25, 2020
Sort before requiring files.
1 parent 33445a5 commit 4622929

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if ENV["APP_ENV"] == "development"
1111
require "github-release-party/tasks/heroku"
1212
end
1313

14-
Dir["lib/tasks/*.rake"].each { |f| load f }
14+
Dir["lib/tasks/*.rake"].sort.each { |f| load f }

‎config/application.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Bundler.require(:default, ENV["APP_ENV"])
77

88
app_path = File.expand_path("../..", __FILE__)
9-
Dir["#{app_path}/lib/*.rb"].each { |f| require f }
9+
Dir["#{app_path}/lib/**/*.rb"].sort.each { |f| require f }
1010

1111
# Expose the request path in the exception message for Sinatra::NotFound
1212
# This makes it easier to scan the list of errors in Airbrake to see what paths causes 404 errors
@@ -52,5 +52,5 @@ def route_missing
5252
end
5353
end
5454

55-
Dir["#{app_path}/config/initializers/*.rb"].each { |f| require f }
56-
Dir["#{app_path}/app/**/*.rb"].each { |f| require f }
55+
Dir["#{app_path}/config/initializers/*.rb"].sort.each { |f| require f }
56+
Dir["#{app_path}/app/**/*.rb"].sort.each { |f| require f }

0 commit comments

Comments
 (0)
Please sign in to comment.