store-active_record 0.0.6 → 0.0.7
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 +4 -4
- data/lib/store/active_record/version.rb +1 -1
- data/lib/store/active_record.rb +3 -5
- data/spec/helper.rb +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a1ffe10abd7136713ca2600d7e7f8e91da4b2fc
|
4
|
+
data.tar.gz: 3d6d41cd77ba7267700daf99d3080b7f59a86337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e166cd534067d44da529c92921d4e2e382335fac777a89cdf35728f8246f43fb5a1f61aca6e33e3915adc154e7899b8b741a9d11d1fd42d820b647c19ef6fc9f
|
7
|
+
data.tar.gz: e795917c5cf8062973999afe92a717c34134961bffb67509355c4b778a01b4e54717d9acfdaf0b9e575d16ea9117f18e0c8eff7949f15e219731f97542442b6d
|
data/lib/store/active_record.rb
CHANGED
@@ -13,9 +13,7 @@ class Store
|
|
13
13
|
|
14
14
|
def insert(data)
|
15
15
|
entity = cls.create(data)
|
16
|
-
|
17
|
-
entity.update_attributes(data.merge('uid' => id))
|
18
|
-
id
|
16
|
+
entity.id.to_s
|
19
17
|
end
|
20
18
|
|
21
19
|
def update(id, data)
|
@@ -71,8 +69,8 @@ class Store
|
|
71
69
|
end
|
72
70
|
|
73
71
|
def to_hash
|
74
|
-
attributes.tap do |a|
|
75
|
-
a.delete('id') # ActiveRecord detail
|
72
|
+
attributes.dup.tap do |a|
|
73
|
+
a['uid'] = a.delete('id').to_s # ActiveRecord detail
|
76
74
|
end
|
77
75
|
end
|
78
76
|
end
|
data/spec/helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: store-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Owiesniak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.0.
|
150
|
+
rubygems_version: 2.0.0
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Basic ActiveRecord DataMapper for Store.
|