pangolin 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/lib/pangolin/common/jar_common.rb +5 -0
- data/lib/pangolin/common/javac_common.rb +2 -0
- data/lib/pangolin/common/junit_common.rb +2 -0
- data/lib/pangolin/exec/jar.rb +3 -0
- data/lib/pangolin/exec/javac.rb +2 -0
- data/lib/pangolin/exec/junit.rb +2 -0
- data/lib/pangolin/java/jar.rb +2 -0
- data/lib/pangolin/java/javac.rb +2 -0
- data/lib/pangolin/java/junit.rb +11 -6
- data/lib/pangolin/output/formatting.rb +2 -0
- data/lib/pangolin.rb +7 -1
- data/pangolin.gemspec +3 -3
- data/spec/integration/jar_intg_spec.rb +2 -0
- data/spec/integration/javac_intg_spec.rb +2 -0
- data/spec/integration/junit_intg_spec.rb +2 -0
- data/spec/jar_cmd_spec.rb +5 -0
- data/spec/jar_spec.rb +2 -0
- data/spec/javac_cmd_spec.rb +5 -0
- data/spec/javac_spec.rb +2 -0
- data/spec/junit_cmd_spec.rb +5 -0
- data/spec/junit_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/tasks/gem.rake +3 -1
- data/tasks/rdoc.rake +2 -0
- data/tasks/spec.rake +31 -2
- metadata +26 -13
data/README.rdoc
CHANGED
@@ -10,7 +10,7 @@ Ant is a nice tool for writing Java build scripts, but Rake is nicer. The only t
|
|
10
10
|
|
11
11
|
|
12
12
|
task :compile do
|
13
|
-
javac FileList['src/**/*.java'], :destination => 'build, :class_path => FileList['lib/*.jar']
|
13
|
+
javac FileList['src/**/*.java'], :destination => 'build', :class_path => FileList['lib/*.jar']
|
14
14
|
end
|
15
15
|
|
16
16
|
task :dist => :compile do
|
@@ -60,4 +60,4 @@ Even though the whole rationale behind Pangolin is to avoid exec it wouldn't be
|
|
60
60
|
|
61
61
|
== Pangolin?
|
62
62
|
|
63
|
-
Pangolins
|
63
|
+
Pangolins eat ants for breakfast.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/pangolin/exec/jar.rb
CHANGED
data/lib/pangolin/exec/javac.rb
CHANGED
data/lib/pangolin/exec/junit.rb
CHANGED
data/lib/pangolin/java/jar.rb
CHANGED
data/lib/pangolin/java/javac.rb
CHANGED
data/lib/pangolin/java/junit.rb
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'java'
|
4
|
+
|
5
|
+
|
6
|
+
ClassLoader = java.lang.ClassLoader
|
7
|
+
ClassNotFoundException = java.lang.ClassNotFoundException
|
8
|
+
URLClassLoader = java.net.URLClassLoader
|
9
|
+
JURL = java.net.URL
|
5
10
|
|
6
11
|
|
7
12
|
module Pangolin
|
@@ -50,12 +55,12 @@ module Pangolin
|
|
50
55
|
full_path = File.expand_path(e)
|
51
56
|
full_path += '/' if File.directory?(full_path) && full_path[-1] != '/'
|
52
57
|
|
53
|
-
|
58
|
+
JURL.new('file', 'localhost', full_path)
|
54
59
|
end
|
55
60
|
end
|
56
61
|
|
57
62
|
def class_loader
|
58
|
-
@class_loader ||= URLClassLoader.new(class_path_urls.to_java(
|
63
|
+
@class_loader ||= URLClassLoader.new(class_path_urls.to_java(JURL), ClassLoader.system_class_loader)
|
59
64
|
end
|
60
65
|
|
61
66
|
def class_instances
|
data/lib/pangolin.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module Pangolin # :nodoc:
|
2
4
|
|
3
5
|
def self.version # :nodoc:
|
@@ -61,7 +63,11 @@ if Pangolin::is_java?
|
|
61
63
|
else
|
62
64
|
require 'rubygems'
|
63
65
|
|
64
|
-
|
66
|
+
if RUBY_VERSION =~ /^1\.9/
|
67
|
+
gem 'rubyzip2', '>= 2.0.0'
|
68
|
+
else
|
69
|
+
gem 'rubyzip', '>= 0.9.1'
|
70
|
+
end
|
65
71
|
|
66
72
|
require File.expand_path(File.dirname(__FILE__)) + '/pangolin/exec/javac'
|
67
73
|
require File.expand_path(File.dirname(__FILE__)) + '/pangolin/exec/jar'
|
data/pangolin.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pangolin}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Theo Hultberg"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2010-05-10}
|
13
13
|
s.description = %q{Ant is a nice tool for writing Java build scripts, but Rake is nicer. The only thing missing from Rake is a way to run javac and jar, and although it's easy to run these as shell scripts you have to wait for the JVM to start. In combination with JRuby this gem lets you run javac and jar in your Rake scripts without exec'ing.}
|
14
14
|
s.email = %q{theo@iconara.net}
|
15
15
|
s.extensions = ["Rakefile"]
|
@@ -66,7 +66,7 @@ Gem::Specification.new do |s|
|
|
66
66
|
s.homepage = %q{http://github.com/iconara/pangolin}
|
67
67
|
s.rdoc_options = ["--charset=UTF-8"]
|
68
68
|
s.require_paths = ["lib"]
|
69
|
-
s.rubygems_version = %q{1.3.
|
69
|
+
s.rubygems_version = %q{1.3.6}
|
70
70
|
s.summary = %q{Ruby wrappers for javac and jar that don't just exec}
|
71
71
|
s.test_files = [
|
72
72
|
"spec/integration/jar_intg_spec.rb",
|
data/spec/jar_cmd_spec.rb
CHANGED
data/spec/jar_spec.rb
CHANGED
data/spec/javac_cmd_spec.rb
CHANGED
data/spec/javac_spec.rb
CHANGED
data/spec/junit_cmd_spec.rb
CHANGED
data/spec/junit_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/tasks/gem.rake
CHANGED
data/tasks/rdoc.rake
CHANGED
data/tasks/spec.rake
CHANGED
@@ -1,14 +1,43 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'spec/rake/spectask'
|
2
4
|
|
3
5
|
|
4
6
|
Spec::Rake::SpecTask.new(:spec) do |spec|
|
5
7
|
spec.spec_opts << '--options' << 'spec/spec.opts'
|
6
|
-
spec.ruby_opts << '-rpangolin'
|
7
8
|
spec.pattern = 'spec/*_spec.rb'
|
8
9
|
end
|
9
10
|
|
10
11
|
Spec::Rake::SpecTask.new(:intg_spec) do |spec|
|
11
12
|
spec.spec_opts << '--options' << 'spec/spec.opts'
|
12
|
-
spec.ruby_opts << '-rpangolin'
|
13
13
|
spec.pattern = 'spec/integration/*_spec.rb'
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'Run specs and integration specs in all available versions of Ruby'
|
17
|
+
task :multitest do
|
18
|
+
['ruby', 'ruby1.9', 'jruby'].each do |r|
|
19
|
+
if %x(which #{r}) && $?.success?
|
20
|
+
started_at = Time.now
|
21
|
+
|
22
|
+
$stderr.print "#{r}... "
|
23
|
+
|
24
|
+
cmd = r
|
25
|
+
cmd += ' --client' if cmd == 'jruby'
|
26
|
+
|
27
|
+
output = %x(#{cmd} -S rake spec intg_spec 2>&1)
|
28
|
+
|
29
|
+
if $?.success?
|
30
|
+
time_taken = ((Time.now.to_f - started_at.to_f) * 10).round/10.0
|
31
|
+
|
32
|
+
$stderr.puts "done (#{time_taken} s)"
|
33
|
+
else
|
34
|
+
$stderr.puts 'failed:'
|
35
|
+
$stderr.puts output
|
36
|
+
|
37
|
+
raise "Tests failed in #{%x(#{r} --version)}"
|
38
|
+
end
|
39
|
+
else
|
40
|
+
$stderr.puts "#{r} not available"
|
41
|
+
end
|
42
|
+
end
|
14
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pangolin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 1
|
9
|
+
version: 0.4.1
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Theo Hultberg
|
@@ -9,29 +14,35 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-05-10 00:00:00 +02:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rubyzip
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 9
|
30
|
+
- 1
|
23
31
|
version: 0.9.1
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: rspec
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
33
43
|
version: "0"
|
34
|
-
|
44
|
+
type: :development
|
45
|
+
version_requirements: *id002
|
35
46
|
description: Ant is a nice tool for writing Java build scripts, but Rake is nicer. The only thing missing from Rake is a way to run javac and jar, and although it's easy to run these as shell scripts you have to wait for the JVM to start. In combination with JRuby this gem lets you run javac and jar in your Rake scripts without exec'ing.
|
36
47
|
email: theo@iconara.net
|
37
48
|
executables: []
|
@@ -99,18 +110,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
110
|
requirements:
|
100
111
|
- - ">="
|
101
112
|
- !ruby/object:Gem::Version
|
113
|
+
segments:
|
114
|
+
- 0
|
102
115
|
version: "0"
|
103
|
-
version:
|
104
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
117
|
requirements:
|
106
118
|
- - ">="
|
107
119
|
- !ruby/object:Gem::Version
|
120
|
+
segments:
|
121
|
+
- 0
|
108
122
|
version: "0"
|
109
|
-
version:
|
110
123
|
requirements: []
|
111
124
|
|
112
125
|
rubyforge_project:
|
113
|
-
rubygems_version: 1.3.
|
126
|
+
rubygems_version: 1.3.6
|
114
127
|
signing_key:
|
115
128
|
specification_version: 3
|
116
129
|
summary: Ruby wrappers for javac and jar that don't just exec
|