fastly 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/gemfiles/ruby_1.9.gemfile +1 -0
- data/lib/fastly/client.rb +13 -12
- data/lib/fastly/gem_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07ab59c8a33988a1cdba00d6e6e62fcedd7a2809
|
4
|
+
data.tar.gz: d221e2543260cc4c304c56f83279611e46292e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e9b68fbf8853932a05b2cecdfbd7a43915040d4e32e2ee35425875cb117efc4dff2fd9ed82254eb8d805d9aa38ba619fb022e5536c634b214a06dee60f46f7f
|
7
|
+
data.tar.gz: 2df93cc60a1f698386dc1a0ea2590d7fb2060d4136386fe10ae8356e81a4378bc58517b51b34ab82c2049519ea6f2a33a6d5ae6ac60bbf137b77c13376b44c9d
|
data/README.md
CHANGED
@@ -182,6 +182,16 @@ fastly-ruby has not been audited for thread-safety. If you are performing
|
|
182
182
|
actions that require multiple threads (such as performing many purges) we
|
183
183
|
recommend you use the API directly.
|
184
184
|
|
185
|
+
### Debugging notes
|
186
|
+
|
187
|
+
You can pass a `:debug` argument to the initializer. This will output verbose HTTP logs for all API interactions. For example, the following will print logs to STDERR:
|
188
|
+
|
189
|
+
```
|
190
|
+
client = Fastly.new(debug: STDERR, api_key: 'YOUR_API_KEY')
|
191
|
+
```
|
192
|
+
|
193
|
+
This option should not be used in a production setting as all HTTP headers, request parameters, and bodies will be logged, which may include sensitive information.
|
194
|
+
|
185
195
|
## Contributing
|
186
196
|
|
187
197
|
1. Fork it
|
data/gemfiles/ruby_1.9.gemfile
CHANGED
data/lib/fastly/client.rb
CHANGED
@@ -18,18 +18,19 @@ class Fastly
|
|
18
18
|
@customer = opts.fetch(:customer, nil)
|
19
19
|
@oldpurge = opts.fetch(:use_old_purge_method, false)
|
20
20
|
|
21
|
-
base
|
22
|
-
uri
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
base = opts.fetch(:base_url, DEFAULT_URL)
|
22
|
+
uri = URI.parse(base)
|
23
|
+
|
24
|
+
@http = Net::HTTP.new(uri.host, uri.port, :ENV, nil, nil, nil)
|
25
|
+
|
26
|
+
# handle TLS connections outside of development
|
27
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
28
|
+
@http.use_ssl = uri.scheme.downcase == 'https'
|
29
|
+
|
30
|
+
# debug http interactions if specified
|
31
|
+
@http.set_debug_output(opts[:debug]) if opts[:debug]
|
32
|
+
|
33
|
+
@http.start
|
33
34
|
|
34
35
|
return self unless fully_authed?
|
35
36
|
|
data/lib/fastly/gem_version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Client library for the Fastly acceleration system
|
14
14
|
email:
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.5.
|
103
|
+
rubygems_version: 2.5.2
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Client library for the Fastly acceleration system
|