bagit 0.3.5 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e581d4e4b632ebf75e7958de8dffef75425e695d
4
- data.tar.gz: cacad3cbb8385dc5600732730ede21751683d034
3
+ metadata.gz: e61e4ebbb4c8128ba09169d18a8cd5f2d65116df
4
+ data.tar.gz: 31439fd0fb7a12504f52c381d8a50dd7b91cffc3
5
5
  SHA512:
6
- metadata.gz: 385db1340cf4707f0ffa118d515b1d1d5739abc15750758466bce2b3f8d34bc221da766f3f353c3d095c27f1f20f63b6dab951a4d2e638b47174bc126fdc3f5a
7
- data.tar.gz: 0577b97788dc9cd9871760653b380c719a7eb9192391c57e5632b6ef56855fca2ddcdb92ba2932a4b692417fe8167f0a0b2f5a5376456b0399c27012818c6393
6
+ metadata.gz: 56522faf0dbac8705ec25ca2c8332ace8223eeac23361168b23070c44c78226b402af8488ca0e1b83a76d0ae52e5ec3d9fc533e479337f60298c76f6479a169f
7
+ data.tar.gz: ec107432518a390e9c5793cf2f0ce7704f06b48bb1fef06e7079ad3cc8a38dca8320422f711e66a90200cd86efedad454f602dd16021a89b94d1b818aa8141c3
data/.gitignore CHANGED
File without changes
File without changes
data/Gemfile CHANGED
File without changes
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
data/bin/bagit CHANGED
@@ -48,16 +48,20 @@ begin
48
48
  # commands that don't alter the bag #
49
49
  #####################################
50
50
  if opts['validate']
51
- if File.exists?(opts['BAGPATH']+'/bag-info.txt') && File.directory?(opts['BAGPATH']+'/data') && File.exists?(opts['BAGPATH']+'/manifest-md5.txt') || File.exists?(opts['BAGPATH']+'/manifest-sha1.txt')
52
- bag = BagIt::Bag.new(opts['BAGPATH'])
53
- if opts['--oxum']
54
- logger.info(bag.valid_oxum?.to_s)
55
- else
56
- logger.info(bag.valid?.to_s)
57
- end
51
+ bag = BagIt::Bag.new(opts['BAGPATH'])
52
+
53
+ if opts['--oxum']
54
+ valid = bag.valid_oxum?
58
55
  else
59
- logger.error("Not a valid bag")
56
+ valid = bag.valid?
60
57
  end
58
+
59
+ if valid
60
+ logger.info(valid)
61
+ else
62
+ logger.error("#{valid}: #{bag.errors.full_messages.join(', ')}" )
63
+ end
64
+
61
65
  # validation commands MUST NOT change manifest or bag-info files
62
66
  exit
63
67
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module BagIt
2
- VERSION = "0.3.5"
2
+ VERSION = "0.4.0"
3
3
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bagit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Johnson, Francesco Lazzarino, Jamie Little
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-13 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: validatable