flazz-bagit 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bagit.gemspec +1 -1
  2. data/lib/bagit/manifest.rb +4 -4
  3. metadata +1 -1
data/bagit.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "bagit"
3
- spec.version = '0.0.1'
3
+ spec.version = '0.0.2'
4
4
  spec.summary = "BagIt package generation and validation"
5
5
  spec.email = "flazzarino@gmail.com"
6
6
  spec.homepage = 'http://bagit.rubyforge.org'
@@ -78,7 +78,7 @@ module BagIt
78
78
  (manifest_files + tagmanifest_files).all? do |mf|
79
79
  # extract the algorithm
80
80
  mf =~ /manifest-(.+).txt$/
81
-
81
+
82
82
  algo = case $1
83
83
  when /sha1/i
84
84
  Digest::SHA1
@@ -91,13 +91,13 @@ module BagIt
91
91
  # check it, an unknown algorithm is always true
92
92
  unless algo == :unknown
93
93
  lines = open(mf) { |io| io.readlines }
94
-
94
+
95
95
  lines.all? do |line|
96
96
  manifested_digest, path = line.chomp.split /\s+/, 2
97
97
  actual_digest = open(File.join(@bag_dir, path)) { |io| algo.hexdigest io.read }
98
98
  actual_digest == manifested_digest
99
99
  end
100
-
100
+
101
101
  else
102
102
  true
103
103
  end
@@ -105,7 +105,7 @@ module BagIt
105
105
  end
106
106
 
107
107
  end
108
-
108
+
109
109
  end
110
110
 
111
111
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flazz-bagit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Lazzarino