buildr-hx 0.0.16.pre → 0.0.17.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 +1 -1
- data/buildr-hx.gemspec +10 -35
- data/buildr-hx.iml +0 -28
- data/spec/spec_helper.rb +1 -1
- metadata +71 -49
- data/lib/buildr/hx/compiler/haxe_compiler_base.rb +0 -131
- data/lib/buildr/hx/compiler/hxas3.rb +0 -16
- data/lib/buildr/hx/compiler/hxcpp.rb +0 -16
- data/lib/buildr/hx/compiler/hxjs.rb +0 -18
- data/lib/buildr/hx/compiler/hxlib.rb +0 -27
- data/lib/buildr/hx/compiler/hxneko.rb +0 -18
- data/lib/buildr/hx/compiler/hxphp.rb +0 -16
- data/lib/buildr/hx/compiler/hxswf.rb +0 -25
- data/lib/buildr/hx/compiler/hxxml.rb +0 -18
- data/lib/buildr/hx/compiler.rb +0 -40
- data/lib/buildr/hx/core/haxe_lib.rb +0 -64
- data/lib/buildr/hx/core.rb +0 -1
- data/lib/buildr/hx/packaging/haxelib.rb +0 -84
- data/lib/buildr/hx/packaging/hxlib.rb +0 -78
- data/lib/buildr/hx/packaging.rb +0 -27
- data/lib/buildr/hx/test/base.rb +0 -25
- data/lib/buildr/hx/test/munit.rb +0 -90
- data/lib/buildr/hx/test.rb +0 -4
- data/lib/buildr/hx.rb +0 -6
- data/spec/hx/compiler/hxswf_spec.rb +0 -9
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1.pre
|
data/buildr-hx.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "buildr-hx"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.17.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 = "2012-
|
12
|
+
s.date = "2012-03-30"
|
13
13
|
s.description = "Build like you code - now supporting haXe"
|
14
14
|
s.email = "dominic @nospam@ devboy.org"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,52 +26,27 @@ Gem::Specification.new do |s|
|
|
26
26
|
"VERSION",
|
27
27
|
"buildr-hx.gemspec",
|
28
28
|
"buildr-hx.iml",
|
29
|
-
"lib/buildr/hx.rb",
|
30
|
-
"lib/buildr/hx/compiler.rb",
|
31
|
-
"lib/buildr/hx/compiler/haxe_compiler_base.rb",
|
32
|
-
"lib/buildr/hx/compiler/hxas3.rb",
|
33
|
-
"lib/buildr/hx/compiler/hxcpp.rb",
|
34
|
-
"lib/buildr/hx/compiler/hxjs.rb",
|
35
|
-
"lib/buildr/hx/compiler/hxlib.rb",
|
36
|
-
"lib/buildr/hx/compiler/hxneko.rb",
|
37
|
-
"lib/buildr/hx/compiler/hxphp.rb",
|
38
|
-
"lib/buildr/hx/compiler/hxswf.rb",
|
39
|
-
"lib/buildr/hx/compiler/hxxml.rb",
|
40
|
-
"lib/buildr/hx/core.rb",
|
41
|
-
"lib/buildr/hx/core/haxe_lib.rb",
|
42
|
-
"lib/buildr/hx/packaging.rb",
|
43
|
-
"lib/buildr/hx/packaging/haxelib.rb",
|
44
|
-
"lib/buildr/hx/packaging/hxlib.rb",
|
45
|
-
"lib/buildr/hx/test.rb",
|
46
|
-
"lib/buildr/hx/test/base.rb",
|
47
|
-
"lib/buildr/hx/test/munit.rb",
|
48
29
|
"rake/jeweler.rb",
|
49
30
|
"rake/jeweler_prerelease_tasks.rb",
|
50
31
|
"rake/pre_release_gemspec.rb",
|
51
32
|
"rake/pre_release_to_git.rb",
|
52
|
-
"spec/hx/compiler/hxswf_spec.rb",
|
53
33
|
"spec/sandbox.rb",
|
54
34
|
"spec/spec_helper.rb"
|
55
35
|
]
|
56
36
|
s.homepage = "http://github.com/devboy/buildr-hx"
|
57
37
|
s.licenses = ["MIT"]
|
58
38
|
s.require_paths = ["lib"]
|
59
|
-
s.rubygems_version = "1.8.
|
39
|
+
s.rubygems_version = "1.8.21"
|
60
40
|
s.summary = "Buildr extension to allow haXe development."
|
61
|
-
s.test_files = [
|
62
|
-
"spec/hx/compiler/hxswf_spec.rb",
|
63
|
-
"spec/sandbox.rb",
|
64
|
-
"spec/spec_helper.rb"
|
65
|
-
]
|
66
41
|
|
67
42
|
if s.respond_to? :specification_version then
|
68
43
|
s.specification_version = 3
|
69
44
|
|
70
45
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
71
|
-
s.
|
46
|
+
s.add_runtime_dependency(%q<buildr>, ["~> 1.4.6"])
|
72
47
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
73
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.
|
74
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
48
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.1.3"])
|
49
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
75
50
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
76
51
|
s.add_development_dependency(%q<simplecov-rcov>, [">= 0"])
|
77
52
|
s.add_development_dependency(%q<rspec>, ["~> 2.1.0"])
|
@@ -80,8 +55,8 @@ Gem::Specification.new do |s|
|
|
80
55
|
else
|
81
56
|
s.add_dependency(%q<buildr>, ["~> 1.4.6"])
|
82
57
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
83
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
84
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
58
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.3"])
|
59
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
85
60
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
86
61
|
s.add_dependency(%q<simplecov-rcov>, [">= 0"])
|
87
62
|
s.add_dependency(%q<rspec>, ["~> 2.1.0"])
|
@@ -91,8 +66,8 @@ Gem::Specification.new do |s|
|
|
91
66
|
else
|
92
67
|
s.add_dependency(%q<buildr>, ["~> 1.4.6"])
|
93
68
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
94
|
-
s.add_dependency(%q<bundler>, ["~> 1.
|
95
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
69
|
+
s.add_dependency(%q<bundler>, ["~> 1.1.3"])
|
70
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
96
71
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
97
72
|
s.add_dependency(%q<simplecov-rcov>, [">= 0"])
|
98
73
|
s.add_dependency(%q<rspec>, ["~> 2.1.0"])
|
data/buildr-hx.iml
CHANGED
@@ -5,34 +5,6 @@
|
|
5
5
|
<content url="file://$MODULE_DIR$" />
|
6
6
|
<orderEntry type="jdk" jdkName="RVM: ruby-1.9.2-p180" jdkType="RUBY_SDK" />
|
7
7
|
<orderEntry type="sourceFolder" forTests="false" />
|
8
|
-
<orderEntry type="library" scope="PROVIDED" name="atoulme-Antwrap (v0.7.1, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
9
|
-
<orderEntry type="library" scope="PROVIDED" name="builder (v2.1.2, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
10
|
-
<orderEntry type="library" scope="PROVIDED" name="buildr (v1.4.6, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
11
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.0.21, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
12
|
-
<orderEntry type="library" scope="PROVIDED" name="ci_reporter (v1.6.5, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.2, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="git (v1.2.5, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="highline (v1.5.1, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="hoe (v2.3.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="jeweler (v1.5.2, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="json_pure (v1.4.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="minitar (v0.5.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.0.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="net-sftp (v2.0.4, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.0.23, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v0.8.7, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rjb (v1.3.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.1.0, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.1.0, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.1.0, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.1.0, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="rubyforge (v2.0.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v0.9.4, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="shoulda (v2.11.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.5.4, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.5.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov-rcov (v0.2.3, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="xml-simple (v1.0.12, RVM: ruby-1.9.2-p180) [gem]" level="application" />
|
36
8
|
</component>
|
37
9
|
</module>
|
38
10
|
|
data/spec/spec_helper.rb
CHANGED
@@ -44,7 +44,7 @@ unless defined?(SpecHelpers)
|
|
44
44
|
require path
|
45
45
|
end
|
46
46
|
#require 'buildr'
|
47
|
-
require File.dirname( __FILE__) + '/../lib/buildr/
|
47
|
+
require File.dirname( __FILE__) + '/../lib/buildr/as3'
|
48
48
|
# load ecj
|
49
49
|
#require 'buildr/java/ecj'
|
50
50
|
#Make ecj appear as a compiler that doesn't apply:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildr-hx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17.pre
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,27 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: buildr
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 1.4.6
|
22
|
-
type: :
|
22
|
+
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.4.6
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: shoulda
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,32 +37,47 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: bundler
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
42
52
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
53
|
+
version: 1.1.3
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.1.3
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: jeweler
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
69
|
+
version: 1.8.3
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.8.3
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: simplecov
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ! '>='
|
@@ -65,10 +85,15 @@ dependencies:
|
|
65
85
|
version: '0'
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: simplecov-rcov
|
71
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
98
|
requirements:
|
74
99
|
- - ! '>='
|
@@ -76,10 +101,15 @@ dependencies:
|
|
76
101
|
version: '0'
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
80
110
|
- !ruby/object:Gem::Dependency
|
81
111
|
name: rspec
|
82
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
114
|
requirements:
|
85
115
|
- - ~>
|
@@ -87,10 +117,15 @@ dependencies:
|
|
87
117
|
version: 2.1.0
|
88
118
|
type: :development
|
89
119
|
prerelease: false
|
90
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 2.1.0
|
91
126
|
- !ruby/object:Gem::Dependency
|
92
127
|
name: ci_reporter
|
93
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
94
129
|
none: false
|
95
130
|
requirements:
|
96
131
|
- - ~>
|
@@ -98,10 +133,15 @@ dependencies:
|
|
98
133
|
version: 1.6.5
|
99
134
|
type: :development
|
100
135
|
prerelease: false
|
101
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.6.5
|
102
142
|
- !ruby/object:Gem::Dependency
|
103
143
|
name: buildr
|
104
|
-
requirement:
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
105
145
|
none: false
|
106
146
|
requirements:
|
107
147
|
- - ! '>='
|
@@ -109,7 +149,12 @@ dependencies:
|
|
109
149
|
version: 1.4.6
|
110
150
|
type: :runtime
|
111
151
|
prerelease: false
|
112
|
-
version_requirements:
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 1.4.6
|
113
158
|
description: Build like you code - now supporting haXe
|
114
159
|
email: dominic @nospam@ devboy.org
|
115
160
|
executables: []
|
@@ -127,30 +172,10 @@ files:
|
|
127
172
|
- VERSION
|
128
173
|
- buildr-hx.gemspec
|
129
174
|
- buildr-hx.iml
|
130
|
-
- lib/buildr/hx.rb
|
131
|
-
- lib/buildr/hx/compiler.rb
|
132
|
-
- lib/buildr/hx/compiler/haxe_compiler_base.rb
|
133
|
-
- lib/buildr/hx/compiler/hxas3.rb
|
134
|
-
- lib/buildr/hx/compiler/hxcpp.rb
|
135
|
-
- lib/buildr/hx/compiler/hxjs.rb
|
136
|
-
- lib/buildr/hx/compiler/hxlib.rb
|
137
|
-
- lib/buildr/hx/compiler/hxneko.rb
|
138
|
-
- lib/buildr/hx/compiler/hxphp.rb
|
139
|
-
- lib/buildr/hx/compiler/hxswf.rb
|
140
|
-
- lib/buildr/hx/compiler/hxxml.rb
|
141
|
-
- lib/buildr/hx/core.rb
|
142
|
-
- lib/buildr/hx/core/haxe_lib.rb
|
143
|
-
- lib/buildr/hx/packaging.rb
|
144
|
-
- lib/buildr/hx/packaging/haxelib.rb
|
145
|
-
- lib/buildr/hx/packaging/hxlib.rb
|
146
|
-
- lib/buildr/hx/test.rb
|
147
|
-
- lib/buildr/hx/test/base.rb
|
148
|
-
- lib/buildr/hx/test/munit.rb
|
149
175
|
- rake/jeweler.rb
|
150
176
|
- rake/jeweler_prerelease_tasks.rb
|
151
177
|
- rake/pre_release_gemspec.rb
|
152
178
|
- rake/pre_release_to_git.rb
|
153
|
-
- spec/hx/compiler/hxswf_spec.rb
|
154
179
|
- spec/sandbox.rb
|
155
180
|
- spec/spec_helper.rb
|
156
181
|
homepage: http://github.com/devboy/buildr-hx
|
@@ -168,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
193
|
version: '0'
|
169
194
|
segments:
|
170
195
|
- 0
|
171
|
-
hash:
|
196
|
+
hash: -2732739556421316452
|
172
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
198
|
none: false
|
174
199
|
requirements:
|
@@ -177,11 +202,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
202
|
version: 1.3.1
|
178
203
|
requirements: []
|
179
204
|
rubyforge_project:
|
180
|
-
rubygems_version: 1.8.
|
205
|
+
rubygems_version: 1.8.21
|
181
206
|
signing_key:
|
182
207
|
specification_version: 3
|
183
208
|
summary: Buildr extension to allow haXe development.
|
184
|
-
test_files:
|
185
|
-
- spec/hx/compiler/hxswf_spec.rb
|
186
|
-
- spec/sandbox.rb
|
187
|
-
- spec/spec_helper.rb
|
209
|
+
test_files: []
|
@@ -1,131 +0,0 @@
|
|
1
|
-
module Buildr
|
2
|
-
module Haxe
|
3
|
-
module Compiler
|
4
|
-
class HaxeCompilerBase < Buildr::Compiler::Base
|
5
|
-
|
6
|
-
COMPILE_OPTIONS = [:warnings, :debug, :args, :main, :output, :hxml, :resources, :flags]
|
7
|
-
|
8
|
-
def initialize(project, options)
|
9
|
-
super
|
10
|
-
options[:debug] = Buildr.options.debug if options[:debug].nil?
|
11
|
-
options[:warnings] ||= true
|
12
|
-
end
|
13
|
-
|
14
|
-
def compile(sources, target, dependencies)
|
15
|
-
check_options options, COMPILE_OPTIONS
|
16
|
-
@output = get_output_file(target)
|
17
|
-
is_test = is_test?(sources, target, dependencies)
|
18
|
-
args = ["haxe"]
|
19
|
-
sources += @project.compile.sources.map(&:to_s) if is_test
|
20
|
-
args += generate_source_args sources
|
21
|
-
args += generate_dependency_args dependencies
|
22
|
-
args += base_compiler_args
|
23
|
-
args += compiler_args if respond_to? :compiler_args
|
24
|
-
unless Buildr.application.options.dryrun
|
25
|
-
create_hxml args, is_test
|
26
|
-
appwd = Dir.pwd
|
27
|
-
Dir.chdir @project.base_dir
|
28
|
-
fail("Compilation failed!") unless sh args.join " "
|
29
|
-
Dir.chdir appwd
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def needed?(sources, target, dependencies)
|
34
|
-
return true unless File.exist? get_output_file(target)
|
35
|
-
source_files = Dir.glob(sources.collect { |source| "#{source}/**/*" })
|
36
|
-
dep_files = dependencies.collect { |dep|
|
37
|
-
File.directory?(dep) ? Dir.glob("#{dep}/**/*") : dep
|
38
|
-
}.flatten
|
39
|
-
maxtime = (source_files + dep_files).collect { |file| File.stat(file).mtime }.max || Time.at(0)
|
40
|
-
maxtime > File.stat(get_output_file(target)).mtime
|
41
|
-
end
|
42
|
-
|
43
|
-
protected
|
44
|
-
|
45
|
-
def base_compiler_args #:nodoc:
|
46
|
-
args = []
|
47
|
-
args << "-main #{options[:main]}"
|
48
|
-
args << '-debug' if options[:debug]
|
49
|
-
args += options[:resources].map{|id,path| "-resource #{path}@#{id.to_s}"} unless options[:resources].nil?
|
50
|
-
args += options[:flags].map{|flag| "-D #{flag.to_s}"} unless options[:flags].nil?
|
51
|
-
args + Array(options[:args])
|
52
|
-
end
|
53
|
-
|
54
|
-
def generate_source_args sources
|
55
|
-
sources.collect { |source| "-cp #{source}" }
|
56
|
-
end
|
57
|
-
|
58
|
-
def generate_dependency_args dependencies
|
59
|
-
args = []
|
60
|
-
dependencies.each { |dep|
|
61
|
-
spec = HaxeLib.path_to_spec(dep)
|
62
|
-
if spec
|
63
|
-
args << "-lib #{spec[:id]}:#{spec[:version]}"
|
64
|
-
#elsif File.extname(dep) == ".zip" && Buildr.zip(dep).contain?("haxelib.xml")
|
65
|
-
# xml = Zip::ZipFile.open(dep) { |zip| zip.file.read("haxelib.xml") }
|
66
|
-
# require 'rexml/document'
|
67
|
-
# doc = REXML::Document.new(xml)
|
68
|
-
# id = doc.root.attribute("name")
|
69
|
-
# version = doc.root.elements['version'].attribute("name")
|
70
|
-
# fail "Could not install #{id}:#{version}." unless install_haxelib_zip dep
|
71
|
-
# args << "-lib #{id}:#{version}"
|
72
|
-
elsif File.extname(dep) == ".swf"
|
73
|
-
args << "-swf-lib #{dep}"
|
74
|
-
elsif File.extname(dep) == ".hxlib"
|
75
|
-
args += File.read(dep).split("\n").map{ |dep|
|
76
|
-
dep.start_with?("-cp") ? "-cp #{File.join(root_project_dir, dep.gsub("-cp ", "").strip )}" : dep
|
77
|
-
}
|
78
|
-
end
|
79
|
-
}
|
80
|
-
args
|
81
|
-
end
|
82
|
-
|
83
|
-
def install_haxelib_zip zip
|
84
|
-
system "haxelib test #{zip}"
|
85
|
-
end
|
86
|
-
|
87
|
-
def is_test?(sources, target, dependencies)
|
88
|
-
test_task = @project.test.compile
|
89
|
-
sources==test_task.sources && dependencies==test_task.dependencies.collect { |dep| dep.to_s } && target==test_task.target.to_s
|
90
|
-
end
|
91
|
-
|
92
|
-
def get_output_file target
|
93
|
-
file = "#{@project.name.split(":").last}.#{self.class.packaging.to_s}"
|
94
|
-
file = options[:output] unless options[:output].nil?
|
95
|
-
File.join(target.to_s, file)
|
96
|
-
end
|
97
|
-
|
98
|
-
def create_hxml( args, is_test )
|
99
|
-
file = File.join(@project.base_dir, options[:hxml] || is_test ? "test.hxml" : "compile.hxml")
|
100
|
-
puts "Creating hxml '#{file}'"
|
101
|
-
with_path = ["cp", "swf-lib", "swf", "js", "as3", "cpp", "neko", "xml", "swf9", "resource"].map{|p|"-#{p}"}
|
102
|
-
File.open(file, 'w') {|f| f.write(
|
103
|
-
args.reject{|a| a == "haxe"}.
|
104
|
-
map{|a|
|
105
|
-
cmd = a.split(" ").first
|
106
|
-
if with_path.include? cmd
|
107
|
-
path = a.gsub(cmd,"").strip
|
108
|
-
path, id = path.split("@") if cmd == "-resource"
|
109
|
-
path = relative_path(path,@project.base_dir)
|
110
|
-
entry = "#{cmd} #{path}"
|
111
|
-
id.nil? ? entry : entry + "@#{id}"
|
112
|
-
else
|
113
|
-
a
|
114
|
-
end
|
115
|
-
}.
|
116
|
-
join("\n")
|
117
|
-
) }
|
118
|
-
end
|
119
|
-
|
120
|
-
def relative_path path, from
|
121
|
-
Pathname.new(path).relative_path_from(Pathname.new(from)).to_s
|
122
|
-
end
|
123
|
-
|
124
|
-
def root_project_dir
|
125
|
-
Buildr.application.instance_eval { find_rakefile_location.last }
|
126
|
-
end
|
127
|
-
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Buildr
|
2
|
-
module Haxe
|
3
|
-
module Compiler
|
4
|
-
class HXJS < HaxeCompilerBase
|
5
|
-
|
6
|
-
specify :language => :haxe,
|
7
|
-
:sources => :hx, :source_ext => :hx,
|
8
|
-
:target_ext => "js",
|
9
|
-
:packaging => :js
|
10
|
-
|
11
|
-
def compiler_args
|
12
|
-
[ "-js #{@output}" ]
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require "fileutils"
|
2
|
-
require "pathname"
|
3
|
-
|
4
|
-
module Buildr
|
5
|
-
module Haxe
|
6
|
-
module Compiler
|
7
|
-
class HXLib < HaxeCompilerBase
|
8
|
-
|
9
|
-
specify :language => :haxe,
|
10
|
-
:sources => :hx, :source_ext => :hx,
|
11
|
-
:packaging => :hxlib
|
12
|
-
|
13
|
-
def compile(sources, target, dependencies)
|
14
|
-
dependency_list = (generate_dependency_args(dependencies) + generate_source_args(sources)).
|
15
|
-
reject{|dep| !( dep.start_with?("-cp") || dep.start_with?("-lib") ) }.
|
16
|
-
map{ |dep|
|
17
|
-
dep.start_with?("-cp") ? "-cp #{relative_path( dep.gsub("-cp ", "").strip, root_project_dir )}" : dep
|
18
|
-
}
|
19
|
-
file = get_output_file(target)
|
20
|
-
FileUtils.mkdir_p File.dirname(file)
|
21
|
-
File.open(file, 'w') {|f| f.write( dependency_list.join("\n") ) }
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Buildr
|
2
|
-
module Haxe
|
3
|
-
module Compiler
|
4
|
-
class HXNeko < HaxeCompilerBase
|
5
|
-
|
6
|
-
specify :language => :haxe,
|
7
|
-
:sources => :hx, :source_ext => :hx,
|
8
|
-
:target_ext => "n",
|
9
|
-
:packaging => :n
|
10
|
-
|
11
|
-
def compiler_args
|
12
|
-
[ "-neko #{@output}" ]
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Buildr
|
2
|
-
module Haxe
|
3
|
-
module Compiler
|
4
|
-
class HXSWF < HaxeCompilerBase
|
5
|
-
|
6
|
-
specify :language => :haxe,
|
7
|
-
:sources => :hx, :source_ext => :hx,
|
8
|
-
:target_ext => "swf",
|
9
|
-
:packaging => :swf
|
10
|
-
|
11
|
-
COMPILE_OPTIONS << :swfversion << :swfheader << :flashstrict << :apparat
|
12
|
-
|
13
|
-
def compiler_args
|
14
|
-
args = []
|
15
|
-
args << "-swf #{@output}"
|
16
|
-
args << "-swf-version #{options[:swfversion]}"
|
17
|
-
args << "-swf-header #{options[:swfheader]}" unless options[:swfheader].nil?
|
18
|
-
args << "--flash-strict" if options[:flashstrict]
|
19
|
-
args
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Buildr
|
2
|
-
module Haxe
|
3
|
-
module Compiler
|
4
|
-
class HXXML < HaxeCompilerBase
|
5
|
-
|
6
|
-
specify :language => :haxe,
|
7
|
-
:sources => :hx, :source_ext => :hx,
|
8
|
-
:target_ext => "xml",
|
9
|
-
:packaging => :xml
|
10
|
-
|
11
|
-
def compiler_args
|
12
|
-
[ "-xml #{@output}" ]
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/lib/buildr/hx/compiler.rb
DELETED
@@ -1,40 +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 File.dirname(__FILE__) + '/compiler/haxe_compiler_base'
|
24
|
-
require File.dirname(__FILE__) + '/compiler/hxswf'
|
25
|
-
require File.dirname(__FILE__) + '/compiler/hxjs'
|
26
|
-
require File.dirname(__FILE__) + '/compiler/hxneko'
|
27
|
-
require File.dirname(__FILE__) + '/compiler/hxphp'
|
28
|
-
require File.dirname(__FILE__) + '/compiler/hxxml'
|
29
|
-
require File.dirname(__FILE__) + '/compiler/hxas3'
|
30
|
-
require File.dirname(__FILE__) + '/compiler/hxcpp'
|
31
|
-
require File.dirname(__FILE__) + '/compiler/hxlib'
|
32
|
-
|
33
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXSWF
|
34
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXJS
|
35
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXNeko
|
36
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXPHP
|
37
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXXML
|
38
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXAS3
|
39
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXCPP
|
40
|
-
Buildr::Compiler << Buildr::Haxe::Compiler::HXLib
|
@@ -1,64 +0,0 @@
|
|
1
|
-
class HaxeLib < Rake::FileTask
|
2
|
-
class << self
|
3
|
-
def home
|
4
|
-
`haxelib config`.chomp
|
5
|
-
end
|
6
|
-
|
7
|
-
def spec_to_path spec
|
8
|
-
id, version = spec.split(":")
|
9
|
-
fail("No version number provided for haxelib '#{id}'!") if version.nil?
|
10
|
-
File.join( home, id, version.gsub(".",",") )
|
11
|
-
end
|
12
|
-
|
13
|
-
def path_to_spec path
|
14
|
-
id, version = path.gsub(home,"").split(File::SEPARATOR)
|
15
|
-
return nil unless id && version && path.include?(home)
|
16
|
-
{:id => id, :version => version.gsub(",",".")}
|
17
|
-
end
|
18
|
-
|
19
|
-
def lookup spec
|
20
|
-
id, version = spec.split(":")
|
21
|
-
task = HaxeLib.define_task( spec_to_path spec )
|
22
|
-
task.id = id
|
23
|
-
task.version = version
|
24
|
-
task
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
attr_accessor :id, :version
|
29
|
-
|
30
|
-
def initialize(*args)
|
31
|
-
super
|
32
|
-
enhance do |task|
|
33
|
-
task.enhance do
|
34
|
-
if download_needed?
|
35
|
-
info "Downloading #{to_spec}"
|
36
|
-
download
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def download
|
43
|
-
fail( "Could not download #{to_spec}") unless system "haxelib install #{id} #{version}"
|
44
|
-
end
|
45
|
-
|
46
|
-
def download_needed?
|
47
|
-
!File.exists?(name)
|
48
|
-
end
|
49
|
-
|
50
|
-
def to_spec
|
51
|
-
"#{id}:#{version}"
|
52
|
-
end
|
53
|
-
|
54
|
-
def to_spec_hash
|
55
|
-
{:id => @id, :version => @version}
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
module Buildr
|
61
|
-
def haxelib spec
|
62
|
-
HaxeLib.lookup(spec)
|
63
|
-
end
|
64
|
-
end
|
data/lib/buildr/hx/core.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/core/haxe_lib'
|
@@ -1,84 +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
|
-
require "fileutils"
|
25
|
-
|
26
|
-
module Buildr
|
27
|
-
module Haxe
|
28
|
-
module Packaging
|
29
|
-
include Extension
|
30
|
-
|
31
|
-
class HaxelibTask < Buildr::ZipTask
|
32
|
-
|
33
|
-
def initialize(*args) #:nodoc:
|
34
|
-
super
|
35
|
-
enhance do
|
36
|
-
include *@project.compile.sources.collect { |src| File.join(src, "**", "*") }
|
37
|
-
xml = @project._("haxelib.xml")
|
38
|
-
File.open(xml, 'w') {|f| f.write(haxelib_xml) }
|
39
|
-
include xml
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
attr_accessor :url, :license, :tags, :user
|
44
|
-
|
45
|
-
protected
|
46
|
-
|
47
|
-
def associate(project)
|
48
|
-
@project = project
|
49
|
-
end
|
50
|
-
|
51
|
-
def haxelib_xml
|
52
|
-
buffer =''
|
53
|
-
xml = Builder::XmlMarkup.new(:target=>buffer, :indent => 2)
|
54
|
-
xml.project(:name => @project.name.gsub(":","-"), :url => url, :license => license) do
|
55
|
-
xml.description @project.comment
|
56
|
-
xml.version(@project.version, :name => @project.version)
|
57
|
-
@tags.each { |tag| xml.tag :v => tag }
|
58
|
-
xml.user :name => @user
|
59
|
-
haxelib_dependencies.each{ |dep| xml.depends :name => dep[:id], :version => dep[:version] }
|
60
|
-
end
|
61
|
-
buffer
|
62
|
-
end
|
63
|
-
|
64
|
-
def haxelib_dependencies
|
65
|
-
haxelib_deps = []
|
66
|
-
@project.compile.dependencies.each{ |dep| haxelib_deps << dep.to_spec_hash if dep.is_a? HaxeLib }
|
67
|
-
haxelib_deps
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
|
72
|
-
def package_as_haxelib(file_name)
|
73
|
-
HaxelibTask.define_task(file_name).tap do |haxelib|
|
74
|
-
haxelib.send :associate, self
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def package_as_haxelib_spec(spec)
|
79
|
-
spec.merge :type=>:zip
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
@@ -1,78 +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
|
-
require 'fileutils'
|
25
|
-
|
26
|
-
module Buildr
|
27
|
-
module AS3
|
28
|
-
module Packaging
|
29
|
-
|
30
|
-
class HxlibTask < Rake::FileTask
|
31
|
-
|
32
|
-
include Extension
|
33
|
-
|
34
|
-
attr_accessor :target_hxlib, :src_hxlib
|
35
|
-
|
36
|
-
def initialize(*args) #:nodoc:
|
37
|
-
super
|
38
|
-
enhance do
|
39
|
-
fail "File not found: #{src_hxlib}" unless File.exists? src_hxlib
|
40
|
-
FileUtils.cp(src_hxlib, target_hxlib)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def needed?
|
45
|
-
return true unless File.exists?(target_hxlib)
|
46
|
-
File.stat(src_hxlib).mtime > File.stat(target_hxlib).mtime
|
47
|
-
end
|
48
|
-
|
49
|
-
first_time do
|
50
|
-
desc 'create hxlib package task'
|
51
|
-
Project.local_task('package_hxlib')
|
52
|
-
end
|
53
|
-
|
54
|
-
before_define do |project|
|
55
|
-
HxlibTask.define_task('package_hxlib').tap do |package_hxlib|
|
56
|
-
package_hxlib
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
def package_hxlib(&block)
|
63
|
-
task("package_hxlib").enhance &block
|
64
|
-
end
|
65
|
-
|
66
|
-
protected
|
67
|
-
|
68
|
-
def package_as_hxlib(file_name)
|
69
|
-
fail("Package types don't match! :hxlib vs. :#{compile.packaging.to_s}") unless compile.packaging == :hxlib
|
70
|
-
HxlibTask.define_task(file_name).tap do |hxlib|
|
71
|
-
hxlib.src_hxlib = File.join(compile.target.to_s, compile.options[:output] || "#{project.name.split(":").last}.#{compile.packaging.to_s}")
|
72
|
-
hxlib.target_hxlib = file_name
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
data/lib/buildr/hx/packaging.rb
DELETED
@@ -1,27 +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
|
-
require File.dirname(__FILE__)+"/packaging/haxelib"
|
23
|
-
require File.dirname(__FILE__)+"/packaging/hxlib"
|
24
|
-
|
25
|
-
class Buildr::Project
|
26
|
-
include Buildr::Haxe::Packaging
|
27
|
-
end
|
data/lib/buildr/hx/test/base.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'buildr'
|
2
|
-
|
3
|
-
module Buildr
|
4
|
-
module Haxe
|
5
|
-
module Test
|
6
|
-
class TestFramework::Haxe < TestFramework::Base
|
7
|
-
|
8
|
-
class << self
|
9
|
-
|
10
|
-
def applies_to?(project) #:nodoc:
|
11
|
-
project.test.compile.language == :haxe
|
12
|
-
end
|
13
|
-
|
14
|
-
def dependencies
|
15
|
-
unless @dependencies
|
16
|
-
super
|
17
|
-
end
|
18
|
-
@dependencies
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
data/lib/buildr/hx/test/munit.rb
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
require 'buildr'
|
2
|
-
require 'fileutils'
|
3
|
-
require 'pathname'
|
4
|
-
require "rexml/document"
|
5
|
-
|
6
|
-
module Buildr
|
7
|
-
module Haxe
|
8
|
-
module Test
|
9
|
-
|
10
|
-
class MUnit < TestFramework::Haxe
|
11
|
-
|
12
|
-
DEFAULT_VERSION = "0.9.2.1"
|
13
|
-
|
14
|
-
"src=test
|
15
|
-
bin=bin/test/build
|
16
|
-
report=bin/test/report
|
17
|
-
hxml=test.hxml
|
18
|
-
classPaths=lib"
|
19
|
-
|
20
|
-
def tests(dependencies) #:nodoc:
|
21
|
-
candidates = []
|
22
|
-
task.project.test.compile.sources.each do |source|
|
23
|
-
files = Dir["#{source}/**/*Test.hx"] + Dir["#{source}/**/*Tests.hx"]
|
24
|
-
files.each { |item|
|
25
|
-
if File.dirname(item) == source
|
26
|
-
candidates << File.basename(item, '.*')
|
27
|
-
else
|
28
|
-
candidates << "#{File.dirname(item).gsub!(source+"/", "").gsub!("/", ".")}.#{File.basename(item, '.*')}"
|
29
|
-
end
|
30
|
-
}
|
31
|
-
end
|
32
|
-
candidates
|
33
|
-
end
|
34
|
-
|
35
|
-
def run(tests, dependencies) #:nodoc:
|
36
|
-
|
37
|
-
unless Buildr.application.options.dryrun
|
38
|
-
create_munit_config
|
39
|
-
appwd = Dir.pwd
|
40
|
-
Dir.chdir task.project.base_dir
|
41
|
-
|
42
|
-
cmd = "haxelib run munit test"
|
43
|
-
cmd << " -browser #{options[:browser]}" unless options[:browser].nil?
|
44
|
-
cmd << " -keep-browser-alive" if options[:keepbrowseralive]
|
45
|
-
cmd << " -coverage" if options[:coverage]
|
46
|
-
|
47
|
-
fail "Problems...oh noes!" unless system cmd
|
48
|
-
|
49
|
-
Dir.chdir appwd
|
50
|
-
|
51
|
-
Dir[File.join(task.project.path_to(:reports, :munit),"**/TEST-*.xml")].each do |xml_report|
|
52
|
-
doc = REXML::Document.new File.new(xml_report)
|
53
|
-
name = doc.elements["testsuite"].attributes["name"]
|
54
|
-
failures = Integer(doc.elements["testsuite"].attributes["failures"])
|
55
|
-
errors = Integer(doc.elements["testsuite"].attributes["errors"])
|
56
|
-
tests -= [name] unless failures + errors == 0
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
60
|
-
tests
|
61
|
-
end
|
62
|
-
|
63
|
-
def create_munit_config
|
64
|
-
file = File.join(task.project.base_dir, ".munit")
|
65
|
-
puts "Creating munit config '#{file}'"
|
66
|
-
File.open(file, 'w') { |f| f.write(
|
67
|
-
"version=#{options[:version].nil? ? DEFAULT_VERSION : options[:version]}\n" +
|
68
|
-
"src=#{relative_path task.project.path_to(:source, :test, :hx), task.project.base_dir}\n" +
|
69
|
-
"bin=#{relative_path task.project.test.compile.target.to_s, task.project.base_dir}\n" +
|
70
|
-
"report=#{relative_path task.project.path_to(:reports, :munit), task.project.base_dir}\n" +
|
71
|
-
"hxml=#{relative_path get_hxml_file, task.project.base_dir}\n" +
|
72
|
-
"classPaths=#{task.project.compile.sources.map(&:to_s).map{|s| relative_path s, task.project.base_dir}.join(',')}"
|
73
|
-
) }
|
74
|
-
end
|
75
|
-
|
76
|
-
def get_hxml_file
|
77
|
-
file = "test.hxml"
|
78
|
-
file = task.project.test.compile.options[:hxml] unless task.project.test.compile.options[:hxml].nil?
|
79
|
-
File.join(task.project.base_dir, file)
|
80
|
-
end
|
81
|
-
|
82
|
-
def relative_path path, from
|
83
|
-
Pathname.new(path).relative_path_from(Pathname.new(from)).to_s
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
end
|
data/lib/buildr/hx/test.rb
DELETED
data/lib/buildr/hx.rb
DELETED