statesman 8.0.0 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aeab084afcfb068e82eae390dbac202fb8167884b3a58610429ca2efb30a8b46
4
- data.tar.gz: 65f10904ea38a716a26f7acd6d6809a484f4cb51eb5458b98f94d2b29acfd746
3
+ metadata.gz: aa4a88371cc60e6698eb820b60096f681fbaedf8dbbbec5991d47db81daf695d
4
+ data.tar.gz: b67153a87f62722deb2053ddf661e79e7918fca5339f9a6829a086e30a2abf02
5
5
  SHA512:
6
- metadata.gz: 36a6a95abb071113a8a17e59982db8c0c1e82cd189d2b5c0d59e4825f894dfde59a0051357a935ff9c3070520541461a69177a08003c7734252c4c1ae42946b6
7
- data.tar.gz: 96887197a7551e0fe65269b727cff3cba0318c459e895836d05969120cd22d6b17f1f9052935ce768f91ff4af9a0d33aff43af025e41bba28f24a1948e188056
6
+ metadata.gz: ac43c11e5dc1791bac7a00ba8e84b459daad104be9c9b460626c7569e4b9bdf215f0d080b5151ff754ee109640e70d1ca6cec4b958acfeadd974aab6962f16fd
7
+ data.tar.gz: 965b0a4020631cb18c39ce6af8870f3e165c87058aaf25f40f217a71d51cf65345818f974569191156a5ed94021c63595cf049c45fa11b62e132b1631e6d3d46
@@ -86,11 +86,11 @@ jobs:
86
86
  - POSTGRES_DB=statesman_test
87
87
  - POSTGRES_PASSWORD=statesman
88
88
  steps: *steps
89
- build-ruby265-rails-master-mysql:
89
+ build-ruby265-rails-main-mysql:
90
90
  docker:
91
91
  - image: circleci/ruby:2.6.5-node
92
92
  environment:
93
- - RAILS_VERSION=master
93
+ - RAILS_VERSION=main
94
94
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
95
95
  - DATABASE_DEPENDENCY_PORT=3306
96
96
  - image: circleci/mysql:5.7.18
@@ -100,11 +100,11 @@ jobs:
100
100
  - MYSQL_PASSWORD=
101
101
  - MYSQL_DATABASE=statesman_test
102
102
  steps: *steps
103
- build-ruby265-rails-master-postgres:
103
+ build-ruby265-rails-main-postgres:
104
104
  docker:
105
105
  - image: circleci/ruby:2.6.5-node
106
106
  environment:
107
- - RAILS_VERSION=master
107
+ - RAILS_VERSION=main
108
108
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
109
109
  - EXCLUDE_MONGOID=true
110
110
  - DATABASE_DEPENDENCY_PORT=5432
@@ -142,11 +142,11 @@ jobs:
142
142
  - POSTGRES_DB=statesman_test
143
143
  - POSTGRES_PASSWORD=statesman
144
144
  steps: *steps
145
- build-ruby270-rails-master-mysql:
145
+ build-ruby270-rails-main-mysql:
146
146
  docker:
147
147
  - image: circleci/ruby:2.7.0-node
148
148
  environment:
149
- - RAILS_VERSION=master
149
+ - RAILS_VERSION=main
150
150
  - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
151
151
  - DATABASE_DEPENDENCY_PORT=3306
152
152
  - image: circleci/mysql:5.7.18
@@ -156,11 +156,11 @@ jobs:
156
156
  - MYSQL_PASSWORD=
157
157
  - MYSQL_DATABASE=statesman_test
158
158
  steps: *steps
159
- build-ruby270-rails-master-postgres:
159
+ build-ruby270-rails-main-postgres:
160
160
  docker:
161
161
  - image: circleci/ruby:2.7.0-node
162
162
  environment:
163
- - RAILS_VERSION=master
163
+ - RAILS_VERSION=main
164
164
  - DATABASE_URL=postgres://postgres@localhost/statesman_test
165
165
  - EXCLUDE_MONGOID=true
166
166
  - DATABASE_DEPENDENCY_PORT=5432
@@ -179,9 +179,9 @@ workflows:
179
179
  - build-ruby249-rails-524-postgres
180
180
  - build-ruby265-rails-602-mysql
181
181
  - build-ruby265-rails-602-postgres
182
- - build-ruby265-rails-master-mysql
183
- - build-ruby265-rails-master-postgres
182
+ - build-ruby265-rails-main-mysql
183
+ - build-ruby265-rails-main-postgres
184
184
  - build-ruby270-rails-602-mysql
185
185
  - build-ruby270-rails-602-postgres
186
- - build-ruby270-rails-master-mysql
187
- - build-ruby270-rails-master-postgres
186
+ - build-ruby270-rails-main-mysql
187
+ - build-ruby270-rails-main-postgres
data/Gemfile CHANGED
@@ -5,8 +5,8 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  # rubocop:disable Bundler/DuplicatedGem
8
- if ENV['RAILS_VERSION'] == 'master'
9
- gem "rails", git: "https://github.com/rails/rails"
8
+ if ENV['RAILS_VERSION'] == 'main'
9
+ gem "rails", git: "https://github.com/rails/rails", branch: "main"
10
10
  elsif ENV['RAILS_VERSION']
11
11
  gem "rails", "~> #{ENV['RAILS_VERSION']}"
12
12
  end
data/README.md CHANGED
@@ -322,6 +322,10 @@ Machine.successors
322
322
  #### `Machine#current_state`
323
323
  Returns the current state based on existing transition objects.
324
324
 
325
+ Takes an optional keyword argument to force a reload of data from the
326
+ database.
327
+ e.g `current_state(force_reload: true)`
328
+
325
329
  #### `Machine#in_state?(:state_1, :state_2, ...)`
326
330
  Returns true if the machine is in any of the given states.
327
331
 
@@ -313,7 +313,7 @@ module Statesman
313
313
  end
314
314
 
315
315
  def db_null
316
- type_cast(nil)
316
+ Arel::Nodes::SqlLiteral.new("NULL")
317
317
  end
318
318
 
319
319
  # Type casting against a column is deprecated and will be removed in Rails 6.2.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Statesman
4
- VERSION = "8.0.0"
4
+ VERSION = "8.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statesman
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-06 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ammeter