mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
prefer __dir__ over __FILE__ in File.expand_path
Thinking .. relative to files is not natural, we are used to think "parent of a directory", and we have __dir__ nowadays.
This commit is contained in:
parent
a1623fc667
commit
432222fae1
6 changed files with 18 additions and 6 deletions
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require File.expand_path("../tools/test", COMPONENT_ROOT)
|
||||
|
||||
exit Minitest.run(ARGV)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require File.expand_path("../tools/test", COMPONENT_ROOT)
|
||||
|
||||
exit Minitest.run(ARGV)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require File.expand_path("../tools/test", COMPONENT_ROOT)
|
||||
|
||||
exit Minitest.run(ARGV)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require File.expand_path("../tools/test", COMPONENT_ROOT)
|
||||
|
||||
exit Minitest.run(ARGV)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/env ruby
|
||||
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require File.expand_path("../tools/test", COMPONENT_ROOT)
|
||||
|
||||
module Minitest
|
||||
def self.plugin_active_record_options(opts, options)
|
||||
opts.separator ""
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
|
||||
|
||||
COMPONENT_ROOT = File.expand_path("..", __dir__)
|
||||
require File.expand_path("../tools/test", COMPONENT_ROOT)
|
||||
|
||||
exit Minitest.run(ARGV)
|
||||
|
|
Loading…
Reference in a new issue