hot_catch 0.1.6.4 → 0.1.6.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
  SHA256:
3
- metadata.gz: 134f070491935128d4ef465bdfb1c4ef83aae1d67669e974523aa7129f9f3c4e
4
- data.tar.gz: 4930b5307f1599e91e453446a08980931fdad63eeb877c751bb6793c6ec3580e
3
+ metadata.gz: bbfee917472dc467699e577ce68ab9fb7b0cc7cdae38fe822f0681eb722ee176
4
+ data.tar.gz: f6c6778062d2d8712c9b5c5305774363aa3f7665b480bb21d02fe2838e880290
5
5
  SHA512:
6
- metadata.gz: b0763e5e34523e7bce5228c83426a086599632e34caf16cd1fefa274401a5cb12a9676b565c17fcb5ef1dbd6418f8e43d4a21de19768e8546e8c3cd0c7408eed
7
- data.tar.gz: 67a1308e75cc9b967f2649d824f235ac6052697de25655b1f0a2c8d2dda4e47e8331f40c76daefba122f9644685d52ae90d014eadbee45b96bb8d8c9bc891a7e
6
+ metadata.gz: 4db091215d06224ddda9e3ecd09eeaa1c6602676909d8ab45b0b050a8c2a4e9be78bc4f28c733ba538119342b0b7fff17086df8904907ead977f61d380dbc6b6
7
+ data.tar.gz: 767ab0a8ccbdc90c129b174498ecce4c32f22697ff9ba407e82d83ffd5e2abeb3d2483c5c2c5285d1ebcc0f5d04cd6f970bc522073ef9ad9cb9124e27273c27d
@@ -55,7 +55,7 @@ def get_nginx_logs(from_time_file = 'tmp/hot_catch_from_time.txt', input_file =
55
55
  puts ind
56
56
  logs = ind ? logs[0..ind] : ""
57
57
  File.open(from_time_file, 'w'){|file| file.write now}
58
- logs.join("")
58
+ logs = logs.join("")
59
59
  end
60
60
  logs
61
61
  end
@@ -1,3 +1,3 @@
1
1
  module HotCatch
2
- VERSION = '0.1.6.4'
2
+ VERSION = '0.1.6.8'
3
3
  end
data/lib/hot_catch.rb CHANGED
@@ -92,13 +92,15 @@ module HotCatch
92
92
  req.body = hash_json.to_json
93
93
  req['Content-Type'] = 'application/json'
94
94
  response = https(uri).request(req)
95
- JSON.parse(response.body).inspect
95
+ JSON.parse(response.body).inspect if response.body.present?
96
96
  end
97
97
 
98
98
  def https(uri)
99
99
  Net::HTTP.new(uri.host, uri.port).tap do |http|
100
- # http.use_ssl = true
101
- # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
100
+ if uri.to_s =~ /^https/
101
+ http.use_ssl = true
102
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
103
+ end
102
104
  end
103
105
  end
104
106
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot_catch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.4
4
+ version: 0.1.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davhot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-20 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq