skylight 0.10.4 → 0.10.5

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: a76099fda886af0e74d06bed09f512715705be0a
4
- data.tar.gz: 7f926a22b2da10ecc498995ada0ddc5b48d2b510
3
+ metadata.gz: b493d2bd2640af0664051fabec05cb868ff84b95
4
+ data.tar.gz: f5d1f59e9653f75e13d6235c9b0edd2e41316f62
5
5
  SHA512:
6
- metadata.gz: c054668e4feec17241dbbcfbc6ddb1bf8808d7d718f10a1449940c056ecfdb3d26a2ddfe805e0d0c81d880eb949b699f517687e3cf13eda242bba4e287a5a1c0
7
- data.tar.gz: 35516e9b5e0cec82a57d1e04e759787a301123b223c9a00d0ae829d2e116f1a1d85154bd79ed962e2229e92757ed36919d25efe55bea5ac608fc640ea51e6771
6
+ metadata.gz: c9b9b7ab7b673ce41b1e48caa14fd75e4ed89e4761272eed68b3541d1ca70d76e451033f515f748d2ffc5c2e08e68ab41e5bc6166c19b8cd9ac9b75539929a62
7
+ data.tar.gz: 8aba7b9f73bae5cefaf1b7c772c7687bb3a8b0103378c93350aefb111d51600db0af90055c7c5b29908ba8bb213433f243a1775bbfca31ad44cff402d5de8219
@@ -1,3 +1,10 @@
1
+ ## 0.10.5 (June 22, 2016)
2
+
3
+ * [BUGFIX] Fix issue with Grape multi-method naming
4
+ * [BUGFIX] Add http to proxy_url for native fetching
5
+ * [BUGFIX] Fix setting `proxy_url` in config YML
6
+ * [IMPROVEMENT] Log errors during authentication validation
7
+
1
8
  ## 0.10.4 (June 3, 2016)
2
9
 
3
10
  * [BUGFIX] Sinatra instrumenation now works for latest master
@@ -9,7 +16,7 @@
9
16
  * [IMPROVEMENT] Allow Skylight to raise on logged errors, useful for testing and debugging
10
17
  * [IMPROVEMENT] Finish Rack::Responses in Middleware
11
18
  * [IMRPOVEMENT] Better message when config/skylight.yml already exists
12
- * [IMPROVEMENT] Update Rust Agent with SQL improvements
19
+ * [IMPROVEMENT] Update Rust Agent with SQL improvements, including handling for arrays and WITH
13
20
 
14
21
  ## 0.10.3 (February 2, 2016)
15
22
 
@@ -3,6 +3,8 @@ require 'uri'
3
3
  module Skylight
4
4
  # @api private
5
5
  class Api
6
+ include Util::Logging
7
+
6
8
  attr_reader :config, :http
7
9
 
8
10
  class CreateFailed < StandardError
@@ -53,9 +55,11 @@ module Skylight
53
55
  when 400...500
54
56
  :invalid
55
57
  else
58
+ warn res.exception.message if res.exception
56
59
  :unknown
57
60
  end
58
- rescue
61
+ rescue => e
62
+ warn e.message
59
63
  :unknown
60
64
  end
61
65
 
@@ -9,6 +9,7 @@ require 'skylight/util/hostname'
9
9
  require 'skylight/util/logging'
10
10
  require 'skylight/util/platform'
11
11
  require 'skylight/util/ssl'
12
+ require 'skylight/util/proxy'
12
13
 
13
14
  module Skylight
14
15
  class Config
@@ -241,7 +242,10 @@ module Skylight
241
242
 
242
243
  return ret unless env
243
244
 
244
- ret[:proxy_url] = detect_proxy_url(env)
245
+ # Only set if it exists, we don't want to set to a nil value
246
+ if proxy_url = Util::Proxy.detect_url(env)
247
+ ret[:proxy_url] = proxy_url
248
+ end
245
249
 
246
250
  env.each do |k, val|
247
251
  # Support deprecated SK_ key prefix
@@ -263,13 +267,6 @@ module Skylight
263
267
  ret
264
268
  end
265
269
 
266
- def self.detect_proxy_url(env)
267
- if u = env['HTTP_PROXY'] || env['http_proxy']
268
- u = "http://#{u}" unless u =~ %r[://]
269
- u
270
- end
271
- end
272
-
273
270
  # @api private
274
271
  def skip_validation?
275
272
  !!get(:skip_validation)
@@ -12,7 +12,7 @@ module Skylight
12
12
 
13
13
  def get_method(endpoint)
14
14
  method = endpoint.options[:method].first
15
- method << "..." if endpoint.options[:method].length > 1
15
+ method = "#{method}..." if endpoint.options[:method].length > 1
16
16
  method
17
17
  end
18
18
 
@@ -4,6 +4,7 @@ require 'net/http'
4
4
  require 'fileutils'
5
5
  require 'digest/sha2'
6
6
  require 'skylight/util/ssl'
7
+ require 'skylight/util/proxy'
7
8
 
8
9
  # Used from extconf.rb
9
10
  module Skylight
@@ -92,9 +93,9 @@ module Skylight
92
93
  when :success
93
94
  log "successfully downloaded native ext; out=#{out}"
94
95
  return extra
95
- else
96
+ when :redirect
96
97
  log "fetching native ext; uri=#{uri}; redirected=#{res}"
97
- uri = res
98
+ uri = extra
98
99
 
99
100
  next
100
101
  end
@@ -118,7 +119,7 @@ module Skylight
118
119
  end
119
120
 
120
121
  def http_get(host, port, use_ssl, path, out)
121
- if http_proxy = ENV['HTTP_PROXY'] || ENV['http_proxy']
122
+ if http_proxy = Proxy.detect_url(ENV)
122
123
  log "connecting with proxy: #{http_proxy}"
123
124
  uri = URI.parse(http_proxy)
124
125
  p_host, p_port = uri.host, uri.port
@@ -0,0 +1,12 @@
1
+ module Skylight
2
+ module Util
3
+ module Proxy
4
+ def self.detect_url(env)
5
+ if u = env['HTTP_PROXY'] || env['http_proxy']
6
+ u = "http://#{u}" unless u =~ %r[://]
7
+ u
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,4 +1,4 @@
1
1
  module Skylight
2
- VERSION = '0.10.4'
2
+ VERSION = '0.10.5'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skylight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilde, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-03 00:00:00.000000000 Z
11
+ date: 2016-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -113,6 +113,7 @@ files:
113
113
  - lib/skylight/util/multi_io.rb
114
114
  - lib/skylight/util/native_ext_fetcher.rb
115
115
  - lib/skylight/util/platform.rb
116
+ - lib/skylight/util/proxy.rb
116
117
  - lib/skylight/util/ssl.rb
117
118
  - lib/skylight/vendor/active_support/notifications.rb
118
119
  - lib/skylight/vendor/active_support/notifications/fanout.rb