From 1c51fb1778e5e14f245f9e8d8a3531a4effc811f Mon Sep 17 00:00:00 2001 From: James Lopez Date: Thu, 21 Jan 2016 16:12:49 +0100 Subject: update Ruby version to 2.2.4 (latest previous stable) and update docs --- .ruby-version | 2 +- doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md | 6 +++--- doc/ci/yaml/README.md | 2 +- doc/development/ci_setup.md | 2 +- doc/install/installation.md | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.ruby-version b/.ruby-version index 04b10b4f150..530cdd91a20 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.7 +2.2.4 diff --git a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md index e52e1547461..c1bb47e4291 100644 --- a/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md +++ b/doc/ci/examples/test-and-deploy-ruby-application-to-heroku.md @@ -56,12 +56,12 @@ gitlab-ci-multi-runner register \ --non-interactive \ --url "https://gitlab.com/ci/" \ --registration-token "PROJECT_REGISTRATION_TOKEN" \ - --description "ruby-2.1" \ + --description "ruby-2.2" \ --executor "docker" \ - --docker-image ruby:2.1 \ + --docker-image ruby:2.2 \ --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. diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index fd0d49de4e4..779b9db6486 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -33,7 +33,7 @@ The YAML syntax allows for using more complex job specifications than in the above example: ```yaml -image: ruby:2.1 +image: ruby:2.2 services: - postgres diff --git a/doc/development/ci_setup.md b/doc/development/ci_setup.md index f9b48868182..05db30b4a7e 100644 --- a/doc/development/ci_setup.md +++ b/doc/development/ci_setup.md @@ -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) - Language: Ruby -- Ruby version: 2.1.2 +- Ruby version: 2.2.4 - database.yml: pg Build commands diff --git a/doc/install/installation.md b/doc/install/installation.md index 00030729a4b..376a02d4534 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -116,9 +116,9 @@ Remove the old Ruby 1.8 if present Download Ruby and compile it: mkdir /tmp/ruby && cd /tmp/ruby - curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.7.tar.gz - echo 'e2e195a4a58133e3ad33b955c829bb536fa3c075 ruby-2.1.7.tar.gz' | shasum -c - && tar xzf ruby-2.1.7.tar.gz - cd ruby-2.1.7 + curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz + echo 'e2e195a4a58133e3ad33b955c829bb536fa3c075 ruby-2.2.4.tar.gz' | shasum -c - && tar xzf ruby-2.2.4.tar.gz + cd ruby-2.2.4 ./configure --disable-install-rdoc make sudo make install -- cgit v1.2.1 From ba07a4c96a90a0cbe81ae7e987f32cc8eac20323 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Thu, 21 Jan 2016 18:28:09 +0100 Subject: update gitlab ci docker image version --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac8390074f4..9bd558c7d0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ # This file is generated by GitLab CI +image: ruby:2.2 before_script: - ./scripts/prepare_build.sh - ruby -v -- cgit v1.2.1 From ee209cc936d9242af2b2d8d45ecb64adc55e3a51 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 25 Jan 2016 11:44:25 +0100 Subject: fix rubocop new 2.2 syntax issues --- app/helpers/commits_helper.rb | 2 +- app/helpers/projects_helper.rb | 2 +- spec/models/concerns/case_sensitivity_spec.rb | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index d26f007c8e6..53f8f913b33 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -152,7 +152,7 @@ module CommitsHelper options = { class: "commit-#{options[:source]}-link has_tooltip", - data: { :'original-title' => sanitize(source_email) } + data: { 'original-title': sanitize(source_email) } } if user.nil? diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 77ba612548a..c5823e50096 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -40,7 +40,7 @@ module ProjectsHelper link_to(author_html, user_path(author), class: "author_link").html_safe else 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 diff --git a/spec/models/concerns/case_sensitivity_spec.rb b/spec/models/concerns/case_sensitivity_spec.rb index 25b3f4e50da..6535246bf2d 100644 --- a/spec/models/concerns/case_sensitivity_spec.rb +++ b/spec/models/concerns/case_sensitivity_spec.rb @@ -37,7 +37,7 @@ describe CaseSensitivity, models: true do with(%q{LOWER("foo"."bar") = LOWER(:value)}, value: 'bar'). and_return(criteria) - expect(model.iwhere(:'foo.bar' => 'bar')).to eq(criteria) + expect(model.iwhere('foo.bar': 'bar')).to eq(criteria) end end @@ -87,8 +87,8 @@ describe CaseSensitivity, models: true do with(%q{LOWER("foo"."baz") = LOWER(:value)}, value: 'baz'). and_return(final) - got = model.iwhere(:'foo.bar' => 'bar', - :'foo.baz' => 'baz') + got = model.iwhere('foo.bar': 'bar', + 'foo.baz': 'baz') expect(got).to eq(final) end @@ -127,7 +127,7 @@ describe CaseSensitivity, models: true do with(%q{`foo`.`bar` = :value}, value: 'bar'). and_return(criteria) - expect(model.iwhere(:'foo.bar' => 'bar')). + expect(model.iwhere('foo.bar': 'bar')). to eq(criteria) end end @@ -178,8 +178,8 @@ describe CaseSensitivity, models: true do with(%q{`foo`.`baz` = :value}, value: 'baz'). and_return(final) - got = model.iwhere(:'foo.bar' => 'bar', - :'foo.baz' => 'baz') + got = model.iwhere('foo.bar': 'bar', + 'foo.baz': 'baz') expect(got).to eq(final) end -- cgit v1.2.1 From 870e38ead93901bbe5a2a809422e60d555cbf8e8 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 25 Jan 2016 12:39:50 +0100 Subject: updated docs to reflect version update [ci skip] --- README.md | 2 +- doc/install/installation.md | 2 +- doc/install/requirements.md | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3ec1d4a776c..6ab3b1fcc5f 100644 --- a/README.md +++ b/README.md @@ -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: - Ubuntu/Debian/CentOS/RHEL -- Ruby (MRI) 2.1 +- Ruby (MRI) 2.2 - Git 1.7.10+ - Redis 2.8+ - MySQL or PostgreSQL diff --git a/doc/install/installation.md b/doc/install/installation.md index aef35436571..1c0da6fbef4 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -107,7 +107,7 @@ Then select 'Internet Site' and press enter to confirm the hostname. ## 2. Ruby -_**Note:** The current supported Ruby versions are 2.1.x. Ruby 2.2 and 2.3 are +_**Note:** The current supported Ruby version is 2.2.x. Ruby 2.3 is currently not supported._ The use of Ruby version managers such as [RVM], [rbenv] or [chruby] with GitLab diff --git a/doc/install/requirements.md b/doc/install/requirements.md index c0425f27ab1..fde1aaa90f3 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -32,8 +32,7 @@ Please consider using a virtual machine to run GitLab. ## Ruby versions -GitLab requires Ruby (MRI) 2.1.x and currently does not work with versions 2.2 -and 2.3. +GitLab requires Ruby (MRI) 2.2.x and currently does not work with version 2.3. You will have to use the standard MRI implementation of Ruby. We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab -- cgit v1.2.1 From 1b84de573d0afe8c8d81db4ef2897a925686d212 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 27 Jan 2016 14:48:15 +0100 Subject: updated docs to reflect min requirement of 2.1 [ci skip] --- doc/install/installation.md | 2 +- doc/install/requirements.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/install/installation.md b/doc/install/installation.md index 1c0da6fbef4..f05097fedc5 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -107,7 +107,7 @@ Then select 'Internet Site' and press enter to confirm the hostname. ## 2. Ruby -_**Note:** The current supported Ruby version is 2.2.x. Ruby 2.3 is +_**Note:** The current supported Ruby versions are 2.1.x and 2.2.x. Ruby 2.3 is currently not supported._ The use of Ruby version managers such as [RVM], [rbenv] or [chruby] with GitLab diff --git a/doc/install/requirements.md b/doc/install/requirements.md index fde1aaa90f3..006dae8ca9a 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -32,7 +32,7 @@ Please consider using a virtual machine to run GitLab. ## Ruby versions -GitLab requires Ruby (MRI) 2.2.x and currently does not work with version 2.3. +GitLab requires Ruby (MRI) 2.1.x or 2.2.x and currently does not work with version 2.3. You will have to use the standard MRI implementation of Ruby. We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab -- cgit v1.2.1 From b8ed5789c03961444fc40baca31f870b30a73766 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 27 Jan 2016 15:41:05 +0100 Subject: update gitlab ci settings to include ruby 2.1 images --- .gitlab-ci.yml | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dca861faf12..414344a7f75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,3 +134,119 @@ bundler:audit: - ruby - mysql allow_failure: true + +# Ruby 2.1 jobs + +spec:feature: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:feature + tags: + - ruby + - mysql + only: + - master + +spec:api:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api + tags: + - ruby + - mysql + only: + - master + +spec:models:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models + tags: + - ruby + - mysql + only: + - master + +spec:lib:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib + tags: + - ruby + - mysql + only: + - master + +spec:services:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services + tags: + - ruby + - mysql + only: + - master + +spec:benchmark:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test bundle exec rake spec:benchmark + tags: + - ruby + - mysql + allow_failure: true + only: + - master + +spec:other:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other + tags: + - ruby + - mysql + only: + - master + +spinach:project:half:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half + tags: + - ruby + - mysql + only: + - master + +spinach:project:rest:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest + tags: + - ruby + - mysql + only: + - master + +spinach:other:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other + tags: + - ruby + - mysql + only: + - master + +bundler:audit:ruby21: + image: ruby:2.1 + script: + - "bundle exec bundle-audit update" + - "bundle exec bundle-audit check" + tags: + - ruby + - mysql + allow_failure: true + only: + - master -- cgit v1.2.1 From e862af95375ed9e7ff778352c3900946bbb8e7e7 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 27 Jan 2016 16:16:03 +0100 Subject: merge spec and spinach jobs --- .gitlab-ci.yml | 101 +++------------------------------------------------------ 1 file changed, 4 insertions(+), 97 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 414344a7f75..dbdbae9d787 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,116 +137,23 @@ bundler:audit: # Ruby 2.1 jobs -spec:feature:ruby21: +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:feature - tags: - - ruby - - mysql - only: - - master - -spec:api:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api - tags: - - ruby - - mysql - only: - - master - -spec:models:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models - tags: - - ruby - - mysql - only: - - master - -spec:lib:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib - tags: - - ruby - - mysql - only: - - master - -spec:services:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services - tags: - - ruby - - mysql - only: - - master - -spec:benchmark:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test bundle exec rake spec:benchmark - tags: - - ruby - - mysql - allow_failure: true - only: - - master - -spec:other:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec tags: - ruby - mysql only: - master -spinach:project:half:ruby21: +spinach:ruby21: image: ruby:2.1 script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach tags: - ruby - mysql only: - master - -spinach:project:rest:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest - tags: - - ruby - - mysql - only: - - master - -spinach:other:ruby21: - image: ruby:2.1 - script: - - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other - tags: - - ruby - - mysql - only: - - master - -bundler:audit:ruby21: - image: ruby:2.1 - script: - - "bundle exec bundle-audit update" - - "bundle exec bundle-audit check" - tags: - - ruby - - mysql - allow_failure: true - only: - - master -- cgit v1.2.1 From 47e0d6b16242cef440244e7d31f1310dea42f5ef Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 27 Jan 2016 16:19:16 +0100 Subject: updated README to include Ruby 2.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ab3b1fcc5f..22dbf841bdc 100644 --- a/README.md +++ b/README.md @@ -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: - Ubuntu/Debian/CentOS/RHEL -- Ruby (MRI) 2.2 +- Ruby (MRI) 2.1 or 2.2 - Git 1.7.10+ - Redis 2.8+ - MySQL or PostgreSQL -- cgit v1.2.1