-
Notifications
You must be signed in to change notification settings - Fork 145
fix(ruby): support multi-part version constraints in Gemfile #193
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
Open
gauravtiwari
wants to merge
8
commits into
railwayapp:main
Choose a base branch
from
gauravtiwari:fix-ruby-version-detection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b8b35ef
Add --ignore-scripts flag to package manager prune commands
gauravtiwari 77ffa43
Oops! missed it
gauravtiwari b1e5815
Merge branch 'main' into main
coffee-cup bbabd22
Fix ruby version detection from Gemfile
gauravtiwari b4fc89e
Add another example
gauravtiwari 15950b6
Simplify
gauravtiwari 6b235bb
Extract to function
gauravtiwari 22bf76f
Merge branch 'main' into fix-ruby-version-detection
gauravtiwari 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
171 changes: 171 additions & 0 deletions
171
core/__snapshots__/TestGenerateBuildPlanForExamples_ruby-single-version_1.snap.json
This file contains hidden or 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,171 @@ | ||
| { | ||
| "caches": { | ||
| "apt": { | ||
| "directory": "/var/cache/apt", | ||
| "type": "locked" | ||
| }, | ||
| "apt-lists": { | ||
| "directory": "/var/lib/apt/lists", | ||
| "type": "locked" | ||
| } | ||
| }, | ||
| "deploy": { | ||
| "base": { | ||
| "step": "packages:apt:runtime" | ||
| }, | ||
| "inputs": [ | ||
| { | ||
| "include": [ | ||
| "/mise/shims", | ||
| "/mise/installs", | ||
| "/usr/local/bin/mise", | ||
| "/etc/mise/config.toml", | ||
| "/root/.local/state/mise" | ||
| ], | ||
| "step": "packages:mise" | ||
| }, | ||
| { | ||
| "include": [ | ||
| "/usr/local/bundle" | ||
| ], | ||
| "step": "install" | ||
| }, | ||
| { | ||
| "include": [ | ||
| "/app" | ||
| ], | ||
| "step": "build" | ||
| } | ||
| ], | ||
| "startCommand": "bundle exec rackup config.ru -p ${PORT:-3000}", | ||
| "variables": { | ||
| "BUNDLE_GEMFILE": "/app/Gemfile", | ||
| "GEM_HOME": "/usr/local/bundle", | ||
| "GEM_PATH": "/usr/local/bundle", | ||
| "MALLOC_ARENA_MAX": "2" | ||
| } | ||
| }, | ||
| "steps": [ | ||
| { | ||
| "caches": [ | ||
| "apt", | ||
| "apt-lists" | ||
| ], | ||
| "commands": [ | ||
| { | ||
| "cmd": "sh -c 'apt-get update \u0026\u0026 apt-get install -y cargo libyaml-dev rustc'", | ||
| "customName": "install apt packages: cargo libyaml-dev rustc" | ||
| } | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "image": "ghcr.io/railwayapp/railpack-builder:latest" | ||
| } | ||
| ], | ||
| "name": "packages:apt:build" | ||
| }, | ||
| { | ||
| "assets": { | ||
| "mise.toml": "[mise.toml]" | ||
| }, | ||
| "commands": [ | ||
| { | ||
| "path": "/mise/shims" | ||
| }, | ||
| { | ||
| "customName": "create mise config", | ||
| "name": "mise.toml", | ||
| "path": "/etc/mise/config.toml" | ||
| }, | ||
| { | ||
| "cmd": "sh -c 'mise trust -a \u0026\u0026 mise install'", | ||
| "customName": "install mise packages: ruby" | ||
| } | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "step": "packages:apt:build" | ||
| } | ||
| ], | ||
| "name": "packages:mise", | ||
| "variables": { | ||
| "MISE_CACHE_DIR": "/mise/cache", | ||
| "MISE_CONFIG_DIR": "/mise", | ||
| "MISE_DATA_DIR": "/mise", | ||
| "MISE_INSTALLS_DIR": "/mise/installs", | ||
| "MISE_SHIMS_DIR": "/mise/shims" | ||
| } | ||
| }, | ||
| { | ||
| "commands": [ | ||
| { | ||
| "cmd": "gem install -N bundler:2.4.22" | ||
| }, | ||
| { | ||
| "dest": "Gemfile", | ||
| "src": "Gemfile" | ||
| }, | ||
| { | ||
| "dest": "Gemfile.lock", | ||
| "src": "Gemfile.lock" | ||
| }, | ||
| { | ||
| "cmd": "bundle install" | ||
| }, | ||
| { | ||
| "path": "/usr/local/bundle" | ||
| } | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "step": "packages:mise" | ||
| } | ||
| ], | ||
| "name": "install", | ||
| "variables": { | ||
| "BUNDLE_GEMFILE": "/app/Gemfile", | ||
| "GEM_HOME": "/usr/local/bundle", | ||
| "GEM_PATH": "/usr/local/bundle", | ||
| "MALLOC_ARENA_MAX": "2" | ||
| } | ||
| }, | ||
| { | ||
| "commands": [ | ||
| { | ||
| "dest": ".", | ||
| "src": "." | ||
| } | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "step": "install" | ||
| } | ||
| ], | ||
| "name": "build", | ||
| "variables": { | ||
| "BUNDLE_GEMFILE": "/app/Gemfile", | ||
| "GEM_HOME": "/usr/local/bundle", | ||
| "GEM_PATH": "/usr/local/bundle", | ||
| "MALLOC_ARENA_MAX": "2" | ||
| } | ||
| }, | ||
| { | ||
| "caches": [ | ||
| "apt", | ||
| "apt-lists" | ||
| ], | ||
| "commands": [ | ||
| { | ||
| "cmd": "sh -c 'apt-get update \u0026\u0026 apt-get install -y libyaml-dev'", | ||
| "customName": "install apt packages: libyaml-dev" | ||
| } | ||
| ], | ||
| "inputs": [ | ||
| { | ||
| "image": "ghcr.io/railwayapp/railpack-runtime:latest" | ||
| } | ||
| ], | ||
| "name": "packages:apt:runtime" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,5 +1,5 @@ | ||
|
|
||
| source 'https://rubygems.org' | ||
| ruby '>= 3.2.0', '< 3.5.0' | ||
|
|
||
| gem 'puma', '~> 5.6' | ||
| gem 'sinatra' | ||
| gem "puma", "~> 5.6" |
This file contains hidden or 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,5 @@ | ||
| source 'https://rubygems.org' | ||
| ruby '3.4.2' | ||
|
|
||
| gem 'puma', '~> 5.6' | ||
| gem 'sinatra' |
This file contains hidden or 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,20 @@ | ||
| GEM | ||
| remote: https://rubygems.org/ | ||
| specs: | ||
| puma (5.6.7) | ||
| nio4r (~> 2.0) | ||
| sinatra (3.0.5) | ||
| mustermann (~> 3.0) | ||
| rack (~> 3.0) | ||
| rack-protection (= 3.0.5) | ||
| tilt (~> 2.0) | ||
|
|
||
| PLATFORMS | ||
| x86_64-linux | ||
|
|
||
| DEPENDENCIES | ||
| puma (~> 5.6) | ||
| sinatra | ||
|
|
||
| BUNDLED WITH | ||
| 2.4.22 |
This file contains hidden or 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,5 @@ | ||
| require 'sinatra' | ||
|
|
||
| get '/' do | ||
| "Hello from Ruby #{RUBY_VERSION}!" | ||
| end |
This file contains hidden or 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,2 @@ | ||
| require './app' | ||
| run Sinatra::Application |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.