slinky 0.7.2 → 0.7.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/VERSION +1 -1
- data/lib/slinky/listener.rb +15 -3
- data/lib/slinky/manifest.rb +2 -8
- data/lib/slinky/server.rb +1 -0
- data/slinky.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33d6587d8e7257920874cf090c6591d9c0ffbbe4
|
4
|
+
data.tar.gz: 1d67f8ebdbe3c530c33c37dd6fc5c206613b9f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6c8154b45b0259adaf9738f35e395cea591f900679020da3399b8c0d2c20f3c605ae3f77712dcb399ee0d54e14d6f40f8092e1527f252dc5f830fffd1c69af3
|
7
|
+
data.tar.gz: e1d86f830c2af11375a62ebd8bf3c1b47a5109bbe704113508d70e3253fbeda1507990821f0e168a645704aa50c196f6c0cfddb044ee9e2939e95aba586c9b7d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.3
|
data/lib/slinky/listener.rb
CHANGED
@@ -39,15 +39,27 @@ module Slinky
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def handle_mod files
|
42
|
-
|
42
|
+
begin
|
43
|
+
@manifest.update_all_by_path files
|
44
|
+
rescue
|
45
|
+
puts "Unable to update file: #{$!}"
|
46
|
+
end
|
43
47
|
end
|
44
48
|
|
45
49
|
def handle_add files
|
46
|
-
|
50
|
+
begin
|
51
|
+
@manifest.add_all_by_path files
|
52
|
+
rescue
|
53
|
+
puts "Unable to add file: #{$!}"
|
54
|
+
end
|
47
55
|
end
|
48
56
|
|
49
57
|
def handle_rem files
|
50
|
-
|
58
|
+
begin
|
59
|
+
@manifest.remove_all_by_path files
|
60
|
+
rescue
|
61
|
+
puts "Unable to remove file: #{$1}"
|
62
|
+
end
|
51
63
|
end
|
52
64
|
end
|
53
65
|
end
|
data/lib/slinky/manifest.rb
CHANGED
@@ -64,13 +64,7 @@ module Slinky
|
|
64
64
|
|
65
65
|
# Notifies of an update to a file in the manifest
|
66
66
|
def update_all_by_path paths
|
67
|
-
manifest_update paths
|
68
|
-
md = find_by_path(File.dirname(path)).first
|
69
|
-
if mf = find_by_path(path).first
|
70
|
-
mf.parent.remove_file(mf)
|
71
|
-
end
|
72
|
-
md.add_file(File.basename(path))
|
73
|
-
end
|
67
|
+
manifest_update paths
|
74
68
|
end
|
75
69
|
|
76
70
|
# Removes a file from the manifest
|
@@ -242,7 +236,7 @@ module Slinky
|
|
242
236
|
if path[0] == '/'
|
243
237
|
path = Pathname.new(path).relative_path_from(Pathname.new(@dir).expand_path).to_s
|
244
238
|
end
|
245
|
-
yield path
|
239
|
+
yield path if block_given?
|
246
240
|
}
|
247
241
|
invalidate_cache
|
248
242
|
files.each{|f|
|
data/lib/slinky/server.rb
CHANGED
data/slinky.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: slinky 0.7.
|
5
|
+
# stub: slinky 0.7.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "slinky"
|
9
|
-
s.version = "0.7.
|
9
|
+
s.version = "0.7.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|