fastly 1.2.3 → 1.3.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/fastly/backend.rb +44 -1
- data/lib/fastly/belongs_to_service_and_version.rb +10 -1
- data/lib/fastly/gem_version.rb +1 -1
- data/lib/fastly/healthcheck.rb +21 -1
- data/lib/fastly/s3_logging.rb +21 -1
- data/lib/fastly/syslog.rb +23 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41770bdcf1d13d916bbc1c33620497ced6259270
|
4
|
+
data.tar.gz: ddf4eb5b4b18d0932ddf340dffe73571ac47f68b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9602cf07f2d1f405f13afb0ea0aca1238722ebf5539b0c1e8079058b487027d541ce29d83f31145fcc4fb3e7c7e40c7e48976eac113265c8149dfa089c92890f
|
7
|
+
data.tar.gz: 529cc34f51929cf9dbb8b876002a79709348427ba57b1e4e698fa7f5d20549d11188b88714c9535b2a83446acf96b58446728de4ec0c99f526c5cd2aacaac9c7
|
data/CHANGELOG.md
ADDED
data/lib/fastly/backend.rb
CHANGED
@@ -2,7 +2,9 @@ class Fastly
|
|
2
2
|
# An individual host you want to serve assets off
|
3
3
|
class Backend < BelongsToServiceAndVersion
|
4
4
|
attr_accessor :service_id, :name, :address, :ipv4, :ipv6, :hostname, :use_ssl, :client_cert, :port,
|
5
|
-
:connect_timeout, :first_byte_timeout, :between_bytes_timeout, :error_threshold, :max_conn, :weight, :comment, :healthcheck, :auto_loadbalance, :request_condition
|
5
|
+
:connect_timeout, :first_byte_timeout, :between_bytes_timeout, :error_threshold, :max_conn, :weight, :comment, :healthcheck, :auto_loadbalance, :request_condition,
|
6
|
+
:ssl_check_cert, :ssl_hostname, :ssl_cert_hostname, :ssl_sni_hostname, :min_tls_version, :max_tls_version, :ssl_ciphers,
|
7
|
+
:shield
|
6
8
|
|
7
9
|
##
|
8
10
|
# :attr: service_id
|
@@ -109,5 +111,46 @@ class Fastly
|
|
109
111
|
# :attr: request_condition
|
110
112
|
#
|
111
113
|
# name of a request_condition to filter the backend on
|
114
|
+
|
115
|
+
##
|
116
|
+
# :attr: ssl_check_cert
|
117
|
+
#
|
118
|
+
# be strict on checking SSL certs.
|
119
|
+
|
120
|
+
##
|
121
|
+
# :attr: ssl_hostname
|
122
|
+
#
|
123
|
+
# used for both SNI during the TLS handshake and to validate the cert.
|
124
|
+
|
125
|
+
##
|
126
|
+
# :attr: ssl_cert_hostname
|
127
|
+
#
|
128
|
+
# overrides ssl_hostname, but only for cert verification. Does not affect SNI at all.
|
129
|
+
|
130
|
+
##
|
131
|
+
# :attr: ssl_sni_hostname
|
132
|
+
#
|
133
|
+
# overrides ssl_hostname, but only for SNI in the handshake. Does not affect cert validation at all.
|
134
|
+
|
135
|
+
##
|
136
|
+
# :attr: min_tls_version
|
137
|
+
#
|
138
|
+
# minimum allowed TLS version on ssl connections to this backend
|
139
|
+
|
140
|
+
##
|
141
|
+
# :attr: max_tls_version
|
142
|
+
#
|
143
|
+
# maximum allowed TLS version on ssl connections to this backend.
|
144
|
+
|
145
|
+
##
|
146
|
+
# :attr: ssl_ciphers
|
147
|
+
#
|
148
|
+
# list of openssl ciphers (see https://www.openssl.org/docs/manmaster/apps/ciphers.html for details)
|
149
|
+
|
150
|
+
##
|
151
|
+
# :attr: shield
|
152
|
+
#
|
153
|
+
# name of a datacenter to shield requests
|
154
|
+
|
112
155
|
end
|
113
156
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
1
3
|
class Fastly
|
2
4
|
# Encapsulates behavior of objects requiring both service and version
|
3
5
|
class BelongsToServiceAndVersion < Base
|
@@ -23,8 +25,15 @@ class Fastly
|
|
23
25
|
super.delete_if { |var| %w(service_id version).include?(var) }
|
24
26
|
end
|
25
27
|
|
28
|
+
# URI escape (including spaces) the path and return it
|
29
|
+
def self.path_escape(path)
|
30
|
+
@uri_parser ||= URI::Parser.new
|
31
|
+
# the leading space in the escape character set is intentional
|
32
|
+
@uri_parser.escape(path, ' !*\'();:@&=+$,/?#[]')
|
33
|
+
end
|
34
|
+
|
26
35
|
def self.get_path(service, version, name, _opts = {})
|
27
|
-
"/service/#{service}/version/#{version}/#{path}/#{name}"
|
36
|
+
"/service/#{service}/version/#{version}/#{path}/#{path_escape(name)}"
|
28
37
|
end
|
29
38
|
|
30
39
|
def self.post_path(opts)
|
data/lib/fastly/gem_version.rb
CHANGED
data/lib/fastly/healthcheck.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Fastly
|
2
2
|
# A way of keeping track of any of your hosts which are down
|
3
3
|
class Healthcheck < BelongsToServiceAndVersion
|
4
|
-
attr_accessor :service_id, :name, :comment, :path, :host, :http_version, :timeout, :window, :threshold
|
4
|
+
attr_accessor :service_id, :name, :comment, :path, :host, :http_version, :timeout, :window, :threshold, :method, :expected_response, :initial, :check_interval
|
5
5
|
|
6
6
|
##
|
7
7
|
# :attr: service_id
|
@@ -61,4 +61,24 @@ class Fastly
|
|
61
61
|
#
|
62
62
|
# How many have to be ok for it work
|
63
63
|
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# :attr: method
|
67
|
+
#
|
68
|
+
# The HTTP method to use: GET, PUT, POST etc.
|
69
|
+
|
70
|
+
##
|
71
|
+
# :attr: expected_response
|
72
|
+
#
|
73
|
+
# The HTTP status to indicate a successful healthcheck (e.g. 200)
|
74
|
+
|
75
|
+
##
|
76
|
+
# :attr: initial
|
77
|
+
#
|
78
|
+
# How many have to be ok for it work the first time
|
79
|
+
|
80
|
+
##
|
81
|
+
# :attr: check_interval
|
82
|
+
#
|
83
|
+
# Time between checks in milliseconds
|
64
84
|
end
|
data/lib/fastly/s3_logging.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Fastly
|
2
2
|
# An s3 endpoint to stream logs to
|
3
3
|
class S3Logging < BelongsToServiceAndVersion
|
4
|
-
attr_accessor :service_id, :name, :bucket_name, :access_key, :secret_key, :path, :period, :gzip_level, :format, :response_condition
|
4
|
+
attr_accessor :service_id, :name, :bucket_name, :access_key, :secret_key, :path, :period, :gzip_level, :format, :response_condition, :timestamp_format, :domain, :redundancy
|
5
5
|
|
6
6
|
##
|
7
7
|
# :attr: service_id
|
@@ -59,6 +59,26 @@ class Fastly
|
|
59
59
|
#
|
60
60
|
# When to execute the s3 logging. If empty, always execute.
|
61
61
|
|
62
|
+
##
|
63
|
+
# :attr: timestamp_format
|
64
|
+
#
|
65
|
+
# strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").
|
66
|
+
|
67
|
+
##
|
68
|
+
# :attr: domain
|
69
|
+
#
|
70
|
+
# The region-specific endpoint for your domain if your AWS S3 bucket was not
|
71
|
+
# set up in the US Standard region. See Amazon's list of supported,
|
72
|
+
# region-specific endpoints for more info.
|
73
|
+
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
74
|
+
|
75
|
+
##
|
76
|
+
# :attr: redundancy
|
77
|
+
#
|
78
|
+
# The S3 redundancy level. Defaults to Standard. See
|
79
|
+
# http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingRRS.html on using reduced
|
80
|
+
# redundancy storage for more information.
|
81
|
+
|
62
82
|
def self.path
|
63
83
|
'logging/s3'
|
64
84
|
end
|
data/lib/fastly/syslog.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Fastly
|
2
2
|
# An endpoint to stream syslogs to
|
3
3
|
class Syslog < BelongsToServiceAndVersion
|
4
|
-
attr_accessor :service_id, :name, :comment, :ipv4, :ipv6, :hostname, :port, :format, :response_conditions
|
4
|
+
attr_accessor :service_id, :name, :comment, :ipv4, :ipv6, :hostname, :port, :token, :format, :response_conditions, :use_tls, :tls_hostname, :tls_ca_cert
|
5
5
|
|
6
6
|
##
|
7
7
|
# :attr: service_id
|
@@ -53,6 +53,11 @@ class Fastly
|
|
53
53
|
#
|
54
54
|
# the port to stream logs to (defaults to 514)
|
55
55
|
|
56
|
+
##
|
57
|
+
# :attr: token
|
58
|
+
#
|
59
|
+
# Whether to prepend each message with a specific token.
|
60
|
+
|
56
61
|
##
|
57
62
|
# :attr: format
|
58
63
|
#
|
@@ -62,5 +67,22 @@ class Fastly
|
|
62
67
|
# :attr: response_condition
|
63
68
|
#
|
64
69
|
# name of a response_condition to filter the log on, if empty it always logs
|
70
|
+
|
71
|
+
##
|
72
|
+
# :attr: use_tls
|
73
|
+
#
|
74
|
+
# Establish a TLS connection when connecting
|
75
|
+
|
76
|
+
##
|
77
|
+
# :attr: tls_hostname
|
78
|
+
#
|
79
|
+
# Hostname used to verify the certificate. It can either be the CN or be in
|
80
|
+
# subAltNames. Not required.
|
81
|
+
|
82
|
+
##
|
83
|
+
# :attr: tls_ca_cert
|
84
|
+
#
|
85
|
+
# Use this pem formatted certificate as the CA cert to verify the syslog
|
86
|
+
# server's certificate
|
65
87
|
end
|
66
88
|
end
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Client library for the Fastly acceleration system
|
14
14
|
email:
|
@@ -21,9 +21,10 @@ executables:
|
|
21
21
|
extensions: []
|
22
22
|
extra_rdoc_files: []
|
23
23
|
files:
|
24
|
-
- .gitignore
|
25
|
-
- .rubocop.yml
|
26
|
-
- .travis.yml
|
24
|
+
- ".gitignore"
|
25
|
+
- ".rubocop.yml"
|
26
|
+
- ".travis.yml"
|
27
|
+
- CHANGELOG.md
|
27
28
|
- Gemfile
|
28
29
|
- HISTORY.md
|
29
30
|
- LICENSE
|
@@ -80,17 +81,17 @@ require_paths:
|
|
80
81
|
- lib
|
81
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
83
|
requirements:
|
83
|
-
- -
|
84
|
+
- - ">="
|
84
85
|
- !ruby/object:Gem::Version
|
85
86
|
version: '0'
|
86
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
88
|
requirements:
|
88
|
-
- -
|
89
|
+
- - ">="
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '0'
|
91
92
|
requirements: []
|
92
93
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.5.1
|
94
95
|
signing_key:
|
95
96
|
specification_version: 4
|
96
97
|
summary: Client library for the Fastly acceleration system
|