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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db4e533a8cede13eb9cbf2e0291f129374d8e59a
4
- data.tar.gz: d1131c392f74131b23ce68d0204aebe8c5441b23
3
+ metadata.gz: 58aeaa0b000342900f3a34bf42431cd65f8dd632
4
+ data.tar.gz: 5667fb95cdcbc4339f8dda5fc6b4a633b2d80efa
5
5
  SHA512:
6
- metadata.gz: 089e9d32d55496832507a763c7a4dfffb4b0df01489d84828b78637eb66887cb33131856d0e72025088530c932809b52498638d34539d615c1fc62cee94e70cc
7
- data.tar.gz: cd7f5928d0d86d90d9f43ccc5d33b1e5003931f20fe12d928572d5922647c74504dbb23b13eaeadbf07a676a9167809184e338d885065b93f78c626b7252fcdc
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
@@ -1,3 +1,8 @@
1
+ # 1.2.1 (2016-11-07)
2
+
3
+ * (jdguzman) remove explicit ActiveRecord dependency
4
+ * (jdguzman) fix module lookup to get it to work with mongoid
5
+
1
6
  # 1.2.0
2
7
 
3
8
  * (atomaka) Allow timestamp to accept an array of timestamps
@@ -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::Dirty)
87
+ defined?(ActiveModel) && klazz.included_modules.include?(ActiveModel::Validations)
88
88
  end
89
89
  end
@@ -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.class < ActiveRecord::Base && obj.persisted? ? "with ID #{obj.id} " : nil}"
146
+ " #{obj.respond_to?(:id) ? "with ID #{obj.id} " : nil}"
147
147
  end
148
148
  end
149
149
  end
@@ -1,3 +1,3 @@
1
1
  module Transitions
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
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.0
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-09-21 00:00:00.000000000 Z
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.4.5.1
199
+ rubygems_version: 2.5.1
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: State machine extracted from ActiveModel