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.
Files changed (169) hide show
  1. data/CHANGELOG +62 -9
  2. data/NOTICE +1 -1
  3. data/README.rdoc +9 -21
  4. data/Rakefile +20 -39
  5. data/_buildr +1 -0
  6. data/{spec/java/ant.rb → _jbuildr} +11 -15
  7. metadata +30 -210
  8. data/DISCLAIMER +0 -7
  9. data/addon/buildr/antlr.rb +0 -65
  10. data/addon/buildr/cobertura.rb +0 -22
  11. data/addon/buildr/drb.rb +0 -281
  12. data/addon/buildr/emma.rb +0 -22
  13. data/addon/buildr/hibernate.rb +0 -142
  14. data/addon/buildr/javacc.rb +0 -85
  15. data/addon/buildr/jdepend.rb +0 -60
  16. data/addon/buildr/jetty.rb +0 -248
  17. data/addon/buildr/jibx.rb +0 -86
  18. data/addon/buildr/nailgun.rb +0 -221
  19. data/addon/buildr/openjpa.rb +0 -90
  20. data/addon/buildr/org/apache/buildr/BuildrNail$Main.class +0 -0
  21. data/addon/buildr/org/apache/buildr/BuildrNail.class +0 -0
  22. data/addon/buildr/org/apache/buildr/BuildrNail.java +0 -41
  23. data/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -0
  24. data/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
  25. data/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
  26. data/addon/buildr/org/apache/buildr/JettyWrapper.java +0 -144
  27. data/addon/buildr/path.rb +0 -136
  28. data/addon/buildr/xmlbeans.rb +0 -93
  29. data/buildr.buildfile +0 -53
  30. data/buildr.gemspec +0 -58
  31. data/doc/css/default.css +0 -228
  32. data/doc/css/print.css +0 -100
  33. data/doc/css/syntax.css +0 -52
  34. data/doc/images/apache-incubator-logo.png +0 -0
  35. data/doc/images/buildr-hires.png +0 -0
  36. data/doc/images/buildr.png +0 -0
  37. data/doc/images/favicon.png +0 -0
  38. data/doc/images/growl-icon.tiff +0 -0
  39. data/doc/images/note.png +0 -0
  40. data/doc/images/project-structure.png +0 -0
  41. data/doc/images/tip.png +0 -0
  42. data/doc/images/zbuildr.tif +0 -0
  43. data/doc/pages/artifacts.textile +0 -207
  44. data/doc/pages/building.textile +0 -240
  45. data/doc/pages/contributing.textile +0 -208
  46. data/doc/pages/download.textile +0 -62
  47. data/doc/pages/extending.textile +0 -175
  48. data/doc/pages/getting_started.textile +0 -273
  49. data/doc/pages/index.textile +0 -42
  50. data/doc/pages/languages.textile +0 -407
  51. data/doc/pages/mailing_lists.textile +0 -17
  52. data/doc/pages/more_stuff.textile +0 -314
  53. data/doc/pages/packaging.textile +0 -427
  54. data/doc/pages/projects.textile +0 -274
  55. data/doc/pages/recipes.textile +0 -103
  56. data/doc/pages/settings_profiles.textile +0 -274
  57. data/doc/pages/testing.textile +0 -212
  58. data/doc/pages/troubleshooting.textile +0 -103
  59. data/doc/pages/whats_new.textile +0 -323
  60. data/doc/print.haml +0 -51
  61. data/doc/print.toc.yaml +0 -29
  62. data/doc/scripts/buildr-git.rb +0 -412
  63. data/doc/scripts/install-jruby.sh +0 -44
  64. data/doc/scripts/install-linux.sh +0 -64
  65. data/doc/scripts/install-osx.sh +0 -52
  66. data/doc/site.haml +0 -56
  67. data/doc/site.toc.yaml +0 -47
  68. data/etc/KEYS +0 -151
  69. data/etc/git-svn-authors +0 -16
  70. data/lib/buildr.rb +0 -33
  71. data/lib/buildr/core.rb +0 -29
  72. data/lib/buildr/core/application.rb +0 -665
  73. data/lib/buildr/core/build.rb +0 -311
  74. data/lib/buildr/core/checks.rb +0 -254
  75. data/lib/buildr/core/common.rb +0 -150
  76. data/lib/buildr/core/compile.rb +0 -590
  77. data/lib/buildr/core/environment.rb +0 -117
  78. data/lib/buildr/core/filter.rb +0 -366
  79. data/lib/buildr/core/generate.rb +0 -195
  80. data/lib/buildr/core/help.rb +0 -119
  81. data/lib/buildr/core/osx.rb +0 -49
  82. data/lib/buildr/core/progressbar.rb +0 -156
  83. data/lib/buildr/core/project.rb +0 -923
  84. data/lib/buildr/core/test.rb +0 -715
  85. data/lib/buildr/core/transports.rb +0 -560
  86. data/lib/buildr/core/util.rb +0 -294
  87. data/lib/buildr/groovy.rb +0 -18
  88. data/lib/buildr/groovy/bdd.rb +0 -106
  89. data/lib/buildr/groovy/compiler.rb +0 -138
  90. data/lib/buildr/ide.rb +0 -19
  91. data/lib/buildr/ide/eclipse.rb +0 -222
  92. data/lib/buildr/ide/idea.ipr.template +0 -300
  93. data/lib/buildr/ide/idea.rb +0 -190
  94. data/lib/buildr/ide/idea7x.ipr.template +0 -290
  95. data/lib/buildr/ide/idea7x.rb +0 -212
  96. data/lib/buildr/java.rb +0 -23
  97. data/lib/buildr/java/ant.rb +0 -92
  98. data/lib/buildr/java/bdd.rb +0 -451
  99. data/lib/buildr/java/cobertura.rb +0 -236
  100. data/lib/buildr/java/commands.rb +0 -211
  101. data/lib/buildr/java/compiler.rb +0 -348
  102. data/lib/buildr/java/deprecated.rb +0 -141
  103. data/lib/buildr/java/emma.rb +0 -238
  104. data/lib/buildr/java/jruby.rb +0 -117
  105. data/lib/buildr/java/jtestr_runner.rb.erb +0 -116
  106. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  107. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +0 -119
  108. data/lib/buildr/java/packaging.rb +0 -717
  109. data/lib/buildr/java/pom.rb +0 -174
  110. data/lib/buildr/java/rjb.rb +0 -155
  111. data/lib/buildr/java/test_result.rb +0 -307
  112. data/lib/buildr/java/tests.rb +0 -329
  113. data/lib/buildr/java/version_requirement.rb +0 -172
  114. data/lib/buildr/packaging.rb +0 -24
  115. data/lib/buildr/packaging/archive.rb +0 -488
  116. data/lib/buildr/packaging/artifact.rb +0 -759
  117. data/lib/buildr/packaging/artifact_namespace.rb +0 -972
  118. data/lib/buildr/packaging/artifact_search.rb +0 -140
  119. data/lib/buildr/packaging/gems.rb +0 -102
  120. data/lib/buildr/packaging/package.rb +0 -233
  121. data/lib/buildr/packaging/tar.rb +0 -186
  122. data/lib/buildr/packaging/version_requirement.rb +0 -172
  123. data/lib/buildr/packaging/zip.rb +0 -64
  124. data/lib/buildr/packaging/ziptask.rb +0 -313
  125. data/lib/buildr/resources/buildr.icns +0 -0
  126. data/lib/buildr/scala.rb +0 -19
  127. data/lib/buildr/scala/compiler.rb +0 -109
  128. data/lib/buildr/scala/tests.rb +0 -203
  129. data/rakelib/apache.rake +0 -191
  130. data/rakelib/changelog.rake +0 -57
  131. data/rakelib/doc.rake +0 -103
  132. data/rakelib/package.rake +0 -76
  133. data/rakelib/release.rake +0 -65
  134. data/rakelib/rspec.rake +0 -83
  135. data/rakelib/rubyforge.rake +0 -56
  136. data/rakelib/scm.rake +0 -49
  137. data/rakelib/setup.rake +0 -81
  138. data/rakelib/stage.rake +0 -48
  139. data/spec/addon/drb_spec.rb +0 -328
  140. data/spec/core/application_spec.rb +0 -419
  141. data/spec/core/build_spec.rb +0 -423
  142. data/spec/core/checks_spec.rb +0 -519
  143. data/spec/core/common_spec.rb +0 -670
  144. data/spec/core/compile_spec.rb +0 -582
  145. data/spec/core/generate_spec.rb +0 -33
  146. data/spec/core/project_spec.rb +0 -776
  147. data/spec/core/test_spec.rb +0 -1098
  148. data/spec/core/transport_spec.rb +0 -500
  149. data/spec/groovy/bdd_spec.rb +0 -80
  150. data/spec/groovy/compiler_spec.rb +0 -239
  151. data/spec/ide/eclipse_spec.rb +0 -311
  152. data/spec/java/bdd_spec.rb +0 -358
  153. data/spec/java/cobertura_spec.rb +0 -77
  154. data/spec/java/compiler_spec.rb +0 -446
  155. data/spec/java/emma_spec.rb +0 -120
  156. data/spec/java/java_spec.rb +0 -96
  157. data/spec/java/packaging_spec.rb +0 -1120
  158. data/spec/java/test_coverage_spec.rb +0 -255
  159. data/spec/java/tests_spec.rb +0 -471
  160. data/spec/packaging/archive_spec.rb +0 -503
  161. data/spec/packaging/artifact_namespace_spec.rb +0 -646
  162. data/spec/packaging/artifact_spec.rb +0 -795
  163. data/spec/packaging/packaging_helper.rb +0 -63
  164. data/spec/packaging/packaging_spec.rb +0 -589
  165. data/spec/sandbox.rb +0 -139
  166. data/spec/scala/compiler_spec.rb +0 -228
  167. data/spec/scala/tests_spec.rb +0 -215
  168. data/spec/spec_helpers.rb +0 -327
  169. data/spec/version_requirement_spec.rb +0 -123
