Class: LockJar::Domain::GemDsl

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

Overview

Jarfile found in a Gem

Constant Summary

Constants inherited from Dsl

Dsl::DEFAULT_GROUP

Instance Attribute Summary collapse

Attributes inherited from JarfileDsl

#file_path

Attributes inherited from Dsl

#artifacts, #clear_repositories, #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, #without_default_maven_repo

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



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

def create(spec, jarfile)
  builder = new
  builder.gem_dir = spec.gem_dir

  builder.file_path = "gem:#{spec.name}:Jarfile.lock"

  evaluate(builder, jarfile)
end

Instance Method Details

#overriden_pomObject



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

alias_method :overriden_pom, :pom

#pom(path, *args) ⇒ Object



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

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