state_manager 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -30,7 +30,7 @@ GEM
30
30
  rdoc
31
31
  json (1.7.3)
32
32
  method_source (0.7.1)
33
- multi_json (1.3.5)
33
+ multi_json (1.3.6)
34
34
  pry (0.9.9.6)
35
35
  coderay (~> 1.0.5)
36
36
  method_source (~> 0.7.1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -1,4 +1,4 @@
1
- require 'active_support/core_ext'
1
+ require 'active_support/all'
2
2
 
3
3
  module StateManager
4
4
  module DSL
@@ -8,9 +8,9 @@ module StateManager
8
8
  def state(name, klass=nil, &block)
9
9
  # If no base class is specified we look for a class inside the current
10
10
  # state's class which has the same name as the state
11
- const_name = name.capitalize
11
+ const_name = name.to_s.classify
12
12
  klass ||= if const_defined?(const_name)
13
- self.const_get(name.capitalize)
13
+ self.const_get(const_name)
14
14
  else
15
15
  Class.new(StateManager::State)
16
16
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "state_manager"
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gordon Hempton"]
12
- s.date = "2012-06-06"
12
+ s.date = "2012-06-09"
13
13
  s.description = "Finite state machine implementation that keeps logic separate from model classes and supports sub-states."
14
14
  s.email = "ghempton@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -74,6 +74,11 @@ class DelayedJobTest < Test::Unit::TestCase
74
74
  def time_warp(duration)
75
75
  Timecop.travel(duration.from_now)
76
76
  Delayed::Worker.new.work_off
77
+
78
+ # Check for any errors inside the delayed job
79
+ jobs = Delayed::Job.where('last_error IS NOT NULL')
80
+ error = jobs.last && jobs.last.last_error
81
+ raise "Delayed job error: #{error}" if error
77
82
  end
78
83
 
79
84
  def test_delayed_event
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: state_manager
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.4
5
+ version: 0.2.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Gordon Hempton
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-06-06 00:00:00 Z
13
+ date: 2012-06-09 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
- hash: -1076366777807304127
208
+ hash: 696568598486714476
209
209
  segments:
210
210
  - 0
211
211
  version: "0"