@@ -1,81 +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 'rubygems/source_info_cache'
18
- require 'stringio' # for Gem::RemoteFetcher
19
- require 'jruby' if RUBY_PLATFORM[/java/]
20
-
21
- # True if running on the Windows operating sytem. Different from Gem.win_platform?
22
- # which returns true if running on the Windows platform of MRI, false when using JRuby.
23
- def windows?
24
- Config::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
25
- end
26
-
27
- def set_java_home
28
- if !ENV['JAVA_HOME'] && RUBY_PLATFORM[/java/]
29
- ENV['JAVA_HOME'] = java.lang.System.getProperty('java.home')
30
- end
31
- fail "Please set JAVA_HOME first #{'(no need to run as sudo)' if ENV['USER'] == 'root'}" unless ENV['JAVA_HOME']
32
- end
33
-
34
- def sudo_needed?
35
- !( windows? || ENV['GEM_HOME'] )
36
- end
37
-
38
- # Finds and returns path to executable. Consults PATH environment variable.
39
- # Returns nil if executable not found.
40
- def which(name)
41
- if windows?
42
- path = ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| path.gsub('\\', '/') }.map { |path| "#{path}/#{name}.{exe,bat,com}" }
43
- else
44
- path = ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| "#{path}/#{name}" }
45
- end
46
- FileList[path].existing.first
47
- end
48
-
49
- # Execute a GemRunner command
50
- def gem_run(*args)
51
- rb_bin = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
52
- args.unshift rb_bin, '-S', 'gem'
53
- args.unshift 'sudo', 'env', 'JAVA_HOME=' + ENV['JAVA_HOME'] if sudo_needed?
54
- sh *args.map{ |a| a.inspect }.join(' ')
55
- end
56
-
57
- def install_gem(name, ver_requirement = ['> 0'])
58
- dep = Gem::Dependency.new(name, ver_requirement)
59
- @load_cache = true
60
- if Gem::SourceIndex.from_installed_gems.search(dep).empty?
61
- spec = Gem::SourceInfoCache.search(dep, true, @load_cache).last
62
- fail "#{dep} not found in local or remote repository!" unless spec
63
- puts "Installing #{spec.full_name} ..."
64
- args = ['install']
65
- args.push '--install-dir', ENV['GEM_HOME'] if ENV['GEM_HOME']
66
- args.push spec.name, '-v', spec.version.to_s
67
- gem_run *args
68
- @load_cache = false # Just update the Gem cache once
69
- end
70
- end
71
-
72
- # Setup environment for running this Rakefile (RSpec, Docter, etc).
73
- desc "If you're building from sources, run this task first to setup the necessary dependencies."
74
- missing = spec.dependencies.select { |dep| Gem::SourceIndex.from_installed_gems.search(dep).empty? }
75
- task 'setup' do
76
- set_java_home
77
- missing.each do |dep|
78
- install_gem dep.name, dep.version_requirements
79
- end
80
- end
81
- puts "Missing Gems #{missing.join(', ')}, please run rake setup first!" unless missing.empty?
@@ -1,48 +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
- # Staged files are copied to this directory first, and from there uploaded to the staging server.
18
- directory 'staged'
19
-
20
- task 'clobber' do
21
- rm_rf 'staged'
22
- end
23
-
24
- namespace 'stage' do
25
- # stage:check verifies that we're able to stage a release: check for a changelog,
26
- # local changes, run all the test cases, etc. You can add more actions, e.g.
27
- # checking license files, spell checking documentation.
28
- task 'check'=>['setup', 'clobber']
29
-
30
- # stage:prepare prepares all the files necessary for making a successful release:
31
- # binary and source packages, documentation, Web site, change file, checksums, etc.
32
- # This task depends on stage:check, and also performs its own verification of the
33
- # produced artifacts. Staged files are placed in the staged directory.
34
- task 'prepare'=>'staged'
35
-
36
- # stage:upload moves the stage directory to the staging server.
37
- task 'upload' do |task, args|
38
- puts "Uploading staged directory to #{args.staging} ..."
39
- sh 'rsync', '--progress', '--recursive', 'staged/', args.staging
40
- puts 'Done'
41
- end
42
-
43
- # Put anything that happens post staging here, e.g. release vote email template.
44
- task 'wrapup'
45
- end
46
-
47
- desc 'Stage files for the release, upload them to staging server'
48
- task 'stage'=>['stage:check', 'stage:prepare', 'stage:upload', 'stage:wrapup']
@@ -1,328 +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 File.expand_path('../spec_helpers', File.dirname(__FILE__))
18
- require 'stringio'
19
- Sandbox.require_optional_extension 'buildr/drb'
20
-
21
-
22
- describe Buildr::DRbApplication do
23
-
24
- module DRbHelper
25
- attr_accessor :app, :drb, :cfg
26
-
27
- def use_stdio(stdin = nil, stdout = nil, stderr = nil)
28
- stdin ||= StringIO.new
29
- stdout ||= StringIO.new
30
- stderr ||= StringIO.new
31
- cfg.update :in => stdin, :out => stdout, :err => stderr
32
- end
33
-
34
- def remote_run(*argv)
35
- cfg.update :argv => argv
36
- drb.remote_run(cfg)
37
- end
38
-
39
- def output
40
- cfg[:out].string
41
- end
42
-
43
- def write_buildfile(content = nil)
44
- write 'buildfile', content || %q{
45
- define('foo') do
46
-
47
- rule '.rbc' => '.rb' do |t|
48
- $stdout.puts "#{t.name} from #{t.source}"
49
- end
50
-
51
- task('hello') do
52
- $stdout.puts 'hi'
53
- end
54
-
55
- task('empty')
56
-
57
- task('no') do
58
- task('empty').enhance ['delete_me']
59
- task('empty') { $stdout.puts 'no' }
60
- end
61
-
62
- task('delete_me')
63
-
64
- task('create') do
65
- Rake::Task.define_task('created')
66
- rule '.rbc' => '.rb' do |t|
67
- $stdout.puts "#{t.name} from #{t.source}"
68
- end
69
- end
70
-
71
- task('exists') do
72
- $stdout.puts !!Buildr.application.lookup('created')
73
- end
74
-
75
- task('setopt', :name, :value) do |task, args|
76
- Buildr.application.options.send("#{args[:name]}=", args[:value])
77
- end
78
- end
79
- }
80
- end
81
- end
82
-
83
- include DRbHelper
84
-
85
- before(:each) do
86
- @in, @out, @err = $stdin, $stdout, $stderr
87
- @cfg = {
88
- :dir => Dir.pwd, :argv => [],
89
- :in => @in, :out => @out, :err => @err
90
- }
91
- @drb = Buildr::DRbApplication.clone
92
- @drb.send :setup
93
- @app = Buildr.application
94
- end
95
-
96
- after(:each) do
97
- $stdin, $stdout, $stderr = @in, @out, @err
98
- end
99
-
100
- describe '.run' do
101
- it 'starts server if no server is running' do
102
- drb.should_receive(:connect).and_raise DRb::DRbConnError
103
- drb.should_receive(:run_server!)
104
- drb.should_not_receive(:run_client)
105
- drb.run
106
- end
107
-
108
- it 'connects to an already started server' do
109
- drb.should_receive(:connect).and_return "client"
110
- drb.should_receive(:run_client).with "client"
111
- drb.should_not_receive(:run_server!)
112
- drb.run
113
- end
114
- end
115
-
116
- describe '.remote_run' do
117
-
118
- describe 'stdout' do
119
- it 'is redirected to client' do
120
- use_stdio
121
- Buildr.application.should_receive(:remote_run) do
122
- $stdout.puts "HELLO"
123
- end
124
- remote_run
125
- output.should eql("HELLO\n")
126
- end
127
- end
128
-
129
- describe 'stderr' do
130
- it 'is redirected to client' do
131
- use_stdio
132
- Buildr.application.should_receive(:remote_run) do
133
- $stderr.puts "HELLO"
134
- end
135
- remote_run
136
- cfg[:err].string.should eql("HELLO\n")
137
- end
138
- end
139
-
140
- describe 'stdin' do
141
- it 'is redirected to client' do
142
- use_stdio
143
- cfg[:in].should_receive(:gets).and_return("HELLO\n")
144
- result = nil
145
- Buildr.application.should_receive(:remote_run) do
146
- result = $stdin.gets
147
- end
148
- remote_run
149
- result.should eql("HELLO\n")
150
- end
151
- end
152
-
153
- describe 'server ARGV' do
154
- it 'is replaced with client argv' do
155
- Buildr.application.should_receive(:remote_run) do
156
- ARGV.should eql(['hello'])
157
- end
158
- remote_run 'hello'
159
- end
160
- end
161
-
162
- describe 'without buildfile loaded' do
163
- before(:each) do
164
- app.instance_eval { @rakefile = nil }
165
- write_buildfile
166
- end
167
-
168
- it 'should load the buildfile' do
169
- app.should_receive(:top_level)
170
- lambda { remote_run }.should run_task('foo')
171
- end
172
- end
173
-
174
- describe 'with unmodified buildfile' do
175
-
176
- before(:each) do
177
- write_buildfile
178
- app.options.rakelib = []
179
- app.send :load_buildfile
180
- drb.save_snapshot(app)
181
- end
182
-
183
- it 'should not reload the buildfile' do
184
- app.should_not_receive(:reload_buildfile)
185
- app.should_receive(:top_level)
186
- remote_run
187
- end
188
-
189
- it 'should not define projects again' do
190
- use_stdio
191
- lambda { 2.times { remote_run 'foo:hello' } }.should_not run_task('foo')
192
- output.should eql("hi\nhi\n")
193
- end
194
-
195
- it 'should restore task actions' do
196
- use_stdio
197
- remote_run 'foo:empty'
198
- output.should be_empty
199
- 2.times { remote_run 'foo:no' }
200
- remote_run 'foo:empty'
201
- actions = app.lookup('foo:empty').instance_eval { @actions }
202
- actions.should be_empty # as originally defined
203
- output.should be_empty
204
- end
205
-
206
- it 'should restore task prerequisites' do
207
- use_stdio
208
- remote_run 'foo:empty'
209
- output.should be_empty
210
- 2.times { remote_run 'foo:no' }
211
- remote_run 'foo:empty'
212
- pres = app.lookup('foo:empty').send(:prerequisites).map(&:to_s)
213
- pres.should be_empty # as originally defined
214
- output.should be_empty
215
- end
216
-
217
- it 'should drop runtime created tasks' do
218
- remote_run 'foo:create'
219
- app.lookup('created').should_not be_nil
220
- remote_run 'foo:empty'
221
- app.lookup('created').should be_nil
222
- end
223
-
224
- it 'should restore options' do
225
- remote_run 'foo:setopt[bar,baz]'
226
- app.options.bar.should eql("baz")
227
- remote_run 'foo:empty'
228
- app.options.bar.should be_nil
229
- end
230
-
231
- it 'should restore rules' do
232
- orig = app.instance_eval { @rules.size }
233
- remote_run 'foo:create'
234
- app.instance_eval { @rules.size }.should eql(orig + 1)
235
- remote_run 'foo:empty'
236
- app.instance_eval { @rules.size }.should eql(orig)
237
- end
238
-
239
- end
240
-
241
- describe 'with modified buildfile' do
242
-
243
- before(:each) do
244
- write_buildfile
245
- app.options.rakelib = []
246
- app.send :load_buildfile
247
- drb.save_snapshot(app)
248
- app.instance_eval { @last_loaded = Time.now - 10 }
249
- write_buildfile %q{
250
- rule '.rbc' => '.rb' do |t|
251
- $stdout.puts "#{t.name} from #{t.source}"
252
- end
253
- define('foo') do
254
- task('hello') do
255
- $stdout.puts 'bye'
256
- end
257
- task('empty')
258
- define('bar') do
259
-
260
- end
261
- end
262
- }
263
- end
264
-
265
- it 'should reload the buildfile' do
266
- app.should_receive(:reload_buildfile)
267
- app.should_receive(:top_level)
268
- remote_run
269
- end
270
-
271
- it 'should redefine projects' do
272
- lambda { remote_run }.should run_tasks('foo', 'foo:bar')
273
- end
274
-
275
- it 'should remove tasks deleted from buildfile' do
276
- app.lookup('foo:delete_me').should_not be_nil
277
- remote_run
278
- app.lookup('foo:delete_me').should be_nil
279
- end
280
-
281
- it 'should redefine tasks actions' do
282
- actions = app.lookup('foo:empty').instance_eval { @actions }
283
- actions.should be_empty # no action
284
- app.lookup('foo:no').invoke # enhance the empty task
285
- actions = app.lookup('foo:empty').instance_eval { @actions }
286
- actions.should_not be_empty
287
- remote_run # cause to reload the buildfile
288
- actions = app.lookup('foo:empty').instance_eval { @actions }
289
- actions.should be_empty # as defined on the new buildfile
290
- end
291
-
292
- it 'should redefine task prerequisites' do
293
- pres = app.lookup('foo:empty').send(:prerequisites).map(&:to_s)
294
- pres.should be_empty # no action
295
- app.lookup('foo:no').invoke # enhance the empty task
296
- pres = app.lookup('foo:empty').send(:prerequisites).map(&:to_s)
297
- pres.should_not be_empty
298
- remote_run # cause to reload the buildfile
299
- pres = app.lookup('foo:empty').send(:prerequisites).map(&:to_s)
300
- pres.should be_empty # as defined on the new buildfile
301
- end
302
-
303
- it 'should drop runtime created tasks' do
304
- app.lookup('foo:create').invoke
305
- app.lookup('created').should_not be_nil
306
- remote_run 'foo:empty'
307
- app.lookup('created').should be_nil
308
- end
309
-
310
- it 'should restore options' do
311
- app.options.bar = 'baz'
312
- remote_run 'foo:empty'
313
- app.options.bar.should be_nil
314
- end
315
-
316
- it 'should redefine rules' do
317
- orig = app.instance_eval { @rules.size }
318
- app.lookup('foo:create').invoke
319
- app.instance_eval { @rules.size }.should eql(orig + 1)
320
- remote_run 'foo:empty'
321
- app.instance_eval { @rules.size }.should eql(orig)
322
- end
323
-
324
- end
325
-
326
- end
327
- end
328
-