jsonb_accessor 0.3.1 → 0.3.2

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: 9565410763ee9eea5acf3d6777d05499bcc252e2
4
- data.tar.gz: 437f4d27e4798c1fedc0fc8cac83ab819cbbdd04
3
+ metadata.gz: dba6b66a157993e3d518a9ca752e01896450a31d
4
+ data.tar.gz: e66183b852574346ffbb79d1cc0bb1a5ffc3806c
5
5
  SHA512:
6
- metadata.gz: 6cd4aac8ddcf212710f4daff6891493a1a8c62633e5e9c88038d2532215fed58c9b6f1a901dde9101941f8cc18ce05f0c5a57d0b946fb9510637304846309325
7
- data.tar.gz: 0d063060883e0c77de74d10bc7470cc08a03133a7a452d83ee4c6d3648fbbb55bd80a48f89919a58e8304ec826ef69feacc54c6d23d6cea36a8c5649ed46c8fe
6
+ metadata.gz: 6cc7e7aee5f2ac627f2d6e447744e6fc453e93e4ea6a19611b59e5c0dde20d1e996a3de94d870a96e1dd83ce8149e86c13738b032ab129811c9cceaeafeeac5f
7
+ data.tar.gz: e2f92dfb4f94a9886bc92772145d5d9b671a48055f2b0cad1857e50e62ee651a327d124c37202a2a84b7f577b12cc08bea5dcc2e3d180f453ff6fc9366f5443f
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.3.0
data/.travis.yml CHANGED
@@ -2,6 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.1.5
4
4
  - 2.2.0
5
+ - 2.3.0
5
6
  addons:
6
7
  postgresql: '9.4'
7
8
  before_install:
data/README.md CHANGED
@@ -90,38 +90,23 @@ end
90
90
 
91
91
  ### Supported Types
92
92
 
93
- The following types are supported:
93
+ Because the underlying storage mechanism is JSON, we attempt to abide by the limitations of what can be represented natively. We use [ActiveRecord::Type](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/type.rb) for seralization, but any type defined in the [Postgres connection adapter](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb) will also be accepted. Beware of the impact of using complex Postgres column types such as inet, enum, hstore, etc... We plan to restrict which types are allowed in a future patch.
94
+
95
+ The following types are explicitly supported.
94
96
 
95
97
  * big_integer
96
98
  * binary
97
- * bit
98
- * bit_varying
99
99
  * boolean
100
- * bytea
101
- * cidr
102
100
  * date
103
101
  * date_time
104
102
  * decimal
105
- * decimal_without_scale
106
- * enum
107
103
  * float
108
- * hstore
109
- * inet
110
104
  * integer
111
- * json
112
- * jsonb
113
- * money
114
- * point
115
- * range
116
- * specialized_string
117
105
  * string
118
106
  * text
119
107
  * time
120
- * unsigned_integer
121
- * uuid
122
108
  * value
123
- * vector
124
- * xml
109
+
125
110
 
126
111
  Typed arrays are also supported by specifying `:type_array` (i.e. `:float_array`). `:array` is interpreted as an array of `value` types.
127
112
 
data/db/config.yml CHANGED
@@ -1,9 +1,6 @@
1
1
  default: &default
2
2
  adapter: postgresql
3
3
  database: jsonb_accessor
4
- username: postgres
5
- host: localhost
6
- port: 5432
7
4
 
8
5
  development:
9
6
  <<: *default
@@ -43,6 +43,7 @@ module JsonbAccessor
43
43
  fields_map.names.each do |field|
44
44
  send("#{field}=", jsonb_attribute_hash[field.to_s])
45
45
  end
46
+ send(:clear_attribute_changes, fields_map.names)
46
47
  end
47
48
  end
48
49
  after_initialize(jsonb_attribute_initialization_method_name)
@@ -1,3 +1,3 @@
1
1
  module JsonbAccessor
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonb_accessor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Crismali
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-10-22 00:00:00.000000000 Z
12
+ date: 2016-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -245,7 +245,6 @@ files:
245
245
  - db/config.yml
246
246
  - db/migrate/20150407031737_set_up_testing_db.rb
247
247
  - db/schema.rb
248
- - docker-compose.yml
249
248
  - gemfiles/activerecord_4.2.1.gemfile
250
249
  - gemfiles/activerecord_4.2.1.gemfile.lock
251
250
  - gemfiles/activerecord_4.2.2.gemfile
@@ -283,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
282
  version: '0'
284
283
  requirements: []
285
284
  rubyforge_project:
286
- rubygems_version: 2.4.5
285
+ rubygems_version: 2.5.1
287
286
  signing_key:
288
287
  specification_version: 4
289
288
  summary: Adds typed jsonb backed fields to your ActiveRecord models.
data/docker-compose.yml DELETED
@@ -1,4 +0,0 @@
1
- db:
2
- image: postgres:9.4
3
- ports:
4
- - 5432:5432