Commit c85fe387 authored by Jonne Haß's avatar Jonne Haß
Browse files

Replace DB environment variable with optional bundler groups

See the changes to the changelog for more details
parent 351f54d7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@ rvm:
  - 2.1

env:
  - DB=postgres BUILD_TYPE=other
  - DB=postgresql BUILD_TYPE=other
  - DB=mysql BUILD_TYPE=other
  - DB=postgres BUILD_TYPE=cucumber
  - DB=postgresql BUILD_TYPE=cucumber
  - DB=mysql BUILD_TYPE=cucumber

sudo: false
@@ -23,7 +23,7 @@ branches:
    - 'develop'

before_install: gem install bundler
bundler_args: "--without development production heroku --jobs 3 --retry 3"
bundler_args: "--deployment --without development production --with mysql postgresql --jobs 3 --retry 3"

script: "./script/ci/build.sh"

+14 −0
Original line number Diff line number Diff line
# 0.6.0.0

## The DB environment variable is gone

With Bundler 1.10 supporting optional groups, we removed the DB environment variable. When updating to this release, please update
bundler and select the database support you want:

```sh
gem install bundler
bundle install --with mysql # For MySQL and MariaDB
bundle install --with postgresql # For PostgreSQL
```

For production setups we now additionally recommend adding the `--deployment` flag.
If you set the DB environment variable anywhere, that's no longer necessary.

## Supported Ruby versions

This release recommends using Ruby 2.2, while retaining Ruby 2.1 as an officially supported version.
+6 −4
Original line number Diff line number Diff line
@@ -60,10 +60,12 @@ gem "autoprefixer-rails", "5.1.11"

# Database

ENV["DB"] ||= "mysql"

gem "mysql2", "0.3.18" if ENV["DB"] == "all" || ENV["DB"] == "mysql"
gem "pg",     "0.18.1" if ENV["DB"] == "all" || ENV["DB"] == "postgres"
group :mysql, optional: true do
  gem "mysql2", "0.3.18"
end
group :postgresql, optional: true do
  gem "pg",     "0.18.1"
end

gem "activerecord-import", "0.7.0"

+5 −0
Original line number Diff line number Diff line
@@ -463,6 +463,7 @@ GEM
    orm_adapter (0.5.0)
    parser (2.2.2.2)
      ast (>= 1.1, < 3.0)
    pg (0.18.1)
    phantomjs (1.9.8.0)
    powerpack (0.1.1)
    pry (0.10.1)
@@ -785,6 +786,7 @@ DEPENDENCIES
  omniauth-twitter (= 1.0.1)
  omniauth-wordpress (= 0.2.1)
  open_graph_reader (= 0.6.1)
  pg (= 0.18.1)
  pry
  pry-byebug
  pry-debundle
@@ -850,3 +852,6 @@ DEPENDENCIES
  uuid (= 2.3.7)
  webmock (= 1.21.0)
  will_paginate (= 3.0.7)

BUNDLED WITH
   1.10.0
+10 −12
Original line number Diff line number Diff line
postgresql: &postgresql
  adapter: postgresql
  host: localhost
  port: 5432
  username: postgres
  password:
  encoding: unicode

mysql: &mysql
  adapter: mysql2
  host: "localhost"
@@ -8,20 +16,13 @@ mysql: &mysql
  encoding: utf8mb4
  collation: utf8mb4_bin

postgres: &postgres
  adapter: postgresql
  host: localhost
  port: 5432
  username: postgres
  password:
  encoding: unicode

# Comment the the mysql line and uncomment the postgres line
# if you want to use postgres
common: &common
  # Choose one of the following
  <<: *mysql
  #<<: *postgres
  <<: *postgresql
  #<<: *mysql

  # Should match environment.sidekiq.concurrency
  #pool: 25
@@ -32,9 +33,6 @@ common: &common

# Normally you don't need to touch anything here

postgres_travis: &postgres_travis
  adapter: postgresql
  username: postgres
combined: &combined
  <<: *common
development:
Loading