the_garage 2.3.2 → 2.3.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: f9f82e33e1a9c6bff9448ca2b49a8f38e0c8d355
4
- data.tar.gz: 95809152a36fc6cbb47c908902a36026ffc72ada
3
+ metadata.gz: a9ee99351350b8a8ee6000590003952aebc06515
4
+ data.tar.gz: eba9c748cfe782a481a799857c633d663ac99e54
5
5
  SHA512:
6
- metadata.gz: 17bdd17006908052bd2607c7636da5a782b6c05634c34b177a53826190a754767c255b1d2724ad78ee1be784311cbbc64bd790be5ed7626aa38b42f9599e28b1
7
- data.tar.gz: 088f5c656a73d4cd575ee54013dc27ebaac68585381cef91576abc3e52476c33cb10c9092cbc369e51842c75b87dac24fea7cc72a4c9d0fda1bc8010027e9b3b
6
+ metadata.gz: 864aaa96191d81364a174f95ac5779578392d928a7c76bb8edefeb7b12df748e2b40cb3aced29415a7eba84520b161ce866dad8fceac143f1d4c0bb38b536afd
7
+ data.tar.gz: bcd8e23f4aaa5728b6995bb41a83d24ad7420756b206eedee28579253aaebe67812ca26f203ef8fd8a219c4db5f695fece39989e85e9b14b19c1bb6d01fe5fc8
@@ -91,7 +91,7 @@ module Garage
91
91
  end
92
92
 
93
93
  def render
94
- Oj.dump(converted_data, mode: :compat).gsub(/([<>])/, JSON_ESCAPE_TABLE)
94
+ Oj.dump(converted_data, mode: :compat, use_as_json: true).gsub(/([<>])/, JSON_ESCAPE_TABLE)
95
95
  end
96
96
 
97
97
  private
@@ -166,22 +166,23 @@ module Garage::Representer
166
166
  end
167
167
  end
168
168
 
169
+ PRIMITIVE_CLASSES = [
170
+ ActiveSupport::TimeWithZone,
171
+ Date,
172
+ Time,
173
+ Integer,
174
+ Float,
175
+ Hash,
176
+ Array,
177
+ String,
178
+ NilClass,
179
+ TrueClass,
180
+ FalseClass,
181
+ Symbol,
182
+ ]
183
+
169
184
  def primitive?(value)
170
- [
171
- ActiveSupport::TimeWithZone,
172
- Date,
173
- Time,
174
- Bignum,
175
- Fixnum,
176
- Float,
177
- Hash,
178
- Array,
179
- String,
180
- NilClass,
181
- TrueClass,
182
- FalseClass,
183
- Symbol,
184
- ].any? {|k| value.is_a?(k) }
185
+ PRIMITIVE_CLASSES.any? {|k| value.is_a?(k) }
185
186
  end
186
187
 
187
188
  private
@@ -1,3 +1,3 @@
1
1
  module Garage
2
- VERSION = '2.3.2'
2
+ VERSION = '2.3.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_garage
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuhiko Miyagawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-11 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -269,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  version: '0'
270
270
  requirements: []
271
271
  rubyforge_project:
272
- rubygems_version: 2.5.1
272
+ rubygems_version: 2.5.2
273
273
  signing_key:
274
274
  specification_version: 4
275
275
  summary: Garage Platform Engine