class Pushwagner::Maven
Attributes
artifacts[R]
repository[R]
Public Class Methods
new(maven, version)
click to toggle source
# File lib/pushwagner/maven.rb, line 11 def initialize(maven, version) required("Need maven configuration") unless maven if version && !version.empty? @version = version else required("Deployment version for artifacts is required") end @repository = Repository.new(maven['repositories']) @artifacts = Hash[(maven['artifacts'] || required("Requires at least one maven artifact")).map { |k,h| [k, Artifact.new(h['artifact_id'], h['group_id'], h['version'] || version)] }] (artifacts && repository) || required("Could not initialize maven configuration") end
Public Instance Methods
any?()
click to toggle source
# File lib/pushwagner/maven.rb, line 30 def any? artifacts && repository end
required(msg)
click to toggle source
# File lib/pushwagner/maven.rb, line 26 def required(msg) raise StandardError.new(msg) end