webflow_sync 6.0.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98d3c00c861dd048087817fe1a709eb32a66cde4d5b79e0207ca6b19513dd9df
4
- data.tar.gz: dac4374d4f30f254db0808669600b5f0e1d8418bd38e43dcfaa736fed25631ca
3
+ metadata.gz: bf8a9fdd99e65667dad7f82bd2e5eb7539999a3c48a363cfd8f68b1217b6bb84
4
+ data.tar.gz: e7aa812fd99148cf99cd41b5c999414d356dd2384e59cc610de61a73d7a3ecf1
5
5
  SHA512:
6
- metadata.gz: 203099b7e60df11fe4ac8c4319c4e41603d737a269892fcc120ed4909ebbfb47ea3c4dc0ec2456404607f8a3ba5e155923cff5c781e75a7edd3417e1ac908268
7
- data.tar.gz: '0993c797a70bf2efe1faa86eb3f439a85a1a7233201033c5ccc4ccb3b71fcf97f15df19839e9b92259013f4141b2955d84d9c7bdaf017d8ee7a81791989c4d26'
6
+ metadata.gz: 7ad5b0d2e7fb1724ab309f96630e3653dfe3b4419365b2131af623ec324b05b47e4a65275f977fc5a42744f12630892659bce92053de065d5cc92ebc2f2cc58a
7
+ data.tar.gz: b61fdc179fcc31af51ab45180eec3f108e842e3b92870463e5602515b470a6c5956a3d1825f7c37dc99e513322d76d615d30d957344a191d45018893b4c5873d
@@ -80,6 +80,8 @@ module WebflowSync
80
80
  response
81
81
  end
82
82
 
83
+ def sites = make_request(:sites)
84
+
83
85
  private
84
86
 
85
87
  def client
@@ -87,7 +89,7 @@ module WebflowSync
87
89
  end
88
90
 
89
91
  def collections
90
- @collections ||= client.collections(site_id)
92
+ @collections ||= make_request(:collections, site_id)
91
93
  end
92
94
 
93
95
  def domain_names
@@ -98,16 +100,16 @@ module WebflowSync
98
100
  # client.domains request does not return the default domain
99
101
  # We need to get default domain name if there are no custom domains set to avoid error:
100
102
  # Webflow::Error: Domain not found for site
101
- site = client.site(site_id)
102
- default_domain_name = "#{site['shortName']}.webflow.io"
103
+ site = make_request(:site, site_id)
104
+ default_domain_name = "#{site.fetch('shortName')}.webflow.io"
103
105
  names = [default_domain_name]
104
- client.domains(site_id).each { |domain| names << domain['name'] }
106
+ make_request(:domains, site_id).each { |domain| names << domain.fetch('name') }
105
107
 
106
108
  names
107
109
  end
108
110
 
109
111
  def find_webflow_collection(collection_slug)
110
- response = collections.find { |collection| collection['slug'] == collection_slug }
112
+ response = collections.find { |collection| collection.fetch('slug') == collection_slug }
111
113
  raise "Cannot find collection #{collection_slug} for Webflow site #{site_id}" unless response
112
114
 
113
115
  response
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebflowSync
4
- VERSION = '6.0.0'
4
+ VERSION = '6.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webflow_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viktor