changelog_client 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/changelog_client.rb +4 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 232a016ed930c4dcd338b510cca864d3363316d6
4
- data.tar.gz: 643736164435667d915eaa73744ab564164299c2
3
+ metadata.gz: e753572768020c59acb119878612d4e713537cc5
4
+ data.tar.gz: 20311d27d673bf20036a55ddd428a187af5c7085
5
5
  SHA512:
6
- metadata.gz: c1d23f9af2b297c39221db65dd28b45516527f895136df4691a87c698e7065a6edddd5a38614437353f257c76300c8bcd196bdfed313380deb60d63c6ce4f9fb
7
- data.tar.gz: e92d7e7abbfc671b07d0b50e0fb7f10c576ca0294e469b3acc41a65b590684737603000aeea62d57667c2aacb2c1d1a177ebc53b202915cbbae55732b98d3ecd
6
+ metadata.gz: aa954011a705fc9d9c1e16809a706a4c02a2ffc0b653ab19aaec313908d26b10450f3b01b5fab18da33886902165f8fb961b56e5dcc31f70a82ebc6122ca4550
7
+ data.tar.gz: a7e92fb31cad5fe38cfde698012daa89a928d67830f06548eb35d5587f59d3f3bdcd8e87b241fb26f74b920eb86e14e87d3d5636760caa344a0b7dc248a6df8d
@@ -1,6 +1,8 @@
1
1
  require 'json'
2
2
  require 'net/http'
3
+ require 'net/https'
3
4
  require 'uri'
5
+ require 'openssl'
4
6
 
5
7
  SEVERITY = {
6
8
  'INFO' => 1,
@@ -38,6 +40,8 @@ class ChangelogClient
38
40
  # extra_headers: (Hash)
39
41
  def send(message, severity, category = 'misc', extra_headers = nil)
40
42
  http = Net::HTTP.new(@host, server_port)
43
+ server_port == 443 ? http.use_ssl = true : http.use_ssl = false
44
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
41
45
  headers = {
42
46
  'User-Agent' => "ccp/client v.#{Gem.loaded_specs['changelog_client'].version.to_s}",
43
47
  'Content-Type' => 'application/json'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelog_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Papai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-07-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A client library for the Changelog server
14
14
  email: wooh@wooh.hu