fastly 1.9.0 → 1.10.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/lib/fastly.rb +20 -1
- data/lib/fastly/gem_version.rb +1 -1
- data/lib/fastly/papertrail_logging.rb +63 -0
- 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: 2bffdc8c4c5d8b766061b27e27aa386e508c4254
|
4
|
+
data.tar.gz: 2ff6f9559d2f02703002da01c113ad121d47f331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2dc064a48235638f91d5712e50e495b89d1ba0306c7919738ba57707fcc8374ede5e4bdd6ad1018d6935ab39d6b0ebdab9ccf45dda95b47fb68797ed1c0979e
|
7
|
+
data.tar.gz: 674dd39c5d43580c4b5f83a5a5b3a4cd9ae6893073c6756e290414e148f3fd33536d734b809a0342252a21255e7f3958ec62e6eb500b5c084b10967890ae85d1
|
data/lib/fastly.rb
CHANGED
@@ -24,6 +24,7 @@ require 'fastly/healthcheck'
|
|
24
24
|
require 'fastly/gzip'
|
25
25
|
require 'fastly/invoice'
|
26
26
|
require 'fastly/match'
|
27
|
+
require 'fastly/papertrail_logging'
|
27
28
|
require 'fastly/request_setting'
|
28
29
|
require 'fastly/response_object'
|
29
30
|
require 'fastly/service'
|
@@ -144,7 +145,7 @@ class Fastly
|
|
144
145
|
client.get_stats('/stats/regions')
|
145
146
|
end
|
146
147
|
|
147
|
-
[ACL, ACLEntry, User, Customer, Backend, CacheSetting, Condition, Dictionary, DictionaryItem, Director, Domain, Header, Healthcheck, Gzip, Match, RequestSetting, ResponseObject, Service, S3Logging, Syslog, VCL, Version].each do |klass|
|
148
|
+
[ACL, ACLEntry, User, Customer, Backend, CacheSetting, Condition, Dictionary, DictionaryItem, Director, Domain, Header, Healthcheck, Gzip, Match, PapertrailLogging, RequestSetting, ResponseObject, Service, S3Logging, Syslog, VCL, Version].each do |klass|
|
148
149
|
type = Util.class_to_path(klass)
|
149
150
|
|
150
151
|
if klass.respond_to?(:pluralize)
|
@@ -218,6 +219,10 @@ class Fastly
|
|
218
219
|
# :method: create_s3_logging(opts)
|
219
220
|
# opts must contain service_id, version and name params
|
220
221
|
|
222
|
+
##
|
223
|
+
# :method: create_papertrail_logging(opts)
|
224
|
+
# opts must contain service_id, version and name params
|
225
|
+
|
221
226
|
##
|
222
227
|
# :method: create_syslog(opts)
|
223
228
|
# opts must contain service_id, version and name params
|
@@ -298,6 +303,10 @@ class Fastly
|
|
298
303
|
# :method: get_s3_logging(service_id, number, name)
|
299
304
|
# Get a S3 logging
|
300
305
|
|
306
|
+
##
|
307
|
+
# :method: get_papertrail_logging(service_id, number, name)
|
308
|
+
# Get a Papertrail logging stream config
|
309
|
+
|
301
310
|
##
|
302
311
|
# :method: get_syslog(service_id, number, name)
|
303
312
|
# Get a Syslog
|
@@ -403,6 +412,11 @@ class Fastly
|
|
403
412
|
# You can also call
|
404
413
|
# s3_logging.save!
|
405
414
|
|
415
|
+
##
|
416
|
+
# :method: update_papertrail_logging(papertrail_logging)
|
417
|
+
# You can also call
|
418
|
+
# papertrail_logging.save!
|
419
|
+
|
406
420
|
##
|
407
421
|
# :method: update_syslog(syslog)
|
408
422
|
# You can also call
|
@@ -508,6 +522,11 @@ class Fastly
|
|
508
522
|
# You can also call
|
509
523
|
# s3_logging.delete!
|
510
524
|
|
525
|
+
##
|
526
|
+
# :method: delete_papertrail_logging(papertrail_logging)
|
527
|
+
# You can also call
|
528
|
+
# papertrail_logging.delete!
|
529
|
+
|
511
530
|
##
|
512
531
|
# :method: delete_syslog(syslog)
|
513
532
|
# You can also call
|
data/lib/fastly/gem_version.rb
CHANGED
@@ -0,0 +1,63 @@
|
|
1
|
+
class Fastly
|
2
|
+
# A Papertrail endpoint to stream logs to
|
3
|
+
class PapertrailLogging < BelongsToServiceAndVersion
|
4
|
+
attr_accessor :service_id, :name, :address, :port, :hostname, :format, :format_version, :response_condition, :timestamp_format
|
5
|
+
|
6
|
+
##
|
7
|
+
# :attr: service_id
|
8
|
+
#
|
9
|
+
# The id of the service this belongs to.
|
10
|
+
|
11
|
+
##
|
12
|
+
# :attr: version
|
13
|
+
#
|
14
|
+
# The number of the version this belongs to.
|
15
|
+
|
16
|
+
##
|
17
|
+
# :attr: name
|
18
|
+
#
|
19
|
+
# The name for this s3 rule
|
20
|
+
|
21
|
+
##
|
22
|
+
# :attr: address
|
23
|
+
#
|
24
|
+
# Hostname of the papertrail server - located at the top of your Papertrail
|
25
|
+
# Setup e.g. https://papertrailapp.com/account/t destinations
|
26
|
+
|
27
|
+
##
|
28
|
+
# :attr: port
|
29
|
+
#
|
30
|
+
# Port of the Papertrail server from Papertrail account
|
31
|
+
|
32
|
+
##
|
33
|
+
# :attr: hostname
|
34
|
+
#
|
35
|
+
# Source name of the Fastly logs in Papertrail
|
36
|
+
|
37
|
+
##
|
38
|
+
# :attr: format
|
39
|
+
#
|
40
|
+
# Apache style log formatting
|
41
|
+
|
42
|
+
##
|
43
|
+
# :attr: format_version
|
44
|
+
#
|
45
|
+
# The version of the custom logging format used for the configured endpoint.
|
46
|
+
# Can be either 1 (the default, version 1 log format) or 2 (the version 2
|
47
|
+
# log format).
|
48
|
+
|
49
|
+
##
|
50
|
+
# :attr: response_condition
|
51
|
+
#
|
52
|
+
# When to execute the logging. If empty, always execute.
|
53
|
+
|
54
|
+
##
|
55
|
+
# :attr: timestamp_format
|
56
|
+
#
|
57
|
+
# strftime specified timestamp formatting (default "%Y-%m-%dT%H:%M:%S.000").
|
58
|
+
|
59
|
+
def self.path
|
60
|
+
'logging/papertrail'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
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.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Client library for the Fastly acceleration system
|
14
14
|
email:
|
@@ -21,9 +21,9 @@ 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
27
|
- Appraisals
|
28
28
|
- CHANGELOG.md
|
29
29
|
- Gemfile
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/fastly/healthcheck.rb
|
58
58
|
- lib/fastly/invoice.rb
|
59
59
|
- lib/fastly/match.rb
|
60
|
+
- lib/fastly/papertrail_logging.rb
|
60
61
|
- lib/fastly/request_setting.rb
|
61
62
|
- lib/fastly/response_object.rb
|
62
63
|
- lib/fastly/s3_logging.rb
|
@@ -90,17 +91,17 @@ require_paths:
|
|
90
91
|
- lib
|
91
92
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
93
|
requirements:
|
93
|
-
- -
|
94
|
+
- - ">="
|
94
95
|
- !ruby/object:Gem::Version
|
95
96
|
version: '0'
|
96
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
98
|
requirements:
|
98
|
-
- -
|
99
|
+
- - ">="
|
99
100
|
- !ruby/object:Gem::Version
|
100
101
|
version: '0'
|
101
102
|
requirements: []
|
102
103
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.6.8
|
104
105
|
signing_key:
|
105
106
|
specification_version: 4
|
106
107
|
summary: Client library for the Fastly acceleration system
|