pushmi_pullyu 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee3ae95bd69295b902eff713c4f8948af9839dde
4
- data.tar.gz: bed88e162b360674ac772add2686507bfe646944
3
+ metadata.gz: a330952a1f5a8ed2f7811ebe6b0dc5754bab3353
4
+ data.tar.gz: f9822d002af9b9f31df6a4c983a2662a122009ee
5
5
  SHA512:
6
- metadata.gz: 27df9fdf2b2eb85cada45100b884abc84d19ba7f54df595e6f23567b6923b4c229337d7bd9685a468eea6a3f6628c8e24c5eb1682979614f349c767b64ac987b
7
- data.tar.gz: a804823e637a9a316cae302517d42e0b45fb15579801a83f2c0f98574b5ca514c618b71d9194e692fadf4b2be4adbc59228fae372742ed0e3555dde8a20521ca
6
+ metadata.gz: 4dbd7b2824eafc784ad8841a49782d8ffeeb5fae9a651d9c3bba0319c7540d5bfee85d2a122f34b27d17af5bcee92f7862ae1ac9366efcb6135cb881abc92106
7
+ data.tar.gz: 4cfbf1ec3a72cebb651e23e09607cc9176d76d410bc80a0dff0b41ff8a96448e23e20edb6322a9d958f0274543e870d9d17b659dffcf1060b29b6340b7639f6a
@@ -151,6 +151,7 @@ class PushmiPullyu::AIP::Downloader
151
151
 
152
152
  def clean_directories
153
153
  return unless File.exist?(@aip_directory)
154
+
154
155
  PushmiPullyu.logger.debug("#{@noid}: Nuking directories ...")
155
156
  FileUtils.rm_rf(@aip_directory)
156
157
  end
@@ -46,6 +46,7 @@ class PushmiPullyu::AIP::FedoraFetcher
46
46
  return true
47
47
  elsif response.is_a?(Net::HTTPNotFound)
48
48
  raise FedoraFetchError unless optional
49
+
49
50
  return false
50
51
  else
51
52
  raise FedoraFetchError
@@ -53,6 +53,7 @@ class PushmiPullyu::AIP::FileListCreator
53
53
  break if next_proxy.nil?
54
54
 
55
55
  raise NextPreviousProxyMismatch if this_proxy != find_prev_proxy(next_proxy)
56
+
56
57
  this_proxy = next_proxy
57
58
  end
58
59
 
@@ -76,6 +77,7 @@ class PushmiPullyu::AIP::FileListCreator
76
77
  first_uri = statement.object
77
78
  # Validate that the first proxy doesn't have a previous one
78
79
  raise FirstProxyHasPrev, @uri.to_s if find_prev_proxy(first_uri)
80
+
79
81
  return first_uri
80
82
  end
81
83
  raise NoFirstProxyFound, @uri.to_s
@@ -86,6 +88,7 @@ class PushmiPullyu::AIP::FileListCreator
86
88
  last_uri = statement.object
87
89
  # Validate that the last proxy doesn't have a next one
88
90
  raise LastProxyHasNext, @uri.to_s if find_next_proxy(last_uri)
91
+
89
92
  return last_uri
90
93
  end
91
94
  raise LastProxyFound, @uri.to_s
@@ -11,6 +11,7 @@ class PushmiPullyu::AIP::OwnerEmailEditor
11
11
  end
12
12
 
13
13
  def run
14
+ setup_db_connection
14
15
  is_modified = false
15
16
  prefixes = nil
16
17
  # Read once to load prefixes (the @things at the top of an n3 file)
@@ -32,7 +33,18 @@ class PushmiPullyu::AIP::OwnerEmailEditor
32
33
  end
33
34
  end
34
35
  return new_body if is_modified
36
+
35
37
  raise NoOwnerPredicate
36
38
  end
37
39
 
40
+ private
41
+
42
+ def setup_db_connection
43
+ ActiveRecord::Base.establish_connection(database_configuration)
44
+ end
45
+
46
+ def database_configuration
47
+ PushmiPullyu.options[:database][:url]
48
+ end
49
+
38
50
  end
@@ -48,7 +48,6 @@ class PushmiPullyu::CLI
48
48
  setup_signal_traps
49
49
 
50
50
  setup_log
51
- setup_db_connection
52
51
  print_banner
53
52
 
54
53
  run_tick_loop
@@ -276,12 +275,4 @@ class PushmiPullyu::CLI
276
275
  end
277
276
  end
278
277
 
279
- def setup_db_connection
280
- ActiveRecord::Base.establish_connection(database_configuration)
281
- end
282
-
283
- def database_configuration
284
- PushmiPullyu.options[:database][:url]
285
- end
286
-
287
278
  end
@@ -63,6 +63,7 @@ class PushmiPullyu::PreservationQueue
63
63
  while PushmiPullyu.continue_polling?
64
64
  element = next_item
65
65
  return element if element.present?
66
+
66
67
  sleep @poll_interval
67
68
  end
68
69
  end
@@ -1,3 +1,3 @@
1
1
  module PushmiPullyu
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushmi_pullyu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Murnaghan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord