attr_pouch 0.0.1 → 0.1.0
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/Gemfile.lock +1 -1
- data/README.md +82 -23
- data/TODO +3 -1
- data/lib/attr_pouch/errors.rb +2 -0
- data/lib/attr_pouch/version.rb +1 -1
- data/lib/attr_pouch.rb +107 -61
- data/spec/attr_pouch_spec.rb +468 -399
- data/spec/spec_helper.rb +9 -2
- metadata +2 -2
data/spec/spec_helper.rb
CHANGED
@@ -12,15 +12,22 @@ conn = Sequel.connect(ENV['DATABASE_URL'])
|
|
12
12
|
conn.run 'CREATE EXTENSION IF NOT EXISTS "hstore"'
|
13
13
|
|
14
14
|
conn.extension :pg_hstore
|
15
|
+
conn.extension :pg_json
|
16
|
+
|
15
17
|
Sequel.extension :pg_hstore_ops
|
18
|
+
Sequel.extension :pg_json_ops
|
16
19
|
|
17
20
|
conn.run 'CREATE EXTENSION IF NOT EXISTS "hstore"'
|
18
21
|
conn.run 'DROP TABLE IF EXISTS items'
|
19
22
|
conn.run <<-EOF
|
20
23
|
CREATE TABLE items(
|
21
24
|
id serial primary key,
|
22
|
-
|
23
|
-
|
25
|
+
attrs_hstore hstore default '',
|
26
|
+
attrs_json json default '{}',
|
27
|
+
attrs_jsonb jsonb default '{}'
|
28
|
+
);
|
29
|
+
CREATE INDEX items_hstore_idx ON items USING gin (attrs_hstore);
|
30
|
+
CREATE INDEX items_jsonb_idx ON items USING gin (attrs_jsonb);
|
24
31
|
EOF
|
25
32
|
|
26
33
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_pouch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciek Sakrejda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|