perpetuity-postgres 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/perpetuity/postgres/connection.rb +2 -0
- data/lib/perpetuity/postgres/query_attribute.rb +4 -0
- data/lib/perpetuity/postgres/value_with_attribute.rb +4 -0
- data/lib/perpetuity/postgres/version.rb +1 -1
- data/perpetuity-postgres.gemspec +1 -1
- data/spec/perpetuity/postgres/connection_spec.rb +1 -1
- data/spec/perpetuity/postgres/query_attribute_spec.rb +8 -0
- data/spec/perpetuity/postgres/value_with_attribute_spec.rb +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84195d183dd75f856a69ea888e133407ab33596c
|
4
|
+
data.tar.gz: a08c32b762b10d9d33b26b099703b6521af12930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58737d3a8d9f9a7e462037189df2d8c500367f59b7f2d5505d22cb25bc2060f7557e6208bf4ef79f392660e842989c2c97a2ac49456885a4c7dce113458d41ec
|
7
|
+
data.tar.gz: c39806552ea5979a1902f0a9eaec465e5d65f4bfa0e0690aee06fcf5f84572c3a695d8b18d06d53235cf13616d2b007576d80eb002bb9ea08496eb6df491ee0c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## Version 0.0.4
|
2
|
+
|
3
|
+
- Set minimum logging from the database to warnings. This silences info messages like those from `DROP TABLE IF NOT EXISTS ...` when the table doesn't exist.
|
4
|
+
- Add the ability to query on ids for objects. For example: `mapper.select { |article| article.author.id == params[:author_id] }`
|
5
|
+
|
1
6
|
## Version 0.0.3
|
2
7
|
|
3
8
|
- Require the `bigdecimal` library to avoid undefined constant error: BigDecimals are converted to the Postgres `numeric` data type. In 1.9, it needs to be required explicitly. — [Avdi Grimm](https://github.com/avdi)
|
data/perpetuity-postgres.gemspec
CHANGED
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
22
|
spec.add_development_dependency "rspec"
|
23
23
|
spec.add_development_dependency "rake"
|
24
|
-
spec.add_runtime_dependency "perpetuity", "~> 1.0.0.
|
24
|
+
spec.add_runtime_dependency "perpetuity", "~> 1.0.0.beta5"
|
25
25
|
spec.add_runtime_dependency "pg"
|
26
26
|
end
|
@@ -55,6 +55,14 @@ module Perpetuity
|
|
55
55
|
it 'checks for truthiness' do
|
56
56
|
attribute.to_db.should == 'attribute_name IS NOT NULL'
|
57
57
|
end
|
58
|
+
|
59
|
+
describe 'nested attributes' do
|
60
|
+
it 'checks for an id' do
|
61
|
+
id = attribute.id
|
62
|
+
id.should be_a QueryAttribute
|
63
|
+
id.name.should == %q{attribute_name->'__metadata__'->>'id'}
|
64
|
+
end
|
65
|
+
end
|
58
66
|
end
|
59
67
|
end
|
60
68
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'perpetuity/postgres/value_with_attribute'
|
2
|
+
require 'ostruct'
|
2
3
|
|
3
4
|
module Perpetuity
|
4
5
|
class Postgres
|
@@ -29,6 +30,10 @@ module Perpetuity
|
|
29
30
|
serialized.should_not be_embedded
|
30
31
|
end
|
31
32
|
end
|
33
|
+
|
34
|
+
it 'passes messages to the value' do
|
35
|
+
serialized.upcase.should == 'FOO'
|
36
|
+
end
|
32
37
|
end
|
33
38
|
end
|
34
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: perpetuity-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Gaskins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.0.0.
|
61
|
+
version: 1.0.0.beta5
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.0.0.
|
68
|
+
version: 1.0.0.beta5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pg
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|