webflow_sync 4.0.1 → 5.0.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: a15354ad9d036d149529ea1724b0819d000346791e427e7a4899a8f094cf4bf2
4
- data.tar.gz: 94b84584db65b07817f6a16d37f7932d56dc2f8af6e1326ffa41943ffca4bc2d
3
+ metadata.gz: e2c06f856b81cc899ec4558cd26ddedc42f870bc2cd93620895f2991d68eb0a1
4
+ data.tar.gz: 2ae06ec63e98709b8ce972a83690a9a03aa9c5f1f59da790114391b43a4e1f9f
5
5
  SHA512:
6
- metadata.gz: a8856556ec7258d9b842d9bad88ddd19c105805772796596bcd0e445d314ab7ae54499ebb9c88dc384582eab9034c9066b36a0e275392a1016195fab570731e1
7
- data.tar.gz: 5e3c4daed7f24824bbe475056e2451f8419d2bddc0095b26f5ac828dc27cb908a0f5d5646b42e9f5be5a2e959cf91e3ff1aec85a86f0b2ea6a1468f638dcb861
6
+ metadata.gz: de94d27681c0c660d6ca9a19332660f7864e13077b17cd5afe996d5bfea070df6d63ce7a3f3007d65005ba016175676d85f597322a29b9df55935ff4519916a1
7
+ data.tar.gz: 679933381b266e9b113b7954bff9a206ae6beb1e45f2e0ea895ecf80ae93ebab3c017a3be5efc17c1f8494287d92792e049b98a89174a75e2234266cf8cc142d
data/README.md CHANGED
@@ -230,9 +230,15 @@ This gem silently "fails" (does nothing) when `webflow_site_id` or `webflow_item
230
230
 
231
231
  PRs welcome!
232
232
 
233
+ To run RuboCop style check and RSpec tests run:
234
+
235
+ ```sh
236
+ bundle exec rake
237
+ ```
238
+
233
239
  ## Thanks and Credits
234
240
 
235
- This gem wouldn't be possible without the amazing work of [webflow-ruby](https://github.com/penseo/webflow-ruby) gem. Thank you, @phoet!
241
+ This gem wouldn't be possible without the amazing work of [webflow-ruby](https://github.com/penseo/webflow-ruby) gem. Thank you, [@phoet](https://github.com/phoet)!
236
242
 
237
243
 
238
244
  ## License
data/Rakefile CHANGED
@@ -12,4 +12,7 @@ require 'bundler/gem_tasks'
12
12
  require 'stylecheck/rake_tasks' unless Rails.env.production?
13
13
 
14
14
  load 'rspec/rails/tasks/rspec.rake'
15
- task default: :spec
15
+ task :default do
16
+ Rake::Task['style:rubocop:run'].execute
17
+ Rake::Task['spec'].execute
18
+ end
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'webflow/client'
4
- require 'webflow/error'
5
-
6
3
  module WebflowSync
7
4
  class Api
8
5
  attr_reader :site_id
@@ -45,7 +42,7 @@ module WebflowSync
45
42
  response = make_request(:create_item, collection['_id'],
46
43
  record.as_webflow_json.reverse_merge(_archived: false, _draft: false), live: true)
47
44
 
48
- if update_record_colums(record, response)
45
+ if update_record_columns(record, response)
49
46
  # When the item is created, sometimes changes are not visible throughout the WebFlow site immediately (probably due to some caching).
50
47
  # To make this change immediately visible from the WebFlow site, we need to publish the site.
51
48
  publish
@@ -124,7 +121,7 @@ module WebflowSync
124
121
  response
125
122
  end
126
123
 
127
- def update_record_colums(record, response)
124
+ def update_record_columns(record, response)
128
125
  # use update_column to skip callbacks to prevent WebflowSync::ItemSync to kick off
129
126
  if WebflowSync.configuration.sync_webflow_slug
130
127
  record.update_columns(webflow_item_id: response['_id'], webflow_slug: response['slug']) # rubocop:disable Rails/SkipsModelValidations
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebflowSync
4
- VERSION = '4.0.1'
4
+ VERSION = '5.0.0'
5
5
  end
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.0.1
4
+ version: 5.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: 2022-09-30 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,16 +16,16 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '7.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.0'
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: webflow-ruby
28
+ name: sprockets-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,111 +39,13 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: dotenv-rails
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: factory_bot_rails
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: guard-rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: net-smtp
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: pry-rails
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec-rails
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: vcr
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: webmock
42
+ name: webflow-ruby
141
43
  requirement: !ruby/object:Gem::Requirement
142
44
  requirements:
143
45
  - - ">="
144
46
  - !ruby/object:Gem::Version
145
47
  version: '0'
146
- type: :development
48
+ type: :runtime
147
49
  prerelease: false
148
50
  version_requirements: !ruby/object:Gem::Requirement
149
51
  requirements:
@@ -202,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
104
  - !ruby/object:Gem::Version
203
105
  version: '0'
204
106
  requirements: []
205
- rubygems_version: 3.3.17
107
+ rubygems_version: 3.3.26
206
108
  signing_key:
207
109
  specification_version: 4
208
110
  summary: Keep Rails models in sync with WebFlow.