copperegg-alerts 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -18
- data/lib/copperegg/alerts.rb +2 -2
- data/lib/copperegg/version.rb +1 -1
- metadata +31 -54
- data/.gitignore +0 -4
- data/Gemfile +0 -4
- data/Rakefile +0 -9
- data/copperegg-alerts.gemspec +0 -30
- data/spec/alert_spec.rb +0 -85
- data/spec/client_spec.rb +0 -32
- data/spec/fixtures/vcr_cassettes/4xx.yml +0 -34
- data/spec/fixtures/vcr_cassettes/schedule_create.yml +0 -138
- data/spec/fixtures/vcr_cassettes/schedule_modify.yml +0 -48
- data/spec/fixtures/vcr_cassettes/schedule_reset.yml +0 -132
- data/spec/fixtures/vcr_cassettes/schedule_reset_with_error.yml +0 -122
- data/spec/fixtures/vcr_cassettes/schedules.yml +0 -52
- data/spec/spec_helper.rb +0 -16
- data/tasks/rspec.rake +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 816960ed7460c46475a51a7f02127252e5038906
|
4
|
+
data.tar.gz: 33ac93c9ce9660e720887cc027e85a864426175a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7931be5fd60473b9b7ae3cdadd23167014e0a820c7b63086143b4c6243230940a07180e8009880e98517b95f2953f81ecac27d3a90431925304f6389c9bdfaaf
|
7
|
+
data.tar.gz: 1aa75144163430d2ddc2ccdf6d8497e55b781264db0b0db9367165390996f64d526a0b261c4ae40a9658c8d58ed8d7105d6620090c2f29f1d3ad7322ce55a917
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copperegg::Alerts
|
1
|
+
# Copperegg::Alerts [![Build Status](https://travis-ci.org/cargomedia/copperegg-alerts.png)](https://travis-ci.org/cargomedia/copperegg-alerts)
|
2
2
|
|
3
3
|
Minimalistic API client to manipulate [Copperegg's alert schedules](http://dev.copperegg.com/alerts/schedules.html) aka Maintenance Mode
|
4
4
|
|
@@ -8,22 +8,25 @@ Add this line to your application's Gemfile:
|
|
8
8
|
|
9
9
|
gem 'copperegg-alerts'
|
10
10
|
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install copperegg-alerts
|
18
|
-
|
19
11
|
## Usage
|
20
12
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
require 'copperegg'
|
14
|
+
|
15
|
+
# Set up client
|
16
|
+
|
17
|
+
Copperegg::Client.instance.auth_setup(API_KEY)
|
18
|
+
alerts = Copperegg::Alerts.new
|
19
|
+
|
20
|
+
# Create a new alert schedule (maintenance mode)
|
21
|
+
#
|
22
|
+
# Arguments:
|
23
|
+
# title - A name for the alert schedule
|
24
|
+
# [<arg1>[..<argN>] - Any argument from 'The Alert Schedule Hash'
|
25
|
+
# see http://dev.copperegg.com/alerts/schedules.html
|
26
|
+
|
27
|
+
alerts.create_schedule('spec_test',
|
28
|
+
'match' => {'tag' => ['foo', 'foo-bar']},
|
29
|
+
'state' => 'enabled',
|
30
|
+
'duration' => 7,
|
31
|
+
'start_time' => '2014-09-14T10:21:40Z'
|
32
|
+
)
|
data/lib/copperegg/alerts.rb
CHANGED
@@ -10,7 +10,7 @@ module Copperegg
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def set_schedule(name, tags = {})
|
13
|
-
|
13
|
+
delete_schedules(name)
|
14
14
|
create_schedule(name, tags)
|
15
15
|
end
|
16
16
|
|
@@ -44,7 +44,7 @@ module Copperegg
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
47
|
+
def delete_schedules(name)
|
48
48
|
selected_schedules = @schedules.select { |h| h['name'] == name }
|
49
49
|
if selected_schedules
|
50
50
|
@schedules -= selected_schedules
|
data/lib/copperegg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copperegg-alerts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
@@ -9,36 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 0.13.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 0.13.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: deep_merge
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 1.0.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 1.0.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,98 +57,84 @@ dependencies:
|
|
57
57
|
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 10.3.2
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 10.3.2
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rspec
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - "
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: 3.1.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - "
|
81
|
+
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
83
|
+
version: 3.1.0
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: webmock
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - "
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 1.18.0
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: 1.18.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: vcr
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
104
|
+
version: 2.9.3
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
111
|
+
version: 2.9.3
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: hashdiff
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: 0.2.1
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 0.2.1
|
126
126
|
description: Set and remove alert silencing schedules aka maintenance windows
|
127
127
|
email: hello@cargomedia.ch
|
128
128
|
executables: []
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
-
- ".gitignore"
|
133
|
-
- Gemfile
|
134
132
|
- LICENSE
|
135
133
|
- README.md
|
136
|
-
- Rakefile
|
137
|
-
- copperegg-alerts.gemspec
|
138
134
|
- lib/copperegg.rb
|
139
135
|
- lib/copperegg/alerts.rb
|
140
136
|
- lib/copperegg/client.rb
|
141
137
|
- lib/copperegg/version.rb
|
142
|
-
- spec/alert_spec.rb
|
143
|
-
- spec/client_spec.rb
|
144
|
-
- spec/fixtures/vcr_cassettes/4xx.yml
|
145
|
-
- spec/fixtures/vcr_cassettes/schedule_create.yml
|
146
|
-
- spec/fixtures/vcr_cassettes/schedule_modify.yml
|
147
|
-
- spec/fixtures/vcr_cassettes/schedule_reset.yml
|
148
|
-
- spec/fixtures/vcr_cassettes/schedule_reset_with_error.yml
|
149
|
-
- spec/fixtures/vcr_cassettes/schedules.yml
|
150
|
-
- spec/spec_helper.rb
|
151
|
-
- tasks/rspec.rake
|
152
138
|
homepage: https://github.com/cargomedia/copperegg-alerts
|
153
139
|
licenses:
|
154
140
|
- MIT
|
@@ -173,13 +159,4 @@ rubygems_version: 2.4.1
|
|
173
159
|
signing_key:
|
174
160
|
specification_version: 4
|
175
161
|
summary: A very minimalistic Copperegg API client for managing alert schedules
|
176
|
-
test_files:
|
177
|
-
- spec/alert_spec.rb
|
178
|
-
- spec/client_spec.rb
|
179
|
-
- spec/fixtures/vcr_cassettes/4xx.yml
|
180
|
-
- spec/fixtures/vcr_cassettes/schedule_create.yml
|
181
|
-
- spec/fixtures/vcr_cassettes/schedule_modify.yml
|
182
|
-
- spec/fixtures/vcr_cassettes/schedule_reset.yml
|
183
|
-
- spec/fixtures/vcr_cassettes/schedule_reset_with_error.yml
|
184
|
-
- spec/fixtures/vcr_cassettes/schedules.yml
|
185
|
-
- spec/spec_helper.rb
|
162
|
+
test_files: []
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/copperegg-alerts.gemspec
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'copperegg/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "copperegg-alerts"
|
8
|
-
spec.version = Copperegg::VERSION
|
9
|
-
spec.authors = ['Cargo Media', 'ppp0']
|
10
|
-
spec.email = 'hello@cargomedia.ch'
|
11
|
-
spec.summary = 'A very minimalistic Copperegg API client for managing alert schedules'
|
12
|
-
spec.description = 'Set and remove alert silencing schedules aka maintenance windows'
|
13
|
-
spec.homepage = 'https://github.com/cargomedia/copperegg-alerts'
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_runtime_dependency 'httparty'
|
22
|
-
spec.add_runtime_dependency 'deep_merge'
|
23
|
-
|
24
|
-
spec.add_development_dependency 'bundler', '~> 1.6'
|
25
|
-
spec.add_development_dependency 'rake'
|
26
|
-
spec.add_development_dependency 'rspec'
|
27
|
-
spec.add_development_dependency 'webmock'
|
28
|
-
spec.add_development_dependency 'vcr'
|
29
|
-
spec.add_development_dependency 'hashdiff'
|
30
|
-
end
|
data/spec/alert_spec.rb
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'copperegg'
|
3
|
-
require 'webmock/rspec'
|
4
|
-
require 'pp'
|
5
|
-
require 'hashdiff'
|
6
|
-
|
7
|
-
describe Copperegg::Alerts do
|
8
|
-
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
|
12
|
-
@client = Copperegg::Client.instance.auth_setup(Copperegg::Test::API_KEY)
|
13
|
-
VCR.use_cassette('schedules', :record => :once, :match_requests_on => [:method, :path]) do
|
14
|
-
@alerts = Copperegg::Alerts.new
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
describe '#new' do
|
20
|
-
it 'requests a list of all schedules' do
|
21
|
-
expect(@alerts.schedules.size > 0).to be(true)
|
22
|
-
expect(WebMock).to have_requested(:get, /\/alerts\/schedules\.json$/).once
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
describe 'create schedule' do
|
27
|
-
it 'creates three new schedules with name "spec_test"' do
|
28
|
-
alerts_schedules_list_size_before = @alerts.schedules.size
|
29
|
-
VCR.use_cassette('schedule_create', :record => :once, :match_requests_on => [:body_as_json], :allow_playback_repeats => true) do
|
30
|
-
3.times { @alerts.create_schedule('spec_test', 'match' => {'tag' => ['foo']}, 'state' => 'disabled', 'duration' => 7, 'start_time' => '2014-09-14T10:21:40Z') }
|
31
|
-
end
|
32
|
-
expect(@alerts.schedules.size - alerts_schedules_list_size_before).to eq(3)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe 'reset_schedules("spec_test")' do
|
37
|
-
before :each do
|
38
|
-
VCR.use_cassette('schedule_create', :record => :once, :match_requests_on => [:body_as_json], :allow_playback_repeats => true) do
|
39
|
-
3.times { @alerts.create_schedule('spec_test', 'match' => {'tag' => ['foo']}, 'state' => 'disabled', 'duration' => 7, 'start_time' => '2014-09-14T10:21:40Z') }
|
40
|
-
end
|
41
|
-
expect(WebMock).to have_requested(:post, /\/alerts\/schedules\.json$/).times(3)
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'removes all schedules with name "spec_test" from the list if any' do
|
45
|
-
alerts_schedules_list_size_before = @alerts.schedules.size
|
46
|
-
VCR.use_cassette('schedule_reset', :record => :once, :match_requests_on => [:method, :path]) do
|
47
|
-
@alerts.reset_schedules('spec_test')
|
48
|
-
end
|
49
|
-
expect(alerts_schedules_list_size_before - @alerts.schedules.size).to eq(3)
|
50
|
-
expect(WebMock).to have_requested(:delete, /.*alerts\/schedules\/\d+\.json$/).times(3)
|
51
|
-
end
|
52
|
-
|
53
|
-
it 'deletes schedules from the instance list variable only if api call was successful' do
|
54
|
-
alerts_schedules_list_size_before = @alerts.schedules.size
|
55
|
-
VCR.use_cassette('schedule_reset_with_error', :record => :once, :match_requests_on => [:method, :path]) do
|
56
|
-
@alerts.reset_schedules('spec_test')
|
57
|
-
end
|
58
|
-
expect(alerts_schedules_list_size_before - @alerts.schedules.size).to eq(2)
|
59
|
-
expect(WebMock).to have_requested(:delete, /.*alerts\/schedules\/\d+\.json$/).times(3)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
describe 'modify schedule' do
|
65
|
-
before :each do
|
66
|
-
VCR.use_cassette('schedule_create', :record => :once, :match_requests_on => [:body_as_json], :allow_playback_repeats => true) do
|
67
|
-
@alerts.create_schedule('spec_test', 'match' => {'tag' => ['foo']}, 'state' => 'disabled', 'duration' => 7, 'start_time' => '2014-09-14T10:21:40Z')
|
68
|
-
end
|
69
|
-
expect(WebMock).to have_requested(:post, /\/alerts\/schedules\.json$/).once
|
70
|
-
end
|
71
|
-
|
72
|
-
it 'modifies a schedule with name "spec_test"' do
|
73
|
-
schedule_name='spec_test'
|
74
|
-
alert_schedule_before = @alerts.schedules.select { |schedule| schedule['name'] == schedule_name }
|
75
|
-
VCR.use_cassette('schedule_modify', :record => :once, :match_requests_on => [:body_as_json], :allow_playback_repeats => true) do
|
76
|
-
@alerts.modify_schedule(schedule_name, {'duration' => 33, 'state' => 'enabled'})
|
77
|
-
end
|
78
|
-
alert_schedule_after = @alerts.schedules.select { |schedule| schedule['name'] == schedule_name }
|
79
|
-
diff = HashDiff.diff(alert_schedule_before.first, alert_schedule_after.first)
|
80
|
-
expect(diff).to eq([['~', 'duration', 7, 33], ['~', 'state', 'disabled', 'enabled' ]])
|
81
|
-
expect(WebMock).to have_requested(:put, /.*alerts\/schedules\/\d+\.json$/).once
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
end
|
data/spec/client_spec.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'copperegg'
|
3
|
-
|
4
|
-
describe Copperegg::Client do
|
5
|
-
|
6
|
-
before :each do
|
7
|
-
@client = Copperegg::Client.instance.auth_setup(Copperegg::Test::API_KEY)
|
8
|
-
end
|
9
|
-
|
10
|
-
describe 'Client' do
|
11
|
-
|
12
|
-
it 'is an instance of Copperegg::Client' do
|
13
|
-
expect(@client) === Copperegg::Client
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'has set the base_uri' do
|
17
|
-
expect(@api_base_uri) == 'https://api.copperegg.com/v2'
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'has set the auth hash' do
|
21
|
-
expect(@auth) == {:basic_auth => {:username => Copperegg::Test::API_KEY, :password => 'U'}}
|
22
|
-
end
|
23
|
-
|
24
|
-
%w(get post put delete).each do |verb|
|
25
|
-
it "returns nil on wrong #{verb}" do
|
26
|
-
VCR.use_cassette('4xx', :record => :once, :match_requests_on => [:path], :allow_playback_repeats => true) do
|
27
|
-
expect(@client.send(verb + '?', 'veryWrong', {} )).to eq(nil)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://foo:U@api.copperegg.com/v2/veryWrong
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 400
|
13
|
-
message: Bad Request
|
14
|
-
headers:
|
15
|
-
Date:
|
16
|
-
- Mon, 15 Sep 2014 10:53:28 CDT
|
17
|
-
Server:
|
18
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
19
|
-
Status:
|
20
|
-
- 400 Bad Request
|
21
|
-
X-Powered-By:
|
22
|
-
- Phusion Passenger 4.0.2
|
23
|
-
X-Runtime:
|
24
|
-
- '0.003397'
|
25
|
-
Transfer-Encoding:
|
26
|
-
- chunked
|
27
|
-
Connection:
|
28
|
-
- keep-alive
|
29
|
-
body:
|
30
|
-
encoding: UTF-8
|
31
|
-
string: '{"error":true,"error_type":"message","message":"invalid route: /v2/veryWrong"}'
|
32
|
-
http_version:
|
33
|
-
recorded_at: Mon, 15 Sep 2014 15:53:28 GMT
|
34
|
-
recorded_with: VCR 2.9.3
|
@@ -1,138 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules.json
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"name":"spec_test","state":"disabled","duration":7,"start_time":"2014-09-14T10:21:40Z","match":{"tag":["foo"]}}'
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- application/json
|
12
|
-
response:
|
13
|
-
status:
|
14
|
-
code: 200
|
15
|
-
message: OK
|
16
|
-
headers:
|
17
|
-
Access-Control-Allow-Origin:
|
18
|
-
- "*"
|
19
|
-
Cache-Control:
|
20
|
-
- max-age=0, private, must-revalidate
|
21
|
-
Content-Type:
|
22
|
-
- application/json; charset=utf-8
|
23
|
-
Date:
|
24
|
-
- Sun, 14 Sep 2014 05:21:45 CDT
|
25
|
-
Etag:
|
26
|
-
- '"cf6a6d6c2b8b2d2c3fd23de31e3f63f3"'
|
27
|
-
Server:
|
28
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
29
|
-
Status:
|
30
|
-
- 200 OK
|
31
|
-
X-Ce-Now:
|
32
|
-
- '1410690105'
|
33
|
-
X-Powered-By:
|
34
|
-
- Phusion Passenger 4.0.2
|
35
|
-
X-Runtime:
|
36
|
-
- '0.148460'
|
37
|
-
X-Ua-Compatible:
|
38
|
-
- IE=Edge,chrome=1
|
39
|
-
Transfer-Encoding:
|
40
|
-
- chunked
|
41
|
-
Connection:
|
42
|
-
- keep-alive
|
43
|
-
body:
|
44
|
-
encoding: UTF-8
|
45
|
-
string: '{"id":1284,"name":"spec_test","start_time":"2014-09-14T10:21:40Z","end_time":"2014-09-14T10:28:40Z","duration":7,"state":"disabled","match":{"tag":["foo"]},"match_exclude":{},"recurring":false}'
|
46
|
-
http_version:
|
47
|
-
recorded_at: Sun, 14 Sep 2014 10:21:45 GMT
|
48
|
-
- request:
|
49
|
-
method: post
|
50
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules.json
|
51
|
-
body:
|
52
|
-
encoding: UTF-8
|
53
|
-
string: '{"name":"spec_test","state":"disabled","duration":7,"start_time":"2014-09-14T10:21:40Z","match":{"tag":["foo"]}}'
|
54
|
-
headers:
|
55
|
-
Content-Type:
|
56
|
-
- application/json
|
57
|
-
response:
|
58
|
-
status:
|
59
|
-
code: 200
|
60
|
-
message: OK
|
61
|
-
headers:
|
62
|
-
Access-Control-Allow-Origin:
|
63
|
-
- "*"
|
64
|
-
Cache-Control:
|
65
|
-
- max-age=0, private, must-revalidate
|
66
|
-
Content-Type:
|
67
|
-
- application/json; charset=utf-8
|
68
|
-
Date:
|
69
|
-
- Sun, 14 Sep 2014 05:21:46 CDT
|
70
|
-
Etag:
|
71
|
-
- '"55c9edd9e0005127f6dd7037dda97f00"'
|
72
|
-
Server:
|
73
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
74
|
-
Status:
|
75
|
-
- 200 OK
|
76
|
-
X-Ce-Now:
|
77
|
-
- '1410690106'
|
78
|
-
X-Powered-By:
|
79
|
-
- Phusion Passenger 4.0.2
|
80
|
-
X-Runtime:
|
81
|
-
- '0.060226'
|
82
|
-
X-Ua-Compatible:
|
83
|
-
- IE=Edge,chrome=1
|
84
|
-
Transfer-Encoding:
|
85
|
-
- chunked
|
86
|
-
Connection:
|
87
|
-
- keep-alive
|
88
|
-
body:
|
89
|
-
encoding: UTF-8
|
90
|
-
string: '{"id":1285,"name":"spec_test","start_time":"2014-09-14T10:21:45Z","end_time":"2014-09-14T10:28:45Z","duration":7,"state":"disabled","match":{"tag":["foo"]},"match_exclude":{},"recurring":false}'
|
91
|
-
http_version:
|
92
|
-
recorded_at: Sun, 14 Sep 2014 10:21:46 GMT
|
93
|
-
- request:
|
94
|
-
method: post
|
95
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules.json
|
96
|
-
body:
|
97
|
-
encoding: UTF-8
|
98
|
-
string: '{"name":"spec_test","state":"disabled","duration":7,"start_time":"2014-09-14T10:21:40Z","match":{"tag":["foo"]}}'
|
99
|
-
headers:
|
100
|
-
Content-Type:
|
101
|
-
- application/json
|
102
|
-
response:
|
103
|
-
status:
|
104
|
-
code: 200
|
105
|
-
message: OK
|
106
|
-
headers:
|
107
|
-
Access-Control-Allow-Origin:
|
108
|
-
- "*"
|
109
|
-
Cache-Control:
|
110
|
-
- max-age=0, private, must-revalidate
|
111
|
-
Content-Type:
|
112
|
-
- application/json; charset=utf-8
|
113
|
-
Date:
|
114
|
-
- Sun, 14 Sep 2014 05:21:46 CDT
|
115
|
-
Etag:
|
116
|
-
- '"68f3d83eb36e2c9173e077a57bc774cd"'
|
117
|
-
Server:
|
118
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
119
|
-
Status:
|
120
|
-
- 200 OK
|
121
|
-
X-Ce-Now:
|
122
|
-
- '1410690106'
|
123
|
-
X-Powered-By:
|
124
|
-
- Phusion Passenger 4.0.2
|
125
|
-
X-Runtime:
|
126
|
-
- '0.029386'
|
127
|
-
X-Ua-Compatible:
|
128
|
-
- IE=Edge,chrome=1
|
129
|
-
Content-Length:
|
130
|
-
- '193'
|
131
|
-
Connection:
|
132
|
-
- keep-alive
|
133
|
-
body:
|
134
|
-
encoding: UTF-8
|
135
|
-
string: '{"id":1286,"name":"spec_test","start_time":"2014-09-14T10:21:46Z","end_time":"2014-09-14T10:28:46Z","duration":7,"state":"disabled","match":{"tag":["foo"]},"match_exclude":{},"recurring":false}'
|
136
|
-
http_version:
|
137
|
-
recorded_at: Sun, 14 Sep 2014 10:21:46 GMT
|
138
|
-
recorded_with: VCR 2.9.3
|
@@ -1,48 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: put
|
5
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/1284.json
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"duration":33,"state":"enabled"}'
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- application/json
|
12
|
-
response:
|
13
|
-
status:
|
14
|
-
code: 200
|
15
|
-
message: OK
|
16
|
-
headers:
|
17
|
-
Access-Control-Allow-Origin:
|
18
|
-
- "*"
|
19
|
-
Cache-Control:
|
20
|
-
- max-age=0, private, must-revalidate
|
21
|
-
Content-Type:
|
22
|
-
- application/json; charset=utf-8
|
23
|
-
Date:
|
24
|
-
- Sun, 14 Sep 2014 05:21:45 CDT
|
25
|
-
Etag:
|
26
|
-
- '"cf6a6d6c2b8b2d2c3fd23de31e3f63f3"'
|
27
|
-
Server:
|
28
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
29
|
-
Status:
|
30
|
-
- 200 OK
|
31
|
-
X-Ce-Now:
|
32
|
-
- '1410690105'
|
33
|
-
X-Powered-By:
|
34
|
-
- Phusion Passenger 4.0.2
|
35
|
-
X-Runtime:
|
36
|
-
- '0.148460'
|
37
|
-
X-Ua-Compatible:
|
38
|
-
- IE=Edge,chrome=1
|
39
|
-
Transfer-Encoding:
|
40
|
-
- chunked
|
41
|
-
Connection:
|
42
|
-
- keep-alive
|
43
|
-
body:
|
44
|
-
encoding: UTF-8
|
45
|
-
string: '{"id":1284,"name":"spec_test","start_time":"2014-09-14T10:21:40Z","end_time":"2014-09-14T10:28:40Z","duration":33,"state":"enabled","match":{"tag":["foo"]},"match_exclude":{},"recurring":false}'
|
46
|
-
http_version:
|
47
|
-
recorded_at: Sun, 14 Sep 2014 10:21:45 GMT
|
48
|
-
recorded_with: VCR 2.9.3
|
@@ -1,132 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: delete
|
5
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules/1284.json
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
Access-Control-Allow-Origin:
|
16
|
-
- "*"
|
17
|
-
Cache-Control:
|
18
|
-
- max-age=0, private, must-revalidate
|
19
|
-
Content-Type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
Date:
|
22
|
-
- Sun, 14 Sep 2014 05:26:02 CDT
|
23
|
-
Etag:
|
24
|
-
- '"99914b932bd37a50b983c5e7c90ae93b"'
|
25
|
-
Server:
|
26
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
27
|
-
Status:
|
28
|
-
- 200 OK
|
29
|
-
X-Ce-Now:
|
30
|
-
- '1410690362'
|
31
|
-
X-Powered-By:
|
32
|
-
- Phusion Passenger 4.0.2
|
33
|
-
X-Runtime:
|
34
|
-
- '0.116250'
|
35
|
-
X-Ua-Compatible:
|
36
|
-
- IE=Edge,chrome=1
|
37
|
-
Transfer-Encoding:
|
38
|
-
- chunked
|
39
|
-
Connection:
|
40
|
-
- keep-alive
|
41
|
-
body:
|
42
|
-
encoding: UTF-8
|
43
|
-
string: "{}"
|
44
|
-
http_version:
|
45
|
-
recorded_at: Sun, 14 Sep 2014 10:26:02 GMT
|
46
|
-
- request:
|
47
|
-
method: delete
|
48
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules/1285.json
|
49
|
-
body:
|
50
|
-
encoding: US-ASCII
|
51
|
-
string: ''
|
52
|
-
headers: {}
|
53
|
-
response:
|
54
|
-
status:
|
55
|
-
code: 200
|
56
|
-
message: OK
|
57
|
-
headers:
|
58
|
-
Access-Control-Allow-Origin:
|
59
|
-
- "*"
|
60
|
-
Cache-Control:
|
61
|
-
- max-age=0, private, must-revalidate
|
62
|
-
Content-Type:
|
63
|
-
- application/json; charset=utf-8
|
64
|
-
Date:
|
65
|
-
- Sun, 14 Sep 2014 05:26:03 CDT
|
66
|
-
Etag:
|
67
|
-
- '"99914b932bd37a50b983c5e7c90ae93b"'
|
68
|
-
Server:
|
69
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
70
|
-
Status:
|
71
|
-
- 200 OK
|
72
|
-
X-Ce-Now:
|
73
|
-
- '1410690363'
|
74
|
-
X-Powered-By:
|
75
|
-
- Phusion Passenger 4.0.2
|
76
|
-
X-Runtime:
|
77
|
-
- '0.035337'
|
78
|
-
X-Ua-Compatible:
|
79
|
-
- IE=Edge,chrome=1
|
80
|
-
Content-Length:
|
81
|
-
- '2'
|
82
|
-
Connection:
|
83
|
-
- keep-alive
|
84
|
-
body:
|
85
|
-
encoding: UTF-8
|
86
|
-
string: "{}"
|
87
|
-
http_version:
|
88
|
-
recorded_at: Sun, 14 Sep 2014 10:26:03 GMT
|
89
|
-
- request:
|
90
|
-
method: delete
|
91
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules/1286.json
|
92
|
-
body:
|
93
|
-
encoding: US-ASCII
|
94
|
-
string: ''
|
95
|
-
headers: {}
|
96
|
-
response:
|
97
|
-
status:
|
98
|
-
code: 200
|
99
|
-
message: OK
|
100
|
-
headers:
|
101
|
-
Access-Control-Allow-Origin:
|
102
|
-
- "*"
|
103
|
-
Cache-Control:
|
104
|
-
- max-age=0, private, must-revalidate
|
105
|
-
Content-Type:
|
106
|
-
- application/json; charset=utf-8
|
107
|
-
Date:
|
108
|
-
- Sun, 14 Sep 2014 05:26:03 CDT
|
109
|
-
Etag:
|
110
|
-
- '"99914b932bd37a50b983c5e7c90ae93b"'
|
111
|
-
Server:
|
112
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
113
|
-
Status:
|
114
|
-
- 200 OK
|
115
|
-
X-Ce-Now:
|
116
|
-
- '1410690363'
|
117
|
-
X-Powered-By:
|
118
|
-
- Phusion Passenger 4.0.2
|
119
|
-
X-Runtime:
|
120
|
-
- '0.024569'
|
121
|
-
X-Ua-Compatible:
|
122
|
-
- IE=Edge,chrome=1
|
123
|
-
Content-Length:
|
124
|
-
- '2'
|
125
|
-
Connection:
|
126
|
-
- keep-alive
|
127
|
-
body:
|
128
|
-
encoding: UTF-8
|
129
|
-
string: "{}"
|
130
|
-
http_version:
|
131
|
-
recorded_at: Sun, 14 Sep 2014 10:26:03 GMT
|
132
|
-
recorded_with: VCR 2.9.3
|
@@ -1,122 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: delete
|
5
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules/1284.json
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
Access-Control-Allow-Origin:
|
16
|
-
- "*"
|
17
|
-
Cache-Control:
|
18
|
-
- max-age=0, private, must-revalidate
|
19
|
-
Content-Type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
Date:
|
22
|
-
- Sun, 14 Sep 2014 05:26:02 CDT
|
23
|
-
Etag:
|
24
|
-
- '"99914b932bd37a50b983c5e7c90ae93b"'
|
25
|
-
Server:
|
26
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
27
|
-
Status:
|
28
|
-
- 200 OK
|
29
|
-
X-Ce-Now:
|
30
|
-
- '1410690362'
|
31
|
-
X-Powered-By:
|
32
|
-
- Phusion Passenger 4.0.2
|
33
|
-
X-Runtime:
|
34
|
-
- '0.116250'
|
35
|
-
X-Ua-Compatible:
|
36
|
-
- IE=Edge,chrome=1
|
37
|
-
Transfer-Encoding:
|
38
|
-
- chunked
|
39
|
-
Connection:
|
40
|
-
- keep-alive
|
41
|
-
body:
|
42
|
-
encoding: UTF-8
|
43
|
-
string: "{}"
|
44
|
-
http_version:
|
45
|
-
recorded_at: Sun, 14 Sep 2014 10:26:02 GMT
|
46
|
-
- request:
|
47
|
-
method: delete
|
48
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules/1285.json
|
49
|
-
body:
|
50
|
-
encoding: US-ASCII
|
51
|
-
string: ''
|
52
|
-
headers: {}
|
53
|
-
response:
|
54
|
-
status:
|
55
|
-
code: 200
|
56
|
-
message: OK
|
57
|
-
headers:
|
58
|
-
Access-Control-Allow-Origin:
|
59
|
-
- "*"
|
60
|
-
Cache-Control:
|
61
|
-
- max-age=0, private, must-revalidate
|
62
|
-
Content-Type:
|
63
|
-
- application/json; charset=utf-8
|
64
|
-
Date:
|
65
|
-
- Sun, 14 Sep 2014 05:26:03 CDT
|
66
|
-
Etag:
|
67
|
-
- '"99914b932bd37a50b983c5e7c90ae93b"'
|
68
|
-
Server:
|
69
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
70
|
-
Status:
|
71
|
-
- 200 OK
|
72
|
-
X-Ce-Now:
|
73
|
-
- '1410690363'
|
74
|
-
X-Powered-By:
|
75
|
-
- Phusion Passenger 4.0.2
|
76
|
-
X-Runtime:
|
77
|
-
- '0.035337'
|
78
|
-
X-Ua-Compatible:
|
79
|
-
- IE=Edge,chrome=1
|
80
|
-
Content-Length:
|
81
|
-
- '2'
|
82
|
-
Connection:
|
83
|
-
- keep-alive
|
84
|
-
body:
|
85
|
-
encoding: UTF-8
|
86
|
-
string: "{}"
|
87
|
-
http_version:
|
88
|
-
recorded_at: Sun, 14 Sep 2014 10:26:03 GMT
|
89
|
-
- request:
|
90
|
-
method: delete
|
91
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules/1286.json
|
92
|
-
body:
|
93
|
-
encoding: US-ASCII
|
94
|
-
string: ''
|
95
|
-
headers: {}
|
96
|
-
response:
|
97
|
-
status:
|
98
|
-
code: 500
|
99
|
-
message: Internal Server Error
|
100
|
-
headers:
|
101
|
-
Date:
|
102
|
-
- Tue, 16 Sep 2014 07:32:17 CDT
|
103
|
-
Server:
|
104
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
105
|
-
Status:
|
106
|
-
- 500 Internal Server Error
|
107
|
-
X-Powered-By:
|
108
|
-
- Phusion Passenger 4.0.2
|
109
|
-
X-Runtime:
|
110
|
-
- '0.017949'
|
111
|
-
Transfer-Encoding:
|
112
|
-
- chunked
|
113
|
-
Connection:
|
114
|
-
- keep-alive
|
115
|
-
body:
|
116
|
-
encoding: UTF-8
|
117
|
-
string: '{"error":true,"error_type":"message","message":"internal error: Couldn''t
|
118
|
-
find MaintenanceSchedule with ID=1286 [WHERE (`maintenance_schedules`.site_id
|
119
|
-
= 15310)]. Please report this to support@copperegg.com"}'
|
120
|
-
http_version:
|
121
|
-
recorded_at: Tue, 16 Sep 2014 12:32:17 GMT
|
122
|
-
recorded_with: VCR 2.9.3
|
@@ -1,52 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://foo:U@api.copperegg.com/v2/alerts/schedules.json
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers: {}
|
10
|
-
response:
|
11
|
-
status:
|
12
|
-
code: 200
|
13
|
-
message: OK
|
14
|
-
headers:
|
15
|
-
Access-Control-Allow-Origin:
|
16
|
-
- "*"
|
17
|
-
Cache-Control:
|
18
|
-
- max-age=0, private, must-revalidate
|
19
|
-
Content-Type:
|
20
|
-
- application/json; charset=utf-8
|
21
|
-
Date:
|
22
|
-
- Sun, 14 Sep 2014 05:24:44 CDT
|
23
|
-
Etag:
|
24
|
-
- '"d93c69f8ab9a5078a9f9c593386a2db9"'
|
25
|
-
Server:
|
26
|
-
- nginx/1.2.8 + Phusion Passenger 4.0.2
|
27
|
-
Status:
|
28
|
-
- 200 OK
|
29
|
-
X-Ce-Now:
|
30
|
-
- '1410690284'
|
31
|
-
X-Powered-By:
|
32
|
-
- Phusion Passenger 4.0.2
|
33
|
-
X-Runtime:
|
34
|
-
- '0.027304'
|
35
|
-
X-Ua-Compatible:
|
36
|
-
- IE=Edge,chrome=1
|
37
|
-
Transfer-Encoding:
|
38
|
-
- chunked
|
39
|
-
Connection:
|
40
|
-
- keep-alive
|
41
|
-
body:
|
42
|
-
encoding: UTF-8
|
43
|
-
string: '[{"id":445,"name":"swapping stream servers","start_time":"2014-02-25T19:50:54Z","end_time":"2014-02-25T20:00:54Z","duration":10,"state":"disabled","match":{"tag":["softlayer"]},"match_exclude":{},"recurring":false},{"id":448,"name":"backup1
|
44
|
-
upgrade","start_time":"2014-02-26T18:54:56Z","end_time":"2014-02-26T19:04:56Z","duration":10,"state":"disabled","match":{"tag":["hetzner"]},"match_exclude":{},"recurring":false},{"id":453,"name":"expected
|
45
|
-
downtime","start_time":"2014-07-30T10:33:33Z","end_time":"2014-07-30T11:03:33Z","duration":30,"state":"disabled","match":{},"match_exclude":{},"recurring":false},{"id":768,"name":"mysql
|
46
|
-
load (data copy etc)","start_time":"2014-07-10T10:06:51Z","end_time":"2014-07-10T11:06:51Z","duration":60,"state":"disabled","match":{"tag":["softlayer--vlan1850--db4","softlayer--vlan1850--db5"]},"match_exclude":{},"recurring":false},{"id":805,"name":"db5
|
47
|
-
disk replacement","start_time":"2014-07-04T15:34:02Z","end_time":"2014-07-04T20:34:02Z","duration":300,"state":"disabled","match":{"tag":["softlayer--vlan1850--db5"]},"match_exclude":{},"recurring":false},{"id":1021,"name":"cluster
|
48
|
-
investigation","start_time":"2014-07-30T17:32:23Z","end_time":"2014-07-30T18:32:23Z","duration":60,"state":"disabled","match":{"tag":["softlayer--mongodb"]},"match_exclude":{},"recurring":false},{"id":1233,"name":"sk
|
49
|
-
release","start_time":"2014-09-08T09:52:11Z","end_time":"2014-09-08T10:07:11Z","duration":15,"state":"disabled","match":{"tag":["softlayer"]},"match_exclude":{},"recurring":false}]'
|
50
|
-
http_version:
|
51
|
-
recorded_at: Sun, 14 Sep 2014 10:24:44 GMT
|
52
|
-
recorded_with: VCR 2.9.3
|
data/spec/spec_helper.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'copperegg'
|
2
|
-
require 'webmock'
|
3
|
-
require 'vcr'
|
4
|
-
|
5
|
-
module Copperegg
|
6
|
-
module Test
|
7
|
-
API_KEY = 'foo'
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
VCR.configure do |c|
|
12
|
-
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
13
|
-
c.hook_into :webmock
|
14
|
-
end
|
15
|
-
|
16
|
-
WebMock.enable!
|