upsert 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 1.1.4 / 2012-12-06
2
+
3
+ * Enhancements
4
+
5
+ * Use latest pg-hstore gem with standardized namespace
6
+
1
7
  1.1.3 / 2012-12-06
2
8
 
3
9
  * Bug fix
data/README.md CHANGED
@@ -212,7 +212,7 @@ If you want to use HStore, make the `pg-hstore` gem available and pass a Hash in
212
212
 
213
213
  ```ruby
214
214
  gem 'pg-hstore'
215
- require 'hstore'
215
+ require 'pg_hstore'
216
216
  upsert.row({:name => 'Bill'}, :mydata => {:a => 1, :b => 2})
217
217
  ```
218
218
 
@@ -5,8 +5,8 @@ class Upsert
5
5
  def bind_value(v)
6
6
  case v
7
7
  when Hash
8
- # you must require 'hstore' from the 'pg-hstore' gem yourself
9
- ::HStore.dump(v)[1...-1]
8
+ # you must require 'pg_hstore' from the 'pg-hstore' gem yourself
9
+ ::PgHstore.dump(v)[1...-1]
10
10
  else
11
11
  super
12
12
  end
@@ -1,3 +1,3 @@
1
1
  class Upsert
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  describe Upsert do
3
3
  describe 'hstore on pg' do
4
4
  it "just works" do
5
- require 'hstore'
5
+ require 'pg_hstore'
6
6
  Pet.connection.execute 'CREATE EXTENSION HSTORE'
7
7
  Pet.connection.execute "ALTER TABLE pets ADD COLUMN crazy HSTORE"
8
8
  upsert = Upsert.new $conn, :pets
@@ -13,7 +13,7 @@ describe Upsert do
13
13
 
14
14
  upsert.row({name: 'Bill'}, crazy: {a: 1})
15
15
  row = Pet.connection.select_one(%{SELECT crazy FROM pets WHERE name = 'Bill'})
16
- crazy = HStore.parse row['crazy']
16
+ crazy = PgHstore.parse row['crazy']
17
17
  crazy.should == { a: '1' }
18
18
 
19
19
  upsert.row({name: 'Bill'}, crazy: nil)
@@ -22,17 +22,17 @@ describe Upsert do
22
22
 
23
23
  upsert.row({name: 'Bill'}, crazy: {a: 1})
24
24
  row = Pet.connection.select_one(%{SELECT crazy FROM pets WHERE name = 'Bill'})
25
- crazy = HStore.parse row['crazy']
25
+ crazy = PgHstore.parse row['crazy']
26
26
  crazy.should == { a: '1' }
27
27
 
28
28
  upsert.row({name: 'Bill'}, crazy: {whatdat: 'whodat'})
29
29
  row = Pet.connection.select_one(%{SELECT crazy FROM pets WHERE name = 'Bill'})
30
- crazy = HStore.parse row['crazy']
30
+ crazy = PgHstore.parse row['crazy']
31
31
  crazy.should == { a: '1', whatdat: 'whodat' }
32
32
 
33
33
  upsert.row({name: 'Bill'}, crazy: {a: 2})
34
34
  row = Pet.connection.select_one(%{SELECT crazy FROM pets WHERE name = 'Bill'})
35
- crazy = HStore.parse row['crazy']
35
+ crazy = PgHstore.parse row['crazy']
36
36
  crazy.should == { a: '2', whatdat: 'whodat' }
37
37
  end
38
38
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
28
28
  gem.add_development_dependency 'yard'
29
29
  gem.add_development_dependency 'activerecord-import'
30
30
  gem.add_development_dependency 'pry'
31
- gem.add_development_dependency 'pg-hstore'
31
+ gem.add_development_dependency 'pg-hstore', ">=1.1.0"
32
32
 
33
33
  unless RUBY_VERSION >= '1.9'
34
34
  gem.add_development_dependency 'orderedhash'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upsert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-06 00:00:00.000000000 Z
12
+ date: 2012-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec-core
@@ -162,7 +162,7 @@ dependencies:
162
162
  requirements:
163
163
  - - ! '>='
164
164
  - !ruby/object:Gem::Version
165
- version: '0'
165
+ version: 1.1.0
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ dependencies:
170
170
  requirements:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
- version: '0'
173
+ version: 1.1.0
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: sqlite3
176
176
  requirement: !ruby/object:Gem::Requirement