inimit 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/inimit.gemspec +2 -2
  3. data/lib/inimit.rb +5 -4
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "inimit"
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["AlphaHydrae"]
12
- s.date = "2012-09-12"
12
+ s.date = "2012-09-13"
13
13
  s.description = "Compares files in two directories using SHA1."
14
14
  s.email = "hydrae.alpha@gmail.com"
15
15
  s.executables = ["inimit"]
@@ -6,7 +6,7 @@ require 'optparse'
6
6
  # TODO: lenient option to only fail on mismatch
7
7
 
8
8
  module Inimit
9
- VERSION = '0.0.2'
9
+ VERSION = '0.0.3'
10
10
 
11
11
  class Opts < OptionParser
12
12
  def to_s
@@ -79,6 +79,7 @@ module Inimit
79
79
 
80
80
  # skip directories
81
81
  next unless File.file? file
82
+ human_file = file.sub /^\.\//, ''
82
83
  total += 1
83
84
 
84
85
  source_file = File.join source, file
@@ -86,7 +87,7 @@ module Inimit
86
87
 
87
88
  if !File.file? target_file
88
89
  unknown += 1
89
- puts Paint[" not found", :yellow]
90
+ puts %/#{Paint["not found", :yellow]} #{human_file}/
90
91
  next
91
92
  end
92
93
 
@@ -97,12 +98,12 @@ module Inimit
97
98
  match += 1
98
99
  unless options[:mismatch_only]
99
100
  print Paint[self.hash_notice(source_sha1, target_sha1, options), :green]
100
- puts " #{file.sub /^\.\//, ''}..."
101
+ puts " #{human_file}..."
101
102
  end
102
103
  else
103
104
  mismatch += 1
104
105
  print Paint[self.hash_notice(source_sha1, target_sha1, options), :red]
105
- puts " #{file.sub /^\.\//, ''}..."
106
+ puts " #{human_file}..."
106
107
  end
107
108
  end
108
109
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inimit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-12 00:00:00.000000000 Z
12
+ date: 2012-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paint