Class: Buildr::AS3::Toolkits::ZipToolkiteBase

Inherits:
Object
  • Object
show all
Defined in:
lib/buildr/as3/toolkits/base.rb

Direct Known Subclasses

AlchemyToolkit, ApparatToolkit, FlexSDK

Instance Method Summary collapse

Instance Method Details

#from(url) ⇒ Object

:call-seq:

from(url) => self
  • You can pass a url where the ToolkitArtifact should be downloaded from as a string:

FLEX_SDK.from(“domain.tld/flex_sdk.zip”)

  • You can pass :maven as a parameter to download it from a maven repository:

FLEX_SDK.from(:maven)

  • If you don’t call this function at all, buildr-as3 will try and resolve a url on automatically



49
50
51
52
# File 'lib/buildr/as3/toolkits/base.rb', line 49

def from(url)
  @url = url
  self
end

#invokeObject

:nodoc:



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/buildr/as3/toolkits/base.rb', line 28

def invoke #:nodoc:

  if @url == :maven
    Buildr::artifact(@spec).invoke
  else
    Buildr::download(Buildr::artifact(@spec) => @url).invoke
  end unless File.exists? @zip.to_s

  unzip_toolkit(@zip,@zip_destination)

  self
end