Module: RIM::Manifest::Helpers

Extended by:
Helpers
Included in:
Helpers
Defined in:
lib/rim/manifest/helper.rb

Constant Summary collapse

CHDIR_MONITOR =
Monitor.new
CONFIG_FILE_NAME =
"manifest.rim"

Instance Method Summary collapse

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_monitorObject



34
35
36
# File 'lib/rim/manifest/helper.rb', line 34

def chdir_monitor
  CHDIR_MONITOR
end

#default_lockfileObject



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_manifestObject



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

Returns:

  • (Boolean)


30
31
32
# File 'lib/rim/manifest/helper.rb', line 30

def in_rim_project?
  find_manifest
end