cyborg 0.5.27 → 0.5.28

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: 66b45d00f802a4c65c09a2ea5d574a726410e1df
4
- data.tar.gz: eb4eb6ff0a234be50bf7b7c6d9282ed6793ba9cd
3
+ metadata.gz: dae97725516a452bd00a5e0d01feeb7bb40d6ab9
4
+ data.tar.gz: 5593127665780cdfbdb9c8c4333f9531c2815a8e
5
5
  SHA512:
6
- metadata.gz: 08ab6e220072db6a40e4ac548f53d2782b5a9aa1bc0167d9153cdc31007373a4132096a5ce5bb14b2020ab06f05c6b608e70d1da82086aefe18b25beb9a626e9
7
- data.tar.gz: 0b8650afbd3ca547bd59679446f69e30826739ea2d283f49f35ae0a4c6bbce7eecfe377f76eaad8d0b063a4f03024303d0aa8a581dc4b772dc5101dfbea6bf65
6
+ metadata.gz: 0ef217ce3b0d487adfaa26b2f0ef56ce7459f6052f3dea6578d6821dd1da542de89ba9bb0a0e9129a6ca00e7da4932ecb59ae74554c575fa1f05c1b93ac14b45
7
+ data.tar.gz: aeb6fcfd5e751e9159a1547d11c778376dcd7bb6ca614fdb2d77d5d28cbc8797c45f36cc8a68058405eb6499f7ea4658272999c27ddf587b6b6b41f6d0871996
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency 'sass', '~> 3.4'
22
- spec.add_runtime_dependency 'esvg', '~> 4.2.2'
22
+ spec.add_runtime_dependency 'esvg', '~> 4.2'
23
23
  spec.add_runtime_dependency 'listen', '~> 3.0.0'
24
24
  spec.add_runtime_dependency 'block_helpers', '~> 0.3'
25
25
  spec.add_runtime_dependency 'colorize', '~> 0.8'
@@ -6,8 +6,6 @@ module Cyborg
6
6
  def initialize(plugin, base)
7
7
  @base = base
8
8
  @plugin = plugin
9
- @throttle = 4
10
- @last_build = nil
11
9
  end
12
10
 
13
11
  def find_files
@@ -110,6 +108,10 @@ module Cyborg
110
108
  end
111
109
 
112
110
  def watch
111
+
112
+ @throttle = 4
113
+ @last_build = 0
114
+
113
115
  puts "Watching for changes to #{base.sub(plugin.root+'/', '')}...".colorize(:light_yellow)
114
116
 
115
117
  Thread.new {
@@ -123,14 +125,14 @@ module Cyborg
123
125
  end
124
126
 
125
127
  def change(modified, added, removed)
128
+ return if (Time.now.to_i - @last_build) < @throttle
129
+
126
130
  puts "Added: #{file_event(added)}".colorize(:light_green) unless added.empty?
127
131
  puts "Removed: #{file_event(removed)}".colorize(:light_red) unless removed.empty?
128
132
  puts "Modified: #{file_event(modified)}".colorize(:light_yellow) unless modified.empty?
129
133
 
130
- if !@last_build.nil? || Time.now.to_i - @last_build > @throttle
131
- build
132
- @last_build = Time.now.to_i
133
- end
134
+ build
135
+ @last_build = Time.now.to_i
134
136
  end
135
137
 
136
138
  def file_event(files)
@@ -9,7 +9,6 @@ module Cyborg
9
9
  @plugin = plugin
10
10
  @base = path
11
11
  @svg = esvg
12
-
13
12
  end
14
13
 
15
14
  def esvg
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.5.27"
2
+ VERSION = "0.5.28"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyborg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.27
4
+ version: 0.5.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.2
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.2
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: listen
43
43
  requirement: !ruby/object:Gem::Requirement