preservation 0.4.0 → 0.4.1

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: 922ab4347457976c6f59c174922cec3699ec186b
4
- data.tar.gz: 52fcc64ecab218ffa17f270d69d954d81c779142
3
+ metadata.gz: dc2ee5cb41238a308f3a73b05631e8b71b36b173
4
+ data.tar.gz: f620ea695218dce799dfd708cf86ee35e490e432
5
5
  SHA512:
6
- metadata.gz: 9dba19729c2c899a7e9e1399f66e95eaaaf3ede7d15adfce8d3f7b8c43d0ff932e014e261bcd3aec961335f8b41ee96f3f942a1e7a131b953ccd2662a1b44029
7
- data.tar.gz: 42fd26b22096093d0f199b69622f8d4e92f100f7ad2d259cd43b27eead7357ca5fa4054204568439211f7ee3674f8af7e43ea07f6663cf365f9223ca0240e2f2
6
+ metadata.gz: 7f3fb6d9e81304e76d1f927f8050d29b9885fe95ea4a4365d2995d79751d4b23d0c8128c866db4a8a0e9e8a1893fd9d9dba9096b730c68d9f794214b0beb14a2
7
+ data.tar.gz: f54051a3a67dc83b63d2acdf712c9819c1dcfd6cc047e0c8460efde071c0b69b718568901aa1783827e56686bdbee850c997eb5c00c7fbd126bb0828e2ec5e38
data/CHANGELOG.md CHANGED
@@ -4,7 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## Unreleased
6
6
 
7
- ## 0.3.0 - 2016-09-30
7
+ ## 0.4.1 - 2016-09-30
8
+ ### Fixed
9
+ - Reporting - pending transfers false positives.
10
+
11
+ ## 0.4.0 - 2016-09-30
8
12
  ### Added
9
13
  - Transfer - prepare batches of datasets.
10
14
  - Reporting - pending transfers.
@@ -61,16 +61,23 @@ module Preservation
61
61
  #
62
62
  # @return [Hash]
63
63
  def self.pending
64
- # Get the directories
65
- dirs = Dir.entries Preservation.ingest_path
64
+ entries = Dir.entries Preservation.ingest_path
65
+ dirs = []
66
+ entries.each do |entry|
67
+ path = File.join(Preservation.ingest_path, entry)
68
+ if File.directory?(path)
69
+ dirs << entry unless File.basename(path).start_with?('.')
70
+ end
71
+ end
66
72
  a = []
67
73
  # For each directory, if it isn't in the db, add it to list
68
74
  dirs.each do |dir|
69
- next if !in_db?(dir)
70
- o = {}
71
- o['path'] = dir
72
- o['path_timestamp'] = File.mtime "#{Preservation.ingest_path}/#{dir}"
73
- a << o
75
+ if in_db?(dir) === false
76
+ o = {}
77
+ o['path'] = dir
78
+ o['path_timestamp'] = File.mtime File.join(Preservation.ingest_path, dir)
79
+ a << o
80
+ end
74
81
  end
75
82
  a
76
83
  end
@@ -1,5 +1,5 @@
1
1
  module Preservation
2
2
  # Semantic version number
3
3
  #
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preservation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Albin-Clark