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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1e4131531f13a7e59d8af244621759990a0e195
4
- data.tar.gz: c8fc44e9a92a3344c896b6aec2ace9eec058e552
3
+ metadata.gz: 33d6587d8e7257920874cf090c6591d9c0ffbbe4
4
+ data.tar.gz: 1d67f8ebdbe3c530c33c37dd6fc5c206613b9f8a
5
5
  SHA512:
6
- metadata.gz: 23db4994117d3d0a118ae014920f15a84848fd9239e3f8fa012fd378ba02ee8d745a0bdca8018bfd3546284f04031759724dbd6589f97e46e78302c754a74bb7
7
- data.tar.gz: bdbf6cf9ada64a30b0044a8c363638588ebcda0c048a7228a7ba7566507074c02a191df588d713934ea728338dece776616a88272cbaae778d2786eb2ad39c5a
6
+ metadata.gz: f6c8154b45b0259adaf9738f35e395cea591f900679020da3399b8c0d2c20f3c605ae3f77712dcb399ee0d54e14d6f40f8092e1527f252dc5f830fffd1c69af3
7
+ data.tar.gz: e1d86f830c2af11375a62ebd8bf3c1b47a5109bbe704113508d70e3253fbeda1507990821f0e168a645704aa50c196f6c0cfddb044ee9e2939e95aba586c9b7d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.7.3
@@ -39,15 +39,27 @@ module Slinky
39
39
  end
40
40
 
41
41
  def handle_mod files
42
- @manifest.update_all_by_path files rescue nil
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
- @manifest.add_all_by_path files rescue nil
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
- @manifest.remove_all_by_path files rescue nil
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
@@ -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 do |path|
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
@@ -37,6 +37,7 @@ module Slinky
37
37
 
38
38
  def self.process_path resp, path, pushstate = false
39
39
  file = manifest.find_by_path(path).first
40
+
40
41
  if file.is_a? ManifestDir
41
42
  file = manifest.find_by_path(path + "/index.html").first
42
43
  path += "/index.html"
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.2 ruby lib
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.2"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slinky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Wylde