Skip to content

Commit

Permalink
Merge pull request #386 from gocardless/ruby-27
Browse files Browse the repository at this point in the history
Ruby 2.7 support & fix deprecation warning
  • Loading branch information
Nick Campbell authored Jan 8, 2020
2 parents d55113e + 671e21e commit c05fa58
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 13 deletions.
74 changes: 66 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ references:
- type: cache-restore
key: statesman-{{ checksum "Gemfile" }}-{{ checksum "~/RAILS_VERSION.txt" }}

- run: gem install bundler -v 1.3
- run: gem install bundler -v 2.1.4

- run: bundle install --path vendor/bundle

Expand All @@ -31,6 +31,33 @@ references:
path: /tmp/test-results

jobs:
build-ruby249-rails-524-mysql:
docker:
- image: circleci/ruby:2.4.9-node
environment:
- RAILS_VERSION=5.2.4
- DATABASE_URL=mysql2://[email protected]/statesman_test
- DATABASE_DEPENDENCY_PORT=3306
- image: circleci/mysql:5.7.18
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_USER=root
- MYSQL_PASSWORD=
- MYSQL_DATABASE=statesman_test
steps: *steps
build-ruby249-rails-524-postgres:
docker:
- image: circleci/ruby:2.4.9-node
environment:
- RAILS_VERSION=5.2.4
- DATABASE_URL=postgres://postgres@localhost/statesman_test
- DATABASE_DEPENDENCY_PORT=5432
- image: circleci/postgres:9.6
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=statesman_test
steps: *steps

build-ruby265-rails-602-mysql:
docker:
- image: circleci/ruby:2.6.5-node
Expand Down Expand Up @@ -84,11 +111,12 @@ jobs:
- POSTGRES_USER=postgres
- POSTGRES_DB=statesman_test
steps: *steps
build-ruby249-rails-524-mysql:

build-ruby270-rails-602-mysql:
docker:
- image: circleci/ruby:2.4.9-node
- image: circleci/ruby:2.7.0-node
environment:
- RAILS_VERSION=5.2.4
- RAILS_VERSION=6.0.2
- DATABASE_URL=mysql2://[email protected]/statesman_test
- DATABASE_DEPENDENCY_PORT=3306
- image: circleci/mysql:5.7.18
Expand All @@ -98,19 +126,45 @@ jobs:
- MYSQL_PASSWORD=
- MYSQL_DATABASE=statesman_test
steps: *steps
build-ruby249-rails-524-postgres:
build-ruby270-rails-602-postgres:
docker:
- image: circleci/ruby:2.4.9-node
- image: circleci/ruby:2.7.0-node
environment:
- RAILS_VERSION=5.2.4
- RAILS_VERSION=6.0.2
- DATABASE_URL=postgres://postgres@localhost/statesman_test
- DATABASE_DEPENDENCY_PORT=5432
- image: circleci/postgres:9.6
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=statesman_test
steps: *steps

build-ruby270-rails-master-mysql:
docker:
- image: circleci/ruby:2.7.0-node
environment:
- RAILS_VERSION=master
- DATABASE_URL=mysql2://[email protected]/statesman_test
- DATABASE_DEPENDENCY_PORT=3306
- image: circleci/mysql:5.7.18
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_USER=root
- MYSQL_PASSWORD=
- MYSQL_DATABASE=statesman_test
steps: *steps
build-ruby270-rails-master-postgres:
docker:
- image: circleci/ruby:2.7.0-node
environment:
- RAILS_VERSION=master
- DATABASE_URL=postgres://postgres@localhost/statesman_test
- EXCLUDE_MONGOID=true
- DATABASE_DEPENDENCY_PORT=5432
- image: circleci/postgres:9.6
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=statesman_test
steps: *steps

workflows:
version: 2
Expand All @@ -122,3 +176,7 @@ workflows:
- build-ruby265-rails-602-postgres
- build-ruby265-rails-master-mysql
- build-ruby265-rails-master-postgres
- build-ruby270-rails-602-mysql
- build-ruby270-rails-602-postgres
- build-ruby270-rails-master-mysql
- build-ruby270-rails-master-postgres
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v7.0.1, 8th Jan 2020

- Fix deprecation warning with Ruby 2.7 [#386](https://github.com/gocardless/statesman/pull/386)

## v7.0.0, 8th Jan 2020

**Breaking changes**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protection.
To get started, just add Statesman to your `Gemfile`, and then run `bundle`:

```ruby
gem 'statesman', '~> 5.2.0'
gem 'statesman', '~> 7.0.1'
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions lib/statesman/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def with_updated_timestamp(params)
end

class ActiveRecordAfterCommitWrap
def initialize
@callback = Proc.new
def initialize(&block)
@callback = block
@connection = ::ActiveRecord::Base.connection
end

Expand Down
2 changes: 1 addition & 1 deletion lib/statesman/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Statesman
VERSION = "7.0.0"
VERSION = "7.0.1"
end
2 changes: 1 addition & 1 deletion statesman.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = ">= 2.2"

spec.add_development_dependency "ammeter", "~> 1.1"
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "bundler", "~> 2.1.4"
spec.add_development_dependency "gc_ruboconfig", "~> 2.3.9"
spec.add_development_dependency "mysql2", ">= 0.4", "< 0.6"
spec.add_development_dependency "pg", "~> 0.18"
Expand Down

0 comments on commit c05fa58

Please sign in to comment.