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 +4 -4
- data/lib/nimbu/command/themes.rb +80 -66
- data/lib/nimbu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16d9ba50aa18acaef28088a16027a976c516b820936f3093f5036e5afb08e3a6
|
4
|
+
data.tar.gz: 4af2e9337b3263955915835f5e591dcbcc099a7f41c6743bf85165b7433b87d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f9c63dd2d04415b9d5078b859ce655996172f57cca84bc4a1f626ac2d09f9d4c09764b1651267a1864a96165310704805bafcd161ffff14f07f5cc9fa9c942
|
7
|
+
data.tar.gz: 13a436709c3c715444424a73f0cb73e8ac09c2bdbb3c06854b9313231ef9b2d31e1b3bb0001341d4c5de5dccdc4b49e713f731fc41497f28dcf5147d0e802a69
|
data/lib/nimbu/command/themes.rb
CHANGED
@@ -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
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
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
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
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
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
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
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
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
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
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
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
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
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
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
|
data/lib/nimbu/version.rb
CHANGED
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:
|
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-
|
11
|
+
date: 2018-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|