nimbu 0.11 → 0.11.1

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: 8b83d487f125fd6e62172e87ffd73d35dfe239a3e28d89909628071a8f5146c2
4
- data.tar.gz: f0cb95835bc63ede7c7788718865677fa041458492c0792016862775798467c3
3
+ metadata.gz: 16d9ba50aa18acaef28088a16027a976c516b820936f3093f5036e5afb08e3a6
4
+ data.tar.gz: 4af2e9337b3263955915835f5e591dcbcc099a7f41c6743bf85165b7433b87d3
5
5
  SHA512:
6
- metadata.gz: 6c8b2996b73656dffd0f927d09cfb641ee1628a3c64c76dc1ab7b68e0297d782a94f005a5f2b11bc3ab77e194e519a490b890f3e4e25ab2835a269fbffc43456
7
- data.tar.gz: '0197d07948ec81b9ce10b001db9428347c5c95b8a58507a192bf70feb93ffb648324273eff21305af7996cf85c4221e18f4c6cb5bee19039f989cbf94340364c'
6
+ metadata.gz: f4f9c63dd2d04415b9d5078b859ce655996172f57cca84bc4a1f626ac2d09f9d4c09764b1651267a1864a96165310704805bafcd161ffff14f07f5cc9fa9c942
7
+ data.tar.gz: 13a436709c3c715444424a73f0cb73e8ac09c2bdbb3c06854b9313231ef9b2d31e1b3bb0001341d4c5de5dccdc4b49e713f731fc41497f28dcf5147d0e802a69
@@ -132,16 +132,18 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
132
132
 
133
133
  print "\nFonts:\n"
134
134
  font_files.each do |font|
135
- file = "#{Dir.pwd}/fonts/#{font}"
136
- next if !force && (File.directory?(file) || (!anyFileWithWord?(css_glob,font) && !anyFileWithWord?(js_glob,font) && !anyFileWithWord?(layouts_glob,font) && !anyFileWithWord?(templates_glob,font) && !anyFileWithWord?(snippets_glob,font)))
137
- io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
138
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "fonts/#{font}", :file => io})
139
- print " - fonts/#{font}"
140
- print " (ok)\n"
141
- rescue Nimbu::Error::Conflict => error
142
- handle_conflict(error, font) do
143
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "fonts/#{font}", :file => io, force: "true"})
144
- end
135
+ begin
136
+ file = "#{Dir.pwd}/fonts/#{font}"
137
+ next if !force && (File.directory?(file) || (!anyFileWithWord?(css_glob,font) && !anyFileWithWord?(js_glob,font) && !anyFileWithWord?(layouts_glob,font) && !anyFileWithWord?(templates_glob,font) && !anyFileWithWord?(snippets_glob,font)))
138
+ io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
139
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "fonts/#{font}", :file => io})
140
+ print " - fonts/#{font}"
141
+ print " (ok)\n"
142
+ rescue Nimbu::Error::Conflict => error
143
+ handle_conflict(error, font) do
144
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "fonts/#{font}", :file => io, force: "true"})
145
+ end
146
+ end
145
147
  end
146
148
  end
147
149
 
@@ -154,16 +156,18 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
154
156
 
155
157
  print "\nImages:\n"
156
158
  image_files.each do |image|
157
- file = "#{Dir.pwd}/images/#{image}"
158
- next if !force && (File.directory?(file) || (!anyFileWithWord?(css_glob,image) && !anyFileWithWord?(js_glob,image) && !anyFileWithWord?(layouts_glob,image) && !anyFileWithWord?(templates_glob,image) && !anyFileWithWord?(snippets_glob,image)))
159
- io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
160
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "images/#{image}", :file => io})
161
- print " - images/#{image}"
162
- print " (ok)\n"
163
- rescue Nimbu::Error::Conflict => error
164
- handle_conflict(error, image) do
165
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "images/#{image}", :file => io, force: "true"})
166
- end
159
+ begin
160
+ file = "#{Dir.pwd}/images/#{image}"
161
+ next if !force && (File.directory?(file) || (!anyFileWithWord?(css_glob,image) && !anyFileWithWord?(js_glob,image) && !anyFileWithWord?(layouts_glob,image) && !anyFileWithWord?(templates_glob,image) && !anyFileWithWord?(snippets_glob,image)))
162
+ io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
163
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "images/#{image}", :file => io})
164
+ print " - images/#{image}"
165
+ print " (ok)\n"
166
+ rescue Nimbu::Error::Conflict => error
167
+ handle_conflict(error, image) do
168
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "images/#{image}", :file => io, force: "true"})
169
+ end
170
+ end
167
171
  end
168
172
  end
169
173
 
@@ -176,16 +180,18 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
176
180
 
177
181
  print "\nStylesheets:\n"
178
182
  css_files.each do |css|
179
- file = "#{Dir.pwd}/stylesheets/#{css}"
180
- next if !force && (File.directory?(file) || (!anyFileWithWord?(layouts_glob,css) && !anyFileWithWord?(templates_glob,css) && !anyFileWithWord?(snippets_glob,css)))
181
- io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
182
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "stylesheets/#{css}", :file => io})
183
- print " - stylesheets/#{css}"
184
- print " (ok)\n"
185
- rescue Nimbu::Error::Conflict => error
186
- handle_conflict(error, css) do
187
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "stylesheets/#{css}", :file => io, force: "true"})
188
- end
183
+ begin
184
+ file = "#{Dir.pwd}/stylesheets/#{css}"
185
+ next if !force && (File.directory?(file) || (!anyFileWithWord?(layouts_glob,css) && !anyFileWithWord?(templates_glob,css) && !anyFileWithWord?(snippets_glob,css)))
186
+ io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
187
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "stylesheets/#{css}", :file => io})
188
+ print " - stylesheets/#{css}"
189
+ print " (ok)\n"
190
+ rescue Nimbu::Error::Conflict => error
191
+ handle_conflict(error, css) do
192
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "stylesheets/#{css}", :file => io, force: "true"})
193
+ end
194
+ end
189
195
  end
