Class: LockJar::Domain::GemDsl

Inherits:
JarfileDsl show all
Defined in:
lib/lock_jar/domain/gem_dsl.rb

Constant Summary

Constants inherited from Dsl

Dsl::DEFAULT_GROUP

Instance Attribute Summary collapse

Attributes inherited from JarfileDsl

#file_path

Attributes inherited from Dsl

#artifacts, #excludes, #file_path, #groups, #local_repository, #maps, #merged, #remote_repositories

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Dsl

evaluate, #exclude, #group, #initialize, #jar, #local, #local_repo, #map, #remote_repo, #scope

Constructor Details

This class inherits a constructor from LockJar::Domain::Dsl

Instance Attribute Details

#gem_dirObject

Returns the value of attribute gem_dir.



24
25
26
# File 'lib/lock_jar/domain/gem_dsl.rb', line 24

def gem_dir
  @gem_dir
end

Class Method Details

.create(spec, jarfile) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/lock_jar/domain/gem_dsl.rb', line 28

def create(spec, jarfile)
  builder = new
  builder.gem_dir = spec.gem_dir
  
  jarfile = File.join( spec.gem_dir, jarfile )
  builder.file_path = "gem:#{spec.name}:#{jarfile.gsub( "#{spec.base_dir}/", "" )}.lock"
  
  evaluate(builder, jarfile)
end

.overriden_createObject



27
# File 'lib/lock_jar/domain/gem_dsl.rb', line 27

alias :overriden_create :create

Instance Method Details

#overriden_pomObject



39
# File 'lib/lock_jar/domain/gem_dsl.rb', line 39

alias :overriden_pom :pom

#pom(path, *args) ⇒ Object



40
41
42
# File 'lib/lock_jar/domain/gem_dsl.rb', line 40

def pom(path, *args)
  overriden_pom( File.join( gem_dir, path), *args)
end