Commit f025f80d authored by Douwe Maan's avatar Douwe Maan

Merge branch 'update-ruby-2.2.4' into 'master'

Update Ruby version to 2.2.4 (latest previous stable) and update docs

Tests and issues added to https://github.com/gitlabhq/gitlabhq/issues/8696 were all fine after the upgrade. 

Main issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/3340

See merge request !2534
parents bba7e786 47e0d6b1
image: "ruby:2.1" image: "ruby:2.2"
services: services:
- mysql:latest - mysql:latest
...@@ -134,3 +134,26 @@ bundler:audit: ...@@ -134,3 +134,26 @@ bundler:audit:
- ruby - ruby
- mysql - mysql
allow_failure: true allow_failure: true
# Ruby 2.1 jobs
spec:ruby21:
image: ruby:2.1
script:
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec
tags:
- ruby
- mysql
only:
- master
spinach:ruby21:
image: ruby:2.1
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach
tags:
- ruby
- mysql
only:
- master
...@@ -67,7 +67,7 @@ Instructions on how to start GitLab and how to run the tests can be found in the ...@@ -67,7 +67,7 @@ Instructions on how to start GitLab and how to run the tests can be found in the
GitLab is a Ruby on Rails application that runs on the following software: GitLab is a Ruby on Rails application that runs on the following software:
- Ubuntu/Debian/CentOS/RHEL - Ubuntu/Debian/CentOS/RHEL
- Ruby (MRI) 2.1 - Ruby (MRI) 2.1 or 2.2
- Git 1.7.10+ - Git 1.7.10+
- Redis 2.8+ - Redis 2.8+
- MySQL or PostgreSQL - MySQL or PostgreSQL
......
...@@ -152,7 +152,7 @@ module CommitsHelper ...@@ -152,7 +152,7 @@ module CommitsHelper
options = { options = {
class: "commit-#{options[:source]}-link has_tooltip", class: "commit-#{options[:source]}-link has_tooltip",
data: { :'original-title' => sanitize(source_email) } data: { 'original-title': sanitize(source_email) }
} }
if user.nil? if user.nil?
......
...@@ -40,7 +40,7 @@ module ProjectsHelper ...@@ -40,7 +40,7 @@ module ProjectsHelper
link_to(author_html, user_path(author), class: "author_link").html_safe link_to(author_html, user_path(author), class: "author_link").html_safe
else else
title = opts[:title].sub(":name", sanitize(author.name)) title = opts[:title].sub(":name", sanitize(author.name))
link_to(author_html, user_path(author), class: "author_link has_tooltip", data: { :'original-title' => title, container: 'body' } ).html_safe link_to(author_html, user_path(author), class: "author_link has_tooltip", data: { 'original-title': title, container: 'body' } ).html_safe
end end
end end
......
...@@ -56,12 +56,12 @@ gitlab-ci-multi-runner register \ ...@@ -56,12 +56,12 @@ gitlab-ci-multi-runner register \
--non-interactive \ --non-interactive \
--url "https://gitlab.com/ci/" \ --url "https://gitlab.com/ci/" \
--registration-token "PROJECT_REGISTRATION_TOKEN" \ --registration-token "PROJECT_REGISTRATION_TOKEN" \
--description "ruby-2.1" \ --description "ruby-2.2" \
--executor "docker" \ --executor "docker" \
--docker-image ruby:2.1 \ --docker-image ruby:2.2 \
--docker-postgres latest --docker-postgres latest
``` ```
With the command above, you create a runner that uses [ruby:2.1](https://registry.hub.docker.com/u/library/ruby/) image and uses [postgres](https://registry.hub.docker.com/u/library/postgres/) database. With the command above, you create a runner that uses [ruby:2.2](https://registry.hub.docker.com/u/library/ruby/) image and uses [postgres](https://registry.hub.docker.com/u/library/postgres/) database.
To access PostgreSQL database you need to connect to `host: postgres` as user `postgres` without password. To access PostgreSQL database you need to connect to `host: postgres` as user `postgres` without password.
...@@ -33,7 +33,7 @@ The YAML syntax allows for using more complex job specifications than in the ...@@ -33,7 +33,7 @@ The YAML syntax allows for using more complex job specifications than in the
above example: above example:
```yaml ```yaml
image: ruby:2.1 image: ruby:2.2
services: services:
- postgres - postgres
......
...@@ -26,7 +26,7 @@ We use [these build scripts](https://gitlab.com/gitlab-org/gitlab-ci/blob/master ...@@ -26,7 +26,7 @@ We use [these build scripts](https://gitlab.com/gitlab-org/gitlab-ci/blob/master
# Build configuration on [Semaphore](https://semaphoreapp.com/gitlabhq/gitlabhq/) for testing the [GitHub.com repo](https://github.com/gitlabhq/gitlabhq) # Build configuration on [Semaphore](https://semaphoreapp.com/gitlabhq/gitlabhq/) for testing the [GitHub.com repo](https://github.com/gitlabhq/gitlabhq)
- Language: Ruby - Language: Ruby
- Ruby version: 2.1.2 - Ruby version: 2.2.4
- database.yml: pg - database.yml: pg
Build commands Build commands
......
...@@ -107,7 +107,7 @@ Then select 'Internet Site' and press enter to confirm the hostname. ...@@ -107,7 +107,7 @@ Then select 'Internet Site' and press enter to confirm the hostname.
## 2. Ruby ## 2. Ruby
_**Note:** The current supported Ruby versions are 2.1.x. Ruby 2.2 and 2.3 are _**Note:** The current supported Ruby versions are 2.1.x and 2.2.x. Ruby 2.3 is
currently not supported._ currently not supported._
The use of Ruby version managers such as [RVM], [rbenv] or [chruby] with GitLab The use of Ruby version managers such as [RVM], [rbenv] or [chruby] with GitLab
...@@ -123,9 +123,9 @@ Remove the old Ruby 1.8 if present: ...@@ -123,9 +123,9 @@ Remove the old Ruby 1.8 if present:
Download Ruby and compile it: Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby mkdir /tmp/ruby && cd /tmp/ruby
curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.7.tar.gz curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz
echo 'e2e195a4a58133e3ad33b955c829bb536fa3c075 ruby-2.1.7.tar.gz' | shasum -c - && tar xzf ruby-2.1.7.tar.gz echo 'e2e195a4a58133e3ad33b955c829bb536fa3c075 ruby-2.2.4.tar.gz' | shasum -c - && tar xzf ruby-2.2.4.tar.gz
cd ruby-2.1.7 cd ruby-2.2.4
./configure --disable-install-rdoc ./configure --disable-install-rdoc
make make
sudo make install sudo make install
......
...@@ -32,8 +32,7 @@ Please consider using a virtual machine to run GitLab. ...@@ -32,8 +32,7 @@ Please consider using a virtual machine to run GitLab.
## Ruby versions ## Ruby versions
GitLab requires Ruby (MRI) 2.1.x and currently does not work with versions 2.2 GitLab requires Ruby (MRI) 2.1.x or 2.2.x and currently does not work with version 2.3.
and 2.3.
You will have to use the standard MRI implementation of Ruby. You will have to use the standard MRI implementation of Ruby.
We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab
......
...@@ -37,7 +37,7 @@ describe CaseSensitivity, models: true do ...@@ -37,7 +37,7 @@ describe CaseSensitivity, models: true do
with(%q{LOWER("foo"."bar") = LOWER(:value)}, value: 'bar'). with(%q{LOWER("foo"."bar") = LOWER(:value)}, value: 'bar').
and_return(criteria) and_return(criteria)
expect(model.iwhere(:'foo.bar' => 'bar')).to eq(criteria) expect(model.iwhere('foo.bar': 'bar')).to eq(criteria)
end end
end end
...@@ -87,8 +87,8 @@ describe CaseSensitivity, models: true do ...@@ -87,8 +87,8 @@ describe CaseSensitivity, models: true do
with(%q{LOWER("foo"."baz") = LOWER(:value)}, value: 'baz'). with(%q{LOWER("foo"."baz") = LOWER(:value)}, value: 'baz').
and_return(final) and_return(final)
got = model.iwhere(:'foo.bar' => 'bar', got = model.iwhere('foo.bar': 'bar',
:'foo.baz' => 'baz') 'foo.baz': 'baz')
expect(got).to eq(final) expect(got).to eq(final)
end end
...@@ -127,7 +127,7 @@ describe CaseSensitivity, models: true do ...@@ -127,7 +127,7 @@ describe CaseSensitivity, models: true do
with(%q{`foo`.`bar` = :value}, value: 'bar'). with(%q{`foo`.`bar` = :value}, value: 'bar').
and_return(criteria) and_return(criteria)
expect(model.iwhere(:'foo.bar' => 'bar')). expect(model.iwhere('foo.bar': 'bar')).
to eq(criteria) to eq(criteria)
end end
end end
...@@ -178,8 +178,8 @@ describe CaseSensitivity, models: true do ...@@ -178,8 +178,8 @@ describe CaseSensitivity, models: true do
with(%q{`foo`.`baz` = :value}, value: 'baz'). with(%q{`foo`.`baz` = :value}, value: 'baz').
and_return(final) and_return(final)
got = model.iwhere(:'foo.bar' => 'bar', got = model.iwhere('foo.bar': 'bar',
:'foo.baz' => 'baz') 'foo.baz': 'baz')
expect(got).to eq(final) expect(got).to eq(final)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment