hstore_accessor 0.5.2 → 0.5.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c81705ab4bfeff9568f1f9e580411a1a8fb52387
4
- data.tar.gz: bf60a484be88e5f63a5d08165bc76db186b05b33
3
+ metadata.gz: 4f14646994d4c0a4584452c2238844e4a976e7f7
4
+ data.tar.gz: dd45d154dcb02ae44094097d9ed3b98978f995d9
5
5
  SHA512:
6
- metadata.gz: 1a8cb7b16656ef6cf9e12677d1206a9b5663e3d6b97bac6267fba3bacef27e24ec675c06d8173eac0434ad14a128b9f73da0e9b2d8fa55c7fae3b84ed6aecb82
7
- data.tar.gz: 819667a3a55d48918d2e6b79dd52a71bbf43c3ff91752f389d66c8a020e29f1feb58d114c31df69b46592dc0aeb9092c9996161171816bcc07ab1b399e6a4834
6
+ metadata.gz: 0ce575626467e83fc0ca93559d1916c8f7a48e769b40ad318808adc01f3192c938b1e16af45f1c457aa946c1c5e83352224290fb4cd954156732a57a65832775
7
+ data.tar.gz: 842031d1a0705948ba510df7999c5031fc3f549d15853de0de99892b1e2b5fba5e2859e2002c283aeb82369518f7154f400690c29be348b7c1000c2cd06e2f9b
data/Gemfile CHANGED
@@ -1,3 +1,11 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ group :test do
6
+
7
+ platform :ruby do
8
+ gem "pg", ">= 0.14.1"
9
+ end
10
+
11
+ end
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
+ ![Codeship](https://www.codeship.io/projects/db3ce4f0-c3c8-0130-9c44-167bc618456a/status?branch=master)
2
+
1
3
  # HstoreAccessor
2
4
 
3
5
  PostgreSQL provides an hstore data type for storing arbitrarily complex
4
6
  structures in a column. ActiveRecord 4.0 supports Hstore but casts all
5
- valus in the store to a string. Further, ActiveRecord does not provide
7
+ values in the store to a string. Further, ActiveRecord does not provide
6
8
  discrete fields to access values directly in the hstore column. The
7
9
  HstoreAccessor gem solves both of these issues.
8
10
 
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "pg", ">= 0.14.1"
22
21
  spec.add_dependency "activesupport", ">= 3.2.0"
23
22
 
24
23
  spec.add_development_dependency "activerecord", ">= 4.0.0"
@@ -1,3 +1,3 @@
1
1
  module HstoreAccessor
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,25 +1,31 @@
1
1
  require "hstore_accessor"
2
2
  require "database_cleaner"
3
3
 
4
- ActiveRecord::Base.establish_connection(
5
- adapter: "postgresql",
6
- database: "hstore_accessor",
7
- username: "root"
8
- )
9
-
10
- ActiveRecord::Base.connection.execute("CREATE EXTENSION hstore;") rescue ActiveRecord::StatementInvalid
11
- ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS products;")
12
-
13
- ActiveRecord::Base.connection.create_table(:products) do |t|
14
- t.hstore :options
15
- end
16
-
17
4
  DatabaseCleaner.strategy = :truncation
18
5
 
19
6
  RSpec.configure do |config|
20
7
  config.mock_with :rspec
21
8
 
9
+ config.before :suite do
10
+ create_database
11
+ end
12
+
22
13
  config.before do
23
14
  DatabaseCleaner.clean
24
15
  end
25
16
  end
17
+
18
+ def create_database
19
+ ActiveRecord::Base.establish_connection(
20
+ adapter: "postgresql",
21
+ database: "hstore_accessor",
22
+ username: "postgres"
23
+ )
24
+
25
+ ActiveRecord::Base.connection.execute("CREATE EXTENSION hstore;") rescue ActiveRecord::StatementInvalid
26
+ ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS products;")
27
+
28
+ ActiveRecord::Base.connection.create_table(:products) do |t|
29
+ t.hstore :options
30
+ end
31
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hstore_accessor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Hirn
@@ -10,22 +10,8 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-01-29 00:00:00.000000000 Z
13
+ date: 2014-02-19 00:00:00.000000000 Z
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: pg
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: 0.14.1
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: 0.14.1
29
15
  - !ruby/object:Gem::Dependency
30
16
  name: activesupport
31
17
  requirement: !ruby/object:Gem::Requirement