acts_as_status_for 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.0.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_status_for}
8
- s.version = "2.0.1"
8
+ s.version = "2.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Curtis Schofield"]
@@ -41,12 +41,12 @@ module ActsAsStatusFor
41
41
 
42
42
  define_method "not_#{state}!" do
43
43
  self.send("#{state}_at=".to_sym,nil)
44
- self.save!
44
+ self.save
45
45
  end
46
46
 
47
47
  define_method "#{state}!" do
48
48
  self.send("#{state}_at=".to_sym,Time.now)
49
- self.save!
49
+ self.save
50
50
  end
51
51
  else
52
52
  log_error(state)
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  ActiveRecord::Migration.create_table :things do |t|
4
+ t.string :name
4
5
  t.datetime :on_hold_at
5
6
  t.datetime :archived_at
6
7
  t.datetime :featured_at
@@ -8,11 +9,12 @@ end
8
9
 
9
10
  class Thing < ActiveRecord::Base
10
11
  include ActsAsStatusFor
12
+ validates_presence_of :name # ensure that this works with required fields (no ! on save)
11
13
  end
12
14
 
13
15
  describe ActsAsStatusFor do
14
16
  subject {
15
- Thing.new
17
+ Thing.new(:name => 'required')
16
18
  }
17
19
  context "for non-existing fields" do
18
20
  before do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: acts_as_status_for
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.1
5
+ version: 2.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Curtis Schofield
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- hash: -1995968481398183006
119
+ hash: 556641777155012256
120
120
  segments:
121
121
  - 0
122
122
  version: "0"