watch-paths 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
+ == 1.2.0 / 2007-09-08
2
+
3
+ * 1 significant change
4
+ * To accommodate large files, now shelling out to local unix md5sum.
5
+ * 1 minor enhancement
6
+ * To be more friendly to common file associations, changed default manifest file extension to .txt.
7
+ * 1 bug fix
8
+ * Now works without Rubygems
9
+
1
10
  == 1.1.2 / 2007-09-05
2
11
 
3
12
  * 1 bug fix
data/Rakefile CHANGED
@@ -12,6 +12,7 @@ Hoe.new( 'watch-paths', WatchPaths::VERSION ) do |p|
12
12
  p.description = p.paragraphs_of('README.txt', 3).to_s
13
13
  p.url = p.paragraphs_of('README.txt', 1).to_s.split(/\n/)[1..-1]
14
14
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
15
+ p.rsync_args = '-rpv --delete' # to preserve group permissions
15
16
  end
16
17
 
17
18
  # vim: syntax=Ruby
data/bin/watch-paths CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby -ws
2
2
 
3
- begin require 'rubygems' rescue LoadError end
3
+ begin require 'rubygems'; rescue LoadError; end
4
4
 
5
+ $:.push "#{File.dirname $0}/../lib"
5
6
  require 'watch-paths'
6
7
 
7
8
  if defined? $h then
data/lib/watch-paths.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'yaml'
2
2
  require 'fileutils'
3
- require 'digest/md5'
4
3
 
5
4
  include FileUtils
6
5
 
@@ -11,12 +10,12 @@ $r ||= false
11
10
 
12
11
  class WatchPaths
13
12
 
14
- VERSION = '1.1.2'
13
+ VERSION = '1.2.0'
15
14
 
16
15
  ##
17
16
  # File used to record checksums in each path scanned
18
17
 
19
- MANIFEST = '.chksum_manifest.yml'
18
+ MANIFEST = '.chksum_manifest.txt'
20
19
 
21
20
  ##
22
21
  # compares file checksums for a set of directory paths
@@ -61,7 +60,7 @@ class WatchPaths
61
60
  chksum_manifest = {}
62
61
  files = Dir['*'].select{ |f| File.file? f }
63
62
  files.each do |file|
64
- chksum_manifest[file] = Digest::MD5.hexdigest File.read(file)
63
+ chksum_manifest[file] = `md5sum #{file}`.split.first
65
64
  end
66
65
  chksum_manifest
67
66
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: watch-paths
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.2
7
- date: 2007-09-06 00:00:00 -04:00
6
+ version: 1.2.0
7
+ date: 2007-09-08 00:00:00 -04:00
8
8
  summary: Scan a set of pathnames for file changes according to check sums.
9
9
  require_paths:
10
10
  - lib