rjack-tarpit 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.rdoc +6 -0
  2. data/README.rdoc +1 -1
  3. data/Rakefile +1 -1
  4. data/lib/rjack-tarpit.rb +24 -13
  5. metadata +3 -3
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.3.2 (2011-6-11)
2
+ * Fix case where :install task would omit running "mvn install" due to
3
+ prior run of "mvn package".
4
+ * Add conditional Rake::DSL includes for rake ~> 0.9.0.
5
+ * Update rdoc dependency to >= 2.5.11, < 3.7 (3.6.1 works well.)
6
+
1
7
  === 1.3.1 (2011-5-19)
2
8
  * On gem install(_deps), only ignore gem SystemExitException when
3
9
  exit_code == 0; Fail on failed install.
data/README.rdoc CHANGED
@@ -30,7 +30,7 @@ source with maven:
30
30
  require 'mygem/version'
31
31
 
32
32
  require 'rubygems'
33
- gem 'rjack-tarpit', '~> 1.3.1'
33
+ gem 'rjack-tarpit', '~> 1.3.2'
34
34
  require 'rjack-tarpit'
35
35
 
36
36
  t = RJack::TarPit.new( 'mygem', MyGem::VERSION, :java_platform )
data/Rakefile CHANGED
@@ -3,7 +3,7 @@
3
3
  $LOAD_PATH << './lib'
4
4
  require 'rubygems'
5
5
 
6
- tarpit_deps = [ [ 'rdoc', '>= 2.5.11', '< 3.6' ],
6
+ tarpit_deps = [ [ 'rdoc', '>= 2.5.11', '< 3.7' ],
7
7
  [ 'hoe', '~> 2.8.0' ] ]
8
8
 
9
9
  # gem them here, so we can build tarpit with tarpit_deps
data/lib/rjack-tarpit.rb CHANGED
@@ -21,7 +21,7 @@ module RJack
21
21
  # Provides glue for Rake, Hoe, and Maven by generating tasks.
22
22
  module TarPit
23
23
  # Module version
24
- VERSION = '1.3.1'
24
+ VERSION = '1.3.2'
25
25
 
26
26
  # Construct new task generator by gem name, version, and flags. A descendant
27
27
  # of BaseStrategy is returned.
@@ -43,6 +43,9 @@ module RJack
43
43
  # Rakefile (not :jars_from_assembly)
44
44
  class BaseStrategy
45
45
 
46
+ #For rack ~> 0.9.0
47
+ include Rake::DSL if defined?( Rake::DSL )
48
+
46
49
  # Name of gem as constructed.
47
50
  attr_reader :name
48
51
  # Version of gem as constructed.
@@ -189,22 +192,26 @@ module RJack
189
192
 
190
193
  # Define a file task tracking calls to "mvn package"
191
194
  def define_maven_package_task
192
- file MVN_STATE_FILE => maven_dependencies do
193
- mvn = [ 'mvn', @install_request ? 'install' : 'package' ].join(' ')
194
- sh( mvn ) do |ok,res|
195
- if ok
196
- touch( MVN_STATE_FILE )
197
- else
198
- raise "TARPIT: 'mvn package' failed."
199
- end
195
+ [ MVN_STATE_FILE, MVN_STATE_FILE_INSTALL ].each do |sf|
196
+ file sf => maven_dependencies do
197
+ run_maven
200
198
  end
201
199
  end
202
200
 
203
- file MVN_STATE_FILE_INSTALL => MVN_STATE_FILE do
204
- touch( MVN_STATE_FILE_INSTALL )
205
- end
206
201
  task :install => MVN_STATE_FILE_INSTALL
202
+ end
207
203
 
204
+ # Run Maven mvn package or install and touch state files.
205
+ def run_maven
206
+ mvn = [ 'mvn', @install_request ? 'install' : 'package' ].join( ' ' )
207
+ sh( mvn ) do |ok,res|
208
+ if ok
209
+ touch( MVN_STATE_FILE )
210
+ touch( MVN_STATE_FILE_INSTALL ) if @install_request
211
+ else
212
+ raise "TARPIT: '#{mvn}' failed."
213
+ end
214
+ end
208
215
  end
209
216
 
210
217
  # Define file tasks for all jar symlinks and other misc. maven
@@ -457,8 +464,12 @@ module RJack
457
464
  end
458
465
 
459
466
  # Replace special Hoe development dependency with rjack-tarpit (which
460
- # itself depends on constrained version of Hoe.)
467
+ # itself depends on a constrained version of Hoe.)
461
468
  class Hoe
469
+ # FIXME: Adjust Hoe for rack ~> 0.9.0 until we can update to a hoe
470
+ # that includes Rake::DSL itself.
471
+ include Rake::DSL if defined?( Rake::DSL )
472
+
462
473
  def add_dependencies
463
474
  self.extra_deps = normalize_deps extra_deps
464
475
  self.extra_dev_deps = normalize_deps extra_dev_deps
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rjack-tarpit
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.1
5
+ version: 1.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Kellum
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-19 00:00:00 -07:00
13
+ date: 2011-06-11 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: 2.5.11
25
25
  - - <
26
26
  - !ruby/object:Gem::Version
27
- version: "3.6"
27
+ version: "3.7"
28
28
  type: :runtime
29
29
  version_requirements: *id001
30
30
  - !ruby/object:Gem::Dependency