smart_proxy_pulp 1.4.0 → 1.4.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f5f0c4ac72c832d23ce7e4c9a9d5822a62ad2cf07f15a2290b7ff7c6ea55e20
|
4
|
+
data.tar.gz: 3bffc2ebcdc3cb52cbc548eb8f5b539ced355efcd38e89a959fa181c642fdd7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fbfc5d6c532d9db90817f12121840da2da4aeda023b65e3b910973456cbfe15ed38f811a460e9ab524e3647a42b77e2314c49f0cecd2008634e13cf98e27295
|
7
|
+
data.tar.gz: d86bd960e4377126a7c60212a5404d6079c5901fdcafc3c68a5b4a10b764b3f7cabd2cee37abf0f10dceedf846e53a79e4892b806fcb6525f1e21bd3c70b7e5d
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'smart_proxy_pulp_plugin/validators/pulp_url_validator'
|
2
2
|
|
3
3
|
module PulpProxy
|
4
4
|
class Pulp3Plugin < ::Proxy::Plugin
|
@@ -8,7 +8,7 @@ module PulpProxy
|
|
8
8
|
:pulp_content_dir => '/var/lib/pulp/content',
|
9
9
|
:mirror => false
|
10
10
|
|
11
|
-
load_validators :url => ::
|
11
|
+
load_validators :url => ::PulpProxy::Validators::PulpUrlValidator
|
12
12
|
validate :pulp_url, :url => true
|
13
13
|
|
14
14
|
expose_setting :pulp_url
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module PulpProxy
|
2
|
+
module Validators
|
3
|
+
class PulpUrlValidator < ::Proxy::PluginValidators::Base
|
4
|
+
def validate!(settings)
|
5
|
+
raise ::Proxy::Error::ConfigurationError, "Setting 'pulp_url' is expected to contain a url for pulp server" if settings[:pulp_url].to_s.empty?
|
6
|
+
URI.parse(settings[:pulp_url])
|
7
|
+
rescue URI::InvalidURIError
|
8
|
+
raise ::Proxy::Error::ConfigurationError.new("Setting 'pulp_url' contains an invalid url for pulp server")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_pulp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitri Dolguikh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/smart_proxy_pulp_plugin/pulp_node_plugin.rb
|
104
104
|
- lib/smart_proxy_pulp_plugin/pulp_plugin.rb
|
105
105
|
- lib/smart_proxy_pulp_plugin/settings.rb
|
106
|
+
- lib/smart_proxy_pulp_plugin/validators/pulp_url_validator.rb
|
106
107
|
- lib/smart_proxy_pulp_plugin/version.rb
|
107
108
|
- settings.d/pulp.yml.example
|
108
109
|
- settings.d/pulp3.yml.example
|