aasm 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.0.4
4
+
5
+ * bugfix: Subclasses of aasm-enabled classes don't lose settings anymore (thanks to codez)
6
+
3
7
  ## 3.0.3
4
8
 
5
9
  * bugfix: ActiveRecord scopes are generated when using the new DSL
@@ -5,7 +5,7 @@ require "aasm/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "aasm"
7
7
  s.version = AASM::VERSION
8
- s.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley", "Thorsten Böttger"]
8
+ s.authors = ["Scott Barron", "Scott Petersen", "Travis Tilley", "Thorsten Boettger"]
9
9
  s.email = %q{scott@elitists.net, ttilley@gmail.com}
10
10
  s.homepage = %q{http://rubyist.github.com/aasm/}
11
11
  s.summary = %q{State machine mixin for Ruby objects}
@@ -7,13 +7,13 @@ module AASM
7
7
 
8
8
  if options.key?(:whiny_transitions)
9
9
  sm.config.whiny_transitions = options[:whiny_transitions]
10
- else
10
+ elsif sm.config.whiny_transitions.nil?
11
11
  sm.config.whiny_transitions = true # this is the default, so let's cry
12
12
  end
13
13
 
14
14
  if options.key?(:skip_validation_on_save)
15
15
  sm.config.skip_validation_on_save = options[:skip_validation_on_save]
16
- else
16
+ elsif sm.config.skip_validation_on_save.nil?
17
17
  sm.config.skip_validation_on_save = false # this is the default, so don't store any new state if the model is invalid
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module AASM
2
- VERSION = "3.0.3"
2
+ VERSION = "3.0.4"
3
3
  end
@@ -0,0 +1,3 @@
1
+ class SubClassing < Silencer
2
+
3
+ end
@@ -8,12 +8,18 @@ describe 'transitions' do
8
8
  process.should be_sleeping
9
9
  end
10
10
 
11
- it 'should not raise an exception when whiny' do
11
+ it 'should not raise an exception when not whiny' do
12
12
  silencer = Silencer.new
13
13
  silencer.smile!.should be_false
14
14
  silencer.should be_silent
15
15
  end
16
16
 
17
+ it 'should not raise an exception when superclass not whiny' do
18
+ sub = SubClassing.new
19
+ sub.smile!.should be_false
20
+ sub.should be_silent
21
+ end
22
+
17
23
  end
18
24
 
19
25
  describe AASM::SupportingClasses::StateTransition do
metadata CHANGED
@@ -1,22 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aasm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Barron
9
9
  - Scott Petersen
10
10
  - Travis Tilley
11
- - Thorsten Böttger
11
+ - Thorsten Boettger
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-02-22 00:00:00.000000000Z
15
+ date: 2012-04-02 00:00:00.000000000Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
19
- requirement: &70214630172340 !ruby/object:Gem::Requirement
19
+ requirement: &70112209965860 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: '0'
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70214630172340
27
+ version_requirements: *70112209965860
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
- requirement: &70214630171920 !ruby/object:Gem::Requirement
30
+ requirement: &70112209965440 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *70214630171920
38
+ version_requirements: *70112209965440
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: sdoc
41
- requirement: &70214630171500 !ruby/object:Gem::Requirement
41
+ requirement: &70112209965020 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *70214630171500
49
+ version_requirements: *70112209965020
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rspec
52
- requirement: &70214630171000 !ruby/object:Gem::Requirement
52
+ requirement: &70112209964520 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '2.0'
58
58
  type: :development
59
59
  prerelease: false
60
- version_requirements: *70214630171000
60
+ version_requirements: *70112209964520
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rr
63
- requirement: &70214630170580 !ruby/object:Gem::Requirement
63
+ requirement: &70112209964100 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: '0'
69
69
  type: :development
70
70
  prerelease: false
71
- version_requirements: *70214630170580
71
+ version_requirements: *70112209964100
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: shoulda
74
- requirement: &70214630170120 !ruby/object:Gem::Requirement
74
+ requirement: &70112209963640 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ! '>='
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: '0'
80
80
  type: :development
81
81
  prerelease: false
82
- version_requirements: *70214630170120
82
+ version_requirements: *70112209963640
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sqlite3
85
- requirement: &70214630200660 !ruby/object:Gem::Requirement
85
+ requirement: &70112209994180 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ! '>='
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
- version_requirements: *70214630200660
93
+ version_requirements: *70112209994180
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: minitest
96
- requirement: &70214630200240 !ruby/object:Gem::Requirement
96
+ requirement: &70112209993760 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *70214630200240
104
+ version_requirements: *70112209993760
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: ruby-debug-completion
107
- requirement: &70214630199820 !ruby/object:Gem::Requirement
107
+ requirement: &70112209993340 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,7 +112,7 @@ dependencies:
112
112
  version: '0'
113
113
  type: :development
114
114
  prerelease: false
115
- version_requirements: *70214630199820
115
+ version_requirements: *70112209993340
116
116
  description: AASM is a continuation of the acts as state machine rails plugin, built
117
117
  for plain Ruby objects.
118
118
  email: scott@elitists.net, ttilley@gmail.com
@@ -149,6 +149,7 @@ files:
149
149
  - spec/models/not_auto_loaded/process.rb
150
150
  - spec/models/process_with_new_dsl.rb
151
151
  - spec/models/silencer.rb
152
+ - spec/models/sub_classing.rb
152
153
  - spec/models/validator.rb
153
154
  - spec/schema.rb
154
155
  - spec/spec_helper.rb
@@ -196,6 +197,7 @@ test_files:
196
197
  - spec/models/not_auto_loaded/process.rb
197
198
  - spec/models/process_with_new_dsl.rb
198
199
  - spec/models/silencer.rb
200
+ - spec/models/sub_classing.rb
199
201
  - spec/models/validator.rb
200
202
  - spec/schema.rb
201
203
  - spec/spec_helper.rb