rorvswild 0.3.1 → 0.3.3

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: 2090ba967a7c985f4403ac9e01fc364886120dd9
4
- data.tar.gz: 6251252d0727624d67fecb7a680786baac12b89b
3
+ metadata.gz: 4089f1c19f4f0ede67e54c2a121e0bf53b7c18b9
4
+ data.tar.gz: 6aa24cf46356acca98ccf18d3c134bd264388b9e
5
5
  SHA512:
6
- metadata.gz: 711ed99628c2daeddb99b7ca068401e1d266ab655977e39f3f79b6ca9af6e6aa6b8b051addc4e3dcf4eba0c1e6d2a002541bb332422b4102f1056b86d52343c0
7
- data.tar.gz: 269fb5c4c938c7b891d4fb1e4f7c8515f137c3797c1fb83b2c15f981ab68f3f9fb44912ca86eb0f9035dbe6a76be634eb1de6fb5a8d50734236862734b37b0ab
6
+ metadata.gz: 69cba11e603c52438e29863abe9b8cfa65efea0072bbb0638efa8c6ef24b9380064ff34266f8cc7683a9cfd5869ceb48cc5afffebd8b859ed7ee7c48d5effac5
7
+ data.tar.gz: 29738fb05a6a22ffe804113847d81b8f9e172004feedea8b7b5253b7302f5d744846af0ad109b61d8a97d0624b18b2987e6c396cf4eb86191a0ab925b8b6f191
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "0.3.1".freeze
2
+ VERSION = "0.3.3".freeze
3
3
  end
data/lib/rorvswild.rb CHANGED
@@ -54,7 +54,7 @@ module RorVsWild
54
54
  class Client
55
55
  def self.default_config
56
56
  {
57
- api_url: "http://www.rorvswild.com/api",
57
+ api_url: "https://www.rorvswild.com/api",
58
58
  explain_sql_threshold: 500,
59
59
  }
60
60
  end
@@ -314,13 +314,15 @@ module RorVsWild
314
314
 
315
315
  def post(path, data)
316
316
  uri = URI(api_url + path)
317
- Net::HTTP.start(uri.host, uri.port) do |http|
318
- post = Net::HTTP::Post.new(uri.path)
319
- post.content_type = "application/json".freeze
320
- post.basic_auth(app_id, api_key)
321
- post.body = data.to_json
322
- http.request(post)
323
- end
317
+ http = Net::HTTP.new(uri.host, uri.port)
318
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
319
+ http.use_ssl = true
320
+
321
+ post = Net::HTTP::Post.new(uri.path)
322
+ post.content_type = "application/json".freeze
323
+ post.basic_auth(app_id, api_key)
324
+ post.body = data.to_json
325
+ Rails.logger.debug http.request(post).inspect
324
326
  end
325
327
 
326
328
  def filter_sensitive_data(hash)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rorvswild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Bernard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler