Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ce7fbc610c64^
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 878201d987c0
Choose a head ref
  • 2 commits
  • 27 files changed
  • 1 contributor

Commits on Apr 7, 2016

  1. fix the runnable.jar IT

    mkristian committed Apr 7, 2016
    Copy the full SHA
    ce7fbc6 View commit details
  2. Copy the full SHA
    878201d View commit details
Showing with 98 additions and 209 deletions.
  1. +1 −1 .mvn/extensions.xml
  2. +8 −1 core/src/main/java/org/jruby/util/cli/ArgumentProcessor.java
  3. +2 −2 lib/pom.xml
  4. +1 −17 lib/ruby/stdlib/rubygems/defaults/jruby.rb
  5. 0 maven/{jruby → jruby-complete}/src/it/runnable/.gitignore
  6. 0 maven/{jruby → jruby-complete}/src/it/runnable/.rspec
  7. +2 −2 maven/{jruby → jruby-complete}/src/it/runnable/Gemfile
  8. +28 −0 maven/jruby-complete/src/it/runnable/Gemfile.lock
  9. 0 maven/{jruby → jruby-complete}/src/it/runnable/Jarfile
  10. +5 −0 maven/jruby-complete/src/it/runnable/Jars.lock
  11. +44 −0 maven/jruby-complete/src/it/runnable/Mavenfile
  12. +0 −1 maven/{jruby → jruby-complete}/src/it/runnable/Rakefile
  13. 0 maven/{jruby → jruby-complete}/src/it/runnable/nested.rb
  14. 0 maven/{jruby → jruby-complete}/src/it/runnable/pom.xml
  15. +2 −4 maven/{jruby → jruby-complete}/src/it/runnable/spec/one_spec.rb
  16. +3 −0 maven/jruby-complete/src/it/runnable/spec/spec_helper.rb
  17. 0 maven/{jruby → jruby-complete}/src/it/runnable/test.rb
  18. 0 maven/{jruby → jruby-complete}/src/it/runnable/test_other.rb
  19. 0 maven/{jruby → jruby-complete}/src/it/runnable/verify.bsh
  20. +0 −13 maven/jruby/src/it/.mvn/extensions.xml
  21. +0 −12 maven/jruby/src/it/runnable/.jbundler/classpath.rb
  22. +0 −55 maven/jruby/src/it/runnable/Gemfile.lock
  23. +0 −6 maven/jruby/src/it/runnable/Jarfile.lock
  24. +0 −91 maven/jruby/src/it/runnable/Mavenfile
  25. +0 −2 maven/jruby/src/it/runnable/spec/spec_helper.rb
  26. +1 −1 pom.rb
  27. +1 −1 pom.xml
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
<extension>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-ruby</artifactId>
<version>0.1.11</version>
<version>0.1.15</version>
</extension>
</extensions>
9 changes: 8 additions & 1 deletion core/src/main/java/org/jruby/util/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
@@ -61,6 +61,9 @@
* script or by a native executable.
*/
public class ArgumentProcessor {

public static final String SEPARATOR = "(?<!jar:file|jar|file|classpath|uri:classloader|uri|http|https):";

private static final class Argument {
public final String originalValue;
public final String dashedValue;
@@ -250,7 +253,11 @@ private void processArgument() {
break FOR;
case 'I':
String s = grabValue(getArgumentError("-I must be followed by a directory name to add to lib path"));
String[] ls = s.split(java.io.File.pathSeparator);
String separator = java.io.File.pathSeparator;
if (":".equals(separator)) {
separator = SEPARATOR;
}
String[] ls = s.split(separator);
config.getLoadPaths().addAll(Arrays.asList(ls));
break FOR;
case 'J':
4 changes: 2 additions & 2 deletions lib/pom.xml
Original file line number Diff line number Diff line change
@@ -276,7 +276,7 @@ DO NOT MODIFIY - GENERATED CODE
<plugin>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-maven-plugin</artifactId>
<version>0.1.11</version>
<version>0.1.15</version>
<executions>
<execution>
<id>install_gems</id>
@@ -327,7 +327,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-ruby</artifactId>
<version>0.1.11</version>
<version>0.1.15</version>
</dependency>
</dependencies>
</plugin>
18 changes: 1 addition & 17 deletions lib/ruby/stdlib/rubygems/defaults/jruby.rb
Original file line number Diff line number Diff line change
@@ -20,22 +20,6 @@ def ruby
def jarred_path?(p)
p =~ /^(file|uri|jar|classpath):/
end

# A jar path looks like this on non-Windows platforms:
# file:/path/to/file.jar!/path/within/jar/to/file.txt
# and like this on Windows:
# file:/C:/path/to/file.jar!/path/within/jar/to/file.txt
#
# This method returns:
# /path/to/file.jar
# or
# C:/path/to/file.jar
# as appropriate.
def jar_path(p)
path = p.sub(/^file:/, "").sub(/!.*/, "")
path = path.sub(/^\//, "") if win_platform? && path =~ /^\/[A-Za-z]:/
path
end
end

# Default home directory path to be used if an alternate value is not
@@ -72,7 +56,7 @@ def self.win_platform?
# Allow specifying jar and classpath type gem path entries
def self.path_separator
return File::PATH_SEPARATOR unless File::PATH_SEPARATOR == ':'
/(?<!jar:file|jar|file|classpath|uri:classloader|uri|http|https):/
/#{org.jruby.util.cli.ArgumentProcessor::SEPARATOR}/
end
end

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@ gem 'rspec', '~> 3.0'

gem 'rake', '10.4.2'

gem 'jbundler', '0.7.1'
#gem 'jbundler', '0.7.1'

gem 'ruby-maven', '3.1.1.0.11'
#gem 'ruby-maven', '3.1.1.0.11'
28 changes: 28 additions & 0 deletions maven/jruby-complete/src/it/runnable/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
rake (10.4.2)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.3)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)

PLATFORMS
java

DEPENDENCIES
rake (= 10.4.2)
rspec (~> 3.0)

BUNDLED WITH
1.11.2
File renamed without changes.
5 changes: 5 additions & 0 deletions maven/jruby-complete/src/it/runnable/Jars.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
org.yaml:snakeyaml:1.14:compile:
org.bouncycastle:bcpkix-jdk15on:1.54:compile:
org.slf4j:slf4j-simple:1.6.4:compile:
org.bouncycastle:bcprov-jdk15on:1.54:compile:
org.slf4j:slf4j-api:1.6.4:compile:
44 changes: 44 additions & 0 deletions maven/jruby-complete/src/it/runnable/Mavenfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#-*- mode: ruby -*-

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10', 'mavengem.wagon.version' => '0.2.0' )

gemfile

packaging :jrubyJar

properties 'jruby.version' => '9.0.5.0'

resource :includes => ['.rspec', '*.rb', 'config.ru', '*file', '*file.lock', '.jbundler/classpath.rb',
'lib/**', 'app/**', 'config/**', 'vendor/**', 'spec/**']


final_name 'runnable'

# test bits

phase :package do
plugin( 'org.codehaus.mojo:exec-maven-plugin:1.2',
:executable => 'java',
:environmentVariables => {
'HOME' => '${basedir}',
'GEM_PATH' => '${basedir}',
'GEM_HOME' => '${basedir}'
} ) do

execute_goal( :exec, :id => 'rake -T',
:arguments => [ '-jar', 'pkg/runnable.jar', '-S', 'rake', '-T' ] )

execute_goal( :exec, :id => 'rspec',
:arguments => [ '-jar', 'pkg/runnable.jar', '-S', 'rspec' ] )

execute_goal( :exec, :id => 'nested IsolatedScriptingContainer',
:arguments => [ '-jar', 'pkg/runnable.jar', 'nested.rb' ] )

# does not work anymore - bundler setup fails on forked rspec
# execute_goal( :exec, :id => 'rake spec',
# :arguments => [ '-jar', 'pkg/runnable.jar', '-S', 'rake', 'spec' ] )

end
end

Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ rescue Bundler::BundlerError => e
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'jbundler'

require 'rspec/core/rake_task'

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
require 'jbundler'

describe "something" do
it "does something" do
expect(__FILE__).to eq 'uri:classloader:/spec/one_spec.rb'
expect($CLASSPATH.size).to eq 6
expect(Jars.home).to eq 'uri:classloader:/jars'
expect($CLASSPATH.size).to eq 5
expect(Jars.home).to eq 'uri:classloader:/jars' if ENV_JAVA['jars.home']
expect(Dir.pwd).to eq 'uri:classloader://'
$LOAD_PATH.each do |lp|
# bundler or someone else messes up the $LOAD_PATH
3 changes: 3 additions & 0 deletions maven/jruby-complete/src/it/runnable/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require 'jars/setup'
module Helper
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions maven/jruby/src/it/.mvn/extensions.xml

This file was deleted.

12 changes: 0 additions & 12 deletions maven/jruby/src/it/runnable/.jbundler/classpath.rb

This file was deleted.

55 changes: 0 additions & 55 deletions maven/jruby/src/it/runnable/Gemfile.lock

This file was deleted.

6 changes: 0 additions & 6 deletions maven/jruby/src/it/runnable/Jarfile.lock

This file was deleted.

91 changes: 0 additions & 91 deletions maven/jruby/src/it/runnable/Mavenfile

This file was deleted.

2 changes: 0 additions & 2 deletions maven/jruby/src/it/runnable/spec/spec_helper.rb

This file was deleted.

2 changes: 1 addition & 1 deletion pom.rb
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@
# used in ./lib/pom.rb and ./maven/jruby-stdlib/pom.rb
'rdoc.version' => '4.2.0',
'rake.version' => '10.4.2',
'jar-dependencies.version' => '0.2.3',
'jar-dependencies.version' => '0.3.2',

'jruby-launcher.version' => '1.1.1',
'ant.version' => '1.9.2',
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ DO NOT MODIFIY - GENERATED CODE
<jruby.plugins.version>1.0.10</jruby.plugins.version>
<invoker.skip>true</invoker.skip>
<json.version>1.8.3</json.version>
<jar-dependencies.version>0.2.3</jar-dependencies.version>
<jar-dependencies.version>0.3.2</jar-dependencies.version>
<power_assert.version>0.2.3</power_assert.version>
<version.jruby>${project.version}</version.jruby>
<bouncy-castle.version>1.47</bouncy-castle.version>