Class: Buildr::AS3::Apparat::ApparatToolkit
- Inherits:
-
Object
- Object
- Buildr::AS3::Apparat::ApparatToolkit
- Defined in:
- lib/buildr/as3/apparat.rb
Instance Attribute Summary collapse
-
#asm_swc ⇒ Object
readonly
Returns the value of attribute asm_swc.
-
#asmifier ⇒ Object
readonly
Returns the value of attribute asmifier.
-
#concrete ⇒ Object
readonly
Returns the value of attribute concrete.
-
#coverage ⇒ Object
readonly
Returns the value of attribute coverage.
-
#dump ⇒ Object
readonly
Returns the value of attribute dump.
-
#ersatz_swc ⇒ Object
readonly
Returns the value of attribute ersatz_swc.
-
#home ⇒ Object
readonly
Returns the value of attribute home.
-
#jitb ⇒ Object
readonly
Returns the value of attribute jitb.
-
#lzma_decoder_swc ⇒ Object
readonly
Returns the value of attribute lzma_decoder_swc.
-
#reducer ⇒ Object
readonly
Returns the value of attribute reducer.
-
#scala_home ⇒ Object
readonly
Returns the value of attribute scala_home.
-
#stripper ⇒ Object
readonly
Returns the value of attribute stripper.
-
#tdsi ⇒ Object
readonly
Returns the value of attribute tdsi.
Instance Method Summary collapse
- #from(url) ⇒ Object
-
#initialize(version) ⇒ ApparatToolkit
constructor
A new instance of ApparatToolkit.
- #invoke ⇒ Object
- #scala(scala_home) ⇒ Object
Constructor Details
#initialize(version) ⇒ ApparatToolkit
Returns a new instance of ApparatToolkit.
30 31 32 33 34 35 36 |
# File 'lib/buildr/as3/apparat.rb', line 30 def initialize(version) @version = version @spec = "com.googlecode:apparat-bin:zip:#{@version}" @apparat_zip = Buildr.artifact(@spec) @apparat_dir = File.join(File.dirname(@apparat_zip.to_s), "apparat-bin-#{@version}", "apparat-#{@version}") generate_paths @apparat_dir, @version end |
Instance Attribute Details
#asm_swc ⇒ Object (readonly)
Returns the value of attribute asm_swc.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def asm_swc @asm_swc end |
#asmifier ⇒ Object (readonly)
Returns the value of attribute asmifier.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def asmifier @asmifier end |
#concrete ⇒ Object (readonly)
Returns the value of attribute concrete.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def concrete @concrete end |
#coverage ⇒ Object (readonly)
Returns the value of attribute coverage.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def coverage @coverage end |
#dump ⇒ Object (readonly)
Returns the value of attribute dump.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def dump @dump end |
#ersatz_swc ⇒ Object (readonly)
Returns the value of attribute ersatz_swc.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def ersatz_swc @ersatz_swc end |
#home ⇒ Object (readonly)
Returns the value of attribute home.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def home @home end |
#jitb ⇒ Object (readonly)
Returns the value of attribute jitb.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def jitb @jitb end |
#lzma_decoder_swc ⇒ Object (readonly)
Returns the value of attribute lzma_decoder_swc.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def lzma_decoder_swc @lzma_decoder_swc end |
#reducer ⇒ Object (readonly)
Returns the value of attribute reducer.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def reducer @reducer end |
#scala_home ⇒ Object (readonly)
Returns the value of attribute scala_home.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def scala_home @scala_home end |
#stripper ⇒ Object (readonly)
Returns the value of attribute stripper.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def stripper @stripper end |
#tdsi ⇒ Object (readonly)
Returns the value of attribute tdsi.
26 27 28 |
# File 'lib/buildr/as3/apparat.rb', line 26 def tdsi @tdsi end |
Instance Method Details
#from(url) ⇒ Object
64 65 66 67 |
# File 'lib/buildr/as3/apparat.rb', line 64 def from(url) @url = url self end |
#invoke ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/buildr/as3/apparat.rb', line 38 def invoke if @url Buildr.artifact(@spec).from(Buildr.download(@url)).invoke unless File.exists? @apparat_zip.to_s else Buildr.artifact(@spec).invoke unless File.exists? @apparat_zip.to_s end unless File.exists? @apparat_dir puts "Unzipping Apparat, this might take a while." unzip_dir = File.dirname @apparat_dir if Buildr::Util.win_os? puts "Please make sure unzip is installed and in your PATH variable!" unzip @apparat_zip, unzip_dir else begin Buildr.unzip(unzip_dir.to_s=>@apparat_zip.to_s).target.invoke rescue TypeError puts "RubyZip extract failed, trying system unzip now." unzip @apparat_zip, unzip_dir end end end self end |
#scala(scala_home) ⇒ Object
69 70 71 72 |
# File 'lib/buildr/as3/apparat.rb', line 69 def scala(scala_home) @scala_home = scala_home self end |