apiql 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/apiql.gemspec +1 -1
  4. data/lib/apiql.rb +4 -3
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bbded1678a2f87e16c36aba467e427750d595d7da6f5ee7a99c3a282a495748
4
- data.tar.gz: 4da0fc38f413a99f3205087430425b8df6517eff28e9675668aca488d90494a6
3
+ metadata.gz: b56d0b44618a6a8578144285d3db2c78622c92bfc837fe48c1e1ac9aee681bb8
4
+ data.tar.gz: fbf923f84c2201c4bba5bdf62f495d128b393659d251383b4da6f9b6d8d788e4
5
5
  SHA512:
6
- metadata.gz: 5201be091148a26ec08de7092a0852c806dc44bfdab3f51cbdbd0789df5189e47483fe678260778371808836c6b4e2e4c4c16955ae113cb76cbd1e0befca57ba
7
- data.tar.gz: d81b99f5b248df08eb685215bff5d2bd38211b36ab8006616c4c5ab21c3f52a5b876161167cd846b92e8322b1ee020a3bb01a6b9f8c4ab745e8002853b7ba8bc
6
+ metadata.gz: 749b0adf7b7fdc048df3612ab0427020ddd61e5c3e2a160f2574bede8a217d1868bacc110cc96bc434168d1688c63bcca74806ff7ec010053d3733c4ed49d065
7
+ data.tar.gz: e8b94e128b15856463e490b5ebd03ce1328925fd1b5708c733a0b7d2e1ea8a1a9486ba87083fb4d6bf044612c45003c55944055af5ebe6576b8df84a8e76de16
data/README.md CHANGED
@@ -61,6 +61,7 @@ end
61
61
  assets/javascripts/application.js:
62
62
 
63
63
  ```javascript
64
+ //= require apiql
64
65
  APIQL.endpoint = "/"
65
66
  ```
66
67
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'apiql'
7
- spec.version = '0.1.1'
7
+ spec.version = '0.1.2'
8
8
  spec.authors = ['Dmitry Silchenko']
9
9
  spec.email = ['dmitry@desofto.com']
10
10
 
@@ -36,7 +36,8 @@ class APIQL
36
36
  value.nil? ||
37
37
  value.is_a?(TrueClass) || value.is_a?(FalseClass) ||
38
38
  value.is_a?(Symbol) || value.is_a?(String) ||
39
- value.is_a?(Integer) || value.is_a?(Float) || value.is_a?(BigDecimal)
39
+ value.is_a?(Integer) || value.is_a?(Float) || value.is_a?(BigDecimal) ||
40
+ value.is_a?(Hash)
40
41
  end
41
42
 
42
43
  private
@@ -209,7 +210,7 @@ class APIQL
209
210
  respond[field] = render_value(data[field.to_sym], sub_schema)
210
211
  end
211
212
  else
212
- respond[field] = render_value(data[field.to_sym], schema)
213
+ respond[field] = render_value(data[field.to_sym])
213
214
  end
214
215
  end
215
216
 
@@ -219,7 +220,7 @@ class APIQL
219
220
  end
220
221
  end
221
222
 
222
- def render_value(value, schema)
223
+ def render_value(value, schema = nil)
223
224
  if schema.present?
224
225
  context.render_value(value, schema)
225
226
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Silchenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-27 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler