Class: Buildr::PackageGemTask
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from ArchiveTask
#clean, #contain?, #empty?, #exclude, #include, #invoke_prerequisites, #merge, #needed?, #path, #root, #with
#contain?, #empty?, #exist?
Constructor Details
Returns a new instance of PackageGemTask.
27
28
29
30
31
32
33
|
# File 'lib/buildr/packaging/gems.rb', line 27
def initialize(*args)
super
@spec = Gem::Specification.new
prepare do
include(changelog) if changelog
end
end
|
Instance Attribute Details
#changelog ⇒ Object
Returns the value of attribute changelog.
35
36
37
|
# File 'lib/buildr/packaging/gems.rb', line 35
def changelog
@changelog
end
|
Instance Method Details
#spec {|@spec| ... } ⇒ Object
37
38
39
40
|
# File 'lib/buildr/packaging/gems.rb', line 37
def spec
yield @spec if block_given?
@spec
end
|
#uninstall ⇒ Object
46
47
48
|
# File 'lib/buildr/packaging/gems.rb', line 46
def uninstall
Util::Gems.command 'uninstall', spec.name, '-v', spec.version.to_s
end
|
50
51
52
53
54
55
|
# File 'lib/buildr/packaging/gems.rb', line 50
def upload
rubyforge = RubyForge.new
rubyforge.login
rubyforge.userconfig.merge!('release_changes'=>changelog.to_s, 'preformatted'=>true) if changelog
rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version, package(:gem).to_s
end
|