Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ci.yml
on: [push, pull_request]

jobs:
test:
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 'jruby-head'
- run: bundle
- run: bundle exec rake specs
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<extension>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-ruby</artifactId>
<version>0.4.4</version>
<version>0.4.8</version>
</extension>
</extensions>
4 changes: 2 additions & 2 deletions Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gemfile
properties( 'jruby.versions' => "${jruby.version}, 9.0.4.0",
# just lock the versions
'jruby.version' => '9.2.9.0',
'jruby.plugins.version' => '1.1.8' )
'jruby.plugins.version' => '2.0.1' )

jruby_plugin( :minitest, :minispecDirectory => "spec/*_spec.rb" ) do
execute_goals(:spec)
Expand All @@ -20,7 +20,7 @@ plugin :invoker, '1.8' do
:properties => { 'jbundler.version' => '${project.version}',
'jruby.version' => '${jruby.version}',
'jruby.plugins.version' => '${jruby.plugins.version}',
'bundler.version' => '1.9.3',
'bundler.version' => '2.3.13',
# dump pom for the time being - for travis
'polyglot.dump.pom' => 'pom.xml' } )
end
Expand Down
4 changes: 2 additions & 2 deletions jbundler.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'jbundler'
s.version = '0.9.3'
s.version = '0.9.5'

s.summary = 'managing jar dependencies'
s.description = <<-END
Expand All @@ -26,7 +26,7 @@ END
s.files += Dir['Gemfile*']
s.test_files += Dir['spec/*_spec.rb']

s.add_runtime_dependency 'maven-tools', '~> 1.1'
s.add_runtime_dependency 'maven-tools', '1.2.3'

s.add_runtime_dependency "ruby-maven", "~> 3.3", '>= 3.3.8'
s.add_runtime_dependency "bundler", "> 1.5", "< 3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions lib/jbundler/classpath_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def mtime
end

def exists?
File.exists?(@classpathfile)
File.exist?(@classpathfile)
end

def missing?( jarfile )
Expand Down Expand Up @@ -100,7 +100,7 @@ def dump_jar( file, path, prefix, local_repo )
return if path =~ /pom$/
if local_repo
path = path.sub( /#{local_repo}/, '' )
unless File.exists?( path )
unless File.exist?( path )
file.puts "JBUNDLER_#{prefix}CLASSPATH << (JBUNDLER_LOCAL_REPO + '#{path}')"
path = nil
end
Expand Down
10 changes: 5 additions & 5 deletions lib/jbundler/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ class Config
def initialize
if ENV.has_key? 'HOME'
homefile = File.join(ENV['HOME'], RC_FILE)
home_config = YAML.load_file(homefile) if File.exists?(homefile)
home_config = YAML.load_file(homefile) if File.exist?(homefile)
else
home_config = nil
end
@config = (home_config || {})
@basedir = find_basedir( File.expand_path( '.' ) )
@basedir ||= File.expand_path( '.' )
file = join_basedir( RC_FILE )
pwd_config = YAML.load_file(file) if File.exists?(file)
pwd_config = YAML.load_file(file) if File.exist?(file)
@config.merge!(pwd_config || {})
end

Expand All @@ -55,11 +55,11 @@ def join_basedir( path )

def find_basedir( dir )
f = File.join( dir, RC_FILE )
return dir if File.exists?( f )
return dir if File.exist?( f )
f = File.join( dir, _jarfile )
return dir if File.exists?( f )
return dir if File.exist?( f )
f = File.join( dir, _gemfile )
return dir if File.exists?( f )
return dir if File.exist?( f )
parent = File.dirname( dir )
if dir != ENV['HOME'] && dir != parent
find_basedir( parent )
Expand Down
2 changes: 1 addition & 1 deletion lib/jbundler/gemfile_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class GemfileLock

def initialize(jarfile, lockfile = 'Gemfile.lock')
@jarfile = jarfile
@lockfile = lockfile if File.exists?(lockfile)
@lockfile = lockfile if File.exist?(lockfile)
end

def exists?
Expand Down
2 changes: 1 addition & 1 deletion lib/jbundler/jarfile_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def to_path( group_id, artifact_id, *classifier_version )

jar = to_jar( group_id, artifact_id, version, classifier )
( [ Jars.home ] + $LOAD_PATH ).each do |path|
if File.exists?( f = File.join( path, jar ) )
if File.exist?( f = File.join( path, jar ) )
return f
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/jbundler/jruby_complete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def show_versions

exec( 'dependency:tree' )

if File.exists?( @tree )
if File.exist?( @tree )
puts File.read( @tree )
end
end
Expand Down
8 changes: 4 additions & 4 deletions lib/jbundler/vendor.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'jar_installer'
require 'jars/installer'
module JBundler
class Vendor

Expand All @@ -8,11 +8,11 @@ def initialize( dir )
end

def vendored?
File.exists?( @dir ) && Dir[ File.join( @dir, '*' ) ].size > 0
File.exist?( @dir ) && Dir[ File.join( @dir, '*' ) ].size > 0
end

def require_jars
if File.exists?(@jars_lock)
if File.exist?(@jars_lock)
$LOAD_PATH << @dir unless $LOAD_PATH.include? @dir
ENV_JAVA['jars.lock'] = @jars_lock
Jars.require_jars_lock!
Expand All @@ -24,7 +24,7 @@ def require_jars

def require_jars_legacy
jars = File.join( @dir, 'jbundler.rb' )
if File.exists?( jars )
if File.exist?( jars )
$LOAD_PATH << @dir unless $LOAD_PATH.include? @dir
require jars
else
Expand Down