smart_proxy_chef 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/smart_proxy_chef_plugin/foreman_api.rb +3 -2
- data/lib/smart_proxy_chef_plugin/request.rb +17 -0
- data/lib/smart_proxy_chef_plugin/version.rb +1 -1
- metadata +12 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60cbcd3c7f2f6b07c15075e4ff11fe4d459eb3f6
|
4
|
+
data.tar.gz: 4a5c918d6b8011624bbfee11b7202abfd9d604da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c570decfdf962366522f8cd4df87d1a696de4402860e4e8e9693c6e2c50039fd201283fb181217bb8f140419507d8dddcb0d670eede57c0a04a2fc0a931bb324
|
7
|
+
data.tar.gz: 0cd3e8992e2bbbd7a2486b452b46985fe40349a0ad838bafc1f29952047a0c135b6d03a4b1cbb3e82d72e24f61ffcb99d6588a1973afc80987974cc47c42764e
|
data/Gemfile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'proxy/request'
|
2
|
+
require 'smart_proxy_chef_plugin/request'
|
2
3
|
require 'smart_proxy_chef_plugin/authentication'
|
3
4
|
|
4
5
|
module ChefPlugin
|
@@ -18,13 +19,13 @@ module ChefPlugin
|
|
18
19
|
|
19
20
|
post "/hosts/facts" do
|
20
21
|
logger.debug 'facts upload request received'
|
21
|
-
foreman_response =
|
22
|
+
foreman_response = ChefPlugin::HttpRequest::Facts.new.post_facts(get_content)
|
22
23
|
log_result(foreman_response)
|
23
24
|
end
|
24
25
|
|
25
26
|
post "/reports" do
|
26
27
|
logger.debug 'report upload request received'
|
27
|
-
foreman_response =
|
28
|
+
foreman_response = ChefPlugin::HttpRequest::Reports.new.post_report(get_content)
|
28
29
|
log_result(foreman_response)
|
29
30
|
end
|
30
31
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'proxy/request'
|
2
|
+
|
3
|
+
module ChefPlugin
|
4
|
+
module HttpRequest
|
5
|
+
class Facts < ::Proxy::HttpRequest::ForemanRequest
|
6
|
+
def post_facts(facts)
|
7
|
+
send_request(request_factory.create_post('api/hosts/facts', facts))
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class Reports < ::Proxy::HttpRequest::ForemanRequest
|
12
|
+
def post_report(report)
|
13
|
+
send_request(request_factory.create_post('api/reports', report))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: test-unit
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,19 +116,20 @@ executables: []
|
|
130
116
|
extensions: []
|
131
117
|
extra_rdoc_files: []
|
132
118
|
files:
|
119
|
+
- Gemfile
|
120
|
+
- LICENSE
|
133
121
|
- bundler.d/chef.rb
|
134
|
-
- lib/
|
135
|
-
- lib/smart_proxy_chef_plugin/chef_api.rb
|
136
|
-
- lib/smart_proxy_chef_plugin/foreman_api.rb
|
137
|
-
- lib/smart_proxy_chef_plugin/connection_helper.rb
|
138
|
-
- lib/smart_proxy_chef_plugin/chef_resource_api.rb
|
122
|
+
- lib/smart_proxy_chef.rb
|
139
123
|
- lib/smart_proxy_chef_plugin/authentication.rb
|
124
|
+
- lib/smart_proxy_chef_plugin/chef_api.rb
|
140
125
|
- lib/smart_proxy_chef_plugin/chef_plugin.rb
|
126
|
+
- lib/smart_proxy_chef_plugin/chef_resource_api.rb
|
127
|
+
- lib/smart_proxy_chef_plugin/connection_helper.rb
|
128
|
+
- lib/smart_proxy_chef_plugin/foreman_api.rb
|
129
|
+
- lib/smart_proxy_chef_plugin/http_config.ru
|
130
|
+
- lib/smart_proxy_chef_plugin/request.rb
|
141
131
|
- lib/smart_proxy_chef_plugin/version.rb
|
142
|
-
- lib/smart_proxy_chef.rb
|
143
132
|
- settings.d/chef.yml.example
|
144
|
-
- LICENSE
|
145
|
-
- Gemfile
|
146
133
|
homepage: https://github.com/theforeman/smart_proxy_chef
|
147
134
|
licenses:
|
148
135
|
- GPLv3
|
@@ -163,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
150
|
version: '0'
|
164
151
|
requirements: []
|
165
152
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.4.6
|
167
154
|
signing_key:
|
168
155
|
specification_version: 4
|
169
156
|
summary: Chef support for Foreman Smart-Proxy
|