190
196
  end
191
197
 
@@ -198,16 +204,18 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
198
204
 
199
205
  print "\nJavascripts:\n"
200
206
  js_files.each do |js|
201
- file = "#{Dir.pwd}/javascripts/#{js}"
202
- next if !force && (File.directory?(file) || (!anyFileWithWord?(layouts_glob,js) && !anyFileWithWord?(templates_glob,js) && !anyFileWithWord?(snippets_glob,js)))
203
- io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
204
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "javascripts/#{js}", :file => io})
205
- print " - javascripts/#{js}"
206
- print " (ok)\n"
207
- rescue Nimbu::Error::Conflict => error
208
- handle_conflict(error, js) do
209
- nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "javascripts/#{js}", :file => io, force: "true"})
210
- end
207
+ begin
208
+ file = "#{Dir.pwd}/javascripts/#{js}"
209
+ next if !force && (File.directory?(file) || (!anyFileWithWord?(layouts_glob,js) && !anyFileWithWord?(templates_glob,js) && !anyFileWithWord?(snippets_glob,js)))
210
+ io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
211
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "javascripts/#{js}", :file => io})
212
+ print " - javascripts/#{js}"
213
+ print " (ok)\n"
214
+ rescue Nimbu::Error::Conflict => error
215
+ handle_conflict(error, js) do
216
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "javascripts/#{js}", :file => io, force: "true"})
217
+ end
218
+ end
211
219
  end
212
220
  end
213
221
 
@@ -224,41 +232,47 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
224
232
 
225
233
  print "\nSnippets:\n"
226
234
  snippets_files.each do |snippet|
227
- file = "#{Dir.pwd}/snippets/#{snippet}"
228
- next if !force && (File.directory?(file))
229
- print " - snippets/#{snippet}"
230
- nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file).force_encoding('UTF-8')})
231
- print " (ok)\n"
232
- rescue Nimbu::Error::Conflict => error
233
- handle_conflict(error, snippet) do
234
- nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file).force_encoding('UTF-8'), force: "true"})
235
- end
235
+ begin
236
+ file = "#{Dir.pwd}/snippets/#{snippet}"
237
+ next if !force && (File.directory?(file))
238
+ print " - snippets/#{snippet}"
239
+ nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file).force_encoding('UTF-8')})
240
+ print " (ok)\n"
241
+ rescue Nimbu::Error::Conflict => error
242
+ handle_conflict(error, snippet) do
243
+ nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file).force_encoding('UTF-8'), force: "true"})
244
+ end
245
+ end
236
246
  end
237
247
 
238
248
  print "\nLayouts:\n"
239
249
  layouts_files.each do |layout|
240
- file = "#{Dir.pwd}/layouts/#{layout}"
241
- next if !force && (File.directory?(file))
242
- print " - layouts/#{layout}"
243
- nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file).force_encoding('UTF-8')})
244
- print " (ok)\n"
245
- rescue Nimbu::Error::Conflict => error
246
- handle_conflict(error, layout) do
247
- nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file).force_encoding('UTF-8'), force: "true"})
250
+ begin
251
+ file = "#{Dir.pwd}/layouts/#{layout}"
252
+ next if !force && (File.directory?(file))
253
+ print " - layouts/#{layout}"
254
+ nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file).force_encoding('UTF-8')})
255
+ print " (ok)\n"
256
+ rescue Nimbu::Error::Conflict => error
257
+ handle_conflict(error, layout) do
258
+ nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file).force_encoding('UTF-8'), force: "true"})
259
+ end
248
260
  end
249
261
  end
250
262
 
251
263
  print "\nTemplates:\n"
252
264
  templates_files.each do |template|
253
- file = "#{Dir.pwd}/templates/#{template}"
254
- next if !force && (File.directory?(file))
255
- print " - templates/#{template}"
256
- nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file).force_encoding('UTF-8')})
257
- print " (ok)\n"
258
- rescue Nimbu::Error::Conflict => error
259
- handle_conflict(error, template) do
260
- nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file).force_encoding('UTF-8'), force: "true"})
261
- end
265
+ begin
266
+ file = "#{Dir.pwd}/templates/#{template}"
267
+ next if !force && (File.directory?(file))
268
+ print " - templates/#{template}"
269
+ nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file).force_encoding('UTF-8')})
270
+ print " (ok)\n"
271
+ rescue Nimbu::Error::Conflict => error
272
+ handle_conflict(error, template) do
273
+ nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file).force_encoding('UTF-8'), force: "true"})
274
+ end
275
+ end
262
276
  end
263
277
  end
264
278
  rescue ::Nimbu::Error::Forbidden
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Nimbu
3
- VERSION = "0.11"
3
+ VERSION = "0.11.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nimbu
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.11'
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zenjoy BVBA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-09 00:00:00.000000000 Z
11
+ date: 2018-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor