acts_as_status_for 4.3.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/acts_as_status_for.gemspec +2 -2
- data/lib/acts_as_status_for.rb +1 -1
- data/spec/acts_as_status_for_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55aa15db54ac712680db94e33beb3f5c5ca67263
|
4
|
+
data.tar.gz: 983746c94629e15d8d62e86062157ef92d6e0456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d15f6fdebfce40155824619cab1328f454dfe1ddbf522e232ad9803d5c6adde99f3d3e037635b17300ebc819be9faf1e1e6ac7ada018fd528ec841a0ed35f5c
|
7
|
+
data.tar.gz: 1cc76ad1caeff2fd0122e5f0e805ca5ada08a7d1869b22f8f423c2e1844087c58210677027c97ff9d665d3959c0c25ac2bb7a274f93311cd7d1d40dafe0235ff
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.3.
|
1
|
+
4.3.1
|
data/acts_as_status_for.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: acts_as_status_for 4.3.
|
5
|
+
# stub: acts_as_status_for 4.3.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "acts_as_status_for".freeze
|
9
|
-
s.version = "4.3.
|
9
|
+
s.version = "4.3.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
data/lib/acts_as_status_for.rb
CHANGED
@@ -145,12 +145,12 @@ module ActsAsStatusFor
|
|
145
145
|
if self.class.all_at_events.include?(event.to_sym)
|
146
146
|
self.send("#{event}!") if self.respond_to?("#{event}!")
|
147
147
|
else
|
148
|
-
puts "Here"
|
149
148
|
raise UnsupportedStatus.new("#{event} is not a status_at field")
|
150
149
|
end
|
151
150
|
end
|
152
151
|
end
|
153
152
|
end
|
153
|
+
|
154
154
|
alias :current_status= :status=
|
155
155
|
alias :statuses= :status=
|
156
156
|
|
@@ -163,6 +163,14 @@ describe ActsAsStatusFor do
|
|
163
163
|
expect(subject.statuses).to eq('on_hold featured archived')
|
164
164
|
end
|
165
165
|
|
166
|
+
it "setting to nil raises error" do
|
167
|
+
expect {
|
168
|
+
subject.status = nil
|
169
|
+
}.to raise_error(ActsAsStatusFor::UnsupportedStatus)
|
170
|
+
expect {
|
171
|
+
subject.statuses = nil
|
172
|
+
}.to raise_error(ActsAsStatusFor::UnsupportedStatus)
|
173
|
+
end
|
166
174
|
it "setting it to blank clears all states when clear_status is true" do
|
167
175
|
subject.on_hold!
|
168
176
|
subject.archived!
|