nimbu 0.6.3 → 0.6.4

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
  SHA1:
3
- metadata.gz: 85062049f83871c00e19e7721fec07d2a29853ca
4
- data.tar.gz: a3abc193ed88a9dca0b0333dc99809e394f6ae70
3
+ metadata.gz: 05ea5b7593ec34ac1b9021a9717c648cc990869d
4
+ data.tar.gz: f4c39215744c4c55fcf49185164b7329a7fcc6c0
5
5
  SHA512:
6
- metadata.gz: 99b94607189f978d250fda9962997de3bb55951065ba5db8dabd60a60bea5b789d3dfddfdec219039b3e8aab62f0331969eda4dcb8a779c7f953452656972272
7
- data.tar.gz: 483e865ade1d1cd8b02bb309276664a4b3ace4876be3626c7944caf4bc691cc54ab0db748886e72b3fb9065bfd5680079733bfc507490752e1fdf30e05774357
6
+ metadata.gz: a8814292a860e967494b4fc8f45b9aeeb2f39da95adbec81bb3db0bbb751874a55a21beb9e846894730b22ee485794758d8abf8643da4f2809dc957c3d68ea29
7
+ data.tar.gz: 06224ba232d2dbf588095deeb8d0c507ea3218e2ba43586905cb8a09f277eb2fa8e7825a39973a3ce08fec7de04ff79e29c000ec1c47a20540ca33c588b8fd01
@@ -97,9 +97,6 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
97
97
  js_only = options[:js]
98
98
  images_only = options[:images_only]
99
99
 
100
- puts options
101
- puts images_only
102
-
103
100
  # if !input.to_s.strip.empty?
104
101
  # theme = input.to_s.strip
105
102
  # else
@@ -150,7 +147,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
150
147
  print "\nStylesheet:\n"
151
148
  css_files.each do |css|
152
149
  file = "#{Dir.pwd}/stylesheets/#{css}"
153
- next if File.directory?(file) || (!anyFileWithWord?(layouts_glob,css) && !anyFileWithWord?(templates_glob,css))
150
+ next if File.directory?(file) || (!anyFileWithWord?(layouts_glob,css) && !anyFileWithWord?(templates_glob,css) && !anyFileWithWord?(snippets_glob,css))
154
151
  io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
155
152
  nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "stylesheets/#{css}", :file => io})
156
153
  print " - stylesheets/#{css}"
@@ -164,7 +161,7 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
164
161
  print "\nJavascripts:\n"
165
162
  js_files.each do |js|
166
163
  file = "#{Dir.pwd}/javascripts/#{js}"
167
- next if File.directory?(file) || (!anyFileWithWord?(layouts_glob,js) && !anyFileWithWord?(templates_glob,js))
164
+ next if File.directory?(file) || (!anyFileWithWord?(layouts_glob,js) && !anyFileWithWord?(templates_glob,js) && !anyFileWithWord?(snippets_glob,js))
168
165
  io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
169
166
  nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "javascripts/#{js}", :file => io})
170
167
  print " - javascripts/#{js}"
@@ -177,13 +174,26 @@ class Nimbu::Command::Themes < Nimbu::Command::Base
177
174
  print "\nImages:\n"
178
175
  image_files.each do |image|
179
176
  file = "#{Dir.pwd}/images/#{image}"
180
- next if File.directory?(file) || (!anyFileWithWord?(css_glob,image) && !anyFileWithWord?(js_glob,image) && !anyFileWithWord?(layouts_glob,image) && !anyFileWithWord?(templates_glob,image))
177
+ 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))
181
178
  io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
182
179
  nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "images/#{image}", :file => io})
183
180
  print " - images/#{image}"
184
181
  print " (ok)\n"
185
182
  end
186
183
  end
184
+
185
+ font_files = Dir.glob("#{Dir.pwd}/fonts/**/*").map {|dir| dir.gsub("#{Dir.pwd}/fonts/","")} rescue []
186
+ if !(css_only || js_only)
187
+ print "\nFonts:\n"
188
+ font_files.each do |font|
189
+ file = "#{Dir.pwd}/fonts/#{font}"
190
+ 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))
191
+ io = Faraday::UploadIO.new(File.open(file), 'application/octet-stream', File.basename(file))
192
+ nimbu.themes(:subdomain => Nimbu::Auth.site).assets(:theme_id => theme).create({:name => "fonts/#{font}", :file => io})
193
+ print " - fonts/#{font}"
194
+ print " (ok)\n"
195
+ end
196
+ end
187
197
  end
188
198
  end
189
199
 
data/lib/nimbu/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Nimbu
3
- VERSION = "0.6.3"
3
+ VERSION = "0.6.4"
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.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zenjoy BVBA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-28 00:00:00.000000000 Z
11
+ date: 2014-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor