workflow_status 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 530de5549fdd5fae05fbc10cc0098e9c7bea0f2e
4
- data.tar.gz: 1dc744873559cf07ad8a2978bb6bc89c942863d1
3
+ metadata.gz: 31a522d1ccf4c3405db031b702031905d6b10b00
4
+ data.tar.gz: 3a9a0a8f138c85de5ee4b93ac76523e5c515199f
5
5
  SHA512:
6
- metadata.gz: 45cb2fd18b53c7d274a5d319da041e6176336b86323fe2a4b0a739a618de03b5fbdc4f8e5a25aaefc03efe9b31666ccf868277c217b8aa23e4ba38ba289b33d0
7
- data.tar.gz: f4833fa9faf3f99bee37d94c7dd9bb6c344b00c81db89fd938727f0b21329c3b4cb15b2c0894c3e9e4d83b2cc45954bc92657c0f12518234156baab513c4bec9
6
+ metadata.gz: 408286f3e1330b8007da751765e3c6dd14bac8f006eab2e7ff1fe563420620c45d14cba6814a0b7457e362e2519f411794dab98dbae0890f2deaa274596849ad
7
+ data.tar.gz: 58e8c86a11e30c737c2204d4f9e15b95ebef549d8018253fd1eda893b1729d425901c2129ed80c0b2d2dfa64ce1d2e79e104c0b56febd467400f453bf8fc6eb3
@@ -2,11 +2,14 @@ module WorkflowStatus::InstanceMethods
2
2
 
3
3
  def workflow_status
4
4
  code = read_attribute :workflow_status
5
+
6
+ code = code.to_i if [nil, 0, 1, 2, '0', '1', '2'].include? code
7
+
5
8
  workflow_status_map.invert.fetch(code)
6
9
  end
7
10
 
8
11
  def workflow_status=(status_symbol)
9
- if [0, 1, 2, '0', '1', '2'].include? status_symbol
12
+ if [nil, 0, 1, 2, '0', '1', '2'].include? status_symbol
10
13
  value = status_symbol.to_i
11
14
  else
12
15
  value = workflow_status_map.fetch(status_symbol.to_sym)
@@ -1,3 +1,3 @@
1
1
  module WorkflowStatus
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workflow_status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Friel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-10 00:00:00.000000000 Z
11
+ date: 2015-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler