dato 0.6.2 → 0.6.3.beta

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
  SHA256:
3
- metadata.gz: e329219fdc49be66749f4f2b31747b18f347b35732d5c72b33fc6b824811f51d
4
- data.tar.gz: 702e5c6547e278cc8175bdfee6ecf5c36075f8f6ceaabf467e93c3bb89eab5af
3
+ metadata.gz: 15067b99fcc4a58291b9a0f0e4d7526be9a05bfbc701c610a053d7d264e56068
4
+ data.tar.gz: a9edb33c2f22c72372fcf1816faf21e33fffa4e56da2532716664de2cf66cc54
5
5
  SHA512:
6
- metadata.gz: 5d7c8e2e8b43806eb37f1e9da47ce2fcd375f1c09bdcd32fafc3c92b312b0ab4f13d3f6c37cc74bf525d0b368461cd8e7d7d178763339044bba976d47a21675a
7
- data.tar.gz: '0078f5dce062b0336ff1169d149cf6978d65c07101e5ac007a855abc03a7c179fc5dab7661f3c0d206104b5f47bae0dbb39a2bcc563d0da47e25d3c75282960f'
6
+ metadata.gz: bbdb13300444f185c228a38716fe192dd9a151b3a483ca77227ea2358c0e629af011d8b30e198046e0daba57ce72619059cc9416bc70211f375a80d2ea77eee2
7
+ data.tar.gz: 6f4e56b6518a23f792b1a2edd9759f7d26edcb21e180051f0e0050980ef0eebc52023ea35536cc57678c0bfebfd0d2cfb528dc1419f7f59c58303e6262b4b783
@@ -1,3 +1,7 @@
1
+ # v0.6.2
2
+
3
+ Moved `json_schema` as runtime dependency
4
+
1
5
  # v0.6.1
2
6
 
3
7
  The big change is that the methods the client makes available are generated at runtime based on the [JSON Schema of our CMA](https://www.datocms.com/content-management-api/). This means any new API endpoint — or changes to existing ones — will instantly be reflected to the client, without the need to upgrade to the latest client version.
@@ -30,10 +30,9 @@ module Dato
30
30
  @extra_headers = options[:extra_headers] || {}
31
31
  end
32
32
 
33
- url = URI.parse("https://#{subdomain}.datocms.com/docs/#{subdomain}-hyperschema.json")
34
- response = Net::HTTP.get(url)
33
+ response = Faraday.get("https://#{subdomain}.datocms.com/docs/#{subdomain}-hyperschema.json")
35
34
 
36
- schema = JsonSchema.parse!(JSON.parse(response))
35
+ schema = JsonSchema.parse!(JSON.parse(response.body))
37
36
  schema.expand_references!
38
37
 
39
38
  schema.definitions.each do |type, schema|
@@ -18,7 +18,18 @@ module Dato
18
18
  end
19
19
 
20
20
  def load
21
- @entities_repo = EntitiesRepo.new(site, all_items, all_uploads)
21
+ threads = [
22
+ Thread.new { Thread.current[:output] = site },
23
+ Thread.new { Thread.current[:output] = all_items },
24
+ Thread.new { Thread.current[:output] = all_uploads }
25
+ ]
26
+
27
+ results = threads.map do |t|
28
+ t.join
29
+ t[:output]
30
+ end
31
+
32
+ @entities_repo = EntitiesRepo.new(*results)
22
33
  @items_repo = ItemsRepo.new(@entities_repo)
23
34
  end
24
35
 
@@ -39,7 +50,7 @@ module Dato
39
50
 
40
51
  def all_uploads
41
52
  client.uploads.all(
42
- {},
53
+ { "filter[type]" => "used" },
43
54
  deserialize_response: false,
44
55
  all_pages: true
45
56
  )
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Dato
3
- VERSION = '0.6.2'
3
+ VERSION = '0.6.3.beta'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-11 00:00:00.000000000 Z
11
+ date: 2018-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -455,9 +455,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
455
455
  version: '0'
456
456
  required_rubygems_version: !ruby/object:Gem::Requirement
457
457
  requirements:
458
- - - ">="
458
+ - - ">"
459
459
  - !ruby/object:Gem::Version
460
- version: '0'
460
+ version: 1.3.1
461
461
  requirements: []
462
462
  rubyforge_project:
463
463
  rubygems_version: 2.7.6