rails_machine 0.0.6 → 0.0.7

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: 4af0035757028b9a274654be5553733c35b3b86c
4
- data.tar.gz: 902c57516ac9603ead3293150fe5bdbf6439b3a6
3
+ metadata.gz: 6c0cfeb2e36e5e75e8def129cebe9b383f78e184
4
+ data.tar.gz: 337b2bdebc721d04edb47ceb1f699f0ba5e509dc
5
5
  SHA512:
6
- metadata.gz: 15e6ab9e4f8f566e3f22a6f0ca6dc408084a6d2853446d59a5bdc7f9290569c04fba8e8e328690a5eca22c67de107a0a6600295ae417807c5531930684933f67
7
- data.tar.gz: 689a28349e74c30d1d4130e100a7e8485eee6c8f3af8558d8adf14b67910e79fab3698b3cf692ad9fbf768a51b35615662c28ed2b8e3c2477333fa9bc1937689
6
+ metadata.gz: 3f11e509d82daaa3e176a1583ce290c7bbb96a0c027eb6c0e6065d64f2a621c1384131580a2716894f9168428b7578e471baf3cd137be174b3db03e732fc7409
7
+ data.tar.gz: fc29a5a23e2321ecc970b0d952b19b7ee85764379df5f3b08bd7bb307c9f2b788a399cce4ec795a14857f2abb8a2e224340b7a3607d24230cc7f2c563a3fd03d
data/lib/rails_machine.rb CHANGED
@@ -6,7 +6,7 @@ module RailsMachine
6
6
  included do
7
7
  cattr_accessor :transitions
8
8
 
9
- validate :allowed_state, if: :state_changed?
9
+ validate :allowed_state, if: ->{ new_record? || state_changed? }
10
10
  private
11
11
  cattr_accessor :init_states
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module RailsMachine
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Łuszczek
@@ -15,42 +15,42 @@ dependencies:
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '4.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '4.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: sqlite3
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.3'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.3'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec-rails
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '3.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.0'
56
56
  description: Simple implementation of state machine for Rails using enums.
@@ -78,12 +78,12 @@ require_paths:
78
78
  - lib
79
79
  required_ruby_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '2.1'
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '>='
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []