pushmi_pullyu 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/pushmi_pullyu.yml +1 -4
- data/lib/pushmi_pullyu/aip/owner_email_editor.rb +0 -24
- data/lib/pushmi_pullyu/cli.rb +10 -0
- data/lib/pushmi_pullyu/version.rb +1 -1
- data/pushmi_pullyu.gemspec +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa937d14979ab2d2816e710c8ab07953161538d0
|
4
|
+
data.tar.gz: 4b941305b25f708ed1cec36d96e0573e73e83d64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba32265c07780fb2bc9e894505cdc44c893c1c61eed805a409263f0f0208410f6313c09624b5bc2afec132b5d4c2203f0e4039ea8cd41f7744d4e2d6ddffa757
|
7
|
+
data.tar.gz: 9f5ba89beb76ce3102a2ebf232021d6f6d401553e46c310e79c0f8956f02855a79392b7b1831fba8b0b246bce2f9eaf463659244032ab09741ea5b7f6423c61c
|
data/examples/pushmi_pullyu.yml
CHANGED
@@ -28,10 +28,7 @@ fedora:
|
|
28
28
|
base_path: /dev
|
29
29
|
|
30
30
|
database:
|
31
|
-
|
32
|
-
url: postgresql://jupiter:mysecretpassword@127.0.0.1
|
33
|
-
database: jupiter_development
|
34
|
-
pool: 5
|
31
|
+
url: postgresql://jupiter:mysecretpassword@127.0.0.1/jupiter_development
|
35
32
|
|
36
33
|
#parameters project_name and project_domain_name are required only for keystone v3 authentication
|
37
34
|
swift:
|
@@ -11,8 +11,6 @@ class PushmiPullyu::AIP::OwnerEmailEditor
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def run
|
14
|
-
ensure_database_connection
|
15
|
-
|
16
14
|
is_modified = false
|
17
15
|
prefixes = nil
|
18
16
|
# Read once to load prefixes (the @things at the top of an n3 file)
|
@@ -37,26 +35,4 @@ class PushmiPullyu::AIP::OwnerEmailEditor
|
|
37
35
|
raise NoOwnerPredicate
|
38
36
|
end
|
39
37
|
|
40
|
-
private
|
41
|
-
|
42
|
-
def ensure_database_connection
|
43
|
-
return if ActiveRecord::Base.connected?
|
44
|
-
ActiveRecord::Base.establish_connection(database_configuration)
|
45
|
-
end
|
46
|
-
|
47
|
-
def database_configuration
|
48
|
-
# Config either from URL, or with more granular options (the later taking precedence)
|
49
|
-
config = {}
|
50
|
-
uri = URI.parse(PushmiPullyu.options[:database][:url])
|
51
|
-
config[:adapter] = PushmiPullyu.options[:database][:adaptor] || uri.scheme
|
52
|
-
config[:host] = PushmiPullyu.options[:database][:host] || uri.host
|
53
|
-
config[:database] = PushmiPullyu.options[:database][:database] || uri.path.split('/')[1].to_s
|
54
|
-
config[:username] = PushmiPullyu.options[:database][:username] || uri.user
|
55
|
-
config[:password] = PushmiPullyu.options[:database][:password] || uri.password
|
56
|
-
params = CGI.parse(uri.query || '')
|
57
|
-
config[:encoding] = PushmiPullyu.options[:database][:encoding] || params['encoding'].to_a.first
|
58
|
-
config[:pool] = PushmiPullyu.options[:database][:pool] || params['pool'].to_a.first
|
59
|
-
config
|
60
|
-
end
|
61
|
-
|
62
38
|
end
|
data/lib/pushmi_pullyu/cli.rb
CHANGED
@@ -48,6 +48,7 @@ class PushmiPullyu::CLI
|
|
48
48
|
setup_signal_traps
|
49
49
|
|
50
50
|
setup_log
|
51
|
+
setup_db_connection
|
51
52
|
print_banner
|
52
53
|
|
53
54
|
run_tick_loop
|
@@ -169,6 +170,7 @@ class PushmiPullyu::CLI
|
|
169
170
|
|
170
171
|
def run_preservation_cycle
|
171
172
|
item = queue.wait_next_item
|
173
|
+
return unless item.present?
|
172
174
|
|
173
175
|
# add additional information about the error context to errors that occur while processing this item.
|
174
176
|
Rollbar.scoped(noid: item) do
|
@@ -262,4 +264,12 @@ class PushmiPullyu::CLI
|
|
262
264
|
end
|
263
265
|
end
|
264
266
|
|
267
|
+
def setup_db_connection
|
268
|
+
ActiveRecord::Base.establish_connection(database_configuration)
|
269
|
+
end
|
270
|
+
|
271
|
+
def database_configuration
|
272
|
+
PushmiPullyu.options[:database][:url]
|
273
|
+
end
|
274
|
+
|
265
275
|
end
|
data/pushmi_pullyu.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_runtime_dependency 'rdf', '>= 1.99', '< 4.0'
|
33
33
|
spec.add_runtime_dependency 'rdf-n3', '>= 1.99', '< 4.0'
|
34
34
|
spec.add_runtime_dependency 'redis', '>= 3.3', '< 5.0'
|
35
|
-
spec.add_runtime_dependency 'rest-client', '
|
35
|
+
spec.add_runtime_dependency 'rest-client', '>= 1.8', '< 3.0'
|
36
36
|
spec.add_runtime_dependency 'rollbar', '~> 2.14'
|
37
37
|
|
38
38
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
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
|
+
version: 1.0.3
|
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-08-
|
11
|
+
date: 2018-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -204,16 +204,22 @@ dependencies:
|
|
204
204
|
name: rest-client
|
205
205
|
requirement: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
|
-
- - "
|
207
|
+
- - ">="
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '1.8'
|
210
|
+
- - "<"
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '3.0'
|
210
213
|
type: :runtime
|
211
214
|
prerelease: false
|
212
215
|
version_requirements: !ruby/object:Gem::Requirement
|
213
216
|
requirements:
|
214
|
-
- - "
|
217
|
+
- - ">="
|
215
218
|
- !ruby/object:Gem::Version
|
216
219
|
version: '1.8'
|
220
|
+
- - "<"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '3.0'
|
217
223
|
- !ruby/object:Gem::Dependency
|
218
224
|
name: rollbar
|
219
225
|
requirement: !ruby/object:Gem::Requirement
|