Module: RIM::Manifest::Helpers
Constant Summary collapse
- CHDIR_MONITOR =
Monitor.new
- CONFIG_FILE_NAME =
"manifest.rim"
Instance Method Summary collapse
- #chdir(dir, &blk) ⇒ Object
- #chdir_monitor ⇒ Object
- #default_lockfile ⇒ Object
- #default_manifest ⇒ Object
- #in_rim_project? ⇒ Boolean
Instance Method Details
#chdir(dir, &blk) ⇒ Object
38 39 40 41 42 |
# File 'lib/rim/manifest/helper.rb', line 38 def chdir(dir, &blk) chdir_monitor.synchronize do Dir.chdir dir, &blk end end |
#chdir_monitor ⇒ Object
34 35 36 |
# File 'lib/rim/manifest/helper.rb', line 34 def chdir_monitor CHDIR_MONITOR end |
#default_lockfile ⇒ Object
25 26 27 28 |
# File 'lib/rim/manifest/helper.rb', line 25 def default_lockfile manifest = default_manifest Pathname.new(manifest.sub(/.rim$/, '.locked')) end |
#default_manifest ⇒ Object
19 20 21 22 23 |
# File 'lib/rim/manifest/helper.rb', line 19 def default_manifest manifest = find_manifest raise ManifestFileNotFound, "Could not locate #{CONFIG_FILE_NAME}" unless manifest Pathname.new(manifest) end |
#in_rim_project? ⇒ Boolean
30 31 32 |
# File 'lib/rim/manifest/helper.rb', line 30 def in_rim_project? find_manifest end |