transitions 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.todo.reek +1 -0
- data/CHANGELOG.md +5 -0
- data/lib/transitions.rb +1 -1
- data/lib/transitions/event.rb +1 -1
- data/lib/transitions/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58aeaa0b000342900f3a34bf42431cd65f8dd632
|
4
|
+
data.tar.gz: 5667fb95cdcbc4339f8dda5fc6b4a633b2d80efa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f881e73d0a839f28cecd58f0c93a598a1884ef1ab167a8ede9e5168a94d62bd87160bc2ffe1b6452be218fb8ecd0a092ad2735feba2e62a434c59ca25ebc36f8
|
7
|
+
data.tar.gz: d1fda9b6559ba36cf35de667e71e5644a0a03d17ba000980e6ce22fbda0486c8b573f4e9f89b444e91dbc316cd5e4367510fa3d012ddb696ff8afc9103897089
|
data/.todo.reek
CHANGED
@@ -50,6 +50,7 @@ InstanceVariableAssumption:
|
|
50
50
|
ManualDispatch:
|
51
51
|
exclude:
|
52
52
|
- Transitions::Event#default_timestamp_name
|
53
|
+
- Transitions::Event#error_message_for_invalid_transitions
|
53
54
|
- Transitions::Machine#fire_event
|
54
55
|
- Transitions::Machine#handle_event_failed_callback
|
55
56
|
- Transitions::Machine#handle_event_fired_callback
|
data/CHANGELOG.md
CHANGED
data/lib/transitions.rb
CHANGED
@@ -84,6 +84,6 @@ module Transitions
|
|
84
84
|
|
85
85
|
def self.active_model_descendant?(klazz)
|
86
86
|
# Checking directly for "ActiveModel" wouldn't work so we use some arbitrary module close to it.
|
87
|
-
defined?(ActiveModel) && klazz.included_modules.include?(ActiveModel::
|
87
|
+
defined?(ActiveModel) && klazz.included_modules.include?(ActiveModel::Validations)
|
88
88
|
end
|
89
89
|
end
|
data/lib/transitions/event.rb
CHANGED
@@ -143,7 +143,7 @@ module Transitions
|
|
143
143
|
|
144
144
|
def error_message_for_invalid_transitions(obj)
|
145
145
|
"Can't fire event `#{name}` in current state `#{obj.current_state}` for `#{obj.class.name}`"\
|
146
|
-
" #{obj.
|
146
|
+
" #{obj.respond_to?(:id) ? "with ID #{obj.id} " : nil}"
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
data/lib/transitions/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transitions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Rößner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.5.1
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: State machine extracted from ActiveModel
|