-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds compatibility to install gems with jruby > 9.2.10.x #106
Merged
headius
merged 6 commits into
jruby:master
from
abelsromero:fix-compatibility-with-jruby-9-2-10-0-or-higher
Sep 16, 2020
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1c6b906
adds compatibility to install gems with jruby > 9.2.10.x
abelsromero 55f8be4
refactor to handle jruby version discovery errors in ScriptFactory
abelsromero 23511c6
fix JRubyVersion language comparison
abelsromero b38682c
fix 'file does not exists' typo in tests and RSpecMojo
abelsromero 2f20e77
replace langauge version comparision by jruby version due to limitati…
abelsromero a9194eb
fix IT test execute-compass-with-gems-from-plugin
abelsromero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ target | |
tmp | ||
*Backup | ||
release.properties | ||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 11 additions & 13 deletions
24
gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin/verify.bsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
import java.io.*; | ||
import java.util.*; | ||
import org.codehaus.plexus.util.FileUtils; | ||
|
||
|
||
String log = FileUtils.fileRead( new File( basedir, "build.log" ) ); | ||
String expected = "Successfully installed compass-"; | ||
if ( !log.contains( expected ) ) | ||
{ | ||
throw new RuntimeException( "log file does not contain '" + expected + "'" ); | ||
} | ||
expected = "Successfully installed sass-"; | ||
if ( !log.contains( expected ) ) | ||
{ | ||
throw new RuntimeException( "log file does not contain '" + expected + "'" ); | ||
} | ||
expected = "Individual stylesheets must be in the sass directory."; | ||
if ( !log.contains( expected ) ) | ||
|
||
String installMessage = "Successfully installed "; | ||
String[] expectedGems = new String[] { "compass-", "sass-", "rb-inotify-" }; | ||
|
||
for ( String expectedGem: expectedGems ) | ||
{ | ||
throw new RuntimeException( "log file does not contain '" + expected + "'" ); | ||
String expected = installMessage + expectedGem; | ||
if ( !log.contains( expected ) ) | ||
{ | ||
throw new RuntimeException( "log file does not contain '" + expected + "'" ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
gem-maven-plugin/src/it/install-gem-ruby-9.2.10-compatibility/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>rubygems</groupId> | ||
<artifactId>pom_first</artifactId> | ||
<version>0.0.0</version> | ||
<description>Installs a gem from http://rubygems.org with Ruby 2.7 compatibility</description> | ||
<properties> | ||
<jruby.version>9.2.10.0</jruby.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>rubygems</groupId> | ||
<artifactId>yard</artifactId> | ||
<version>0.9.25</version> | ||
<type>gem</type> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<extensions> | ||
<extension> | ||
<groupId>org.torquebox.mojo</groupId> | ||
<artifactId>mavengem-wagon</artifactId> | ||
<version>1.0.3</version> | ||
</extension> | ||
</extensions> | ||
<plugins> | ||
<plugin> | ||
<groupId>de.saumya.mojo</groupId> | ||
<artifactId>gem-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<configuration> | ||
<jrubyVersion>${jruby.version}</jrubyVersion> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>install-gems</id> | ||
<goals> | ||
<goal>initialize</goal> | ||
</goals> | ||
<phase>initialize</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<repositories> | ||
<repository> | ||
<id>mavengems</id> | ||
<url>mavengem:http://rubygems.org</url> | ||
</repository> | ||
</repositories> | ||
</project> |
8 changes: 8 additions & 0 deletions
8
gem-maven-plugin/src/it/install-gem-ruby-9.2.10-compatibility/verify.bsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import java.io.*; | ||
import org.codehaus.plexus.util.FileUtils; | ||
|
||
File f = new File( basedir, "target/rubygems/gems/yard-0.9.25" ); | ||
if ( !f.exists() ) | ||
{ | ||
throw new RuntimeException( "file does not exist: " + f ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a line which made me wonder: http vs https?
It's not recommended to request gems via http from rubygems.org.
Is there a special reason to not use https in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only reason is legacy configuration. Right now it shows a warning but works, and I see there're other places where http is used that are not Java so not sure of the impact.
I am happy to work on it but I'd rather do it in a separated issue. wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate issue, totally right decision, and it's not a priority for me. Thanks for answering!