voog-kit 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/kit +1 -1
- data/lib/voog/dtk/guard.rb +12 -5
- data/lib/voog/dtk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48013ec6fe272a3a6133f9a610d20c81206167ea
|
4
|
+
data.tar.gz: d2429fdabe6243f3c6bffa58da1e78919513797e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9564892648ff8d743fedb767ffd7d4a99e6b0310c27f692d74fd9e06ff6bc49d2770ed9d78bb4cebf2f849c43f3bd816b48dac89e3433fcbe172caf1afb2c45
|
7
|
+
data.tar.gz: 7d9e297d744d4ec40db00ca0461e3bc20f349b0c6b3900f1ba975893ed4e2b922dad3d9d4c523b3df2900dc1b06894ded203ca6dab3269c69822a79da247dde5
|
data/bin/kit
CHANGED
@@ -162,7 +162,7 @@ command :watch do |c|
|
|
162
162
|
c.flag *api_token_args
|
163
163
|
c.flag *site_args
|
164
164
|
c.action do |global_options, options, args|
|
165
|
-
Voog::Dtk::Guuard.new(@filemanager).run
|
165
|
+
Voog::Dtk::Guuard.new(@filemanager, @debug).run
|
166
166
|
sleep 0.5 while ::Guard.running
|
167
167
|
end
|
168
168
|
end
|
data/lib/voog/dtk/guard.rb
CHANGED
@@ -25,7 +25,7 @@ end
|
|
25
25
|
|
26
26
|
module Voog::Dtk
|
27
27
|
class ::Guard::Watchman < ::Guard::Plugin
|
28
|
-
attr_accessor :options, :filemanager
|
28
|
+
attr_accessor :options, :filemanager, :debug
|
29
29
|
|
30
30
|
# Initializes a Guard plugin.
|
31
31
|
# Don't do any work here, especially as Guard plugins get initialized even if they are not in an active group!
|
@@ -50,6 +50,11 @@ module Voog::Dtk
|
|
50
50
|
# run_all
|
51
51
|
end
|
52
52
|
|
53
|
+
def debug=(debug)
|
54
|
+
::Guard::UI.info 'Debug mode is enabed' if debug
|
55
|
+
@debug = debug
|
56
|
+
end
|
57
|
+
|
53
58
|
# Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
|
54
59
|
#
|
55
60
|
# @raise [:task_has_failed] when stop has failed
|
@@ -96,7 +101,7 @@ module Voog::Dtk
|
|
96
101
|
@filemanager.upload_files paths
|
97
102
|
rescue => e
|
98
103
|
@filemanager.notifier.newline
|
99
|
-
Voog::Dtk.handle_exception e, @filemanager.notifier
|
104
|
+
Voog::Dtk.handle_exception e, @debug, @filemanager.notifier
|
100
105
|
end
|
101
106
|
|
102
107
|
# Called on file(s) removals that the Guard plugin watches.
|
@@ -110,7 +115,7 @@ module Voog::Dtk
|
|
110
115
|
# @filemanager.delete_remote_files paths
|
111
116
|
rescue => e
|
112
117
|
@filemanager.notifier.newline
|
113
|
-
Voog::Dtk.handle_exception e, @filemanager.notifier
|
118
|
+
Voog::Dtk.handle_exception e, @debug, @filemanager.notifier
|
114
119
|
end
|
115
120
|
|
116
121
|
# Called on file(s) modifications that the Guard plugin watches.
|
@@ -124,13 +129,14 @@ module Voog::Dtk
|
|
124
129
|
@filemanager.notifier.newline
|
125
130
|
rescue => e
|
126
131
|
@filemanager.notifier.newline
|
127
|
-
Voog::Dtk.handle_exception e, @filemanager.notifier
|
132
|
+
Voog::Dtk.handle_exception e, @debug, @filemanager.notifier
|
128
133
|
end
|
129
134
|
end
|
130
135
|
|
131
136
|
class Guuard
|
132
|
-
def initialize(filemanager)
|
137
|
+
def initialize(filemanager, debug=false)
|
133
138
|
@filemanager = filemanager
|
139
|
+
@debug = debug
|
134
140
|
end
|
135
141
|
|
136
142
|
def run
|
@@ -142,6 +148,7 @@ module Voog::Dtk
|
|
142
148
|
|
143
149
|
::Guard.start(guardfile_contents: guardfile)
|
144
150
|
::Guard.guards('watchman').first.filemanager = @filemanager
|
151
|
+
::Guard.guards('watchman').first.debug = @debug
|
145
152
|
end
|
146
153
|
end
|
147
154
|
end
|
data/lib/voog/dtk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voog-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikk Pristavka
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|