Skip to content

Commit

Permalink
Announce RVM version with Ruby and Gem version
Browse files Browse the repository at this point in the history
Close #84
  • Loading branch information
sarahhodne committed Feb 26, 2013
1 parent b3e2249 commit 7538cf4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/build_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ travis_finish before_install $?

travis_start install
if [[ -f Makefile ]]; then
echo \$\ true \#\ \(using\ Makefile\)
echo \$\ true
true
travis_assert
else
Expand Down
2 changes: 2 additions & 0 deletions examples/build_ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ echo \$\ ruby\ --version
ruby --version
echo \$\ gem\ --version
gem --version
echo \$\ rvm\ --version
rvm --version
travis_finish announce $?

travis_start before_install
Expand Down
2 changes: 2 additions & 0 deletions examples/build_ruby_jruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ echo \$\ ruby\ --version
ruby --version
echo \$\ gem\ --version
gem --version
echo \$\ rvm\ --version
rvm --version
travis_finish announce $?

travis_start before_install
Expand Down
3 changes: 2 additions & 1 deletion lib/travis/build/script/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def announce
super
cmd 'ruby --version'
cmd 'gem --version'
cmd 'rvm --version'
end

def install
Expand Down Expand Up @@ -66,7 +67,7 @@ def uses_java?
def uses_jdk?
uses_java? && super
end

def ruby_version
ruby_version = config[:rvm].to_s.gsub(/-(1[89]|20)mode$/, '-d\1')
ruby_version.gsub(/^rbx-d(\d{2})$/, 'rbx-weekly-d\1')
Expand Down
4 changes: 4 additions & 0 deletions spec/script/ruby_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
should announce 'ruby --version'
end

it 'announces rvm --version' do
should announce 'rvm --version'
end

it 'installs with bundle install with the given bundler_args if the gemfile exists' do
gemfile 'Gemfile.ci'
should install 'bundle install'
Expand Down

2 comments on commit 7538cf4

@joshk
Copy link
Contributor

@joshk joshk commented on 7538cf4 Feb 26, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@brixen
Copy link
Contributor

@brixen brixen commented on 7538cf4 Feb 26, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Please sign in to comment.