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 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 eats ants for breakfast.
63
+ Pangolins eat ants for breakfast.
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'rake/clean'
2
4
 
3
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -1,3 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require 'stringio'
4
+
5
+
1
6
  module Pangolin
2
7
  module JarCommon
3
8
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Pangolin
2
4
 
3
5
  module JavacCommon
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Pangolin
2
4
  module JunitCommon
3
5
  include Output::Formatting
@@ -1,5 +1,8 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'zip/zip'
2
4
 
5
+
3
6
  module Pangolin
4
7
  class Jar
5
8
  include JarCommon
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Pangolin
2
4
  class Javac
3
5
  include JavacCommon
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Pangolin
2
4
  class Junit
3
5
  include JunitCommon
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'java'
2
4
 
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'java'
2
4
 
3
5
 
@@ -1,7 +1,12 @@
1
- include_class 'java.lang.ClassLoader'
2
- include_class 'java.lang.ClassNotFoundException'
3
- include_class 'java.net.URLClassLoader'
4
- include_class 'java.net.URL'
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
- URL.new('file', 'localhost', full_path)
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(URL), ClassLoader.system_class_loader)
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
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Pangolin
2
4
  module Output
3
5
  module Formatting
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
- gem 'rubyzip', '>= 0.9.1'
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.0"
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{2009-12-07}
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.5}
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",
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'tmpdir'
2
4
  require 'fileutils'
3
5
  require 'digest/md5'
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'tmpdir'
2
4
  require 'fileutils'
3
5
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
4
 
3
5
 
data/spec/jar_cmd_spec.rb CHANGED
@@ -1,3 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
+
5
+
1
6
  describe "jar command" do
2
7
 
3
8
  it "should pass the first argument to the constructor of Jar" do
data/spec/jar_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
4
 
3
5
 
@@ -1,3 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
+
5
+
1
6
  describe "javac command" do
2
7
 
3
8
  it "should pass the first argument to the constructor of Javac" do
data/spec/javac_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
4
 
3
5
 
@@ -1,3 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
+
5
+
1
6
  describe 'junit command' do
2
7
 
3
8
  before do
data/spec/junit_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
4
 
3
5
 
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require File.expand_path(File.dirname(__FILE__) + '/../lib/pangolin')
2
4
 
3
5
  include Pangolin
data/tasks/gem.rake CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  begin
2
4
  require 'jeweler'
3
5
 
@@ -20,5 +22,5 @@ begin
20
22
 
21
23
  Jeweler::GemcutterTasks.new
22
24
  rescue LoadError
23
- puts 'Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler'
25
+ # ignore
24
26
  end
data/tasks/rdoc.rake CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'rake/rdoctask'
2
4
 
3
5
 
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
- version: 0.4.0
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: 2009-12-07 00:00:00 +01:00
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
- type: :runtime
18
- version_requirement:
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
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: rspec
27
- type: :development
28
- version_requirement:
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
- version:
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.5
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