statesman 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.circleci/config.yml +3 -3
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/lib/statesman/adapters/active_record.rb +4 -2
- data/lib/statesman/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7bcb79a19d0e00628ae28cc7dbfb5f97977f3aa1
|
4
|
+
data.tar.gz: b085866e8bb72e8b48eec5b08e5243553dcf6264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8132a5e0e581c1b9fa6e6858fc85b7b2c35a703e7ce092c0841e15d63d09984ccc6e4df46aaa6eda319f0842266992a575a90195061b24e0bd209e929d2eaef5
|
7
|
+
data.tar.gz: d2afbe9e9fb2aec84cffa7719aceaf71959a48b04924427374cb056d3a91c484e11ffab3bd4a02520217817c2d3ec728904073ad38c714af6b1ace774e661c45
|
data/.circleci/config.yml
CHANGED
@@ -142,7 +142,7 @@ jobs:
|
|
142
142
|
docker:
|
143
143
|
- image: circleci/ruby:2.6.2-node
|
144
144
|
environment:
|
145
|
-
- RAILS_VERSION=6.0.0.
|
145
|
+
- RAILS_VERSION=6.0.0.rc1
|
146
146
|
- DATABASE_DEPENDENCY_PORT=27017
|
147
147
|
- image: circleci/mongo:3
|
148
148
|
steps: *steps
|
@@ -150,7 +150,7 @@ jobs:
|
|
150
150
|
docker:
|
151
151
|
- image: circleci/ruby:2.6.2-node
|
152
152
|
environment:
|
153
|
-
- RAILS_VERSION=6.0.0.
|
153
|
+
- RAILS_VERSION=6.0.0.rc1
|
154
154
|
- DATABASE_URL=mysql2://root@127.0.0.1/statesman_test
|
155
155
|
- EXCLUDE_MONGOID=true
|
156
156
|
- DATABASE_DEPENDENCY_PORT=3306
|
@@ -165,7 +165,7 @@ jobs:
|
|
165
165
|
docker:
|
166
166
|
- image: circleci/ruby:2.6.2-node
|
167
167
|
environment:
|
168
|
-
- RAILS_VERSION=6.0.0.
|
168
|
+
- RAILS_VERSION=6.0.0.rc1
|
169
169
|
- DATABASE_URL=postgres://postgres@localhost/statesman_test
|
170
170
|
- EXCLUDE_MONGOID=true
|
171
171
|
- DATABASE_DEPENDENCY_PORT=5432
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## v4.1.1, 6th July 2019
|
2
|
+
|
3
|
+
- Fix statesman index detection for indexes that start t-z [@hmarr](https://github.com/gocardless/statesman/pull/354)
|
4
|
+
- Correct access of metadata via `state_machine` [@glenpike](https://github.com/gocardless/statesman/pull/349)
|
5
|
+
|
1
6
|
## v4.1.0, 10 April 2019
|
2
7
|
|
3
8
|
- Add better support for mysql (and others) in `transition_conflict_error?` [@greysteil](https://github.com/greysteil) (https://github.com/gocardless/statesman/pull/342)
|
data/README.md
CHANGED
@@ -406,7 +406,7 @@ You could also use a calculated column or view in your database.
|
|
406
406
|
Given a field `foo` that was stored in the metadata, you can access it like so:
|
407
407
|
|
408
408
|
```ruby
|
409
|
-
model_instance.last_transition.metadata["foo"]
|
409
|
+
model_instance.state_machine.last_transition.metadata["foo"]
|
410
410
|
```
|
411
411
|
|
412
412
|
#### Events
|
@@ -140,8 +140,10 @@ module Statesman
|
|
140
140
|
select do |index|
|
141
141
|
next unless index.unique
|
142
142
|
|
143
|
-
|
144
|
-
|
143
|
+
# We care about the columns used in the index, but not necessarily
|
144
|
+
# the order, which is why we sort both sides of the comparison here
|
145
|
+
index.columns.sort == [parent_join_foreign_key, "sort_key"].sort ||
|
146
|
+
index.columns.sort == [parent_join_foreign_key, "most_recent"].sort
|
145
147
|
end
|
146
148
|
end
|
147
149
|
|
data/lib/statesman/version.rb
CHANGED
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: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ammeter
|
@@ -298,7 +298,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
298
298
|
- !ruby/object:Gem::Version
|
299
299
|
version: '0'
|
300
300
|
requirements: []
|
301
|
-
|
301
|
+
rubyforge_project:
|
302
|
+
rubygems_version: 2.5.2.3
|
302
303
|
signing_key:
|
303
304
|
specification_version: 4
|
304
305
|
summary: A statesman-like state machine library
|