diff options
author | Alex Johnson <notalexjohnson@gmail.com> | 2013-11-04 17:27:23 +0530 |
---|---|---|
committer | Alex Johnson <notalexjohnson@gmail.com> | 2013-11-05 10:50:03 +0530 |
commit | 01ef2c1943cd813f3fd262602f518640f66db834 (patch) | |
tree | 4ba7a87221e1fcb21a624ebe7afa710fa2e61ac7 | |
parent | 84eac5dab8b0fe9ee20b51250e52ad7bfea36553 (diff) | |
download | rails-01ef2c1943cd813f3fd262602f518640f66db834.tar.gz rails-01ef2c1943cd813f3fd262602f518640f66db834.tar.bz2 rails-01ef2c1943cd813f3fd262602f518640f66db834.zip |
Refactor File.expand_path usage to remove additional File.join
-rw-r--r-- | actionview/test/actionpack/abstract/helper_test.rb | 2 | ||||
-rwxr-xr-x | railties/bin/rails | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionview/test/actionpack/abstract/helper_test.rb b/actionview/test/actionpack/abstract/helper_test.rb index 4e05245584..89c4567715 100644 --- a/actionview/test/actionpack/abstract/helper_test.rb +++ b/actionview/test/actionpack/abstract/helper_test.rb @@ -52,7 +52,7 @@ module AbstractController class AbstractInvalidHelpers < AbstractHelpers include ActionController::Helpers - path = File.join(File.expand_path('../../../fixtures', __FILE__), "helpers_missing") + path = File.expand_path('../../../fixtures/helpers_missing', __FILE__) $:.unshift(path) self.helpers_path = path end diff --git a/railties/bin/rails b/railties/bin/rails index c11d65a08e..82c17cabce 100755 --- a/railties/bin/rails +++ b/railties/bin/rails @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -git_path = File.join(File.expand_path('../../..', __FILE__), '.git') +git_path = File.expand_path('../../../.git', __FILE__) if File.exist?(git_path) railties_path = File.expand_path('../../lib', __FILE__) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 3c62e7a4d2..e3e9c501ad 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -324,7 +324,7 @@ module Rails end def self.default_rc_file - File.join(File.expand_path('~'), '.railsrc') + File.expand_path('~/.railsrc') end private |