Top Level Namespace
Defined Under Namespace
Modules: Kernel, YAML, Zeus
Constant Summary
collapse
- ROOT_PATH =
File.expand_path(Dir.pwd)
- RAILS_PATH =
find_rails_path(ROOT_PATH)
- ENV_PATH =
File.expand_path('config/environment', RAILS_PATH)
- BOOT_PATH =
File.expand_path('config/boot', RAILS_PATH)
- APP_PATH =
File.expand_path('config/application', RAILS_PATH)
Instance Method Summary
collapse
Instance Method Details
#find_rails_path(root_path) ⇒ Object
1
2
3
4
|
# File 'lib/zeus/rails.rb', line 1
def find_rails_path(root_path)
paths = %w(spec/dummy test/dummy .)
paths.find { |path| File.exist?(File.expand_path(path, root_path)) }
end
|
#gem_is_bundled?(gem) ⇒ Boolean
14
15
16
17
|
# File 'lib/zeus/rails.rb', line 14
def gem_is_bundled?(gem)
gemfile_lock_contents = File.read(ROOT_PATH + "/Gemfile.lock")
gemfile_lock_contents.scan(/^\s*#{gem} \(([^=~><]+?)\)/).flatten.first
end
|