application_insights 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTljZjhhZmU0YjRhZDdkMTlmYWMwODM2ZDUyZWFhZDgyZmQ5Yzk4Ng==
4
+ Nzg1ZmY4ZmVkNGVmNzY4MTY1ZmU5MTgxMmM0NGRmNGJlMGUwZTAxYw==
5
5
  data.tar.gz: !binary |-
6
- OWNkZTZhNmE3ODAyOGE4N2JkYTEwNzA3MzI3ODM3NGZhNjJiMTc4YQ==
6
+ NzY2YjU4OTM1NzAzNGE4ZDk4NzhlZDgwYWI3Y2VmYzMzOGVhOWM0OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGVlMzFlMjE3OTQyNGUyNzY1NWUyNGU5YjljYjY3MmQwN2RiYzNlZTNkMGNm
10
- YWQ0MDNmMjUyZDJmNzM0OGJmMjQzNGY5NzMyYTQ2ZWQxOGY1YWUzNDIxYzVk
11
- ZTQ4YjUwMWYwMWM1NmNmZjRiMzZmMDkyYTc2OTY1NDAyOTBhNjM=
9
+ ZjI2ZTM5MWUyZDViNjFhYzY0MjUzZmQyZTI1YTFhYTE1MjYwYzYxNTA4ZjU3
10
+ MDU2Zjk4NWRhODkzY2IzNTA5NjM1M2Q2Njg0OTkwNjliNDY4YjE0NjQyN2Vi
11
+ ZDg4YzI5ZTg2NjYwZGQyNjUzMzc4NDYxMmYxMGY1OWE0ZGJiYTU=
12
12
  data.tar.gz: !binary |-
13
- OGM0MTAwYmUxZGJkN2VjMjFiNWZmNDIzMmU1NTk4YTAyNDc1MzQxZGNiZDYw
14
- YjhhYWUzNGZmODA1ZWVmNDk3M2NmZjE3YWJmZjUwMmIzOGNkNjg4YzhiMDYz
15
- NmEwOWRmZjkyOTU4MTUyYTg3Y2YyYjFhZWZhZGM5ZWU1Yzk1OWE=
13
+ MDc0MTc2ZTdjODBjY2IzM2NiZGU2MjI1MWIzN2ZkYjdkMWE4NmVmODRlMGYw
14
+ ZGJjYmM5NWQ0MDgzZWM1Nzg4ZDY0ZDFhNzEyMTBmMzdhNGEwNTFlNzhkMmI0
15
+ M2MzNjFlYzU5NDk4OTRiNGIyMDEzZWNjNDU3MTcwMDkwYjZlN2M=
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Application Insights SDK for Ruby #
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/application_insights.svg)](http://badge.fury.io/rb/application_insights)
4
+
3
5
  >Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
4
6
  > -- <cite>[Ruby - Official Site](https://www.ruby-lang.org/en/)</cite>
5
7
 
@@ -28,9 +28,12 @@ module ApplicationInsights
28
28
  request = Net::HTTP::Post.new(uri.path, { 'Accept' => 'application/json', 'Content-Type' => 'application/json; charset=utf-8' })
29
29
  request.body = data_to_send.to_json
30
30
 
31
- response = Net::HTTP.start(uri.hostname, uri.port) do |http|
32
- http.request(request)
31
+ http = Net::HTTP.new uri.hostname, uri.port
32
+ if uri.scheme.downcase == 'https'
33
+ http.use_ssl = true
34
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
33
35
  end
36
+ response = http.request(request)
34
37
 
35
38
  case response
36
39
  when Net::HTTPSuccess, Net::HTTPRedirection, Net::HTTPBadRequest
@@ -5,7 +5,7 @@ module ApplicationInsights
5
5
  # A synchronous sender that works in conjunction with SynchronousQueue.
6
6
  class SynchronousSender < SenderBase
7
7
  # Initializes a new instance of the synchronous sender class.
8
- def initialize(service_endpoint_uri='http://dc.services.visualstudio.com/v2/track')
8
+ def initialize(service_endpoint_uri='https://dc.services.visualstudio.com/v2/track')
9
9
  super service_endpoint_uri
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module ApplicationInsights
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -6,6 +6,6 @@ include ApplicationInsights::Channel
6
6
  class TestSynchronousSender < Test::Unit::TestCase
7
7
  def test_initialize
8
8
  sender = SynchronousSender.new
9
- assert_equal 'http://dc.services.visualstudio.com/v2/track', sender.service_endpoint_uri
9
+ assert_equal 'https://dc.services.visualstudio.com/v2/track', sender.service_endpoint_uri
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: application_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft