erorr 0.2.1 → 0.2.2

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: c17e038d7ca5d2eee0fa585557d5cc6db9a2d445573ddc9db6ff9fc6926edf92
4
- data.tar.gz: a42c51528ddd8dd301a27083c61887bb3b1c235b398fb6dd1011ffc38a86c6d1
3
+ metadata.gz: 7cb405bc653a681b7390352189f883b9461524cff45b695e705acc9d20099696
4
+ data.tar.gz: 1a2f7c6706caa2468ca3ea72bdcbb0f44f3e332532356cbf7338dfaddf68cdde
5
5
  SHA512:
6
- metadata.gz: dd20dbb4d023599c710d7da8468a8562398d0f69caf2d2bd991bb0cbe8921541f9af11217401e74ecf611a2173482f5726886a4cb54922f32fc39d7d32870e90
7
- data.tar.gz: af33e2e23461565ad976733b6bec3c174311f96803a3db84eb821e94d20a192410c5342063ec3a3ebc5e1968103c185b56b222d5e8dd480a29f8cdff66d7c814
6
+ metadata.gz: 0ebfb0cc428b0d70dbf4fd92ab921b412fe627c4ed6772937f08fd43c11b4b390ec293980bcf1db5ba55ee971ac7f9e22c361b91a045461fe690d452b78a4612
7
+ data.tar.gz: b5ef9ec0e50d6eb6e7a2f6be7e8554d70eedfa6ed7f7c614491aeec3aab647d9ac9dbc8ec0e85cde11271c6f9c12bf95c0dcfb2c672df9ae8d2a15ca7a910adc
@@ -1,4 +1,5 @@
1
1
  require 'net/http'
2
+ require 'net/https'
2
3
  require 'uri'
3
4
  require 'concurrent'
4
5
 
@@ -22,16 +23,16 @@ module Erorr
22
23
  end
23
24
 
24
25
  def deliver(params)
25
- puts 'Delivering shit...'
26
26
  self.class.thread_pool.post do
27
- puts 'Sending stuff'
28
27
  uri = URI("#{@api_url}/faults")
29
- request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
30
- request.body = {fault: params, api_key: @api_key}.to_json
31
- response = Net::HTTP.start(uri.hostname, uri.port) do |http|
32
- http.request request
28
+ post = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
29
+ post.body = {fault: params, api_key: @api_key}.to_json
30
+
31
+ request = Net::HTTP.new(uri.hostname, uri.port)
32
+ request.use_ssl = true
33
+ response = request.start do |http|
34
+ http.request post
33
35
  end
34
- puts "Response: #{response.inspect}"
35
36
  end
36
37
  end
37
38
  end
data/lib/erorr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Erorr
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erorr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georgi Mitrev