activerecord-postgres-hstore 0.7.5 → 0.7.6

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.
data/CHANGELOG CHANGED
@@ -1,8 +1,26 @@
1
+ 0.7.6 / 2013-03-26
2
+
3
+ * Bug fixes
4
+
5
+ * Fixed JRuby regressions
6
+
7
+ 0.7.5 / 2013-02-14
8
+
9
+ * Bug fixes
10
+
11
+ * Fixed problem while dumping hstore fields to schema.rb
12
+
13
+ 0.7.4 / 2013-02-11
14
+
15
+ * Enhancements
16
+
17
+ * Replaced Rails dependency with ActiveRecord
18
+
1
19
  0.7.3 / 2013-02-07
2
20
 
3
21
  * Enhancements
4
- * Always use empty hash as default value
5
22
 
23
+ * Always use empty hash as default value
6
24
 
7
25
  0.7.2 / 2013-02-07
8
26
 
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "activerecord-postgres-hstore"
7
- s.version = "0.7.5"
7
+ s.version = "0.7.6"
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.license = "MIT"
@@ -66,22 +66,44 @@ module ActiveRecord
66
66
  end
67
67
  end
68
68
 
69
+
69
70
  module ConnectionAdapters
70
- class PostgreSQLColumn < Column
71
- # Adds the hstore type for the column.
72
- def simplified_type_with_hstore(field_type)
73
- field_type == 'hstore' ? :hstore : simplified_type_without_hstore(field_type)
71
+ #I believe this change will break the ability to do a schema dump as per issue #83
72
+ #https://github.com/engageis/activerecord-postgres-hstore/commit/ca34391c776949c13d561870067ddf581f0561b9#lib/activerecord-postgres-hstore/activerecord.rb
73
+ if(RUBY_PLATFORM != 'java')
74
+ class PostgreSQLColumn < Column
75
+ # Adds the hstore type for the column.
76
+ def simplified_type_with_hstore(field_type)
77
+ field_type == 'hstore' ? :hstore : simplified_type_without_hstore(field_type)
78
+ end
79
+
80
+ alias_method_chain :simplified_type, :hstore
74
81
  end
75
82
 
76
- alias_method_chain :simplified_type, :hstore
77
- end
83
+ class PostgreSQLAdapter < AbstractAdapter
84
+ def native_database_types_with_hstore
85
+ native_database_types_without_hstore.merge({:hstore => { :name => "hstore" }})
86
+ end
78
87
 
79
- class PostgreSQLAdapter < AbstractAdapter
80
- def native_database_types_with_hstore
81
- native_database_types_without_hstore.merge({:hstore => { :name => "hstore" }})
88
+ alias_method_chain :native_database_types, :hstore
89
+ end
90
+ else
91
+ class PostgreSQLColumn
92
+ # Adds the hstore type for the column.
93
+ def simplified_type_with_hstore(field_type)
94
+ field_type == 'hstore' ? :hstore : simplified_type_without_hstore(field_type)
95
+ end
96
+
97
+ alias_method_chain :simplified_type, :hstore
82
98
  end
83
99
 
84
- alias_method_chain :native_database_types, :hstore
100
+ class PostgreSQLAdapter
101
+ def native_database_types_with_hstore
102
+ native_database_types_without_hstore.merge({:hstore => { :name => "hstore" }})
103
+ end
104
+
105
+ alias_method_chain :native_database_types, :hstore
106
+ end
85
107
  end
86
108
 
87
109
  module SchemaStatements
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgres-hstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-14 00:00:00.000000000 Z
13
+ date: 2013-03-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: 1.3.6
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 1.8.24
158
+ rubygems_version: 1.8.25
159
159
  signing_key:
160
160
  specification_version: 3
161
161
  summary: Goodbye serialize, hello hstore