buildr-as3 0.2.22.pre → 0.2.23.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.22.pre
1
+ 0.2.23.pre
data/buildr-as3.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "buildr-as3"
8
- s.version = "0.2.22.pre"
8
+ s.version = "0.2.23.pre"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dominic Graefen"]
12
- s.date = "2011-10-03"
12
+ s.date = "2011-10-30"
13
13
  s.description = "Build like you code - now supporting ActionScript 3 & Flex"
14
14
  s.email = "dominic @nospam@ devboy.org"
15
15
  s.executables = ["buildr-as3"]
@@ -36,7 +36,6 @@ Gem::Specification.new do |s|
36
36
  "lib/buildr/as3/compiler/mxmlc.rb",
37
37
  "lib/buildr/as3/compiler/task.rb",
38
38
  "lib/buildr/as3/doc.rb",
39
- "lib/buildr/as3/doc/asdoc.rb",
40
39
  "lib/buildr/as3/ide.rb",
41
40
  "lib/buildr/as3/ide/fdt4.rb",
42
41
  "lib/buildr/as3/packaging.rb",
@@ -69,7 +68,7 @@ Gem::Specification.new do |s|
69
68
  s.homepage = "http://github.com/devboy/buildr_as3"
70
69
  s.licenses = ["MIT"]
71
70
  s.require_paths = ["lib"]
72
- s.rubygems_version = "1.8.10"
71
+ s.rubygems_version = "1.8.11"
73
72
  s.summary = "Buildr extension to allow ActionScript3/Flex development."
