nimbu 0.8.2 → 0.8.3
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 +9 -7
- data/lib/nimbu/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b5f61a8b50e12323f0745f74f4c3708eb11406
|
4
|
+
data.tar.gz: 4cb845db6ef0c0d51f73d00f744396c869201cac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc8d96446d762bfbe25463aeeadceb9e71ef0868982349f1ef32753efadac7cf5b91f8b90fbb43d001194579b3165d3c2d0e8c31ecdb4d6b1b6cf6fd1701d524
|
7
|
+
data.tar.gz: 11338addd9278613b57a91b79358781d5a188d2424d03184f8d2387fb9126241b2a1fcd71d534dc05af684cc499b527beb75a9a29e0532963088f1eeabef755e
|
data/lib/nimbu/command/themes.rb
CHANGED
@@ -92,6 +92,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
92
92
|
# --images-only # only push new images
|
93
93
|
# --fonts-only # only push fonts
|
94
94
|
# --only # only push the files given on the command line
|
95
|
+
# --force # skip the usage check and upload anyway
|
95
96
|
#
|
96
97
|
def push
|
97
98
|
liquid_only = options[:liquid]
|
@@ -100,6 +101,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
100
101
|
images_only = options[:images_only]
|
101
102
|
fonts_only = options[:fonts_only]
|
102
103
|
files_only = options[:only]
|
104
|
+
force = options[:force]
|
103
105
|
|
104
106
|
# if !input.to_s.strip.empty?
|
105
107
|
# theme = input.to_s.strip
|
@@ -125,7 +127,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
125
127
|
print "\nFonts:\n"
|
126
128
|
font_files.each do |font|
|
127
129
|
file = "#{Dir.pwd}/fonts/#{font}"
|
128
|
-
next if File.directory?(file) || (!anyFileWithWord?(css_glob,font) && !anyFileWithWord?(js_glob,font) && !anyFileWithWord?(layouts_glob,font) && !anyFileWithWord?(templates_glob,font) && !anyFileWithWord?(snippets_glob,font))
|
130
|
+
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)))
|
129
131
|
io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
|
130
132
|
nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "fonts/#{font}", :file => io})
|
131
133
|
print " - fonts/#{font}"
|
@@ -143,7 +145,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
143
145
|
print "\nImages:\n"
|
144
146
|
image_files.each do |image|
|
145
147
|
file = "#{Dir.pwd}/images/#{image}"
|
146
|
-
next if File.directory?(file) || (!anyFileWithWord?(css_glob,image) && !anyFileWithWord?(js_glob,image) && !anyFileWithWord?(layouts_glob,image) && !anyFileWithWord?(templates_glob,image) && !anyFileWithWord?(snippets_glob,image))
|
148
|
+
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)))
|
147
149
|
io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
|
148
150
|
nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "images/#{image}", :file => io})
|
149
151
|
print " - images/#{image}"
|
@@ -161,7 +163,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
161
163
|
print "\nStylesheets:\n"
|
162
164
|
css_files.each do |css|
|
163
165
|
file = "#{Dir.pwd}/stylesheets/#{css}"
|
164
|
-
next if File.directory?(file) || (!anyFileWithWord?(layouts_glob,css) && !anyFileWithWord?(templates_glob,css) && !anyFileWithWord?(snippets_glob,css))
|
166
|
+
next if !force && (File.directory?(file) || (!anyFileWithWord?(layouts_glob,css) && !anyFileWithWord?(templates_glob,css) && !anyFileWithWord?(snippets_glob,css)))
|
165
167
|
io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
|
166
168
|
nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "stylesheets/#{css}", :file => io})
|
167
169
|
print " - stylesheets/#{css}"
|
@@ -179,7 +181,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
179
181
|
print "\nJavascripts:\n"
|
180
182
|
js_files.each do |js|
|
181
183
|
file = "#{Dir.pwd}/javascripts/#{js}"
|
182
|
-
next if File.directory?(file) || (!anyFileWithWord?(layouts_glob,js) && !anyFileWithWord?(templates_glob,js) && !anyFileWithWord?(snippets_glob,js))
|
184
|
+
next if !force && (File.directory?(file) || (!anyFileWithWord?(layouts_glob,js) && !anyFileWithWord?(templates_glob,js) && !anyFileWithWord?(snippets_glob,js)))
|
183
185
|
io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
|
184
186
|
nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "javascripts/#{js}", :file => io})
|
185
187
|
print " - javascripts/#{js}"
|
@@ -201,7 +203,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
201
203
|
print "\nSnippets:\n"
|
202
204
|
snippets_files.each do |snippet|
|
203
205
|
file = "#{Dir.pwd}/snippets/#{snippet}"
|
204
|
-
next if File.directory?(file)
|
206
|
+
next if !force && (File.directory?(file))
|
205
207
|
print " - snippets/#{snippet}"
|
206
208
|
nimbu.themes(:subdomain => Nimbu::Auth.site).snippets(:theme_id => theme).create({:name => snippet, :content => IO.read(file).force_encoding('UTF-8')})
|
207
209
|
print " (ok)\n"
|
@@ -210,7 +212,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
210
212
|
print "\nLayouts:\n"
|
211
213
|
layouts_files.each do |layout|
|
212
214
|
file = "#{Dir.pwd}/layouts/#{layout}"
|
213
|
-
next if File.directory?(file)
|
215
|
+
next if !force && (File.directory?(file))
|
214
216
|
print " - layouts/#{layout}"
|
215
217
|
nimbu.themes(:subdomain => Nimbu::Auth.site).layouts(:theme_id => theme).create({:name => layout, :content => IO.read(file).force_encoding('UTF-8')})
|
216
218
|
print " (ok)\n"
|
@@ -219,7 +221,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
|
|
219
221
|
print "\nTemplates:\n"
|
220
222
|
templates_files.each do |template|
|
221
223
|
file = "#{Dir.pwd}/templates/#{template}"
|
222
|
-
next if File.directory?(file)
|
224
|
+
next if !force && (File.directory?(file))
|
223
225
|
print " - templates/#{template}"
|
224
226
|
nimbu.themes(:subdomain => Nimbu::Auth.site).templates(:theme_id => theme).create({:name => template, :content => IO.read(file).force_encoding('UTF-8')})
|
225
227
|
print " (ok)\n"
|
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: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zenjoy BVBA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
version: '0'
|
312
312
|
requirements: []
|
313
313
|
rubyforge_project:
|
314
|
-
rubygems_version: 2.
|
314
|
+
rubygems_version: 2.4.5
|
315
315
|
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: Client library and CLI to design websites on the Nimbu platform.
|