rakejava 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.markdown +4 -0
  2. data/lib/rakejava.rb +13 -12
  3. metadata +27 -38
data/README.markdown CHANGED
@@ -1,5 +1,9 @@
1
1
  RakeJava is a ruby gem for use with Rake. It lets you javac and jar Java files.
2
2
 
3
+ 1.3.3 is the last release that works with Rake version 0.8.7. Later releases work with 0.9.2. The Rake folks sure made this hard given how many Rakefiles depend on 0.8.7.
4
+
5
+ 1.3.6 makes JarFiles more robust so you can specify directories instead of the exhaustive list of files. It also enables JRuby support.
6
+
3
7
  ### Simple Example:
4
8
 
5
9
  require 'rakejava'
data/lib/rakejava.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # http://github.com/tsantos/rakejava
5
5
 
6
6
  =begin
7
- Copyright 2009, 2010 Tom Santos
7
+ Copyright 2009, 2010, 2011, 2012 Tom Santos
8
8
 
9
9
  Licensed under the Apache License, Version 2.0 (the "License");
10
10
  you may not use this file except in compliance with the License.
@@ -43,7 +43,15 @@ module RakeJavaUtil
43
43
  end
44
44
 
45
45
  def winderz?
46
- RUBY_PLATFORM =~ /(win|w)32$/
46
+ if @winderz == nil
47
+ win_regex = /(win|w)32/
48
+ if RUBY_PLATFORM =~ /java/
49
+ @winderz = Config::CONFIG['host_os'] =~ win_regex ? true : false
50
+ else
51
+ @winderz = RUBY_PLATFORM =~ win_regex ? true : false
52
+ end
53
+ end
54
+ @winderz
47
55
  end
48
56
 
49
57
  def path_esc str_ary
@@ -295,17 +303,10 @@ module RakeJava
295
303
 
296
304
  cmd = "jar #{flags} #{@real_name}#{manifest_path}"
297
305
 
306
+ # Chop the roots off the paths and then add each to the jar command
298
307
  @files.each do |file_list|
299
- # Hack time because the jar command is busted. Every arg after the
300
- # first file listed after a -C needs to have paths relative to the
301
- # command-launch rather than the -C specified dir. The first file arg
302
- # after a -C works but subsequent ones fail.
303
- fixed_list = file_list.to_a
304
- unless fixed_list.empty?
305
- fixed_list[0].sub!(%r[^#{file_list.root}/], '')
306
- end
307
-
308
- cmd << " -C #{file_list.root} #{space_sep(path_esc(fixed_list))}"
308
+ fixed_list = file_list.to_a.map {|f| f.sub(%r[^#{file_list.root}/], '')}
309
+ fixed_list.each {|f| cmd << " -C #{file_list.root} #{path_esc(f)}"}
309
310
  end
310
311
 
311
312
  max_cmd_len = 500
metadata CHANGED
@@ -1,36 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rakejava
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 3
8
- - 5
9
- version: 1.3.5
4
+ prerelease:
5
+ version: 1.3.6
10
6
  platform: ruby
11
7
  authors:
12
- - Tom Santos
8
+ - Tom Santos
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-12-04 00:00:00 -08:00
18
- default_executable:
13
+ date: 2012-02-14 00:00:00 Z
19
14
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 9
30
- - 2
31
- version: 0.9.2
32
- type: :runtime
33
- version_requirements: *id001
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.9.2
24
+ type: :runtime
25
+ version_requirements: *id001
34
26
  description: Rake tasks for building Java stuff (javac and jar)
35
27
  email: santos.tom@gmail.com
36
28
  executables: []
@@ -40,9 +32,8 @@ extensions: []
40
32
  extra_rdoc_files: []
41
33
 
42
34
  files:
43
- - README.markdown
44
- - lib/rakejava.rb
45
- has_rdoc: true
35
+ - README.markdown
36
+ - lib/rakejava.rb
46
37
  homepage: http://github.com/tsantos/rakejava
47
38
  licenses: []
48
39
 
@@ -50,25 +41,23 @@ post_install_message:
50
41
  rdoc_options: []
51
42
 
52
43
  require_paths:
53
- - lib
44
+ - lib
54
45
  required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
55
47
  requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- segments:
59
- - 0
60
- version: "0"
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: "0"
61
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
62
53
  requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- segments:
66
- - 0
67
- version: "0"
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
68
57
  requirements: []
69
58
 
70
59
  rubyforge_project:
71
- rubygems_version: 1.3.6
60
+ rubygems_version: 1.8.15
72
61
  signing_key:
73
62
  specification_version: 3
74
63
  summary: Rake tasks for building Java stuff (javac and jar)