ittayd-buildr 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +62 -9
- data/NOTICE +1 -1
- data/README.rdoc +9 -21
- data/Rakefile +20 -39
- data/_buildr +1 -0
- data/{spec/java/ant.rb → _jbuildr} +11 -15
- metadata +30 -210
- data/DISCLAIMER +0 -7
- data/addon/buildr/antlr.rb +0 -65
- data/addon/buildr/cobertura.rb +0 -22
- data/addon/buildr/drb.rb +0 -281
- data/addon/buildr/emma.rb +0 -22
- data/addon/buildr/hibernate.rb +0 -142
- data/addon/buildr/javacc.rb +0 -85
- data/addon/buildr/jdepend.rb +0 -60
- data/addon/buildr/jetty.rb +0 -248
- data/addon/buildr/jibx.rb +0 -86
- data/addon/buildr/nailgun.rb +0 -221
- data/addon/buildr/openjpa.rb +0 -90
- data/addon/buildr/org/apache/buildr/BuildrNail$Main.class +0 -0
- data/addon/buildr/org/apache/buildr/BuildrNail.class +0 -0
- data/addon/buildr/org/apache/buildr/BuildrNail.java +0 -41
- data/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
- data/addon/buildr/org/apache/buildr/JettyWrapper.java +0 -144
- data/addon/buildr/path.rb +0 -136
- data/addon/buildr/xmlbeans.rb +0 -93
- data/buildr.buildfile +0 -53
- data/buildr.gemspec +0 -58
- data/doc/css/default.css +0 -228
- data/doc/css/print.css +0 -100
- data/doc/css/syntax.css +0 -52
- data/doc/images/apache-incubator-logo.png +0 -0
- data/doc/images/buildr-hires.png +0 -0
- data/doc/images/buildr.png +0 -0
- data/doc/images/favicon.png +0 -0
- data/doc/images/growl-icon.tiff +0 -0
- data/doc/images/note.png +0 -0
- data/doc/images/project-structure.png +0 -0
- data/doc/images/tip.png +0 -0
- data/doc/images/zbuildr.tif +0 -0
- data/doc/pages/artifacts.textile +0 -207
- data/doc/pages/building.textile +0 -240
- data/doc/pages/contributing.textile +0 -208
- data/doc/pages/download.textile +0 -62
- data/doc/pages/extending.textile +0 -175
- data/doc/pages/getting_started.textile +0 -273
- data/doc/pages/index.textile +0 -42
- data/doc/pages/languages.textile +0 -407
- data/doc/pages/mailing_lists.textile +0 -17
- data/doc/pages/more_stuff.textile +0 -314
- data/doc/pages/packaging.textile +0 -427
- data/doc/pages/projects.textile +0 -274
- data/doc/pages/recipes.textile +0 -103
- data/doc/pages/settings_profiles.textile +0 -274
- data/doc/pages/testing.textile +0 -212
- data/doc/pages/troubleshooting.textile +0 -103
- data/doc/pages/whats_new.textile +0 -323
- data/doc/print.haml +0 -51
- data/doc/print.toc.yaml +0 -29
- data/doc/scripts/buildr-git.rb +0 -412
- data/doc/scripts/install-jruby.sh +0 -44
- data/doc/scripts/install-linux.sh +0 -64
- data/doc/scripts/install-osx.sh +0 -52
- data/doc/site.haml +0 -56
- data/doc/site.toc.yaml +0 -47
- data/etc/KEYS +0 -151
- data/etc/git-svn-authors +0 -16
- data/lib/buildr.rb +0 -33
- data/lib/buildr/core.rb +0 -29
- data/lib/buildr/core/application.rb +0 -665
- data/lib/buildr/core/build.rb +0 -311
- data/lib/buildr/core/checks.rb +0 -254
- data/lib/buildr/core/common.rb +0 -150
- data/lib/buildr/core/compile.rb +0 -590
- data/lib/buildr/core/environment.rb +0 -117
- data/lib/buildr/core/filter.rb +0 -366
- data/lib/buildr/core/generate.rb +0 -195
- data/lib/buildr/core/help.rb +0 -119
- data/lib/buildr/core/osx.rb +0 -49
- data/lib/buildr/core/progressbar.rb +0 -156
- data/lib/buildr/core/project.rb +0 -923
- data/lib/buildr/core/test.rb +0 -715
- data/lib/buildr/core/transports.rb +0 -560
- data/lib/buildr/core/util.rb +0 -294
- data/lib/buildr/groovy.rb +0 -18
- data/lib/buildr/groovy/bdd.rb +0 -106
- data/lib/buildr/groovy/compiler.rb +0 -138
- data/lib/buildr/ide.rb +0 -19
- data/lib/buildr/ide/eclipse.rb +0 -222
- data/lib/buildr/ide/idea.ipr.template +0 -300
- data/lib/buildr/ide/idea.rb +0 -190
- data/lib/buildr/ide/idea7x.ipr.template +0 -290
- data/lib/buildr/ide/idea7x.rb +0 -212
- data/lib/buildr/java.rb +0 -23
- data/lib/buildr/java/ant.rb +0 -92
- data/lib/buildr/java/bdd.rb +0 -451
- data/lib/buildr/java/cobertura.rb +0 -236
- data/lib/buildr/java/commands.rb +0 -211
- data/lib/buildr/java/compiler.rb +0 -348
- data/lib/buildr/java/deprecated.rb +0 -141
- data/lib/buildr/java/emma.rb +0 -238
- data/lib/buildr/java/jruby.rb +0 -117
- data/lib/buildr/java/jtestr_runner.rb.erb +0 -116
- data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
- data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +0 -119
- data/lib/buildr/java/packaging.rb +0 -717
- data/lib/buildr/java/pom.rb +0 -174
- data/lib/buildr/java/rjb.rb +0 -155
- data/lib/buildr/java/test_result.rb +0 -307
- data/lib/buildr/java/tests.rb +0 -329
- data/lib/buildr/java/version_requirement.rb +0 -172
- data/lib/buildr/packaging.rb +0 -24
- data/lib/buildr/packaging/archive.rb +0 -488
- data/lib/buildr/packaging/artifact.rb +0 -759
- data/lib/buildr/packaging/artifact_namespace.rb +0 -972
- data/lib/buildr/packaging/artifact_search.rb +0 -140
- data/lib/buildr/packaging/gems.rb +0 -102
- data/lib/buildr/packaging/package.rb +0 -233
- data/lib/buildr/packaging/tar.rb +0 -186
- data/lib/buildr/packaging/version_requirement.rb +0 -172
- data/lib/buildr/packaging/zip.rb +0 -64
- data/lib/buildr/packaging/ziptask.rb +0 -313
- data/lib/buildr/resources/buildr.icns +0 -0
- data/lib/buildr/scala.rb +0 -19
- data/lib/buildr/scala/compiler.rb +0 -109
- data/lib/buildr/scala/tests.rb +0 -203
- data/rakelib/apache.rake +0 -191
- data/rakelib/changelog.rake +0 -57
- data/rakelib/doc.rake +0 -103
- data/rakelib/package.rake +0 -76
- data/rakelib/release.rake +0 -65
- data/rakelib/rspec.rake +0 -83
- data/rakelib/rubyforge.rake +0 -56
- data/rakelib/scm.rake +0 -49
- data/rakelib/setup.rake +0 -81
- data/rakelib/stage.rake +0 -48
- data/spec/addon/drb_spec.rb +0 -328
- data/spec/core/application_spec.rb +0 -419
- data/spec/core/build_spec.rb +0 -423
- data/spec/core/checks_spec.rb +0 -519
- data/spec/core/common_spec.rb +0 -670
- data/spec/core/compile_spec.rb +0 -582
- data/spec/core/generate_spec.rb +0 -33
- data/spec/core/project_spec.rb +0 -776
- data/spec/core/test_spec.rb +0 -1098
- data/spec/core/transport_spec.rb +0 -500
- data/spec/groovy/bdd_spec.rb +0 -80
- data/spec/groovy/compiler_spec.rb +0 -239
- data/spec/ide/eclipse_spec.rb +0 -311
- data/spec/java/bdd_spec.rb +0 -358
- data/spec/java/cobertura_spec.rb +0 -77
- data/spec/java/compiler_spec.rb +0 -446
- data/spec/java/emma_spec.rb +0 -120
- data/spec/java/java_spec.rb +0 -96
- data/spec/java/packaging_spec.rb +0 -1120
- data/spec/java/test_coverage_spec.rb +0 -255
- data/spec/java/tests_spec.rb +0 -471
- data/spec/packaging/archive_spec.rb +0 -503
- data/spec/packaging/artifact_namespace_spec.rb +0 -646
- data/spec/packaging/artifact_spec.rb +0 -795
- data/spec/packaging/packaging_helper.rb +0 -63
- data/spec/packaging/packaging_spec.rb +0 -589
- data/spec/sandbox.rb +0 -139
- data/spec/scala/compiler_spec.rb +0 -228
- data/spec/scala/tests_spec.rb +0 -215
- data/spec/spec_helpers.rb +0 -327
- data/spec/version_requirement_spec.rb +0 -123
data/rakelib/changelog.rake
DELETED
@@ -1,57 +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
|
-
# Handling of CHANGELOG.
|
18
|
-
namespace 'changelog' do
|
19
|
-
|
20
|
-
task 'check'=>'CHANGELOG' do
|
21
|
-
print 'Checking that CHANGELOG indicates most recent version and today\'s date ... '
|
22
|
-
expecting = "#{spec.version} (#{Time.now.strftime('%Y-%m-%d')})"
|
23
|
-
header = File.readlines('CHANGELOG').first.chomp
|
24
|
-
fail "Expecting CHANGELOG to start with #{expecting}, but found #{header} instead" unless expecting == header
|
25
|
-
puts 'OK'
|
26
|
-
end
|
27
|
-
|
28
|
-
file 'staged/CHANGES'=>'CHANGELOG' do |task|
|
29
|
-
# Read the changes for this release.
|
30
|
-
print 'Looking for changes between this release and previous one ... '
|
31
|
-
pattern = /(^(\d+\.\d+(?:\.\d+)?)\s+\(\d{4}-\d{2}-\d{2}\)\s*((:?^[^\n]+\n)*))/
|
32
|
-
changes = File.read('CHANGELOG').scan(pattern).inject({}) { |hash, set| hash[set[1]] = set[2] ; hash }
|
33
|
-
current = changes[spec.version.to_s]
|
34
|
-
fail "No changeset found for version #{spec.version}" unless current
|
35
|
-
File.open task.name, 'w' do |file|
|
36
|
-
file.write "#{spec.version} (#{Time.now.strftime('%Y-%m-%d')})\n"
|
37
|
-
file.write current
|
38
|
-
end
|
39
|
-
puts 'OK'
|
40
|
-
end
|
41
|
-
|
42
|
-
task 'wrapup'=>'CHANGELOG' do
|
43
|
-
next_version = spec.version.to_s.split('.').map { |v| v.to_i }.
|
44
|
-
zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
|
45
|
-
print 'Adding new entry to CHANGELOG ... '
|
46
|
-
modified = "#{next_version} (Pending)\n\n" + File.read('CHANGELOG')
|
47
|
-
File.open 'CHANGELOG', 'w' do |file|
|
48
|
-
file.write modified
|
49
|
-
end
|
50
|
-
puts 'Done'
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
task 'stage:check'=>'changelog:check'
|
56
|
-
task 'stage:prepare'=>'staged/CHANGES'
|
57
|
-
task 'release:wrapup'=>'changelog:wrapup'
|
data/rakelib/doc.rake
DELETED
@@ -1,103 +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 'rake/rdoctask'
|
18
|
-
|
19
|
-
desc 'Generate RDoc documentation'
|
20
|
-
rdoc = Rake::RDocTask.new('rdoc') do |rdoc|
|
21
|
-
rdoc.rdoc_dir = 'rdoc'
|
22
|
-
rdoc.title = spec.name
|
23
|
-
rdoc.options = spec.rdoc_options + ['--promiscuous']
|
24
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
|
-
rdoc.rdoc_files.include spec.extra_rdoc_files
|
26
|
-
end
|
27
|
-
|
28
|
-
|
29
|
-
begin
|
30
|
-
gem 'allison'
|
31
|
-
rdoc.template = File.expand_path('lib/allison.rb', Gem.loaded_specs['allison'].full_gem_path)
|
32
|
-
rescue LoadError
|
33
|
-
puts 'Please run rake setup to install the Allison RDoc template'
|
34
|
-
task 'setup' do
|
35
|
-
install_gem 'allison'
|
36
|
-
end
|
37
|
-
task 'stage:check' do
|
38
|
-
fail 'Please run rake setup to install the Allison RDoc template'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
begin
|
44
|
-
require 'docter'
|
45
|
-
require 'docter/server'
|
46
|
-
|
47
|
-
#Docter.filter_for(:footnote) do |html|
|
48
|
-
# html.gsub(/<p id="fn(\d+)">(.*?)<\/p>/, %{<p id="fn\\1" class="footnote">\\2</p>})
|
49
|
-
#end
|
50
|
-
|
51
|
-
collection = Docter.collection(spec.name).using('doc/site.toc.yaml').include('doc/pages', 'LICENSE', 'CHANGELOG')
|
52
|
-
# TODO: Add coverage reports when we get them to run.
|
53
|
-
template = Docter.template('doc/site.haml').
|
54
|
-
include('doc/css', 'doc/images', 'doc/scripts', 'reports/coverage', 'reports/specs.html', 'rdoc', 'print/buildr.pdf')
|
55
|
-
|
56
|
-
desc 'Run Docter server on port 3000'
|
57
|
-
Docter::Rake.serve 'docter', collection, template, :port=>3000
|
58
|
-
|
59
|
-
desc 'Generate Web site in directory site'
|
60
|
-
Docter::Rake.generate 'site', collection, template
|
61
|
-
|
62
|
-
Docter::Rake.generate 'print',
|
63
|
-
Docter.collection(spec.name).using('doc/print.toc.yaml').include('doc/pages'),
|
64
|
-
Docter.template('doc/print.haml').include('doc/css', 'doc/images'), :one_page
|
65
|
-
|
66
|
-
file('print/buildr.pdf'=>'print') do |task|
|
67
|
-
mkpath 'site'
|
68
|
-
sh 'prince', 'print/index.html', '-o', task.name, '--media=print' do |ok, res|
|
69
|
-
fail 'Failed to create PDF, see errors above' unless ok
|
70
|
-
end
|
71
|
-
end
|
72
|
-
task 'site'=>'print/buildr.pdf' do
|
73
|
-
cp 'print/buildr.pdf', 'site'
|
74
|
-
end
|
75
|
-
|
76
|
-
task 'site' do
|
77
|
-
print 'Checking that we have site documentation, RDoc and PDF ... '
|
78
|
-
fail 'No PDF generated, you need to install PrinceXML!' unless File.exist?('site/buildr.pdf')
|
79
|
-
fail 'No RDocs in site directory' unless File.exist?('site/rdoc/files/lib/buildr_rb.html')
|
80
|
-
fail 'No site documentation in site directory' unless File.exist?('site/index.html')
|
81
|
-
fail 'No specifications site directory' unless File.exist?('site/specs.html')
|
82
|
-
puts 'OK'
|
83
|
-
end
|
84
|
-
|
85
|
-
desc 'Produce PDF'
|
86
|
-
task 'pdf'=>'print/buildr.pdf' do |task|
|
87
|
-
sh 'open', 'print/buildr.pdf'
|
88
|
-
end
|
89
|
-
|
90
|
-
task 'clobber' do
|
91
|
-
rm_rf 'print'
|
92
|
-
rm_rf 'site'
|
93
|
-
end
|
94
|
-
|
95
|
-
rescue LoadError
|
96
|
-
puts 'Please run rake setup to install the Docter document generation library'
|
97
|
-
task 'setup' do
|
98
|
-
install_gem 'docter', '~>1.1.3'
|
99
|
-
end
|
100
|
-
task 'stage:check' do
|
101
|
-
fail 'Please run rake setup to install the Docter document generation library'
|
102
|
-
end
|
103
|
-
end
|
data/rakelib/package.rake
DELETED
@@ -1,76 +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 'rake/gempackagetask'
|
18
|
-
|
19
|
-
|
20
|
-
desc 'Clean up all temporary directories used for running tests, creating documentation, packaging, etc.'
|
21
|
-
task 'clobber'
|
22
|
-
|
23
|
-
package = Rake::GemPackageTask.new(spec) do |pkg|
|
24
|
-
pkg.need_tar = true
|
25
|
-
pkg.need_zip = true
|
26
|
-
end
|
27
|
-
|
28
|
-
desc 'Install the package locally'
|
29
|
-
task 'install'=>['setup', "#{package.package_dir}/#{package.gem_file}"] do |task|
|
30
|
-
print "Installing #{spec.name} ... "
|
31
|
-
args = [Config::CONFIG['ruby_install_name'], '-S', 'gem', 'install', "#{package.package_dir}/#{package.gem_file}"]
|
32
|
-
args.unshift('sudo') if sudo_needed?
|
33
|
-
sh *args
|
34
|
-
puts 'Done'
|
35
|
-
end
|
36
|
-
|
37
|
-
desc 'Uninstall previously installed packaged'
|
38
|
-
task 'uninstall' do |task|
|
39
|
-
print "Uninstalling #{spec.name} ... "
|
40
|
-
args = [Config::CONFIG['ruby_install_name'], '-S', 'gem', 'uninstall', spec.name, '--version', spec.version.to_s]
|
41
|
-
args.unshift('sudo') if sudo_needed?
|
42
|
-
sh *args
|
43
|
-
puts 'Done'
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
desc 'Look for new dependencies, check transitive dependencies'
|
48
|
-
task 'dependency' do
|
49
|
-
puts "Checking that all dependencies are up to date ..."
|
50
|
-
=begin
|
51
|
-
# Find if anything has a more recent dependency. These are not errors, just reports.
|
52
|
-
for dep in spec.dependencies
|
53
|
-
current = Gem::SourceInfoCache.search(dep, true, true).last
|
54
|
-
latest = Gem::SourceInfoCache.search(Gem::Dependency.new(dep.name, '>0'), true, true).last
|
55
|
-
puts "A new version of #{dep.name} is available, #{latest.version} replaces #{current.version}" if latest.version > current.version
|
56
|
-
end
|
57
|
-
=end
|
58
|
-
|
59
|
-
# Returns orderd list of transitive dependencies for the given dependency.
|
60
|
-
transitive = lambda { |depend|
|
61
|
-
dep_spec = Gem::SourceIndex.from_installed_gems.search(depend).last
|
62
|
-
fail "No specification for dependency #{depend}" unless dep_spec
|
63
|
-
dep_spec.runtime_dependencies.map { |trans| transitive[trans].push(trans) }.flatten.uniq }
|
64
|
-
# For each dependency, make sure *all* its transitive dependencies are listed
|
65
|
-
# as a Buildr dependency, and order is preserved.
|
66
|
-
spec.dependencies.each_with_index do |dep, index|
|
67
|
-
puts "checking #{dep.name}"
|
68
|
-
for trans in transitive[dep]
|
69
|
-
matching = spec.dependencies.find { |existing| trans =~ existing }
|
70
|
-
fail "#{trans} required by #{dep} and missing from spec" unless matching
|
71
|
-
fail "#{trans} must come before #{dep} in dependency list" unless spec.dependencies.index(matching) < index
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
task 'stage:check'=>'dependency'
|
data/rakelib/release.rake
DELETED
@@ -1,65 +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
|
-
# Released files are placed in this directory first, and from there published to various servers.
|
17
|
-
file 'published' do |task, args|
|
18
|
-
mkpath task.name
|
19
|
-
puts "Populating published directory from #{args.staging} ..."
|
20
|
-
sh 'rsync', '--progress', '--recursive', "#{args.staging}/", 'published'
|
21
|
-
puts 'Done'
|
22
|
-
end
|
23
|
-
|
24
|
-
task 'clobber' do
|
25
|
-
rm_rf 'published'
|
26
|
-
end
|
27
|
-
|
28
|
-
namespace 'release' do
|
29
|
-
task 'prepare'=>['setup', 'clobber', 'published']
|
30
|
-
|
31
|
-
task 'publish'
|
32
|
-
|
33
|
-
task 'wrapup'
|
34
|
-
end
|
35
|
-
|
36
|
-
desc "Make a release using previously staged files"
|
37
|
-
task 'release'=>['release:prepare', 'release:publish', 'release:wrapup']
|
38
|
-
|
39
|
-
|
40
|
-
task 'next_version' do
|
41
|
-
next_version = spec.version.to_s.split('.').map { |v| v.to_i }.
|
42
|
-
zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
|
43
|
-
|
44
|
-
ver_file = "lib/#{spec.name}.rb"
|
45
|
-
if File.exist?(ver_file)
|
46
|
-
print "Updating #{ver_file} to next version number (#{next_version}) ... "
|
47
|
-
modified = File.read(ver_file).sub(/(VERSION\s*=\s*)(['"])(.*)\2/) { |line| "#{$1}#{$2}#{next_version}#{$2}" }
|
48
|
-
File.open ver_file, 'w' do |file|
|
49
|
-
file.write modified
|
50
|
-
end
|
51
|
-
puts 'Done'
|
52
|
-
end
|
53
|
-
|
54
|
-
spec_file = "#{spec.name}.gemspec"
|
55
|
-
if File.exist?(spec_file)
|
56
|
-
print "Updating #{spec_file} to next version number (#{next_version}) ... "
|
57
|
-
modified = File.read(spec_file).sub(/(s(?:pec)?\.version\s*=\s*)(['"])(.*)\2/) { |line| "#{$1}#{$2}#{next_version}#{$2}" }
|
58
|
-
File.open spec_file, 'w' do |file|
|
59
|
-
file.write modified
|
60
|
-
end
|
61
|
-
puts 'Done'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
task 'release:wrapup'=>'next_version'
|
data/rakelib/rspec.rake
DELETED
@@ -1,83 +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
|
-
begin
|
18
|
-
require 'spec/rake/spectask'
|
19
|
-
|
20
|
-
directory 'reports'
|
21
|
-
task 'clobber' do
|
22
|
-
rm_f 'failed'
|
23
|
-
rm_rf 'reports'
|
24
|
-
end
|
25
|
-
|
26
|
-
desc 'Run all specs'
|
27
|
-
Spec::Rake::SpecTask.new('spec'=>'reports') do |task|
|
28
|
-
task.spec_files = Dir['spec/**/*_spec.rb']
|
29
|
-
task.spec_opts = %w{--format specdoc --format failing_examples:failed --format html:reports/specs.html --loadby mtime --backtrace}
|
30
|
-
task.spec_opts << '--colour' if $stdout.isatty
|
31
|
-
end
|
32
|
-
file 'reports/specs.html'=>'spec'
|
33
|
-
|
34
|
-
desc 'Run all failed examples from previous run'
|
35
|
-
Spec::Rake::SpecTask.new('failed') do |task|
|
36
|
-
task.spec_files = Dir['spec/**/*_spec.rb']
|
37
|
-
task.spec_opts = %w{--format specdoc --format failing_examples:failed --example failed --backtrace}
|
38
|
-
task.spec_opts << '--colour' if $stdout.isatty
|
39
|
-
end
|
40
|
-
|
41
|
-
# TODO: Horribly broken! Fix some other time.
|
42
|
-
desc 'Run RSpec and generate Spec and coverage reports (slow)'
|
43
|
-
Spec::Rake::SpecTask.new('coverage'=>'reports') do |task|
|
44
|
-
task.spec_files = Dir['spec/**/*_spec.rb']
|
45
|
-
task.spec_opts = %W{--format progress --format failing_examples:failed --format html:reports/specs.html --backtrace}
|
46
|
-
task.spec_opts << '--colour' if $stdout.isatty
|
47
|
-
task.rcov = true
|
48
|
-
task.rcov_dir = 'reports/coverage'
|
49
|
-
task.rcov_opts << '--exclude / --include-file ^lib --text-summary'
|
50
|
-
end
|
51
|
-
file 'reports/coverage'=>'coverage'
|
52
|
-
|
53
|
-
# Useful for testing with JRuby when using Ruby and vice versa.
|
54
|
-
namespace 'spec' do
|
55
|
-
|
56
|
-
desc 'Run all specs specifically with Ruby'
|
57
|
-
task 'ruby' do
|
58
|
-
puts 'Running test suite using Ruby ...'
|
59
|
-
sh 'ruby -S rake spec'
|
60
|
-
end
|
61
|
-
|
62
|
-
desc 'Run all specs specifically with JRuby'
|
63
|
-
task 'jruby' do
|
64
|
-
puts 'Running test suite using JRuby ...'
|
65
|
-
sh 'jruby -S rake spec'
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
task 'setup' do
|
71
|
-
install_gem 'win32console' if windows? && !RUBY_PLATFORM[/java/] # Colors for RSpec, only on Windows platform.
|
72
|
-
end
|
73
|
-
|
74
|
-
rescue LoadError
|
75
|
-
puts 'Please run rake setup to install RSpec'
|
76
|
-
task 'stage:check' do
|
77
|
-
fail 'Please run rake setup to install RSpec'
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
|
82
|
-
task 'stage:prepare'=>'spec'
|
83
|
-
task 'stage:prepare'=>RUBY_PLATFORM =~ /java/ ? 'spec:ruby' : 'spec:jruby' # Test the *other* platform
|
data/rakelib/rubyforge.rake
DELETED
@@ -1,56 +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
|
-
begin
|
18
|
-
require 'rubyforge'
|
19
|
-
rescue LoadError
|
20
|
-
puts 'Please run rake setup to install the RubyForge gem'
|
21
|
-
task 'setup' do
|
22
|
-
install_gem 'rubyforge'
|
23
|
-
end
|
24
|
-
task 'release:check' do
|
25
|
-
fail 'Please run rake setup to install the RubyForge gem'
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
namespace 'rubyforge' do
|
31
|
-
|
32
|
-
file 'published/rubyforge'=>'published' do
|
33
|
-
mkdir 'published/rubyforge'
|
34
|
-
FileList['published/distro/*.{gem,tgz,zip}'].each do |pkg|
|
35
|
-
cp pkg, 'published/rubyforge/' + File.basename(pkg).sub(/-incubating/, '')
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
task 'release'=>'published/rubyforge' do |task|
|
40
|
-
changes = FileList['published/CHANGES'].first
|
41
|
-
files = FileList['published/rubyforge/*.{gem,tgz,zip}'].exclude(changes).existing
|
42
|
-
print "Uploading #{spec.version} to RubyForge ... "
|
43
|
-
rubyforge = RubyForge.new.configure
|
44
|
-
rubyforge.login
|
45
|
-
rubyforge.userconfig.merge!('release_changes'=>changes, 'preformatted' => true) if changes
|
46
|
-
rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version.to_s, *files
|
47
|
-
puts "Done"
|
48
|
-
print "Posting news to RubyForge ... "
|
49
|
-
rubyforge.post_news spec.rubyforge_project.downcase, "Buildr #{spec.versions} released",
|
50
|
-
"New in Buildr #{spec.version}:\n\n#{changes}"
|
51
|
-
puts "Done"
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
task 'release:publish'=>'rubyforge:release'
|
data/rakelib/scm.rake
DELETED
@@ -1,49 +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
|
-
# Handling of source control.
|
18
|
-
namespace 'scm' do
|
19
|
-
|
20
|
-
task 'check' do
|
21
|
-
print 'Checking there are no local changes ... '
|
22
|
-
svn = `svn status`
|
23
|
-
fail "Cannot release unless all local changes are in SVN:\n#{svn}" unless svn.empty?
|
24
|
-
git = `git status`
|
25
|
-
fail "Cannot release unless all local changes are in Git:\n#{git}" if git[/^#\t/]
|
26
|
-
puts 'OK'
|
27
|
-
end
|
28
|
-
|
29
|
-
task 'tag' do
|
30
|
-
info = `svn info` + `git svn info` # Using either svn or git-svn
|
31
|
-
url = info[/^URL:/] && info.scan(/^URL: (.*)/)[0][0]
|
32
|
-
break unless url
|
33
|
-
new_url = url.sub(/(trunk$)|(branches\/\w*)$/, "tags/#{spec.version}")
|
34
|
-
break if url == new_url
|
35
|
-
print "Tagging release as tags/#{spec.version} ... "
|
36
|
-
sh 'svn', 'copy', url, new_url, '-m', "Release #{spec.version}", :verbose=>false do |ok, res|
|
37
|
-
if ok
|
38
|
-
puts 'Done'
|
39
|
-
else
|
40
|
-
puts 'Could not create tag, please do it yourself!'
|
41
|
-
puts %{ svn copy #{url} #{new_url} -m "Release #{spec.version}"}
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
task 'stage:check'=>'scm:check'
|
49
|
-
task 'release:wrapup'=>'scm:tag'
|