seam-active_record 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddf45cd51d49820b10f610e2b3f2fa122b2e478b
4
- data.tar.gz: 0edb0d42e4d2e95a6bdeed15ef906de5cb29e4f5
3
+ metadata.gz: 8de367d590269db203e15a9f619322003c34d3a3
4
+ data.tar.gz: a99ae57c03fc3012106a8f424b0fc58fd27d924d
5
5
  SHA512:
6
- metadata.gz: d4c3d551bd55e9f4566fadb94badf0131afa366c55111ca4130c9b5c89959963398fc36e2041f782da5c10f60692bdc97f4bf601f6c26a9e623dca33ca3e4a44
7
- data.tar.gz: ecdd517b94fa5d0b69561520220c7883eda17481655e10039136f6303813c1d956792499bedfdf037bffc82cf1a23b163869d7a3459a1ebf9c6a20c1b00ff6c8
6
+ metadata.gz: 34d68dc39656e944e78324604a6f41cfbf9f55113b577a93a51c562ffc76e494d92076c5cf9bb05cd0cf539db4b39fc8505ea207648a6cf7096e65961a923c50
7
+ data.tar.gz: f8896af86634b551c462d7ac506dd82f89b2e3baaf1488db585edca6fcc5873afaee3e90c4866b678baad3b7f90551be3092865aceff3ed9527a51b0ea2533c1
@@ -1,5 +1,5 @@
1
1
  module Seam
2
2
  module ActiveRecord
3
- VERSION = "1.0.2"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
data/lib/seam_effort.rb CHANGED
@@ -1,3 +1,8 @@
1
1
  class SeamEffort < ActiveRecord::Base
2
2
  serialize :data, Hash
3
+
4
+ def to_effort
5
+ Seam::Effort.find effort_id
6
+ end
7
+
3
8
  end
@@ -40,4 +40,20 @@ describe Seam::Effort do
40
40
  second_effort.to_hash.contrast_with! Seam::Effort.find(second_effort.id).to_hash, [:id, :created_at]
41
41
  end
42
42
  end
43
+
44
+ describe "to effort" do
45
+
46
+ it "should find the effort by id" do
47
+ flow.start
48
+ effort = flow.start
49
+ flow.start
50
+
51
+ result = SeamEffort.all[1].to_effort
52
+
53
+ result.is_a?(Seam::Effort).must_equal true
54
+ result.id.must_equal effort.id
55
+ end
56
+
57
+ end
58
+
43
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Cauthon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-04 00:00:00.000000000 Z
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: seam