lrc_handler 0.1.1 → 0.1.2

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: ed4c990eec40815a569581b7c97c4103112ce000
4
- data.tar.gz: 3ccbf7b506982ff35c727f1483917ce71bfc73c4
3
+ metadata.gz: 737fa2ad6b5b97e3cd79363e0e7429b575b37e78
4
+ data.tar.gz: ddeaf8c06ae83ec8313d2292b002942034e0ab2c
5
5
  SHA512:
6
- metadata.gz: 3c75690e336158ede21ab0725bffa7bcea8a7a45b34f1df4f13631b2faa54ef8ca665c4d91d7d92b7ec20b9b6a979c80f9443f65f9e7051e0b809affd64fbb91
7
- data.tar.gz: 02c8dccd2ab9cce845df8b5d67e6775cb6543b13ceac20dd7249aad7b432cce867ef3ec45d1fa586fa2c87d9e1afd37187b220c5b6bb9257f81f0546b514c0db
6
+ metadata.gz: bb97900a9be6dd451700827e9abe744bbd8631ccf497d8562b3fdd10a7c7a4c5fe2d0df0e3e688fef13a4dc7e1e985445dbde3d669072dbb19398a177129b821
7
+ data.tar.gz: 7ef8f62349e2974de5b079636d7cc48098d5cf196fc787b6e923219a71b41de49602cd0baa065b8debe0c1ba2225137d9e6f6b3ba8ae6c0005fbd9361b7ff985
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # changelog
2
2
 
3
+ ## v 0.1.2
4
+
5
+ - fix HTTPS capability
6
+
3
7
  ## v 0.1.1
4
8
 
5
9
  - fix gem specifications
data/LICENSE.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Copyright (c) LINKBYNET 2017
2
+
2
3
  based on chef_handler_foreman gem package (Copyright (c) 2013 Marek Hulan)
3
4
 
4
5
  MIT License
data/README.md CHANGED
@@ -11,7 +11,7 @@ Since it's released as a gem you can simply run this command under root
11
11
  chef gem install lrc_handler
12
12
  ```
13
13
 
14
- ## Usage:
14
+ ## Usage
15
15
 
16
16
  In /etc/chef/client.rb:
17
17
 
@@ -19,7 +19,7 @@ In /etc/chef/client.rb:
19
19
  # this adds new functions to chef configuration
20
20
  require 'lrc_handler'
21
21
  # here you can specify your connection options
22
- lrc_server_options :url => 'http://your.server/report'
22
+ lrc_server_options :url => 'https://lrc.lbn.fr'
23
23
  # add following line if you want to upload reports
24
24
  lrc_reports_upload true
25
25
  # add following line to manage reports verbosity. Allowed values are debug, notice and error
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
@@ -12,12 +12,15 @@ module ChefHandlerLrc
12
12
  def lrc_request(path, body, method = 'post')
13
13
  uri = URI.parse(options[:url])
14
14
  http = Net::HTTP.new(uri.host, uri.port)
15
+ http.use_ssl = true
16
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
15
17
  req = Net::HTTP.const_get(method.capitalize).new("#{uri}#{path}")
16
- req.add_field('Accept', 'application/json')
17
- req.add_field('Content-Type', 'application/json')
18
+ req.add_field('Accept','application/json')
19
+ req.add_field('Content-Type','application/json')
18
20
  req.body = body.to_json
19
21
  response = http.request(req)
20
- Chef::Log.info("The report API has return: #{response}")
22
+ Chef::Log.info("The report API has return: #{response.inspect} from #{uri}#{path}")
23
+ Chef::Log.debug("Report Content: #{body.to_json}")
21
24
  end
22
25
  end
23
26
  end
@@ -1,3 +1,3 @@
1
1
  module ChefHandlerLrc
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lrc_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - team-chef
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-04 00:00:00.000000000 Z
11
+ date: 2017-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler