buildr 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +66 -4
- data/{README → README.rdoc} +29 -16
- data/Rakefile +16 -20
- data/_buildr +38 -0
- data/addon/buildr/cobertura.rb +49 -45
- data/addon/buildr/emma.rb +238 -0
- data/addon/buildr/jetty.rb +1 -1
- data/addon/buildr/nailgun.rb +585 -661
- data/{lib/buildr/java → addon/buildr}/org/apache/buildr/BuildrNail$Main.class +0 -0
- data/{lib/buildr/java → addon/buildr}/org/apache/buildr/BuildrNail.class +0 -0
- data/{lib/buildr/java → addon/buildr}/org/apache/buildr/BuildrNail.java +0 -0
- data/bin/buildr +9 -2
- data/buildr.buildfile +53 -0
- data/buildr.gemspec +21 -14
- data/doc/css/default.css +51 -48
- data/doc/css/print.css +60 -55
- data/doc/images/favicon.png +0 -0
- data/doc/images/growl-icon.tiff +0 -0
- data/doc/images/project-structure.png +0 -0
- data/doc/pages/artifacts.textile +46 -156
- data/doc/pages/building.textile +63 -323
- data/doc/pages/contributing.textile +112 -102
- data/doc/pages/download.textile +19 -27
- data/doc/pages/extending.textile +27 -81
- data/doc/pages/getting_started.textile +44 -119
- data/doc/pages/index.textile +26 -47
- data/doc/pages/languages.textile +407 -0
- data/doc/pages/more_stuff.textile +92 -173
- data/doc/pages/packaging.textile +71 -239
- data/doc/pages/projects.textile +58 -233
- data/doc/pages/recipes.textile +19 -43
- data/doc/pages/settings_profiles.textile +39 -104
- data/doc/pages/testing.textile +41 -304
- data/doc/pages/troubleshooting.textile +29 -47
- data/doc/pages/whats_new.textile +69 -167
- data/doc/print.haml +0 -1
- data/doc/print.toc.yaml +1 -0
- data/doc/scripts/buildr-git.rb +1 -1
- data/doc/site.haml +1 -0
- data/doc/site.toc.yaml +8 -5
- data/{KEYS → etc/KEYS} +0 -0
- data/etc/git-svn-authors +16 -0
- data/lib/buildr.rb +2 -5
- data/lib/buildr/core/application.rb +192 -98
- data/lib/buildr/core/build.rb +140 -91
- data/lib/buildr/core/checks.rb +5 -5
- data/lib/buildr/core/common.rb +1 -1
- data/lib/buildr/core/compile.rb +12 -10
- data/lib/buildr/core/filter.rb +151 -46
- data/lib/buildr/core/generate.rb +9 -9
- data/lib/buildr/core/progressbar.rb +1 -1
- data/lib/buildr/core/project.rb +8 -7
- data/lib/buildr/core/test.rb +51 -26
- data/lib/buildr/core/transports.rb +22 -38
- data/lib/buildr/core/util.rb +78 -26
- data/lib/buildr/groovy.rb +18 -0
- data/lib/buildr/groovy/bdd.rb +105 -0
- data/lib/buildr/groovy/compiler.rb +138 -0
- data/lib/buildr/ide/eclipse.rb +102 -71
- data/lib/buildr/ide/idea.rb +7 -12
- data/lib/buildr/ide/idea7x.rb +7 -8
- data/lib/buildr/java.rb +4 -7
- data/lib/buildr/java/ant.rb +26 -5
- data/lib/buildr/java/bdd.rb +449 -0
- data/lib/buildr/java/commands.rb +9 -9
- data/lib/buildr/java/{compilers.rb → compiler.rb} +8 -90
- data/lib/buildr/java/jruby.rb +29 -11
- data/lib/buildr/java/jtestr_runner.rb.erb +116 -0
- data/lib/buildr/java/packaging.rb +23 -16
- data/lib/buildr/java/pom.rb +1 -1
- data/lib/buildr/java/rjb.rb +21 -8
- data/lib/buildr/java/test_result.rb +308 -0
- data/lib/buildr/java/tests.rb +324 -0
- data/lib/buildr/packaging/artifact.rb +12 -11
- data/lib/buildr/packaging/artifact_namespace.rb +7 -4
- data/lib/buildr/packaging/gems.rb +3 -3
- data/lib/buildr/packaging/zip.rb +13 -10
- data/lib/buildr/resources/buildr.icns +0 -0
- data/lib/buildr/scala.rb +19 -0
- data/lib/buildr/scala/compiler.rb +109 -0
- data/lib/buildr/scala/tests.rb +203 -0
- data/rakelib/apache.rake +71 -45
- data/rakelib/doc.rake +2 -2
- data/rakelib/package.rake +3 -2
- data/rakelib/rspec.rake +23 -21
- data/rakelib/setup.rake +34 -9
- data/rakelib/stage.rake +4 -1
- data/spec/addon/cobertura_spec.rb +77 -0
- data/spec/addon/emma_spec.rb +120 -0
- data/spec/addon/test_coverage_spec.rb +255 -0
- data/spec/{application_spec.rb → core/application_spec.rb} +82 -4
- data/spec/{artifact_namespace_spec.rb → core/artifact_namespace_spec.rb} +12 -1
- data/spec/core/build_spec.rb +415 -0
- data/spec/{checks_spec.rb → core/checks_spec.rb} +2 -2
- data/spec/{common_spec.rb → core/common_spec.rb} +119 -30
- data/spec/{compile_spec.rb → core/compile_spec.rb} +17 -13
- data/spec/core/generate_spec.rb +33 -0
- data/spec/{project_spec.rb → core/project_spec.rb} +9 -6
- data/spec/{test_spec.rb → core/test_spec.rb} +222 -28
- data/spec/{transport_spec.rb → core/transport_spec.rb} +5 -9
- data/spec/groovy/bdd_spec.rb +80 -0
- data/spec/{groovy_compilers_spec.rb → groovy/compiler_spec.rb} +1 -1
- data/spec/ide/eclipse_spec.rb +243 -0
- data/spec/{java_spec.rb → java/ant.rb} +7 -17
- data/spec/java/bdd_spec.rb +358 -0
- data/spec/{java_compilers_spec.rb → java/compiler_spec.rb} +1 -1
- data/spec/java/java_spec.rb +88 -0
- data/spec/{java_packaging_spec.rb → java/packaging_spec.rb} +65 -4
- data/spec/{java_test_frameworks_spec.rb → java/tests_spec.rb} +31 -10
- data/spec/{archive_spec.rb → packaging/archive_spec.rb} +12 -2
- data/spec/{artifact_spec.rb → packaging/artifact_spec.rb} +12 -5
- data/spec/{packaging_helper.rb → packaging/packaging_helper.rb} +0 -0
- data/spec/{packaging_spec.rb → packaging/packaging_spec.rb} +1 -1
- data/spec/sandbox.rb +22 -5
- data/spec/{scala_compilers_spec.rb → scala/compiler_spec.rb} +1 -1
- data/spec/{scala_test_frameworks_spec.rb → scala/tests_spec.rb} +11 -12
- data/spec/spec_helpers.rb +38 -17
- metadata +103 -70
- data/lib/buildr/java/bdd_frameworks.rb +0 -265
- data/lib/buildr/java/groovyc.rb +0 -137
- data/lib/buildr/java/test_frameworks.rb +0 -450
- data/spec/build_spec.rb +0 -193
- data/spec/java_bdd_frameworks_spec.rb +0 -238
- data/spec/spec.opts +0 -6
@@ -14,8 +14,7 @@
|
|
14
14
|
# the License.
|
15
15
|
|
16
16
|
|
17
|
-
require File.join(File.dirname(__FILE__), 'spec_helpers')
|
18
|
-
|
17
|
+
require File.join(File.dirname(__FILE__), '../spec_helpers')
|
19
18
|
|
20
19
|
# TODO's
|
21
20
|
# -test w/ Specs
|
@@ -28,7 +27,7 @@ require File.join(File.dirname(__FILE__), 'spec_helpers')
|
|
28
27
|
# -test exclude Suite's
|
29
28
|
|
30
29
|
|
31
|
-
describe Buildr::ScalaTest do
|
30
|
+
describe Buildr::Scala::ScalaTest do
|
32
31
|
it 'should be the default test framework when test cases are in Scala' do
|
33
32
|
write 'src/test/scala/com/example/MySuite.scala', <<-SCALA
|
34
33
|
package com.example
|
@@ -53,26 +52,26 @@ describe Buildr::ScalaTest do
|
|
53
52
|
|
54
53
|
it 'should include Scalatest dependencies' do
|
55
54
|
define('foo') { test.using(:scalatest) }
|
56
|
-
project('foo').test.compile.dependencies.should include(*artifacts(ScalaTest
|
57
|
-
project('foo').test.dependencies.should include(*artifacts(ScalaTest
|
55
|
+
project('foo').test.compile.dependencies.should include(*artifacts(Scala::ScalaTest.dependencies))
|
56
|
+
project('foo').test.dependencies.should include(*artifacts(Scala::ScalaTest.dependencies))
|
58
57
|
end
|
59
58
|
|
60
59
|
it 'should include JMock dependencies' do
|
61
60
|
define('foo') { test.using(:scalatest) }
|
62
|
-
project('foo').test.compile.dependencies.should include(*artifacts(JMock
|
63
|
-
project('foo').test.dependencies.should include(*artifacts(JMock
|
61
|
+
project('foo').test.compile.dependencies.should include(*artifacts(JMock.dependencies))
|
62
|
+
project('foo').test.dependencies.should include(*artifacts(JMock.dependencies))
|
64
63
|
end
|
65
|
-
|
64
|
+
|
66
65
|
it 'should include Specs dependencies' do
|
67
66
|
define('foo') { test.using(:scalatest) }
|
68
|
-
project('foo').test.compile.dependencies.should include(*artifacts(ScalaSpecs
|
69
|
-
project('foo').test.dependencies.should include(*artifacts(ScalaSpecs
|
67
|
+
project('foo').test.compile.dependencies.should include(*artifacts(Scala::ScalaSpecs.dependencies))
|
68
|
+
project('foo').test.dependencies.should include(*artifacts(Scala::ScalaSpecs.dependencies))
|
70
69
|
end
|
71
70
|
|
72
71
|
it 'should include ScalaCheck dependencies' do
|
73
72
|
define('foo') { test.using(:scalatest) }
|
74
|
-
project('foo').test.compile.dependencies.should include(*artifacts(ScalaCheck
|
75
|
-
project('foo').test.dependencies.should include(*artifacts(ScalaCheck
|
73
|
+
project('foo').test.compile.dependencies.should include(*artifacts(Scala::ScalaCheck.dependencies))
|
74
|
+
project('foo').test.dependencies.should include(*artifacts(Scala::ScalaCheck.dependencies))
|
76
75
|
end
|
77
76
|
|
78
77
|
it 'should include public classes extending org.scalatest.FunSuite' do
|
data/spec/spec_helpers.rb
CHANGED
@@ -16,10 +16,10 @@
|
|
16
16
|
|
17
17
|
# This file gets loaded twice when running 'spec spec/*' and not with pleasent results,
|
18
18
|
# so ignore the second attempt to load it.
|
19
|
-
unless
|
19
|
+
unless defined?(SpecHelpers)
|
20
20
|
|
21
21
|
require 'rubygems'
|
22
|
-
$LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__))
|
22
|
+
$LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__)), File.expand_path('../addon', File.dirname(__FILE__))
|
23
23
|
require 'buildr'
|
24
24
|
|
25
25
|
require File.expand_path('sandbox', File.dirname(__FILE__))
|
@@ -28,13 +28,15 @@ unless self.class.const_defined?('SpecHelpers')
|
|
28
28
|
|
29
29
|
include Checks::Matchers
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
[:info, :warn, :error].each do |severity|
|
32
|
+
::Object.class_eval do
|
33
|
+
define_method severity do |message|
|
34
|
+
$messages ||= {}
|
35
|
+
($messages[severity] ||= []) << message
|
36
|
+
end
|
35
37
|
end
|
36
38
|
end
|
37
|
-
|
39
|
+
|
38
40
|
class << Buildr.application
|
39
41
|
alias :deprecated_without_capture :deprecated
|
40
42
|
def deprecated(message)
|
@@ -42,32 +44,50 @@ unless self.class.const_defined?('SpecHelpers')
|
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
45
|
-
class
|
46
|
-
def initialize(message)
|
47
|
+
class MessageWithSeverityMatcher
|
48
|
+
def initialize(severity, message)
|
49
|
+
@severity = severity
|
47
50
|
@expect = message
|
48
51
|
end
|
49
52
|
|
50
53
|
def matches?(target)
|
51
|
-
$
|
54
|
+
$messages = {@severity => []}
|
52
55
|
target.call
|
53
|
-
return Regexp === @expect ? $
|
56
|
+
return Regexp === @expect ? $messages[@severity].join('\n') =~ @expect : $messages[@severity].include?(@expect.to_s)
|
54
57
|
end
|
55
58
|
|
56
59
|
def failure_message
|
57
|
-
|
60
|
+
"Expected #{@severity} #{@expect.inspect}, " +
|
61
|
+
($messages[@severity].empty? ? "no #{@severity} issued" : "found #{$messages[@severity].inspect}")
|
58
62
|
end
|
59
63
|
|
60
64
|
def negative_failure_message
|
61
|
-
"Found unexpected #{$
|
65
|
+
"Found unexpected #{$messages[@severity].inspect}"
|
62
66
|
end
|
63
67
|
end
|
64
68
|
|
69
|
+
# Test if an info message was shown. You can use a string or regular expression.
|
70
|
+
#
|
71
|
+
# For example:
|
72
|
+
# lambda { info 'ze test' }.should show_info(/ze test/)
|
73
|
+
def show_info(message)
|
74
|
+
MessageWithSeverityMatcher.new :info, message
|
75
|
+
end
|
76
|
+
|
65
77
|
# Tests if a warning was issued. You can use a string or regular expression.
|
66
78
|
#
|
67
79
|
# For example:
|
68
|
-
# lambda { warn 'ze test' }.should
|
69
|
-
def
|
70
|
-
|
80
|
+
# lambda { warn 'ze test' }.should show_warning(/ze test/)
|
81
|
+
def show_warning(message)
|
82
|
+
MessageWithSeverityMatcher.new :warn, message
|
83
|
+
end
|
84
|
+
|
85
|
+
# Test if an error message was shown. You can use a string or regular expression.
|
86
|
+
#
|
87
|
+
# For example:
|
88
|
+
# lambda { error 'ze test' }.should show_error(/ze test/)
|
89
|
+
def show_error(message)
|
90
|
+
MessageWithSeverityMatcher.new :error, message
|
71
91
|
end
|
72
92
|
|
73
93
|
|
@@ -95,7 +115,8 @@ unless self.class.const_defined?('SpecHelpers')
|
|
95
115
|
|
96
116
|
def failure_message
|
97
117
|
return @but_not.negative_failure_message if all_ran? && @but_not
|
98
|
-
"Expected the tasks #{expected} to run, but #{remaining} did not run, or not in the order we expected them to."
|
118
|
+
"Expected the tasks #{expected} to run, but #{remaining} did not run, or not in the order we expected them to." +
|
119
|
+
" Tasks that ran: #{$executed.inspect}"
|
99
120
|
end
|
100
121
|
|
101
122
|
def negative_failure_message
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apache Buildr
|
@@ -9,19 +9,9 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-08 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: rjb
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.1.2
|
24
|
-
version:
|
25
15
|
- !ruby/object:Gem::Dependency
|
26
16
|
name: rake
|
27
17
|
type: :runtime
|
@@ -50,7 +40,7 @@ dependencies:
|
|
50
40
|
requirements:
|
51
41
|
- - "="
|
52
42
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.0.
|
43
|
+
version: 2.0.4
|
54
44
|
version:
|
55
45
|
- !ruby/object:Gem::Dependency
|
56
46
|
name: net-sftp
|
@@ -100,7 +90,17 @@ dependencies:
|
|
100
90
|
requirements:
|
101
91
|
- - "="
|
102
92
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
93
|
+
version: 1.7.0
|
94
|
+
version:
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rjb
|
97
|
+
type: :runtime
|
98
|
+
version_requirement:
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.1.6
|
104
104
|
version:
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: Antwrap
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 1.1.
|
123
|
+
version: 1.1.5
|
124
124
|
version:
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: xml-simple
|
@@ -149,7 +149,7 @@ executables:
|
|
149
149
|
extensions: []
|
150
150
|
|
151
151
|
extra_rdoc_files:
|
152
|
-
- README
|
152
|
+
- README.rdoc
|
153
153
|
- CHANGELOG
|
154
154
|
- LICENSE
|
155
155
|
- NOTICE
|
@@ -173,6 +173,10 @@ files:
|
|
173
173
|
- lib/buildr/core/transports.rb
|
174
174
|
- lib/buildr/core/util.rb
|
175
175
|
- lib/buildr/core.rb
|
176
|
+
- lib/buildr/groovy
|
177
|
+
- lib/buildr/groovy/bdd.rb
|
178
|
+
- lib/buildr/groovy/compiler.rb
|
179
|
+
- lib/buildr/groovy.rb
|
176
180
|
- lib/buildr/ide
|
177
181
|
- lib/buildr/ide/eclipse.rb
|
178
182
|
- lib/buildr/ide/idea.ipr.template
|
@@ -182,24 +186,22 @@ files:
|
|
182
186
|
- lib/buildr/ide.rb
|
183
187
|
- lib/buildr/java
|
184
188
|
- lib/buildr/java/ant.rb
|
185
|
-
- lib/buildr/java/
|
189
|
+
- lib/buildr/java/bdd.rb
|
186
190
|
- lib/buildr/java/commands.rb
|
187
|
-
- lib/buildr/java/
|
191
|
+
- lib/buildr/java/compiler.rb
|
188
192
|
- lib/buildr/java/deprecated.rb
|
189
|
-
- lib/buildr/java/groovyc.rb
|
190
193
|
- lib/buildr/java/jruby.rb
|
194
|
+
- lib/buildr/java/jtestr_runner.rb.erb
|
191
195
|
- lib/buildr/java/org
|
192
196
|
- lib/buildr/java/org/apache
|
193
197
|
- lib/buildr/java/org/apache/buildr
|
194
|
-
- lib/buildr/java/org/apache/buildr/BuildrNail$Main.class
|
195
|
-
- lib/buildr/java/org/apache/buildr/BuildrNail.class
|
196
|
-
- lib/buildr/java/org/apache/buildr/BuildrNail.java
|
197
198
|
- lib/buildr/java/org/apache/buildr/JavaTestFilter.class
|
198
199
|
- lib/buildr/java/org/apache/buildr/JavaTestFilter.java
|
199
200
|
- lib/buildr/java/packaging.rb
|
200
201
|
- lib/buildr/java/pom.rb
|
201
202
|
- lib/buildr/java/rjb.rb
|
202
|
-
- lib/buildr/java/
|
203
|
+
- lib/buildr/java/test_result.rb
|
204
|
+
- lib/buildr/java/tests.rb
|
203
205
|
- lib/buildr/java/version_requirement.rb
|
204
206
|
- lib/buildr/java.rb
|
205
207
|
- lib/buildr/packaging
|
@@ -211,10 +213,18 @@ files:
|
|
211
213
|
- lib/buildr/packaging/tar.rb
|
212
214
|
- lib/buildr/packaging/zip.rb
|
213
215
|
- lib/buildr/packaging.rb
|
216
|
+
- lib/buildr/resources
|
217
|
+
- lib/buildr/resources/buildr.icns
|
218
|
+
- lib/buildr/scala
|
219
|
+
- lib/buildr/scala/compiler.rb
|
220
|
+
- lib/buildr/scala/tests.rb
|
221
|
+
- lib/buildr/scala.rb
|
214
222
|
- lib/buildr.rb
|
223
|
+
- bin/buildr
|
215
224
|
- addon/buildr
|
216
225
|
- addon/buildr/antlr.rb
|
217
226
|
- addon/buildr/cobertura.rb
|
227
|
+
- addon/buildr/emma.rb
|
218
228
|
- addon/buildr/hibernate.rb
|
219
229
|
- addon/buildr/javacc.rb
|
220
230
|
- addon/buildr/jdepend.rb
|
@@ -225,54 +235,14 @@ files:
|
|
225
235
|
- addon/buildr/org
|
226
236
|
- addon/buildr/org/apache
|
227
237
|
- addon/buildr/org/apache/buildr
|
238
|
+
- addon/buildr/org/apache/buildr/BuildrNail$Main.class
|
239
|
+
- addon/buildr/org/apache/buildr/BuildrNail.class
|
240
|
+
- addon/buildr/org/apache/buildr/BuildrNail.java
|
228
241
|
- addon/buildr/org/apache/buildr/JettyWrapper$1.class
|
229
242
|
- addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class
|
230
243
|
- addon/buildr/org/apache/buildr/JettyWrapper.class
|
231
244
|
- addon/buildr/org/apache/buildr/JettyWrapper.java
|
232
245
|
- addon/buildr/xmlbeans.rb
|
233
|
-
- README
|
234
|
-
- CHANGELOG
|
235
|
-
- LICENSE
|
236
|
-
- NOTICE
|
237
|
-
- DISCLAIMER
|
238
|
-
- KEYS
|
239
|
-
- buildr.gemspec
|
240
|
-
- Rakefile
|
241
|
-
- rakelib/apache.rake
|
242
|
-
- rakelib/changelog.rake
|
243
|
-
- rakelib/doc.rake
|
244
|
-
- rakelib/package.rake
|
245
|
-
- rakelib/release.rake
|
246
|
-
- rakelib/rspec.rake
|
247
|
-
- rakelib/rubyforge.rake
|
248
|
-
- rakelib/scm.rake
|
249
|
-
- rakelib/setup.rake
|
250
|
-
- rakelib/stage.rake
|
251
|
-
- spec/application_spec.rb
|
252
|
-
- spec/archive_spec.rb
|
253
|
-
- spec/artifact_namespace_spec.rb
|
254
|
-
- spec/artifact_spec.rb
|
255
|
-
- spec/build_spec.rb
|
256
|
-
- spec/checks_spec.rb
|
257
|
-
- spec/common_spec.rb
|
258
|
-
- spec/compile_spec.rb
|
259
|
-
- spec/groovy_compilers_spec.rb
|
260
|
-
- spec/java_bdd_frameworks_spec.rb
|
261
|
-
- spec/java_compilers_spec.rb
|
262
|
-
- spec/java_packaging_spec.rb
|
263
|
-
- spec/java_spec.rb
|
264
|
-
- spec/java_test_frameworks_spec.rb
|
265
|
-
- spec/packaging_helper.rb
|
266
|
-
- spec/packaging_spec.rb
|
267
|
-
- spec/project_spec.rb
|
268
|
-
- spec/sandbox.rb
|
269
|
-
- spec/scala_compilers_spec.rb
|
270
|
-
- spec/scala_test_frameworks_spec.rb
|
271
|
-
- spec/spec.opts
|
272
|
-
- spec/spec_helpers.rb
|
273
|
-
- spec/test_spec.rb
|
274
|
-
- spec/transport_spec.rb
|
275
|
-
- spec/version_requirement_spec.rb
|
276
246
|
- doc/css
|
277
247
|
- doc/css/default.css
|
278
248
|
- doc/css/print.css
|
@@ -281,7 +251,10 @@ files:
|
|
281
251
|
- doc/images/apache-incubator-logo.png
|
282
252
|
- doc/images/buildr-hires.png
|
283
253
|
- doc/images/buildr.png
|
254
|
+
- doc/images/favicon.png
|
255
|
+
- doc/images/growl-icon.tiff
|
284
256
|
- doc/images/note.png
|
257
|
+
- doc/images/project-structure.png
|
285
258
|
- doc/images/tip.png
|
286
259
|
- doc/images/zbuildr.tif
|
287
260
|
- doc/pages
|
@@ -292,6 +265,7 @@ files:
|
|
292
265
|
- doc/pages/extending.textile
|
293
266
|
- doc/pages/getting_started.textile
|
294
267
|
- doc/pages/index.textile
|
268
|
+
- doc/pages/languages.textile
|
295
269
|
- doc/pages/mailing_lists.textile
|
296
270
|
- doc/pages/more_stuff.textile
|
297
271
|
- doc/pages/packaging.textile
|
@@ -310,19 +284,78 @@ files:
|
|
310
284
|
- doc/scripts/install-osx.sh
|
311
285
|
- doc/site.haml
|
312
286
|
- doc/site.toc.yaml
|
287
|
+
- spec/addon
|
288
|
+
- spec/addon/cobertura_spec.rb
|
289
|
+
- spec/addon/emma_spec.rb
|
290
|
+
- spec/addon/test_coverage_spec.rb
|
291
|
+
- spec/core
|
292
|
+
- spec/core/application_spec.rb
|
293
|
+
- spec/core/artifact_namespace_spec.rb
|
294
|
+
- spec/core/build_spec.rb
|
295
|
+
- spec/core/checks_spec.rb
|
296
|
+
- spec/core/common_spec.rb
|
297
|
+
- spec/core/compile_spec.rb
|
298
|
+
- spec/core/generate_spec.rb
|
299
|
+
- spec/core/project_spec.rb
|
300
|
+
- spec/core/test_spec.rb
|
301
|
+
- spec/core/transport_spec.rb
|
302
|
+
- spec/groovy
|
303
|
+
- spec/groovy/bdd_spec.rb
|
304
|
+
- spec/groovy/compiler_spec.rb
|
305
|
+
- spec/ide
|
306
|
+
- spec/ide/eclipse_spec.rb
|
307
|
+
- spec/java
|
308
|
+
- spec/java/ant.rb
|
309
|
+
- spec/java/bdd_spec.rb
|
310
|
+
- spec/java/compiler_spec.rb
|
311
|
+
- spec/java/java_spec.rb
|
312
|
+
- spec/java/packaging_spec.rb
|
313
|
+
- spec/java/tests_spec.rb
|
314
|
+
- spec/packaging
|
315
|
+
- spec/packaging/archive_spec.rb
|
316
|
+
- spec/packaging/artifact_spec.rb
|
317
|
+
- spec/packaging/packaging_helper.rb
|
318
|
+
- spec/packaging/packaging_spec.rb
|
319
|
+
- spec/sandbox.rb
|
320
|
+
- spec/scala
|
321
|
+
- spec/scala/compiler_spec.rb
|
322
|
+
- spec/scala/tests_spec.rb
|
323
|
+
- spec/spec_helpers.rb
|
324
|
+
- spec/version_requirement_spec.rb
|
325
|
+
- README.rdoc
|
326
|
+
- LICENSE
|
327
|
+
- NOTICE
|
328
|
+
- DISCLAIMER
|
329
|
+
- CHANGELOG
|
330
|
+
- buildr.buildfile
|
331
|
+
- buildr.gemspec
|
332
|
+
- Rakefile
|
333
|
+
- rakelib/apache.rake
|
334
|
+
- rakelib/changelog.rake
|
335
|
+
- rakelib/doc.rake
|
336
|
+
- rakelib/package.rake
|
337
|
+
- rakelib/release.rake
|
338
|
+
- rakelib/rspec.rake
|
339
|
+
- rakelib/rubyforge.rake
|
340
|
+
- rakelib/scm.rake
|
341
|
+
- rakelib/setup.rake
|
342
|
+
- rakelib/stage.rake
|
343
|
+
- _buildr
|
344
|
+
- etc/git-svn-authors
|
345
|
+
- etc/KEYS
|
313
346
|
has_rdoc: true
|
314
|
-
homepage: http://incubator.apache.org/buildr
|
347
|
+
homepage: http://incubator.apache.org/buildr
|
315
348
|
post_install_message:
|
316
349
|
rdoc_options:
|
317
350
|
- --title
|
318
|
-
- Buildr
|
351
|
+
- Buildr
|
319
352
|
- --main
|
320
|
-
- README
|
353
|
+
- README.rdoc
|
321
354
|
- --line-numbers
|
322
355
|
- --inline-source
|
323
356
|
- -p
|
324
357
|
- --webcvs
|
325
|
-
- http://svn.apache.org/repos/asf/incubator
|
358
|
+
- http://svn.apache.org/repos/asf/incubator/buildr/trunk/
|
326
359
|
require_paths:
|
327
360
|
- lib
|
328
361
|
- addon
|
@@ -1,265 +0,0 @@
|
|
1
|
-
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
-
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
-
# work for additional information regarding copyright ownership. The ASF
|
4
|
-
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
-
# "License"); you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
-
# License for the specific language governing permissions and limitations under
|
14
|
-
# the License.
|
15
|
-
|
16
|
-
|
17
|
-
require 'buildr/java/test_frameworks'
|
18
|
-
|
19
|
-
|
20
|
-
module Buildr
|
21
|
-
|
22
|
-
# Mixin for test frameworks using src/spec/{lang}
|
23
|
-
module TestFramework::JavaBDD #:nodoc:
|
24
|
-
|
25
|
-
class << self
|
26
|
-
def included(mod)
|
27
|
-
mod.module_eval do
|
28
|
-
include TestFramework::JavaTest
|
29
|
-
include ClassMethods
|
30
|
-
end
|
31
|
-
mod.extend ClassMethods
|
32
|
-
mod.bdd_dir = :spec
|
33
|
-
mod.lang = :java
|
34
|
-
super
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
module ClassMethods
|
39
|
-
attr_accessor :lang, :bdd_dir
|
40
|
-
end
|
41
|
-
|
42
|
-
def initialize(task, options)
|
43
|
-
self.bdd_dir = self.class.bdd_dir
|
44
|
-
project = task.project
|
45
|
-
project.task('test:compile').tap do |comp|
|
46
|
-
comp.send :associate_with, project, bdd_dir
|
47
|
-
self.lang = comp.language || self.class.lang
|
48
|
-
end
|
49
|
-
project.task('test:resources').tap do |res|
|
50
|
-
res.send :associate_with, project, bdd_dir
|
51
|
-
res.filter.clear
|
52
|
-
project.path_to(:source, bdd_dir, :resources).tap { |dir| res.from dir if File.exist?(dir) }
|
53
|
-
end
|
54
|
-
super
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
class RSpec < TestFramework::Base
|
59
|
-
include TestFramework::JavaBDD
|
60
|
-
self.lang = :ruby
|
61
|
-
|
62
|
-
|
63
|
-
REQUIRES = []
|
64
|
-
REQUIRES.unshift 'org.jruby:jruby-complete:jar:1.1.1' unless RUBY_PLATFORM =~ /java/
|
65
|
-
|
66
|
-
TESTS_PATTERN = [ /_spec.rb$/ ]
|
67
|
-
OPTIONS = [:properties, :java_args]
|
68
|
-
|
69
|
-
def self.applies_to?(project) #:nodoc:
|
70
|
-
!Dir[project.path_to(:source, bdd_dir, lang, '**/*_spec.rb')].empty?
|
71
|
-
end
|
72
|
-
|
73
|
-
def tests(dependencies) #:nodoc:
|
74
|
-
Dir[task.project.path_to(:source, bdd_dir, lang, '**/*_spec.rb')].
|
75
|
-
select do |name|
|
76
|
-
selector = ENV['SPEC']
|
77
|
-
selector.nil? || Regexp.new(selector) === name
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def run(tests, dependencies) #:nodoc:
|
82
|
-
cmd_options = task.options.only(:properties, :java_args)
|
83
|
-
dependencies.push *Dir.glob(File.join(jruby_home, "lib/*.jar")) if RUBY_PLATFORM =~ /java/
|
84
|
-
cmd_options.update :classpath => dependencies, :project => task.project
|
85
|
-
|
86
|
-
# TODO: Setting up JRuby is something to do before running Buildr.
|
87
|
-
#install_gems(cmd_options)
|
88
|
-
|
89
|
-
report_dir = task.report_to.to_s
|
90
|
-
FileUtils.rm_rf report_dir
|
91
|
-
ENV['CI_REPORTS'] = report_dir
|
92
|
-
|
93
|
-
jruby("-Ilib", "-S", "spec",
|
94
|
-
"--require", "ci/reporter/rake/rspec_loader",
|
95
|
-
"--format", "CI::Reporter::RSpecDoc", tests,
|
96
|
-
cmd_options.merge({:name => "RSpec"}))
|
97
|
-
tests
|
98
|
-
end
|
99
|
-
|
100
|
-
private
|
101
|
-
def jruby_home
|
102
|
-
@jruby_home ||= RUBY_PLATFORM =~ /java/ ? Config::CONFIG['prefix'] : File.expand_path(".jruby", ENV['HOME'])
|
103
|
-
end
|
104
|
-
|
105
|
-
def gem_path(project, gem_name, *additional)
|
106
|
-
dir = Dir["#{jruby_home(project)}/lib/ruby/gems/1.8/gems/#{gem_name}*"].to_a.first
|
107
|
-
dir = File.join(dir, *additional) unless additional.empty?
|
108
|
-
dir
|
109
|
-
end
|
110
|
-
|
111
|
-
def required_gems(options)
|
112
|
-
["ci_reporter", options[:required_gems]].flatten.compact
|
113
|
-
end
|
114
|
-
|
115
|
-
def jruby(*args)
|
116
|
-
java_args = ["org.jruby.Main", *args]
|
117
|
-
java_args << {} unless Hash === args.last
|
118
|
-
cmd_options = java_args.last
|
119
|
-
project = cmd_options.delete(:project)
|
120
|
-
cmd_options[:java_args] ||= []
|
121
|
-
cmd_options[:java_args] << "-Xmx512m" unless cmd_options[:java_args].detect {|a| a =~ /^-Xmx/}
|
122
|
-
cmd_options[:properties] ||= {}
|
123
|
-
cmd_options[:properties]["jruby.home"] = jruby_home
|
124
|
-
Java::Commands.java(*java_args)
|
125
|
-
end
|
126
|
-
|
127
|
-
#def install_gems(options)
|
128
|
-
# unless required_gems(options).all? {|g| gem_path(options[:project], g)}
|
129
|
-
# args = ["-S", "maybe_install_gems", *required_gems(options)]
|
130
|
-
# args << {:name => "JRuby Setup"}.merge(options)
|
131
|
-
# jruby(*args)
|
132
|
-
# end
|
133
|
-
#end
|
134
|
-
|
135
|
-
end
|
136
|
-
|
137
|
-
class JtestR < TestFramework::Base
|
138
|
-
include TestFramework::JavaBDD
|
139
|
-
self.lang = :ruby
|
140
|
-
end
|
141
|
-
|
142
|
-
# JBehave is a Java BDD framework. To use in your project:
|
143
|
-
# test.using :jbehave
|
144
|
-
#
|
145
|
-
# This framework will search in your project for:
|
146
|
-
# src/spec/java/**/*Behaviour.java
|
147
|
-
#
|
148
|
-
# JMock libraries are included on runtime.
|
149
|
-
#
|
150
|
-
# Support the following options:
|
151
|
-
# * :properties -- Hash of properties to the test suite
|
152
|
-
# * :java_args -- Arguments passed to the JVM
|
153
|
-
class JBehave < TestFramework::Base
|
154
|
-
include TestFramework::JavaBDD
|
155
|
-
|
156
|
-
VERSION = "1.0.1" unless const_defined?('VERSION')
|
157
|
-
REQUIRES = ["org.jbehave:jbehave:jar:#{VERSION}",
|
158
|
-
"jmock:jmock-cglib:jar:#{JMock::VERSION}",
|
159
|
-
"cglib:cglib-full:jar:2.0.2",
|
160
|
-
] + JUnit::REQUIRES
|
161
|
-
TESTS_PATTERN = [ /Behaviou?r$/ ]
|
162
|
-
|
163
|
-
def self.applies_to?(project) #:nodoc:
|
164
|
-
%w{
|
165
|
-
**/*Behaviour.java **/*Behavior.java
|
166
|
-
}.any? { |glob| !Dir[project.path_to(:source, bdd_dir, lang, glob)].empty? }
|
167
|
-
end
|
168
|
-
|
169
|
-
def tests(dependencies) #:nodoc:
|
170
|
-
filter_classes(dependencies, :class_names => TESTS_PATTERN,
|
171
|
-
:interfaces => %w{ org.jbehave.core.behaviour.Behaviours })
|
172
|
-
end
|
173
|
-
|
174
|
-
def run(tests, dependencies) #:nodoc:
|
175
|
-
cmd_args = ['org.jbehave.core.BehaviourRunner']
|
176
|
-
cmd_options = { :properties=>options[:properties], :java_args=>options[:java_args], :classpath=>dependencies }
|
177
|
-
tests.inject([]) do |passed, test|
|
178
|
-
begin
|
179
|
-
Java::Commands.java cmd_args, test, cmd_options
|
180
|
-
passed << test
|
181
|
-
rescue
|
182
|
-
passed
|
183
|
-
end
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
end
|
188
|
-
|
189
|
-
# EasyB is a Groovy based BDD framework.
|
190
|
-
# To use in your project:
|
191
|
-
#
|
192
|
-
# test.using :easyb
|
193
|
-
#
|
194
|
-
# This framework will search in your project for:
|
195
|
-
# src/spec/groovy/**/*Story.groovy
|
196
|
-
# src/spec/groovy/**/*Behavior.groovy
|
197
|
-
#
|
198
|
-
# Support the following options:
|
199
|
-
# * :format -- Report format :txt or :xml, default is :txt
|
200
|
-
# * :properties -- Hash of properties passed to the test suite.
|
201
|
-
# * :java_args -- Arguments passed to the JVM.
|
202
|
-
class EasyB < TestFramework::Base
|
203
|
-
include TestFramework::JavaBDD
|
204
|
-
self.lang = :groovy
|
205
|
-
|
206
|
-
VERSION = "0.7" unless const_defined?(:VERSION)
|
207
|
-
REQUIRES = ["org.easyb:easyb:jar:#{VERSION}",
|
208
|
-
'org.codehaus.groovy:groovy:jar:1.5.3',
|
209
|
-
'asm:asm:jar:2.2.3',
|
210
|
-
'commons-cli:commons-cli:jar:1.0',
|
211
|
-
'antlr:antlr:jar:2.7.7']
|
212
|
-
TESTS_PATTERN = [ /(Story|Behavior).groovy$/ ]
|
213
|
-
OPTIONS = [:format, :properties, :java_args]
|
214
|
-
|
215
|
-
def self.applies_to?(project) #:nodoc:
|
216
|
-
%w{
|
217
|
-
**/*Behaviour.groovy **/*Behavior.groovy **/*Story.groovy
|
218
|
-
}.any? { |glob| !Dir[project.path_to(:source, bdd_dir, lang, glob)].empty? }
|
219
|
-
end
|
220
|
-
|
221
|
-
def tests(dependencies) #:nodoc:
|
222
|
-
Dir[task.project.path_to(:source, bdd_dir, lang, "**/*.groovy")].
|
223
|
-
select { |name| TESTS_PATTERN.any? { |pat| pat === name } }
|
224
|
-
end
|
225
|
-
|
226
|
-
def run(tests, dependencies) #:nodoc:
|
227
|
-
options = { :format => :txt }.merge(self.options).only(*OPTIONS)
|
228
|
-
|
229
|
-
if :txt == options[:format]
|
230
|
-
easyb_format, ext = 'txtstory', '.txt'
|
231
|
-
elsif :xml == options[:format]
|
232
|
-
easyb_format, ext = 'xmlbehavior', '.xml'
|
233
|
-
else
|
234
|
-
raise "Invalid format #{options[:format]} expected one of :txt :xml"
|
235
|
-
end
|
236
|
-
|
237
|
-
cmd_args = [ 'org.disco.easyb.SpecificationRunner' ]
|
238
|
-
cmd_options = { :properties => options[:properties],
|
239
|
-
:java_args => options[:java_args],
|
240
|
-
:classpath => dependencies }
|
241
|
-
|
242
|
-
tests.inject([]) do |passed, test|
|
243
|
-
name = test.sub(/.*?groovy[\/\\]/, '').pathmap('%X')
|
244
|
-
report = File.join(task.report_to.to_s, name + ext)
|
245
|
-
mkpath report.pathmap('%d'), :verbose => false
|
246
|
-
begin
|
247
|
-
Java::Commands.java cmd_args,
|
248
|
-
"-#{easyb_format}", report,
|
249
|
-
test, cmd_options.merge(:name => name)
|
250
|
-
rescue => e
|
251
|
-
passed
|
252
|
-
else
|
253
|
-
passed << test
|
254
|
-
end
|
255
|
-
end
|
256
|
-
end
|
257
|
-
|
258
|
-
end # EasyB
|
259
|
-
|
260
|
-
end
|
261
|
-
|
262
|
-
Buildr::TestFramework << Buildr::RSpec
|
263
|
-
Buildr::TestFramework << Buildr::JtestR
|
264
|
-
Buildr::TestFramework << Buildr::JBehave
|
265
|
-
Buildr::TestFramework << Buildr::EasyB
|