nimbu 0.11.7 → 0.11.8.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nimbu/command/server.rb +20 -13
- data/lib/nimbu/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02a7eee6fedacaa525a20b7b295b537fe4f1b9a8bb1a2196b78e63daa7573062
|
4
|
+
data.tar.gz: d935cef5805745ef9e47a7c6f7cfecdd857cfacc9f6b80ca38dc94be9ae8a421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffcc496dfac02d5a2e12247262e7d37868fffead38030de72faa1ee4cf3db60d8a5952ae3c9b3b9d120e61c53e3ca4cfb6502ccb3ea514a7baeb5452278f5558
|
7
|
+
data.tar.gz: 8bd965d77499786e3d815346606438e20513c721c85d5c8e42850d293f2d48ef6456913b47b46c62d17106a1a380a6ef1415c07d16236ce6b62010097ce20e59
|
data/lib/nimbu/command/server.rb
CHANGED
@@ -244,7 +244,8 @@ class Nimbu::Command::Server < Nimbu::Command::Base
|
|
244
244
|
end
|
245
245
|
|
246
246
|
require 'rubygems'
|
247
|
-
require '
|
247
|
+
require 'filewatcher'
|
248
|
+
require 'pathname'
|
248
249
|
|
249
250
|
class HamlWatcher
|
250
251
|
class << self
|
@@ -252,19 +253,25 @@ class HamlWatcher
|
|
252
253
|
|
253
254
|
def watch
|
254
255
|
refresh
|
256
|
+
current_dir = File.join(Dir.pwd, 'haml/')
|
255
257
|
puts ">>> Haml is polling for changes. Press Ctrl-C to Stop."
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
258
|
+
Filewatcher.new('haml/**/*.haml', every: true).watch do |filename, event|
|
259
|
+
begin
|
260
|
+
relative = filename.to_s.gsub(current_dir, '')
|
261
|
+
|
262
|
+
case event.to_s
|
263
|
+
when 'updated'
|
264
|
+
puts ">>> Change detected to: #{relative}"
|
265
|
+
HamlWatcher.compile(relative)
|
266
|
+
when 'deleted'
|
267
|
+
puts ">>> File deleted: #{relative}"
|
268
|
+
HamlWatcher.remove(relative)
|
269
|
+
when 'created'
|
270
|
+
puts ">>> File created: #{relative}"
|
271
|
+
HamlWatcher.compile(relative)
|
272
|
+
end
|
273
|
+
rescue => e
|
274
|
+
puts "#{e.inspect}"
|
268
275
|
end
|
269
276
|
end
|
270
277
|
end
|
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.11.
|
4
|
+
version: 0.11.8.pre
|
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: 2020-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: filewatcher
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
@@ -321,11 +321,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
321
321
|
version: '0'
|
322
322
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
323
323
|
requirements:
|
324
|
-
- - "
|
324
|
+
- - ">"
|
325
325
|
- !ruby/object:Gem::Version
|
326
|
-
version:
|
326
|
+
version: 1.3.1
|
327
327
|
requirements: []
|
328
|
-
|
328
|
+
rubyforge_project:
|
329
|
+
rubygems_version: 2.7.6.2
|
329
330
|
signing_key:
|
330
331
|
specification_version: 4
|
331
332
|
summary: Client library and CLI to design websites on the Nimbu platform.
|