smart_proxy_pulp 1.4.0 → 1.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
  SHA256:
3
- metadata.gz: e11236f52109a604b1171429f0d824d2997d1f366af7ddec1c606d3b041cf8ad
4
- data.tar.gz: 4f3d157ba4e93fcabbbc846ecec510235f0010c0dd728560e9e83331a06a624f
3
+ metadata.gz: 0f5f0c4ac72c832d23ce7e4c9a9d5822a62ad2cf07f15a2290b7ff7c6ea55e20
4
+ data.tar.gz: 3bffc2ebcdc3cb52cbc548eb8f5b539ced355efcd38e89a959fa181c642fdd7c
5
5
  SHA512:
6
- metadata.gz: 92005aeed682489ea51bdca541668fca8c2ba453974d99642e13abe1b8e4774b46d2d269c4ec4b37bceb8ff97bdce83b08eeecc9fbeac5508768e2c0da46ea50
7
- data.tar.gz: 95c595b02e6006bfc53fa99d3dce666a9274cfc7b61446f3f51202cd1a23c0c783c4776ef0b24b3f575db17bd34f56995b1d29302ef7608df99f3d0a8baffbbf
6
+ metadata.gz: 8fbfc5d6c532d9db90817f12121840da2da4aeda023b65e3b910973456cbfe15ed38f811a460e9ab524e3647a42b77e2314c49f0cecd2008634e13cf98e27295
7
+ data.tar.gz: d86bd960e4377126a7c60212a5404d6079c5901fdcafc3c68a5b4a10b764b3f7cabd2cee37abf0f10dceedf846e53a79e4892b806fcb6525f1e21bd3c70b7e5d
@@ -1,4 +1,4 @@
1
- require 'puppet_proxy_common/custom_validators'
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 => ::Proxy::Puppet::Validators::UrlValidator
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
@@ -1,3 +1,3 @@
1
1
  module PulpProxy
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  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.0
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-08 00:00:00.000000000 Z
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