74
73
  s.test_files = [
75
74
  "spec/as3/compiler/aircompc_spec.rb",
@@ -1,29 +1,68 @@
1
- #
2
- # Copyright (C) 2011 by Dominic Graefen / http://devboy.org
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
-
23
- require "buildr"
24
-
25
- require "#{File.dirname(__FILE__)}/doc/asdoc"
26
-
27
- class Buildr::Project
28
- include Buildr::AS3::Doc::AsDoc
29
- end
1
+ require 'buildr/core/doc'
2
+
3
+ module Buildr
4
+ module Doc
5
+
6
+ module AsdocDefaults
7
+ include Extension
8
+
9
+ after_define(:asdoc => :doc) do |project|
10
+ if project.doc.engine? Asdoc
11
+ options = project.doc.options
12
+ options[:maintitle] = (project.comment || project.name) unless options[:maintitle]
13
+ end
14
+ end
15
+ end
16
+
17
+ class Asdoc < Base
18
+
19
+ specify :language => :actionscript, :source_ext => ["as", "mxml"]
20
+
21
+ def generate(sources, target, options = {})
22
+
23
+ flexsdk = @project.compile.options[:flexsdk].invoke
24
+ cmd_args = []
25
+ cmd_args << "-jar" << flexsdk.asdoc_jar
26
+ cmd_args << "+flexlib" << "#{flexsdk.home}/frameworks"
27
+ cmd_args << "-load-config" << flexsdk.flex_config
28
+ cmd_args << "-main-title" << options[:maintitle]
29
+ cmd_args << "-window-title" << options[:windowtitle] if options.has_key? :windowtitle
30
+ cmd_args += generate_source_args @project.compile.sources
31
+ cmd_args += generate_dependency_args @project.compile.dependencies
32
+ cmd_args += options[:args] if options.has_key? :args
33
+ cmd_args << "-output" << target
34
+
35
+ unless Buildr.application.options.dryrun
36
+ info "Generating ASDoc for #{project.name}"
37
+ trace (['java'] + cmd_args).join(' ')
38
+ Java.load
39
+ Java::Commands.java cmd_args
40
+ end
41
+
42
+ end
43
+
44
+ private
45
+
46
+ def generate_source_args(sources) #:nodoc:
47
+ source_args = []
48
+ sources.each { |source|
49
+ source_args << "-source-path+=#{source}"
50
+ source_args << "-doc-sources+=#{source}"
51
+ }
52
+ source_args
53
+ end
54
+
55
+ def generate_dependency_args(dependencies) #:nodoc:
56
+ dependency_args = []
57
+ dependencies.each { |source| dependency_args << "-library-path+=#{source}" }
58
+ dependency_args
59
+ end
60
+ end
61
+ end
62
+
63
+ class Project
64
+ include AsdocDefaults
65
+ end
66
+ end
67
+
68
+ Buildr::Doc.engines << Buildr::Doc::Asdoc
@@ -45,7 +45,7 @@ module Buildr
45
45
  "com.adobe.flexunit:flexunitUnitTasks:jar:#{VERSION}"
46
46
  end
47
47
 
48
- def swc_dependencies
48
+ def swcs
49
49
  [
50
50
  "com.adobe.flexunit:flexunit:swc:as3_#{FLEX_SDK_VERSION}:#{VERSION}",
51
51
  "com.adobe.flexunit:flexunit:swc:flex_#{FLEX_SDK_VERSION}:#{VERSION}",
@@ -81,8 +81,12 @@ module Buildr
81
81
  project_dir = Dir.getwd
82
82
  Dir.chdir report_dir
83
83
 
84
- taskdef = Buildr.artifact(FlexUnit4.flexunit_taskdef)
85
- taskdef.invoke
84
+ unless options[:antjar]
85
+ taskdef = Buildr.artifact(FlexUnit4.flexunit_taskdef)
86
+ taskdef.invoke
87
+ else
88
+ taskdef = options[:antjar]
89
+ end
86
90
 
87
91
  player = "air" if [:airmxmlc, :airompc].include?(task.project.compile.compiler) || options[:player] == "air"
88
92
  player ||= "flash"
@@ -103,9 +107,9 @@ module Buildr
103
107
  :display => options[:display] || 99,
104
108
  :swf => task.project.get_as3_output(true)
105
109
 
106
- ant.taskdef :name=>'junitreport',
107
- :classname=>'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
108
- :classpath=>Buildr.artifacts(JUnit.ant_taskdef).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
110
+ ant.taskdef :name=>'junitreport',
111
+ :classname=>'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
112
+ :classpath=>Buildr.artifacts(JUnit.ant_taskdef).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
109
113
 
110
114
  unless options[:htmlreport] == false
111
115
  ant.junitreport :todir => report_dir do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildr-as3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22.pre
4
+ version: 0.2.23.pre
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-03 00:00:00.000000000Z
12
+ date: 2011-10-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
16
- requirement: &2157156780 !ruby/object:Gem::Requirement
16
+ requirement: &2156948180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2157156780
24
+ version_requirements: *2156948180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &2157155420 !ruby/object:Gem::Requirement
27
+ requirement: &2156946940 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2157155420
35
+ version_requirements: *2156946940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &2157153800 !ruby/object:Gem::Requirement
38
+ requirement: &2156945800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.5.2
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2157153800
46
+ version_requirements: *2156945800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: buildr
49
- requirement: &2157152500 !ruby/object:Gem::Requirement
49
+ requirement: &2156944600 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.4.6
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2157152500
57
+ version_requirements: *2156944600
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: simplecov
60
- requirement: &2157151460 !ruby/object:Gem::Requirement
60
+ requirement: &2156943180 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2157151460
68
+ version_requirements: *2156943180
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov-rcov
71
- requirement: &2157149740 !ruby/object:Gem::Requirement
71
+ requirement: &2156942020 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2157149740
79
+ version_requirements: *2156942020
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &2157148500 !ruby/object:Gem::Requirement
82
+ requirement: &2156941100 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 2.1.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2157148500
90
+ version_requirements: *2156941100
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: ci_reporter
93
- requirement: &2157146860 !ruby/object:Gem::Requirement
93
+ requirement: &2156940040 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.6.5
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2157146860
101
+ version_requirements: *2156940040
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: buildr
104
- requirement: &2157145020 !ruby/object:Gem::Requirement
104
+ requirement: &2156938780 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: 1.4.6
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *2157145020
112
+ version_requirements: *2156938780
113
113
  description: Build like you code - now supporting ActionScript 3 & Flex
114
114
  email: dominic @nospam@ devboy.org
115
115
  executables:
@@ -137,7 +137,6 @@ files:
137
137
  - lib/buildr/as3/compiler/mxmlc.rb
138
138
  - lib/buildr/as3/compiler/task.rb
139
139
  - lib/buildr/as3/doc.rb
140
- - lib/buildr/as3/doc/asdoc.rb
141
140
  - lib/buildr/as3/ide.rb
142
141
  - lib/buildr/as3/ide/fdt4.rb
143
142
  - lib/buildr/as3/packaging.rb
@@ -181,7 +180,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
180
  version: '0'
182
181
  segments:
183
182
  - 0
184
- hash: -2275844012035397510
183
+ hash: 727532045536068807
185
184
  required_rubygems_version: !ruby/object:Gem::Requirement
186
185
  none: false
187
186
  requirements:
@@ -190,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
189
  version: 1.3.1
191
190
  requirements: []
192
191
  rubyforge_project:
193
- rubygems_version: 1.8.10
192
+ rubygems_version: 1.8.11
194
193
  signing_key:
195
194
  specification_version: 3
196
195
  summary: Buildr extension to allow ActionScript3/Flex development.
@@ -1,75 +0,0 @@
1
- #
2
- # Copyright (C) 2011 by Dominic Graefen / http://devboy.org
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
-
23
- require 'buildr'
24
-
25
- module Buildr
26
- module AS3
27
- module Doc
28
- module AsDoc
29
-
30
- include Buildr::Extension
31
-
32
- first_time do
33
- desc "Generates asdoc documentation."
34
- Project.local_task('asdoc')
35
- end
36
-
37
- before_define do |project|
38
- project.recursive_task("asdoc")
39
- end
40
-
41
- after_define("asdoc" => :doc) do |project|
42
- project.task("asdoc") do
43
-
44
- if project.compile.language == :actionscript
45
-
46
- sources = project.compile.sources
47
- dependencies = project.compile.dependencies
48
-
49
- flex_sdk = project.compile.options[:flexsdk].invoke
50
- output = project.base_dir + "/target/docs"
51
- cmd_args = []
52
- cmd_args << "-classpath" << "#{flex_sdk.home}/lib/xalan.jar"
53
- cmd_args << "-classpath" << flex_sdk.asdoc_jar
54
- cmd_args << "flex2.tools.ASDoc"
55
- cmd_args << "+flexlib" << "#{flex_sdk.home}/frameworks"
56
- cmd_args << "-load-config" << flex_sdk.flex_config
57
- cmd_args << "-output" << output
58
- sources.each { |source| cmd_args << "-source-path+=#{source}" }
59
- sources.each { |source| cmd_args << "-doc-sources+=#{source}" }
60
- cmd_args << "-templates-path" << flex_sdk.asdoc_templates
61
- cmd_args << "-library-path+=#{dependencies.join(",")}" unless dependencies.empty?
62
-
63
- unless Buildr.application.options.dryrun
64
- trace "java #{cmd_args.join(" ")}"
65
- Java::Commands.java cmd_args
66
- end
67
-
68
- end
69
- end
70
-
71
- end
72
- end
73
- end
74
- end
75
- end