store-active_record 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/store/active_record.rb +2 -0
- data/lib/store/active_record/version.rb +1 -1
- data/spec/active_record_spec.rb +17 -0
- data/spec/helper.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5115077af122d269dba67a6c751fa3c7bf23ec2b
|
4
|
+
data.tar.gz: 705e57d4764e3ee9b48e75f601759e4780844976
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccac37d80174ad96ba4ad66af661c7ccfed3a50d5bda72ec56e128178096641fcad5d24268f09ce544b1e40f6d41ff95e23f1217155ca62a05211944bd8caedf
|
7
|
+
data.tar.gz: 1cb2023e4b3afe7176d39c868e1073be925afb99adcfef9f93f859fddcb87cf5370ec88effaad8e59c71bb5fc74ca67a36dc1b750f55638ec6fa834fc038cf00
|
data/lib/store/active_record.rb
CHANGED
data/spec/active_record_spec.rb
CHANGED
@@ -43,4 +43,21 @@ describe Store::DataMapper::ActiveRecord do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
describe 'single find remove active record specific attributes' do
|
47
|
+
establish_connection
|
48
|
+
recreate_table
|
49
|
+
|
50
|
+
before { empty_table }
|
51
|
+
|
52
|
+
subject { Store::DataMapper::ActiveRecord.new(table) }
|
53
|
+
|
54
|
+
it 'removes the id, updated_at and created_at and build uid as virtual attribute from id' do
|
55
|
+
id = subject.insert({:foo => 'my foo'})
|
56
|
+
|
57
|
+
expected = {"foo"=>"my foo", "uid"=>id.to_s}
|
58
|
+
|
59
|
+
assert_equal expected, subject.single_find(id)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
46
63
|
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.11
|
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-09-
|
11
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|