buildr-hx 0.0.20.pre → 0.0.21.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.0.20.pre
1
+ 0.0.21.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.20.pre"
8
+ s.version = "0.0.21.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-04-11"
12
+ s.date = "2012-04-12"
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 = [
data/buildr-hx.iml CHANGED
@@ -11,7 +11,7 @@
11
11
  <orderEntry type="library" scope="PROVIDED" name="atoulme-Antwrap (v0.7.1, ruby-1.9.2-p290) [gem]" level="application" />
12
12
  <orderEntry type="library" scope="PROVIDED" name="builder (v2.1.2, ruby-1.9.2-p290) [gem]" level="application" />
13
13
  <orderEntry type="library" scope="PROVIDED" name="buildr (v1.4.6, ruby-1.9.2-p290) [gem]" level="application" />
14
- <orderEntry type="library" scope="PROVIDED" name="buildr-hx (v0.0.19.pre, ruby-1.9.2-p290) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="buildr-hx (v0.0.20.pre, ruby-1.9.2-p290) [gem]" level="application" />
15
15
  <orderEntry type="library" scope="PROVIDED" name="bundler (v1.1.3, ruby-1.9.2-p290) [gem]" level="application" />
16
16
  <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.2, ruby-1.9.2-p290) [gem]" level="application" />
17
17
  <orderEntry type="library" scope="PROVIDED" name="git (v1.2.5, ruby-1.9.2-p290) [gem]" level="application" />
@@ -26,7 +26,8 @@ module Buildr
26
26
  create_hxml args, is_test
27
27
  appwd = Dir.pwd
28
28
  Dir.chdir @project.base_dir
29
- fail("Compilation failed!") unless sh args.join " "
29
+ file = File.join(@project.base_dir, options[:hxml] || is_test ? "test.hxml" : "compile.hxml")
30
+ fail("Compilation failed!") unless system "haxe '#{file}'"
30
31
  Dir.chdir appwd
31
32
  end
32
33
  end
@@ -83,7 +84,7 @@ module Buildr
83
84
  end
84
85
 
85
86
  def install_haxelib_zip zip
86
- system "haxelib test #{zip}"
87
+ system "haxelib test '#{zip}'"
87
88
  end
88
89
 
89
90
  def is_test?(sources, target, dependencies)
@@ -12,17 +12,7 @@ module Buildr
12
12
 
13
13
  def initialize(test_task, options)
14
14
  super
15
- generate = Rake::Task.define_task(:generate_files) do
16
- create_munit_config
17
- appwd = Dir.pwd
18
- Dir.chdir task.project.base_dir
19
- cmd = "haxelib run munit gen"
20
- fail "Problems...oh noes!" unless system cmd
21
- Dir.chdir appwd
22
- end
23
- @task.compile.enhance [:generate_files] do
24
- generate.reenable
25
- end
15
+ @task.compile.from generate_test_suites
26
16
  end
27
17
 
28
18
  def tests(dependencies) #:nodoc:
@@ -43,7 +33,6 @@ module Buildr
43
33
  def run(tests, dependencies) #:nodoc:
44
34
 
45
35
  unless Buildr.application.options.dryrun
46
- create_munit_config
47
36
  appwd = Dir.pwd
48
37
  Dir.chdir task.project.base_dir
49
38
 
@@ -52,7 +41,7 @@ module Buildr
52
41
  cmd << " -keep-browser-alive" if options[:keepbrowseralive]
53
42
  cmd << " -coverage" if options[:coverage]
54
43
 
55
- fail "Problems...oh noes!" unless system cmd
44
+ fail "Failed to run MUnit TestRunner!" unless system cmd
56
45
 
57
46
  Dir.chdir appwd
58
47
 
@@ -68,16 +57,27 @@ module Buildr
68
57
  tests
69
58
  end
70
59
 
60
+ def generate_test_suites
61
+ @generate ||= file task.project.path_to(:source, :test, :hx) do
62
+ create_munit_config
63
+ appwd = Dir.pwd
64
+ Dir.chdir task.project.base_dir
65
+ cmd = "haxelib run munit gen"
66
+ fail "Failed to generate MUnit Test Suite" unless system cmd
67
+ Dir.chdir appwd
68
+ end
69
+ end
70
+
71
71
  def create_munit_config
72
72
  file = File.join(task.project.base_dir, ".munit")
73
73
  puts "Creating munit config '#{file}'"
74
74
  File.open(file, 'w') { |f| f.write(
75
75
  "version=#{options[:version].nil? ? DEFAULT_VERSION : options[:version]}\n" +
76
- "src=#{task.project.path_to(:source, :test, :hx)}\n" +
77
- "bin=#{task.project.test.compile.target}\n" +
78
- "report=#{task.project.path_to(:reports, :munit)}\n" +
79
- "hxml=#{get_hxml_file}\n" +
80
- "classPaths=#{task.project.compile.sources.map(&:to_s).join(',')}"
76
+ "src=#{task.project.path_to(:source, :test, :hx)}\n" +
77
+ "bin=#{task.project.test.compile.target}\n" +
78
+ "report=#{task.project.path_to(:reports, :munit)}\n" +
79
+ "hxml=#{get_hxml_file}\n" +
80
+ "classPaths=#{task.project.compile.sources.map(&:to_s).join(',')}"
81
81
  ) }
82
82
  end
83
83
 
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.20.pre
4
+ version: 0.0.21.pre
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-11 00:00:00.000000000 Z
12
+ date: 2012-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: buildr
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
213
213
  version: '0'
214
214
  segments:
215
215
  - 0
216
- hash: -1754110536072122068
216
+ hash: 4044263023288197641
217
217
  required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  none: false
219
219
  requirements: