Class: PoolParty::Plugin::DevelopmentGem
- Inherits:
-
PoolParty::Plugin
- Object
- PoolParty::Plugin
- PoolParty::Plugin::DevelopmentGem
- Defined in:
- lib/extensions/development_gem_package.rb
Instance Method Summary collapse
- #add_gem_building ⇒ Object
- #add_gem_installation ⇒ Object
- #gem_root ⇒ Object
- #loaded(opts = {}, &block) ⇒ Object
- #remove_existing_gem(existing_name) ⇒ Object
Instance Method Details
#add_gem_building ⇒ Object
51 52 53 54 |
# File 'lib/extensions/development_gem_package.rb', line 51 def add_gem_building has_exec("build-development-gem-#{name}", :command => "cd #{gem_root} && rake #{build_gem_task}") end |
#add_gem_installation ⇒ Object
56 57 58 59 60 |
# File 'lib/extensions/development_gem_package.rb', line 56 def add_gem_installation has_exec("install-development-gem-#{name}", :requires => get_exec("build-development-gem-#{name}"), :command => "cd #{gem_root} && #{install_cmd}") end |
#gem_root ⇒ Object
62 63 64 |
# File 'lib/extensions/development_gem_package.rb', line 62 def gem_root to end |
#loaded(opts = {}, &block) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/extensions/development_gem_package.rb', line 34 def loaded(opts={}, &block) bin opts[:bin] ? opts[:bin] : opts[:jruby] ? "jruby -S gem" : "gem" install_cmd opts[:install_cmd] || "#{bin} install pkg/*.gem --no-rdoc --no-ri" to opts[:to] ? opts[:to] : "/usr/local/src/#{name}" has_deploy_directory(name + '-src', ) [name, conflicts].flatten.compact.each {|c| remove_existing_gem(c)} # remove any gems that might conflict add_gem_building add_gem_installation end |
#remove_existing_gem(existing_name) ⇒ Object
45 46 47 48 49 |
# File 'lib/extensions/development_gem_package.rb', line 45 def remove_existing_gem(existing_name) has_exec("rm-existing-gem-#{existing_name}", :command => "#{bin} uninstall #{existing_name} --all", :only_if => "#{bin} list --local #{existing_name} | grep ^#{existing_name}[[:space:]]") end |