buildr 1.4.6-x86-mswin32 → 1.4.7-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +81 -0
- data/Rakefile +5 -2
- data/addon/buildr/antlr.rb +0 -4
- data/addon/buildr/bnd.rb +3 -1
- data/addon/buildr/checkstyle.rb +201 -0
- data/addon/buildr/cobertura.rb +0 -1
- data/addon/buildr/drb.rb +0 -2
- data/addon/buildr/emma.rb +0 -1
- data/addon/buildr/findbugs.rb +227 -0
- data/addon/buildr/gwt.rake +82 -0
- data/addon/buildr/hibernate.rb +0 -4
- data/addon/buildr/javacc.rb +0 -4
- data/addon/buildr/javancss.rb +155 -0
- data/addon/buildr/jdepend.rb +138 -24
- data/addon/buildr/jdepend.rb.orig +178 -0
- data/addon/buildr/jetty.rb +0 -5
- data/addon/buildr/jibx.rb +85 -86
- data/addon/buildr/nailgun.rb +2 -2
- data/addon/buildr/openjpa.rb +0 -4
- data/addon/buildr/pmd.rb +166 -0
- data/addon/buildr/protobuf.rb +0 -1
- data/addon/buildr/sonar.rb +142 -0
- data/addon/buildr/xmlbeans.rb +0 -5
- data/buildr.gemspec +36 -21
- data/doc/_layouts/default.html +1 -0
- data/doc/contributing.textile +11 -2
- data/doc/download.textile +17 -5
- data/doc/index.textile +21 -46
- data/doc/installing.textile +18 -8
- data/doc/installing.textile.orig +282 -0
- data/doc/languages.textile +0 -38
- data/doc/more_stuff.textile +199 -12
- data/doc/more_stuff.textile.orig +1004 -0
- data/doc/packaging.textile +10 -0
- data/doc/settings_profiles.textile +2 -2
- data/etc/KEYS +44 -0
- data/lib/buildr.rb +67 -4
- data/lib/buildr/clojure.rb +0 -2
- data/lib/buildr/core/application.rb +23 -32
- data/lib/buildr/core/build.rb +0 -7
- data/lib/buildr/core/cc.rb +0 -5
- data/lib/buildr/core/checks.rb +0 -4
- data/lib/buildr/core/common.rb +0 -5
- data/lib/buildr/core/compile.rb +5 -10
- data/lib/buildr/core/doc.rb +9 -3
- data/lib/buildr/core/environment.rb +0 -1
- data/lib/buildr/core/filter.rb +0 -5
- data/lib/buildr/core/generate.rb +2 -6
- data/lib/buildr/core/help.rb +1 -6
- data/lib/buildr/core/linux.rb +0 -1
- data/lib/buildr/core/osx.rb +0 -1
- data/lib/buildr/core/project.rb +0 -4
- data/lib/buildr/core/run.rb +1 -5
- data/lib/buildr/core/shell.rb +1 -6
- data/lib/buildr/core/test.rb +1 -7
- data/lib/buildr/core/transports.rb +4 -6
- data/lib/buildr/core/util.rb +2 -65
- data/lib/buildr/groovy/doc.rb +0 -3
- data/lib/buildr/groovy/shell.rb +0 -2
- data/lib/buildr/ide/eclipse.rb +4 -13
- data/lib/buildr/ide/eclipse/java.rb +0 -4
- data/lib/buildr/ide/eclipse/plugin.rb +0 -4
- data/lib/buildr/ide/eclipse/scala.rb +0 -4
- data/lib/buildr/ide/idea.rb +284 -52
- data/lib/buildr/java/ant.rb +2 -6
- data/lib/buildr/java/bdd.rb +5 -123
- data/lib/buildr/java/cobertura.rb +16 -10
- data/lib/buildr/java/commands.rb +33 -7
- data/lib/buildr/java/compiler.rb +0 -7
- data/lib/buildr/java/deprecated.rb +0 -4
- data/lib/buildr/java/doc.rb +0 -2
- data/lib/buildr/java/emma.rb +0 -4
- data/lib/buildr/java/jruby.rb +0 -2
- data/lib/buildr/java/packaging.rb +0 -4
- data/lib/buildr/java/pom.rb +24 -16
- data/lib/buildr/java/rjb.rb +1 -1
- data/lib/buildr/java/test_result.rb +1 -2
- data/lib/buildr/java/tests.rb +68 -6
- data/lib/buildr/packaging/archive.rb +0 -1
- data/lib/buildr/packaging/artifact.rb +19 -16
- data/lib/buildr/packaging/artifact_namespace.rb +51 -24
- data/lib/buildr/packaging/artifact_search.rb +1 -2
- data/lib/buildr/packaging/gems.rb +1 -13
- data/lib/buildr/packaging/package.rb +0 -6
- data/lib/buildr/packaging/tar.rb +2 -4
- data/lib/buildr/packaging/version_requirement.rb +1 -1
- data/lib/buildr/packaging/zip.rb +1 -2
- data/lib/buildr/packaging/ziptask.rb +0 -4
- data/lib/buildr/run.rb +3 -3
- data/lib/buildr/scala/bdd.rb +129 -11
- data/lib/buildr/scala/compiler.rb +53 -6
- data/lib/buildr/scala/doc.rb +6 -4
- data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
- data/lib/buildr/scala/org/apache/buildr/Specs2Runner.java +38 -0
- data/lib/buildr/scala/shell.rb +0 -4
- data/lib/buildr/scala/tests.rb +15 -6
- data/lib/buildr/shell.rb +0 -1
- data/lib/buildr/version.rb +1 -1
- data/rakelib/all-in-one.rake +20 -11
- data/rakelib/checks.rake +0 -31
- data/rakelib/doc.rake +86 -100
- data/rakelib/package.rake +3 -3
- data/rakelib/release.rake +1 -1
- data/rakelib/rspec.rake +23 -7
- data/rakelib/stage.rake +18 -21
- data/spec/addon/bnd_spec.rb +2 -2
- data/spec/addon/jaxb_xjc_spec.rb +5 -0
- data/spec/core/application_spec.rb +11 -64
- data/spec/core/cc_spec.rb +12 -5
- data/spec/core/compile_spec.rb +11 -0
- data/spec/core/doc_spec.rb +1 -1
- data/spec/core/run_spec.rb +17 -4
- data/spec/core/test_spec.rb +5 -3
- data/spec/ide/idea_spec.rb +60 -0
- data/spec/java/bdd_spec.rb +8 -218
- data/spec/java/cobertura_spec.rb +4 -0
- data/spec/java/compiler_spec.rb +11 -8
- data/spec/java/emma_spec.rb +4 -1
- data/spec/java/java_spec.rb +1 -1
- data/spec/java/pom_spec.rb +125 -0
- data/spec/java/tests_spec.rb +185 -0
- data/spec/packaging/archive_spec.rb +1 -1
- data/spec/packaging/artifact_namespace_spec.rb +15 -0
- data/spec/packaging/artifact_spec.rb +26 -1
- data/spec/sandbox.rb +7 -1
- data/spec/scala/bdd_spec.rb +111 -8
- data/spec/scala/tests_spec.rb +5 -1
- data/spec/spec_helpers.rb +9 -4
- data/spec/version_requirement_spec.rb +2 -0
- metadata +570 -505
- data/lib/buildr/core.rb +0 -34
- data/lib/buildr/ide.rb +0 -19
- data/lib/buildr/java.rb +0 -25
- data/lib/buildr/java/jtestr_result.rb +0 -331
- data/lib/buildr/java/jtestr_runner.rb.erb +0 -116
- data/lib/buildr/packaging.rb +0 -25
- data/rakelib/setup.rake +0 -68
data/rakelib/checks.rake
CHANGED
@@ -26,34 +26,3 @@ task :license=>FileList["**/*.{rb,rake,java,gemspec,buildfile}", 'Rakefile'] do
|
|
26
26
|
fail "#{missing.join(', ')} missing Apache License, please add it before making a release!" unless missing.empty?
|
27
27
|
puts "[x] Source files contain the Apache license"
|
28
28
|
end
|
29
|
-
|
30
|
-
|
31
|
-
desc "Look for new dependencies, check transitive dependencies"
|
32
|
-
task :dependency do
|
33
|
-
=begin
|
34
|
-
puts "Checking that all dependencies are up to date ..."
|
35
|
-
# Find if anything has a more recent dependency. These are not errors, just reports.
|
36
|
-
spec.dependencies.each do |dep|
|
37
|
-
current = Gem::SourceInfoCache.search(dep).last
|
38
|
-
latest = Gem::SourceInfoCache.search(Gem::Dependency.new(dep.name, '>0')).last
|
39
|
-
puts "A new version of #{dep.name} is available, #{latest.version} replaces #{current.version}" if (current && latest && latest.version > current.version)
|
40
|
-
end
|
41
|
-
|
42
|
-
# Returns orderd list of transitive dependencies for the given dependency.
|
43
|
-
transitive = lambda { |depend|
|
44
|
-
dep_spec = Gem::SourceIndex.from_installed_gems.search(depend).last
|
45
|
-
fail "No specification for dependency #{depend}" unless dep_spec
|
46
|
-
dep_spec.runtime_dependencies.map { |trans| transitive[trans].push(trans) }.flatten.uniq }
|
47
|
-
# For each dependency, make sure *all* its transitive dependencies are listed
|
48
|
-
# as a Buildr dependency, and order is preserved.
|
49
|
-
spec.dependencies.select {|dep| dep.type == :runtime }.each_with_index do |dep, index|
|
50
|
-
puts "checking #{dep.name}"
|
51
|
-
transitive[dep].each do |trans|
|
52
|
-
matching = spec.dependencies.find { |existing| trans =~ existing }
|
53
|
-
fail "#{trans} required by #{dep} and missing from spec" unless matching
|
54
|
-
fail "#{trans} must come before #{dep} in dependency list" unless spec.dependencies.index(matching) < index
|
55
|
-
end
|
56
|
-
end
|
57
|
-
puts "[X] Checked all dependencies are up to date and transitive dependencies are correctly ordered"
|
58
|
-
=end
|
59
|
-
end
|
data/rakelib/doc.rake
CHANGED
@@ -13,125 +13,111 @@
|
|
13
13
|
# License for the specific language governing permissions and limitations under
|
14
14
|
# the License.
|
15
15
|
|
16
|
+
if !RUBY_PLATFORM[/java/]
|
17
|
+
gem 'rdoc'
|
18
|
+
require 'rdoc/task'
|
19
|
+
desc "Creates a symlink to rake's lib directory to support combined rdoc generation"
|
20
|
+
file "rake/lib" do
|
21
|
+
rake_path = $LOAD_PATH.find { |p| File.exist? File.join(p, "rake.rb") }
|
22
|
+
mkdir_p "rake"
|
23
|
+
File.symlink(rake_path, "rake/lib")
|
24
|
+
end
|
16
25
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
require 'rake/rdoctask'
|
27
|
-
|
28
|
-
desc "Creates a symlink to rake's lib directory to support combined rdoc generation"
|
29
|
-
file "rake/lib" do
|
30
|
-
rake_path = $LOAD_PATH.find { |p| File.exist? File.join(p, "rake.rb") }
|
31
|
-
mkdir_p "rake"
|
32
|
-
File.symlink(rake_path, "rake/lib")
|
33
|
-
end
|
34
|
-
|
35
|
-
desc "Generate RDoc documentation in rdoc/"
|
36
|
-
Rake::RDocTask.new :rdoc do |rdoc|
|
37
|
-
rdoc.rdoc_dir = 'rdoc'
|
38
|
-
rdoc.title = spec.name
|
39
|
-
rdoc.options = spec.rdoc_options.clone
|
40
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
41
|
-
rdoc.rdoc_files.include spec.extra_rdoc_files
|
42
|
-
|
43
|
-
# include rake source for better inheritance rdoc
|
44
|
-
rdoc.rdoc_files.include('rake/lib/**.rb')
|
45
|
-
end
|
46
|
-
task :rdoc => ["rake/lib"]
|
26
|
+
desc "Generate RDoc documentation in rdoc/"
|
27
|
+
RDoc::Task.new :rdoc do |rdoc|
|
28
|
+
rdoc.rdoc_dir = 'rdoc'
|
29
|
+
rdoc.title = spec.name
|
30
|
+
rdoc.options = spec.rdoc_options.clone
|
31
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
32
|
+
rdoc.rdoc_files.include spec.extra_rdoc_files
|
47
33
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
34
|
+
# include rake source for better inheritance rdoc
|
35
|
+
rdoc.rdoc_files.include('rake/lib/**.rb')
|
36
|
+
end
|
37
|
+
task :rdoc => ["rake/lib"]
|
38
|
+
|
39
|
+
begin
|
40
|
+
require 'jekylltask'
|
41
|
+
module TocFilter
|
42
|
+
def toc(input)
|
43
|
+
output = "<ol class=\"toc\">"
|
44
|
+
input.scan(/<(h2)(?:>|\s+(.*?)>)([^<]*)<\/\1\s*>/mi).each do |entry|
|
45
|
+
id = (entry[1][/^id=(['"])(.*)\1$/, 2] rescue nil)
|
46
|
+
title = entry[2].gsub(/<(\w*).*?>(.*?)<\/\1\s*>/m, '\2').strip
|
47
|
+
if id
|
48
|
+
output << %{<li><a href="##{id}">#{title}</a></li>}
|
49
|
+
else
|
50
|
+
output << %{<li>#{title}</li>}
|
51
|
+
end
|
60
52
|
end
|
53
|
+
output << "</ol>"
|
54
|
+
output
|
61
55
|
end
|
62
|
-
output << "</ol>"
|
63
|
-
output
|
64
56
|
end
|
65
|
-
|
66
|
-
Liquid::Template.register_filter(TocFilter)
|
67
|
-
|
68
|
-
desc "Generate Buildr documentation in _site/"
|
69
|
-
JekyllTask.new :jekyll do |task|
|
70
|
-
task.source = 'doc'
|
71
|
-
task.target = '_site'
|
72
|
-
end
|
57
|
+
Liquid::Template.register_filter(TocFilter)
|
73
58
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
install_gem 'jekylltask', :version=>'1.0.2'
|
79
|
-
if `pygmentize -V`.empty?
|
80
|
-
args = %w{easy_install Pygments}
|
81
|
-
args.unshift 'sudo' unless Config::CONFIG['host_os'] =~ /windows/
|
82
|
-
sh *args
|
59
|
+
desc "Generate Buildr documentation in _site/"
|
60
|
+
JekyllTask.new :jekyll do |task|
|
61
|
+
task.source = 'doc'
|
62
|
+
task.target = '_site'
|
83
63
|
end
|
64
|
+
|
65
|
+
rescue LoadError
|
66
|
+
puts "Buildr uses the jekyll gem to generate the Web site. You can install it by running bundler"
|
84
67
|
end
|
85
|
-
end
|
86
68
|
|
69
|
+
if 0 == system("pygmentize -V > /dev/null 2> /dev/null")
|
70
|
+
puts "Buildr uses the Pygments python library. You can install it by running 'sudo easy_install Pygments' or 'sudo apt-get install python-pygments'"
|
71
|
+
end
|
87
72
|
|
88
|
-
desc "Generate Buildr documentation as buildr.pdf"
|
89
|
-
file 'buildr.pdf'=>'_site' do |task|
|
90
|
-
|
91
|
-
|
92
|
-
end
|
73
|
+
desc "Generate Buildr documentation as buildr.pdf"
|
74
|
+
file 'buildr.pdf'=>'_site' do |task|
|
75
|
+
pages = File.read('_site/preface.html').scan(/<li><a href=['"]([^'"]+)/).flatten.map { |f| "_site/#{f}" }
|
76
|
+
sh 'prince', '--input=html', '--no-network', '--log=prince_errors.log', "--output=#{task.name}", '_site/preface.html', *pages
|
77
|
+
end
|
93
78
|
|
94
|
-
desc "Build a copy of the Web site in the ./_site"
|
95
|
-
task :site=>['_site', :rdoc, '_reports/specs.html', '_reports/coverage', 'buildr.pdf'] do
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
79
|
+
desc "Build a copy of the Web site in the ./_site"
|
80
|
+
task :site=>['_site', :rdoc, '_reports/specs.html', '_reports/coverage', 'buildr.pdf'] do
|
81
|
+
cp_r 'rdoc', '_site'
|
82
|
+
fail 'No RDocs in site directory' unless File.exist?('_site/rdoc/lib/buildr_rb.html')
|
83
|
+
cp '_reports/specs.html', '_site'
|
84
|
+
cp_r '_reports/coverage', '_site'
|
85
|
+
fail 'No coverage report in site directory' unless File.exist?('_site/coverage/index.html')
|
86
|
+
cp 'CHANGELOG', '_site'
|
87
|
+
open("_site/.htaccess", "w") do |htaccess|
|
88
|
+
htaccess << %Q{
|
104
89
|
<FilesMatch "CHANGELOG">
|
105
90
|
ForceType 'text/plain; charset=UTF-8'
|
106
91
|
</FilesMatch>
|
107
92
|
}
|
93
|
+
end
|
94
|
+
cp 'buildr.pdf', '_site'
|
95
|
+
fail 'No PDF in site directory' unless File.exist?('_site/buildr.pdf')
|
96
|
+
puts 'OK'
|
108
97
|
end
|
109
|
-
cp 'buildr.pdf', '_site'
|
110
|
-
fail 'No PDF in site directory' unless File.exist?('_site/buildr.pdf')
|
111
|
-
puts 'OK'
|
112
|
-
end
|
113
98
|
|
114
99
|
# Publish prerequisites to Web site.
|
115
|
-
task 'publish'=>:site do
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
end
|
100
|
+
task 'publish'=>:site do
|
101
|
+
target = "people.apache.org:/www/#{spec.name}.apache.org/"
|
102
|
+
puts "Uploading new site to #{target} ..."
|
103
|
+
sh 'rsync', '--progress', '--recursive', '--delete', '_site/', target
|
104
|
+
sh 'ssh', 'people.apache.org', 'chmod', '-f', '-R', 'g+w', "/www/#{spec.name}.apache.org/*"
|
105
|
+
puts "Done"
|
106
|
+
end
|
122
107
|
|
123
108
|
# Update HTML + PDF documentation (but not entire site; no specs, coverage, etc.)
|
124
|
-
task 'publish-doc' => ['buildr.pdf', '_site'] do
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
end
|
109
|
+
task 'publish-doc' => ['buildr.pdf', '_site'] do
|
110
|
+
cp 'buildr.pdf', '_site'
|
111
|
+
target = "people.apache.org:/www/#{spec.name}.apache.org/"
|
112
|
+
puts "Uploading new site to #{target} ..."
|
113
|
+
sh 'rsync', '--progress', '--recursive', '_site/', target # Note: no --delete
|
114
|
+
sh 'ssh', 'people.apache.org', 'chmod', '-f', '-R', 'g+w', "/www/#{spec.name}.apache.org/*"
|
115
|
+
puts "Done"
|
116
|
+
end
|
132
117
|
|
133
|
-
task :clobber do
|
134
|
-
|
135
|
-
|
136
|
-
|
118
|
+
task :clobber do
|
119
|
+
rm_rf '_site'
|
120
|
+
rm_f 'buildr.pdf'
|
121
|
+
rm_f 'prince_errors.log'
|
122
|
+
end
|
137
123
|
end
|
data/rakelib/package.rake
CHANGED
@@ -25,7 +25,7 @@ end
|
|
25
25
|
desc "Install Buildr from source"
|
26
26
|
task :install=>["#{package.package_dir}/#{package.gem_spec.file_name}"] do |task|
|
27
27
|
print "Installing #{spec.name} ... "
|
28
|
-
args =
|
28
|
+
args = RbConfig::CONFIG['ruby_install_name'], '-S', 'gem', 'install', "#{package.package_dir}/#{package.gem_spec.file_name}"
|
29
29
|
args.unshift('sudo') if sudo_needed?
|
30
30
|
sh *args
|
31
31
|
puts "[x] Installed Buildr #{spec.version}"
|
@@ -34,7 +34,7 @@ end
|
|
34
34
|
desc "Uninstall previous rake install"
|
35
35
|
task :uninstall do |task|
|
36
36
|
puts "Uninstalling #{spec.name} ... "
|
37
|
-
args =
|
37
|
+
args = RbConfig::CONFIG['ruby_install_name'], '-S', 'gem', 'uninstall', spec.name, '--version', spec.version.to_s
|
38
38
|
args.unshift('sudo') if sudo_needed?
|
39
39
|
sh *args
|
40
40
|
puts "[x] Uninstalled Buildr #{spec.version}"
|
@@ -44,7 +44,7 @@ end
|
|
44
44
|
desc "Compile Java libraries used by Buildr"
|
45
45
|
task :compile do
|
46
46
|
puts "Compiling Java libraries ..."
|
47
|
-
args =
|
47
|
+
args = RbConfig::CONFIG['ruby_install_name'], File.expand_path(RUBY_PLATFORM[/java/] ? '_jbuildr' : '_buildr'), '--buildfile', 'buildr.buildfile', 'compile'
|
48
48
|
args << '--trace' if Rake.application.options.trace
|
49
49
|
sh *args
|
50
50
|
end
|
data/rakelib/release.rake
CHANGED
@@ -38,7 +38,7 @@ task :release do
|
|
38
38
|
target = "people.apache.org:/www/#{spec.name}.apache.org/"
|
39
39
|
puts "Uploading new site to #{spec.name}.apache.org ..."
|
40
40
|
sh 'rsync', '--progress', '--recursive', '--delete', "_release/#{spec.version}/site/", target
|
41
|
-
sh 'ssh', 'people.apache.org', 'chmod', '-R', 'g+w', "/www/#{spec.name}.apache.org/*"
|
41
|
+
sh 'ssh', 'people.apache.org', 'chmod', '-f', '-R', 'g+w', "/www/#{spec.name}.apache.org/*"
|
42
42
|
puts "[X] Uploaded new site to #{spec.name}.apache.org"
|
43
43
|
end.call
|
44
44
|
|
data/rakelib/rspec.rake
CHANGED
@@ -65,19 +65,37 @@ begin
|
|
65
65
|
desc 'Run all specs with CI reporter'
|
66
66
|
task :ci=>[:load_ci_reporter, :spec]
|
67
67
|
|
68
|
+
def rvm_run_in(version, command)
|
69
|
+
if !(Config::CONFIG['host_os'] =~ /mswin|win32|dos/i)
|
70
|
+
cmd_prefix = "rvm #{version} exec"
|
71
|
+
sh "rm -f Gemfile.lock; #{cmd_prefix} bundle install; #{cmd_prefix} bundle exec #{command}"
|
72
|
+
else
|
73
|
+
sh "#{version =~ /jruby/ ? "j" : ""}ruby -S #{command}"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
68
77
|
# Useful for testing with JRuby when using Ruby and vice versa.
|
69
78
|
namespace :spec do
|
70
|
-
desc "Run all specs specifically with Ruby"
|
71
|
-
task :
|
79
|
+
desc "Run all specs specifically with Ruby 1.9"
|
80
|
+
task :ruby_1_9 do
|
72
81
|
puts "Running test suite using Ruby ..."
|
73
|
-
|
82
|
+
rvm_run_in("ruby-1.9.2-p320@buildr", "rake spec")
|
83
|
+
end
|
84
|
+
|
85
|
+
desc "Run all specs specifically with Ruby 1.8"
|
86
|
+
task :ruby_1_8 do
|
87
|
+
puts "Running test suite using Ruby ..."
|
88
|
+
rvm_run_in("ruby-1.8.7-p358@buildr", "rake spec")
|
74
89
|
end
|
75
90
|
|
76
91
|
desc "Run all specs specifically with JRuby"
|
77
92
|
task :jruby do
|
78
93
|
puts "Running test suite using JRuby ..."
|
79
|
-
|
94
|
+
rvm_run_in("jruby-1.6.7@buildr", "rake spec")
|
80
95
|
end
|
96
|
+
|
97
|
+
desc "Run all specs across various rubies"
|
98
|
+
task :all => [:jruby, :ruby_1_8, :ruby_1_9]
|
81
99
|
end
|
82
100
|
|
83
101
|
task :clobber do
|
@@ -86,7 +104,5 @@ begin
|
|
86
104
|
end
|
87
105
|
|
88
106
|
rescue LoadError => e
|
89
|
-
puts "Buildr uses RSpec. You can install it by running
|
90
|
-
task(:setup) { install_gem 'rcov', :version=>'~>0.8' }
|
91
|
-
task(:setup) { install_gem 'win32console' if RUBY_PLATFORM[/win32/] } # Colors for RSpec, only on Windows platform.
|
107
|
+
puts "Buildr uses RSpec. You can install it by running bundler"
|
92
108
|
end
|
data/rakelib/stage.rake
CHANGED
@@ -13,19 +13,15 @@
|
|
13
13
|
# License for the specific language governing permissions and limitations under
|
14
14
|
# the License.
|
15
15
|
|
16
|
-
|
16
|
+
require 'rubyforge'
|
17
17
|
require 'digest/md5'
|
18
18
|
require 'digest/sha1'
|
19
19
|
|
20
|
-
begin # Releases upload Gems to RubyForge.
|
21
|
-
require 'rubyforge'
|
22
|
-
rescue LoadError
|
23
|
-
task(:setup) { install_gem 'rubyforge' }
|
24
|
-
end
|
25
|
-
|
26
20
|
gpg_cmd = 'gpg2'
|
27
21
|
|
28
22
|
task :prepare do |task, args|
|
23
|
+
gpg_arg = args.gpg || ENV['gpg']
|
24
|
+
|
29
25
|
# Make sure we're doing a release from checked code.
|
30
26
|
lambda do
|
31
27
|
puts "Checking there are no local changes ... "
|
@@ -41,31 +37,30 @@ task :prepare do |task, args|
|
|
41
37
|
puts "Checking that CHANGELOG indicates most recent version and today's date ... "
|
42
38
|
expecting = "#{spec.version} (#{Time.now.strftime('%Y-%m-%d')})"
|
43
39
|
header = File.readlines('CHANGELOG').first.chomp
|
44
|
-
|
40
|
+
fail "Expecting CHANGELOG to start with #{expecting}, but found #{header} instead" unless expecting == header
|
45
41
|
puts "[x] CHANGELOG indicates most recent version and today's date"
|
46
42
|
end.call
|
47
43
|
|
48
44
|
# Need GPG to sign the packages.
|
49
45
|
lambda do
|
50
|
-
|
51
|
-
gpg_ok = `gpg2 --list-keys #{
|
46
|
+
gpg_arg or fail "Please run with gpg=<argument for gpg --local-user>"
|
47
|
+
gpg_ok = `gpg2 --list-keys #{gpg_arg}` rescue nil
|
52
48
|
if !$?.success?
|
53
|
-
gpg_ok = `gpg --list-keys #{
|
49
|
+
gpg_ok = `gpg --list-keys #{gpg_arg}`
|
54
50
|
gpg_cmd = 'gpg'
|
55
51
|
end
|
56
|
-
fail "No GPG user #{
|
52
|
+
fail "No GPG user #{gpg_arg}" if gpg_ok.empty?
|
57
53
|
end.call
|
58
54
|
|
59
55
|
task(:license).invoke
|
60
|
-
task(:dependency).invoke
|
61
56
|
|
62
57
|
# Need JRuby, Scala and Groovy installed to run all the specs.
|
63
58
|
lambda do
|
64
|
-
puts "Checking that we have
|
65
|
-
|
66
|
-
|
59
|
+
puts "Checking that we have Scala and Groovy available ... "
|
60
|
+
`scala -version`
|
61
|
+
$?.exitstatus == 1 or fail "Scala is not installed"
|
67
62
|
sh 'groovy -version'
|
68
|
-
puts "[X] We have
|
63
|
+
puts "[X] We have Scala and Groovy"
|
69
64
|
end.call
|
70
65
|
|
71
66
|
# Need Prince to generate PDF
|
@@ -84,11 +79,13 @@ task :prepare do |task, args|
|
|
84
79
|
end.call
|
85
80
|
|
86
81
|
# We will be speccing in one platform, so also spec the other one.
|
87
|
-
task(
|
82
|
+
task('spec:ruby_1_9').invoke unless RUBY_VERSION >= '1.9' && !RUBY_PLATFORM[/java/]
|
83
|
+
task('spec:ruby_1_8').invoke unless RUBY_VERSION >= '1.8.7' && !RUBY_PLATFORM[/java/]
|
84
|
+
task('spec:jruby').invoke unless RUBY_PLATFORM[/java/]
|
88
85
|
end
|
89
86
|
|
90
|
-
|
91
|
-
|
87
|
+
task :stage=>[:clobber, :prepare] do |task, args|
|
88
|
+
gpg_arg = args.gpg || ENV['gpg']
|
92
89
|
mkpath '_staged'
|
93
90
|
|
94
91
|
# Start by figuring out what has changed.
|
@@ -117,7 +114,7 @@ task :stage=>['setup', 'doc:setup', :clobber, :prepare] do |task, args|
|
|
117
114
|
bytes = File.open(pkg, 'rb') { |file| file.read }
|
118
115
|
File.open(pkg + '.md5', 'w') { |file| file.write Digest::MD5.hexdigest(bytes) << ' ' << File.basename(pkg) }
|
119
116
|
File.open(pkg + '.sha1', 'w') { |file| file.write Digest::SHA1.hexdigest(bytes) << ' ' << File.basename(pkg) }
|
120
|
-
sh gpg_cmd, '--local-user',
|
117
|
+
sh gpg_cmd, '--local-user', gpg_arg, '--armor', '--output', pkg + '.asc', '--detach-sig', pkg, :verbose=>true
|
121
118
|
end
|
122
119
|
cp 'etc/KEYS', '_staged/dist'
|
123
120
|
puts "[X] Created and signed release packages in _staged/dist"
|
data/spec/addon/bnd_spec.rb
CHANGED
@@ -273,14 +273,14 @@ SRC
|
|
273
273
|
|
274
274
|
it "defaults -classpath to compile path and dependencies" do
|
275
275
|
@foo.packages[0].to_params['-classpath'].should include(@foo.compile.target.to_s)
|
276
|
-
@foo.packages[0].to_params['-classpath'].should include(Buildr.
|
276
|
+
@foo.packages[0].to_params['-classpath'].should include(Buildr.artifact(Buildr::Ant.dependencies[0]).to_s)
|
277
277
|
@bar.packages[0].to_params['-classpath'].should include(@bar.compile.target.to_s)
|
278
278
|
end
|
279
279
|
|
280
280
|
it "classpath method returns compile path and dependencies" do
|
281
281
|
@foo.packages[0].classpath.should include(@foo.compile.target)
|
282
282
|
Buildr::Ant.dependencies.each do |dependency|
|
283
|
-
@foo.packages[0].classpath.to_s.should include(Buildr.
|
283
|
+
@foo.packages[0].classpath.to_s.should include(Buildr.artifact(dependency).to_s)
|
284
284
|
end
|
285
285
|
@bar.packages[0].classpath.should include(@bar.compile.target)
|
286
286
|
end
|
data/spec/addon/jaxb_xjc_spec.rb
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
# License for the specific language governing permissions and limitations under
|
14
14
|
# the License.
|
15
15
|
|
16
|
+
if Java.java.lang.System.getProperty("java.runtime.version") >= "1.6"
|
16
17
|
|
17
18
|
require File.expand_path('../spec_helpers', File.dirname(__FILE__))
|
18
19
|
Sandbox.require_optional_extension 'buildr/jaxb_xjc'
|
@@ -123,3 +124,7 @@ describe Buildr::JaxbXjc do
|
|
123
124
|
end
|
124
125
|
end
|
125
126
|
end
|
127
|
+
|
128
|
+
elsif Buildr::VERSION >= '1.5'
|
129
|
+
raise "JVM version guard in #{__FILE__} should be removed since it is assumed that Java 1.5 is no longer supported."
|
130
|
+
end
|