lib/devinstall/package.rb in devinstall-1.2.2 vs lib/devinstall/package.rb in devinstall-1.2.3
- old
+ new
@@ -7,18 +7,16 @@
module Devinstall
class UndeffError < RuntimeError;
end
-
class Package
include Utils
- #noinspection RubyResolve
def load_package_plugin(type)
- require "devinstall/pkg/pkg_#{type.to_s}"
- self.singleton_class.send(:include, Kernel.const_get("Pkg").const_get("#{type.to_s.capitalize}"))
+ require "devinstall/package/pkg_#{type.to_s}"
+ self.singleton_class.send(:include, Kernel.const_get('Pkg').const_get("#{type.to_s.capitalize}"))
end
def initialize(pkg, type, env)
@package, @type, @env = pkg, type, env
load_package_plugin(type)
@@ -46,11 +44,11 @@
puts "Receiving target #{target.to_s} for #{file.to_s}"
builder.get_file(file)
end
rescue KeyNotDefinedError => e
puts e.message
- raise "Error uploading #{pkg}"
+ raise "Error building #{pkg}"
end
def install(pkg=@package, type=@type, env=@env)
puts "Installing #{pkg} in #{env} environment."
installer = Provider.new(pkg, type, env, :install)
@@ -59,11 +57,11 @@
installer.put_file(info[:files][target])
installer.do_action(info[:files][target])
end
rescue KeyNotDefinedError => e
puts e.message
- raise "Error uploading #{pkg}"
+ raise "Error installing #{pkg}"
end
def run_tests(pkg=@package, type=@type, env=@env)
config=Settings.instance
# check if we have the test section in the configuration file
@@ -77,10 +75,10 @@
tester = Provider.new(pkg, type, env, :tests)
tester.copy_sources
tester.do_action
rescue KeyNotDefinedError => e
puts e.message
- raise "Error uploading #{pkg}"
+ raise "Error testing #{pkg}"
end
end
end