webflow_sync 8.0.0 → 9.0.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8fd929a83a27160a05394b80cb0b00fdd70951d8a8be0e4c9dd59f584a9eb19
|
|
4
|
+
data.tar.gz: 61abc4b09b23fab7fbcbd31b560dde4cd0aaab365fac9e9d056cb524f4918a9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6f2d26fcd46a36806fe574f44151f5cb4ef1b0bd69008814386f7b4955a995564f48142f192761817bed452752ee27b608760c69121bd5fafad74d7cdd27c2b
|
|
7
|
+
data.tar.gz: 18b0167348eafdb20e96d14db7c10371b18f43f9d4905f7ab0e59cd6483fed02e9049c63093ca9a350640b31833833c817a0d21e76d24cfd3d3ea918e7dcf994
|
|
@@ -5,10 +5,9 @@ module WebflowSync
|
|
|
5
5
|
def perform(collection_slug)
|
|
6
6
|
model_class = collection_slug.underscore.classify.constantize
|
|
7
7
|
model_class.where(webflow_item_id: nil).find_each do |record|
|
|
8
|
-
next if record.
|
|
8
|
+
next if record.should_skip_webflow_sync?
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
client(record.webflow_site_id).create_item(collection_id:, record:)
|
|
10
|
+
client(record.webflow_site_id).create_item(collection_id: record.webflow_collection_id, record:)
|
|
12
11
|
end
|
|
13
12
|
end
|
|
14
13
|
|
|
@@ -30,12 +30,10 @@ module WebflowSync
|
|
|
30
30
|
WebflowSync::DestroyItemJob.perform_later(collection_id: self.webflow_collection_id, webflow_site_id:, webflow_item_id:)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
self.webflow_site_id.blank? || self.webflow_collection_id.blank?
|
|
38
|
-
end
|
|
33
|
+
def should_skip_webflow_sync?
|
|
34
|
+
WebflowSync.configuration.skip_webflow_sync || self.skip_webflow_sync ||
|
|
35
|
+
self.webflow_site_id.blank? || self.webflow_collection_id.blank?
|
|
36
|
+
end
|
|
39
37
|
end
|
|
40
38
|
end
|
|
41
39
|
end
|
data/lib/webflow_sync/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: webflow_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 9.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Viktor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
88
|
version: '0'
|
|
89
89
|
requirements: []
|
|
90
|
-
rubygems_version: 3.
|
|
90
|
+
rubygems_version: 3.5.9
|
|
91
91
|
signing_key:
|
|
92
92
|
specification_version: 4
|
|
93
93
|
summary: Keep Rails models in sync with WebFlow.
|