smart_proxy_chef 0.1.7 → 0.1.8
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba7ac48c06fec7733e47f6ee326e4832f1a0aeed
|
|
4
|
+
data.tar.gz: d63b9f03d18889953c05cf904f93cd62c3535ec9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1db01e97e6b3c1b96550b5521e595a5de4be163ca1c992421e86e133b3bb61a1fccd0d5e6058a937a3b0685b557858dc555a8f53091bf80be8841c1ecae701e
|
|
7
|
+
data.tar.gz: 5c8735a45ecc99937bc9d5899711f9bfd0a23d5eacadad5a29d89a28cd9a310ea805aa0a84a4d8874fd394c268686fda5f225353844d80dd1289dcc436e13153
|
|
@@ -6,15 +6,18 @@ module ChefPlugin
|
|
|
6
6
|
::Sinatra::Base.register Authentication
|
|
7
7
|
|
|
8
8
|
class ForemanApi < ::Sinatra::Base
|
|
9
|
+
class BadRequest < StandardError; end
|
|
10
|
+
class Unauthorized < StandardError; end
|
|
11
|
+
|
|
9
12
|
helpers ::Proxy::Helpers
|
|
10
13
|
authenticate_with_chef_signature
|
|
11
14
|
|
|
12
|
-
error
|
|
13
|
-
log_halt(400, "Bad request
|
|
15
|
+
error BadRequest do
|
|
16
|
+
log_halt(400, "Bad request: " + env['sinatra.error'].message )
|
|
14
17
|
end
|
|
15
18
|
|
|
16
|
-
error
|
|
17
|
-
log_halt(401, "Unauthorized
|
|
19
|
+
error Unauthorized do
|
|
20
|
+
log_halt(401, "Unauthorized: " + env['sinatra.error'].message )
|
|
18
21
|
end
|
|
19
22
|
|
|
20
23
|
post "/hosts/facts" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_proxy_chef
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marek Hulan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|