fastly 3.0.1 → 3.0.2
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 +8 -0
- data/Gemfile +1 -0
- data/lib/fastly.rb +28 -1
- data/lib/fastly/client.rb +1 -1
- data/lib/fastly/gem_version.rb +1 -1
- data/test/fastly/sumologic_logging_test.rb +44 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a8a72b52675780f42dfcb7638e5992d1cbda77b4e1b826d73c2230404efbad8
|
4
|
+
data.tar.gz: '0878ef856b74957ea849a2337234e107d81bca5f7865e7ad5ce7d4e325b671f8'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1d289d047370ea5933e0d3dbd510f7253395e4c2b0bbb047972d9dd12323c0c73efbc221351ad7681815e98c4353ce2892d9bb9e9f04a2d9fc3a1dbe007cc07
|
7
|
+
data.tar.gz: 4c2493a600ad80631d598bee61ef773550149b14d8f1685ea55925ef997ef96669990748c5e935d61983d73267cef19ae78176c857b046faf9794db007dae859
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v3.0.2](https://github.com/fastly/fastly-ruby/tree/v3.0.2) (2021-06-30)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/fastly/fastly-ruby/compare/v3.0.1...v3.0.2)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Fix SumoLogic Logging [\#180](https://github.com/fastly/fastly-ruby/pull/180) ([integralist](https://github.com/integralist))
|
10
|
+
|
3
11
|
## [v3.0.1](https://github.com/fastly/fastly-ruby/tree/v3.0.1) (2021-02-03)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/fastly/fastly-ruby/compare/v3.0.0...v3.0.1)
|
data/Gemfile
CHANGED
data/lib/fastly.rb
CHANGED
@@ -152,7 +152,34 @@ class Fastly
|
|
152
152
|
client.get_stats('/stats/regions')
|
153
153
|
end
|
154
154
|
|
155
|
-
[
|
155
|
+
[
|
156
|
+
ACL,
|
157
|
+
ACLEntry,
|
158
|
+
Backend,
|
159
|
+
CacheSetting,
|
160
|
+
Condition,
|
161
|
+
Customer,
|
162
|
+
Dictionary,
|
163
|
+
DictionaryItem,
|
164
|
+
Director,
|
165
|
+
Domain,
|
166
|
+
Gzip,
|
167
|
+
Header,
|
168
|
+
Healthcheck,
|
169
|
+
Match,
|
170
|
+
PapertrailLogging,
|
171
|
+
RequestSetting,
|
172
|
+
ResponseObject,
|
173
|
+
S3Logging,
|
174
|
+
Service,
|
175
|
+
Snippet,
|
176
|
+
SumologicLogging,
|
177
|
+
Syslog,
|
178
|
+
Token,
|
179
|
+
User,
|
180
|
+
VCL,
|
181
|
+
Version,
|
182
|
+
].each do |klass|
|
156
183
|
type = Util.class_to_path(klass)
|
157
184
|
|
158
185
|
if klass.respond_to?(:pluralize)
|
data/lib/fastly/client.rb
CHANGED
data/lib/fastly/gem_version.rb
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
describe Fastly::SumologicLogging do
|
4
|
+
let(:client) { Fastly.new(api_key: 'notasecrettestkey', user: 'test@example.com', password: 'password') }
|
5
|
+
let(:service_id) { SecureRandom.hex(6) }
|
6
|
+
let(:version) { 1 }
|
7
|
+
let(:sumo) { Fastly::SumologicLogging.new({ name: 'test_syslog', service_id: service_id, version: 1 }, client) }
|
8
|
+
|
9
|
+
before do
|
10
|
+
stub_request(:post, "#{Fastly::Client::DEFAULT_URL}/login").to_return(body: '{}', status: 200)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#list' do
|
14
|
+
it 'lists sumologic endpoints' do
|
15
|
+
response_body = JSON.dump(
|
16
|
+
[
|
17
|
+
{
|
18
|
+
'created_at' => '2020-07-15T19:34:48Z',
|
19
|
+
'format_version' => '2',
|
20
|
+
'message_type' => 'blank',
|
21
|
+
'placement' => 'none',
|
22
|
+
'response_condition' => '',
|
23
|
+
'deleted_at' => nil,
|
24
|
+
'version' => '74',
|
25
|
+
'url' => 'https://endpoint1.collection.us2.sumologic.com/stuff',
|
26
|
+
'updated_at' => '2021-06-15T21:56:35Z',
|
27
|
+
'format' => 'fake',
|
28
|
+
'name' => 'Sumo Logic',
|
29
|
+
'service_id' => service_id
|
30
|
+
}
|
31
|
+
]
|
32
|
+
)
|
33
|
+
|
34
|
+
list_url = "#{Fastly::Client::DEFAULT_URL}/service/#{service_id}/version/#{version}/#{Fastly::SumologicLogging.path}"
|
35
|
+
stub_request(:get, list_url).to_return(body: response_body, status: 200)
|
36
|
+
|
37
|
+
get_service_url = "#{Fastly::Client::DEFAULT_URL}/service/#{service_id}/version/#{version}"
|
38
|
+
stub_request(:get, get_service_url).to_return(status: 200, body: '{}', headers: {})
|
39
|
+
|
40
|
+
sumos = client.list_sumologic_loggings(service_id: service_id, version: version)
|
41
|
+
assert_equal sumos.map {|s| [s.name, s.format]}, [['Sumo Logic', 'fake']]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
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: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastly
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Client library for the Fastly acceleration system
|
14
14
|
email:
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- test/fastly/client_test.rb
|
84
84
|
- test/fastly/customer_test.rb
|
85
85
|
- test/fastly/dictionary_test.rb
|
86
|
+
- test/fastly/sumologic_logging_test.rb
|
86
87
|
- test/fastly/syslog_test.rb
|
87
88
|
- test/fastly/token_test.rb
|
88
89
|
- test/fastly/util_test.rb
|
@@ -96,7 +97,7 @@ homepage: http://github.com/fastly/fastly-ruby
|
|
96
97
|
licenses:
|
97
98
|
- MIT
|
98
99
|
metadata: {}
|
99
|
-
post_install_message:
|
100
|
+
post_install_message:
|
100
101
|
rdoc_options: []
|
101
102
|
require_paths:
|
102
103
|
- lib
|
@@ -111,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
112
|
- !ruby/object:Gem::Version
|
112
113
|
version: '0'
|
113
114
|
requirements: []
|
114
|
-
rubygems_version: 3.0.
|
115
|
-
signing_key:
|
115
|
+
rubygems_version: 3.0.8
|
116
|
+
signing_key:
|
116
117
|
specification_version: 4
|
117
118
|
summary: Client library for the Fastly acceleration system
|
118
119
|
test_files:
|
@@ -124,6 +125,7 @@ test_files:
|
|
124
125
|
- test/fastly/client_test.rb
|
125
126
|
- test/fastly/customer_test.rb
|
126
127
|
- test/fastly/dictionary_test.rb
|
128
|
+
- test/fastly/sumologic_logging_test.rb
|
127
129
|
- test/fastly/syslog_test.rb
|
128
130
|
- test/fastly/token_test.rb
|
129
131
|
- test/fastly/util_test.rb
|