-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from tjgrathwell/fix-for-ruby-2
Fix issues with running Ruby 2.0.0 and using Heroku Toolbelt
- Loading branch information
Showing
3 changed files
with
54 additions
and
3 deletions.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@slow_process @announce-cmd | ||
Feature: heroku_san can shell out to heroku without errors | ||
|
||
Scenario: Bundling a ruby 2.0 project | ||
Given I run `mkdir -p ruby2test` | ||
And I cd to "ruby2test" | ||
And I write to "Gemfile" with: | ||
""" | ||
source "https://rubygems.org" | ||
ruby '2.0.0' | ||
gem 'heroku_san', :path => '../../../.' | ||
""" | ||
|
||
And I write to "get_heroku_version.rb" with: | ||
""" | ||
#!/usr/bin/env ruby | ||
puts ENV['RUBY_VERSION'] | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__) | ||
require 'bundler/setup' | ||
require 'heroku_san' | ||
api = HerokuSan::API.new | ||
api.sh('cool_app', 'version') | ||
""" | ||
And I write to "run_in_ruby_2.sh" with: | ||
""" | ||
#!/usr/bin/env bash | ||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | ||
rvm use 2.0.0 | ||
bundle install | ||
ruby get_heroku_version.rb | ||
""" | ||
And I run `chmod +x run_in_ruby_2.sh` | ||
And I cleanly run `./run_in_ruby_2.sh` | ||
Then the output should contain "heroku-toolbelt" | ||
# Fail if we see "Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0" | ||
Then the output should not contain "Your Ruby version" | ||
Then the output should not contain "your Gemfile specified" | ||
|
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