From 0b6587d764b294b4cfab1faa20d0161483dfa80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 4 Sep 2020 12:39:53 +0200 Subject: [PATCH 1/6] Bump mvn extensions When running `rmvn` from https://github.com/jruby/jruby-openssl, I get source control changes where the `.mvn/extensions.yml` file in that repository is overwritten with the `.mvn/extensions.yml` file in this repo. This is because of this code: https://github.com/jruby/ruby-maven/blob/2cab8ac4fae8d6bc242e4893c705dde91667f806/lib/ruby_maven.rb#L65-L72 In my understanding, that essentially changes the versions of extensions that get used by `mvn`. So even though I'm not totally sure how all this works, I think it would make sense to sync the files and bump the versions here too. --- .mvn/extensions.xml | 5 ++--- spec/ruby_maven_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index f6a83ff..4fba39b 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,14 +1,13 @@ - org.torquebox.mojo mavengem-wagon - 0.2.1 + 1.0.3 io.takari.polyglot polyglot-ruby - 0.1.18 + 0.4.4 diff --git a/spec/ruby_maven_spec.rb b/spec/ruby_maven_spec.rb index 2d13e3a..4ac5bc9 100644 --- a/spec/ruby_maven_spec.rb +++ b/spec/ruby_maven_spec.rb @@ -10,7 +10,7 @@ CatchStdout.exec do RubyMaven.exec( '--version' ) end - CatchStdout.result.must_match /Polyglot Maven Extension 0.1.15/ + CatchStdout.result.must_match /Polyglot Maven Extension 0.4.4/ xml = File.read('.mvn/extensions.xml') xml.must_equal "dummy\n" end @@ -26,7 +26,7 @@ FileUtils.rm_f gem_name CatchStdout.exec do # need newer jruby version - RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=1.7.24' ) + RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' ) end #puts CatchStdout.result CatchStdout.result.must_match /mvn -Dverbose package/ From acc37330345b254d9147ca852e2f96a174a8050a Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Tue, 12 Oct 2021 19:23:43 +0200 Subject: [PATCH 2/6] Fix Minitest 6 deprecations --- spec/maven_ruby_maven_spec.rb | 8 ++++---- spec/ruby_maven_spec.rb | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spec/maven_ruby_maven_spec.rb b/spec/maven_ruby_maven_spec.rb index 81cb359..328f43f 100644 --- a/spec/maven_ruby_maven_spec.rb +++ b/spec/maven_ruby_maven_spec.rb @@ -10,14 +10,14 @@ subject.exec( '-Dverbose', 'validate' ) end subject.verbose = false - CatchStdout.result.must_match /mvn -Dverbose validate/ + _(CatchStdout.result).must_match /mvn -Dverbose validate/ end it 'takes declared jruby version' do begin subject.inherit_jruby_version '9.0.4.0' subject.exec( '-X', 'initialize', '-l', 'pkg/log1.txt' ) - File.read('pkg/log1.txt').must_match /resolve jruby for version 9.0.4.0/ + _(File.read('pkg/log1.txt')).must_match /resolve jruby for version 9.0.4.0/ ensure subject['jruby.version'] = nil end @@ -27,13 +27,13 @@ it 'inherits jruby version' do subject.inherit_jruby_version subject.exec( '-X', 'initialize', '-l', 'pkg/log2.txt' ) - File.read('pkg/log2.txt').must_match /resolve jruby for version #{JRUBY_VERSION}/ + _(File.read('pkg/log2.txt')).must_match /resolve jruby for version #{JRUBY_VERSION}/ end else it 'takes default jruby version with inherit jruby version' do subject.inherit_jruby_version subject.exec( '-X', 'initialize', '-l', 'pkg/log3.txt' ) - File.read('pkg/log3.txt').must_match /resolve jruby for version 1.7.22/ + _(File.read('pkg/log3.txt')).must_match /resolve jruby for version 1.7.22/ end end end diff --git a/spec/ruby_maven_spec.rb b/spec/ruby_maven_spec.rb index 4ac5bc9..da34c12 100644 --- a/spec/ruby_maven_spec.rb +++ b/spec/ruby_maven_spec.rb @@ -10,9 +10,9 @@ CatchStdout.exec do RubyMaven.exec( '--version' ) end - CatchStdout.result.must_match /Polyglot Maven Extension 0.4.4/ + _(CatchStdout.result).must_match /Polyglot Maven Extension 0.4.4/ xml = File.read('.mvn/extensions.xml') - xml.must_equal "dummy\n" + _(xml).must_equal "dummy\n" end end @@ -29,10 +29,10 @@ RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' ) end #puts CatchStdout.result - CatchStdout.result.must_match /mvn -Dverbose package/ - File.exists?( gem_name ).must_equal true - File.exists?( '.mvn/extensions.xml' ).must_equal true - File.exists?( '.mvn/extensions.xml.orig' ).wont_equal true + _(CatchStdout.result).must_match /mvn -Dverbose package/ + _(File.exists?( gem_name )).must_equal true + _(File.exists?( '.mvn/extensions.xml' )).must_equal true + _(File.exists?( '.mvn/extensions.xml.orig' )).wont_equal true end end From e74ee276f8b874e9e49b38dc987013c6820ebe39 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Tue, 12 Oct 2021 19:26:34 +0200 Subject: [PATCH 3/6] Update CI matrix Run against the latest JRuby and the corresponding CRuby. --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0922fb..d28941e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: ruby sudo: false rvm: - - 2.2.2 - - jruby + - 2.6.8 + - jruby-9.3.1.0 - jruby-head - From d9452ade542135313c6f7a7a7251f547c30be145 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Tue, 12 Oct 2021 19:35:41 +0200 Subject: [PATCH 4/6] Migrate CI to GitHub Actions TravisCI is essentially dead for open source. --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 6 ------ 2 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2de65ee --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-20.04 + + strategy: + fail-fast: false + + matrix: + ruby: [2.6.8, jruby-head, jruby-9.3.1.0] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Set up Java 8 + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 8 + + - name: Run test + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d28941e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: ruby -sudo: false -rvm: - - 2.6.8 - - jruby-9.3.1.0 - - jruby-head From afdef4d45187a99eb91bf1936808b936faded707 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Tue, 12 Oct 2021 21:52:57 +0200 Subject: [PATCH 5/6] Further bump default jruby and catch up in specs --- Mavenfile | 2 +- spec/maven_ruby_maven_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mavenfile b/Mavenfile index 1dbff6e..0a8107f 100644 --- a/Mavenfile +++ b/Mavenfile @@ -2,7 +2,7 @@ gemspec -properties 'push.skip': true, 'jruby.version': '9.2.9.0' +properties 'push.skip': true, 'jruby.version': '9.3.1.0' profile :id => :release do properties 'maven.test.skip' => true, 'invoker.skip' => true diff --git a/spec/maven_ruby_maven_spec.rb b/spec/maven_ruby_maven_spec.rb index 328f43f..90150d7 100644 --- a/spec/maven_ruby_maven_spec.rb +++ b/spec/maven_ruby_maven_spec.rb @@ -33,7 +33,7 @@ it 'takes default jruby version with inherit jruby version' do subject.inherit_jruby_version subject.exec( '-X', 'initialize', '-l', 'pkg/log3.txt' ) - _(File.read('pkg/log3.txt')).must_match /resolve jruby for version 1.7.22/ + _(File.read('pkg/log3.txt')).must_match /resolve jruby for version 9.3.1.0/ end end end From 398408c8133cca03959a5586ae69248b38747eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Oct 2021 09:42:29 +0200 Subject: [PATCH 6/6] Gitignore another file Something generates a backup file of the `pom.ruby-maven.gemspec.xml` file. I guess it should be gitignored too. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f146c2c..a1e6142 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ pkg pom*xml +pom*xml.bkp *.gem *.lock