store-active_record 0.0.6 → 0.0.7

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: 3279773707e3e0b96040ffb066b309896a78e4da
4
- data.tar.gz: 5f227bababaa2f002ba63a196627a6bf6e55e397
3
+ metadata.gz: 3a1ffe10abd7136713ca2600d7e7f8e91da4b2fc
4
+ data.tar.gz: 3d6d41cd77ba7267700daf99d3080b7f59a86337
5
5
  SHA512:
6
- metadata.gz: ac711ed8cff10390e3811a8b859c78e82f6a71df1c6e7855ebc59c8dc2a1e8438664fd00fd3cbd37601235eac5be2572acfe926f7874108d80b499f0bd069208
7
- data.tar.gz: 5238c2e0c72702c4561d226943ae6ae0681888f4f451c236b49f7133fb9ad733c071fae97c24724e82520771bb9e1d1e886c5b0f7e12ec16b0c94b2b0e0dd759
6
+ metadata.gz: e166cd534067d44da529c92921d4e2e382335fac777a89cdf35728f8246f43fb5a1f61aca6e33e3915adc154e7899b8b741a9d11d1fd42d820b647c19ef6fc9f
7
+ data.tar.gz: e795917c5cf8062973999afe92a717c34134961bffb67509355c4b778a01b4e54717d9acfdaf0b9e575d16ea9117f18e0c8eff7949f15e219731f97542442b6d
@@ -1,5 +1,5 @@
1
1
  class Store
2
2
  class ActiveRecord
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -13,9 +13,7 @@ class Store
13
13
 
14
14
  def insert(data)
15
15
  entity = cls.create(data)
16
- id = entity.id.to_s
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
@@ -13,7 +13,6 @@ require 'store/active_record'
13
13
  ensure
14
14
  ::ActiveRecord::Migration.create_table(table) do |t|
15
15
  t.string :foo
16
- t.string :uid
17
16
  end
18
17
  end
19
18
  end
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.6
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-22 00:00:00.000000000 Z
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.3
150
+ rubygems_version: 2.0.0
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Basic ActiveRecord DataMapper for Store.