From 1b70f6fe093f36054f31edba42469f8ad52d84d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Sat, 15 Mar 2014 20:08:39 +0100 Subject: [PATCH] Replace .rvmrc by .ruby-version Also relax the requirement. The .ruby-version represents merely a recomendation for the Ruby version. The incompability issues in the Ruby world are far less currently, than they were when we introduced strict version enforcement. Thus strict enforcement is no longer appropiate. Same holds for RubyGems. This implicity also removes the recomendation on using RVM. The .ruby-version file is supported by all major Ruby version managers. Gemsets are no longer a needed feature since Bundler handles multiple concurrrently installed Gems just well. --- .ruby-gemset | 1 + .ruby-version | 1 + .rvmrc | 21 --------------------- Changelog.md | 1 + script/ci/before_install.sh | 5 ----- script/env/ensure_right_rubygems | 3 --- script/env/ruby_env | 3 --- 7 files changed, 3 insertions(+), 32 deletions(-) create mode 100644 .ruby-gemset create mode 100644 .ruby-version delete mode 100644 .rvmrc delete mode 100644 script/env/ensure_right_rubygems delete mode 100644 script/env/ruby_env diff --git a/.ruby-gemset b/.ruby-gemset new file mode 100644 index 000000000..c2b78cde0 --- /dev/null +++ b/.ruby-gemset @@ -0,0 +1 @@ +diaspora diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..cd5ac039d --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.0 diff --git a/.rvmrc b/.rvmrc deleted file mode 100644 index a7127209a..000000000 --- a/.rvmrc +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -rvm rvmrc warning ignore - -. ./script/env/ruby_env - -if [ -e '.rvmrc.local' ]; then - . ./.rvmrc.local; -elif [ -e '.rvmrc_custom' ] ; then - . ./.rvmrc_custom; -else - if rvm list strings | grep -q "$ruby_version" ; then - rvm --create use "$ruby_version@$gemset" - else - printf "\e[00;31mPLEASE INSTALL RUBY $ruby_version WITH \`rvm install $ruby_version\`\n" - printf "Don't forget to run \`cd .. && cd -\` afterwards!\e[00m\n" - return 1 - fi -fi - -. ./script/env/ensure_right_rubygems diff --git a/Changelog.md b/Changelog.md index 9299faf72..23a99f9d4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -15,6 +15,7 @@ * Port publisher and bookmarklet to Bootstrap [#4678](https://github.com/diaspora/diaspora/pull/4678) * Improve search page, add better indications [#4794](https://github.com/diaspora/diaspora/pull/4794) * Port notifications and hovercards to Bootstrap [#4814](https://github.com/diaspora/diaspora/pull/4814) +* Replace .rvmrc by .ruby-version and .ruby-gemset [#4854](https://github.com/diaspora/diaspora/pull/4855) ## Bug fixes * Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280) diff --git a/script/ci/before_install.sh b/script/ci/before_install.sh index 0a17b2758..975944056 100755 --- a/script/ci/before_install.sh +++ b/script/ci/before_install.sh @@ -2,8 +2,3 @@ # Travis CI still includes 1.2.x by default gem install bundler --version '>= 1.3.4' - -# Ensure known RubyGems version -envdir="$(readlink -e $(dirname $0))/../env" -. "$envdir/ruby_env" -. "$envdir/ensure_right_rubygems" diff --git a/script/env/ensure_right_rubygems b/script/env/ensure_right_rubygems deleted file mode 100644 index ae7967217..000000000 --- a/script/env/ensure_right_rubygems +++ /dev/null @@ -1,3 +0,0 @@ -if [ "$(gem --version)" != "$rubygems_version" ]; then - rvm rubygems "$rubygems_version" -fi diff --git a/script/env/ruby_env b/script/env/ruby_env deleted file mode 100644 index 1328d67c0..000000000 --- a/script/env/ruby_env +++ /dev/null @@ -1,3 +0,0 @@ -rubygems_version="2.2.1" -ruby_version="2.0.0-p353" -gemset="diaspora"