toxiproxy 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c94b91428b8f1e4b982ae184a2e022748eb7902
4
- data.tar.gz: abe80ecccc2bb359a74f2614403316741a208c72
3
+ metadata.gz: dd7714ade2b3e653fabba43c36dc025fd36a6377
4
+ data.tar.gz: bc0fa5de828b70a14da8797ce672245bfd91c760
5
5
  SHA512:
6
- metadata.gz: 84344059667bddf413e3521cb7cdd35ee99fdda1e9d80f50311ce5916dc5dfcf8117420fe7b89451df799905d731f8d7b67193bc8c83106871a274e830a5316b
7
- data.tar.gz: bb9a1bec25d40ae9062823a72fd92b4a4e21ec9ffd869e9bbc0a6d3439324addaeeae0b29d59caeed7c9dde0cf8f7e0fd87bf6736c31f178edca510a2285885a
6
+ metadata.gz: 0247200fb5ee43f9d46d3a73af053ba4b5bddd5ce238eec0d8cc6e32415363f14c6053abafc52b42d46bddc51ff0f6c74d0a0b4a86261e43c58ffc44d8f62ffe
7
+ data.tar.gz: c08a860ae38e8e375478df95d891b351614bf766dca25d582a076f8a55b871a1b2630d5cbe2678555f2a9b17d532ec8dcdb4cf22fafff57dd30b3d12a07eb67e
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash -e
2
2
 
3
- VERSION='v2.0.0'
3
+ VERSION='v2.1.0'
4
4
  TOXIPROXY_LOG_DIR=${CIRCLE_ARTIFACTS:-'/tmp'}
5
5
 
6
6
  if [[ "$OSTYPE" == "linux"* ]]; then
@@ -31,6 +31,8 @@ class Toxiproxy
31
31
  # Re-enables all proxies and disables all toxics.
32
32
  def self.reset
33
33
  request = Net::HTTP::Post.new("/reset")
34
+ request["Content-Type"] = "application/json"
35
+
34
36
  response = http_request(request)
35
37
  assert_response(response)
36
38
  self
@@ -144,6 +146,7 @@ class Toxiproxy
144
146
  # Disables a Toxiproxy. This will drop all active connections and stop the proxy from listening.
145
147
  def disable
146
148
  request = Net::HTTP::Post.new("/proxies/#{name}")
149
+ request["Content-Type"] = "application/json"
147
150
 
148
151
  hash = {enabled: false}
149
152
  request.body = hash.to_json
@@ -156,6 +159,7 @@ class Toxiproxy
156
159
  # Enables a Toxiproxy. This will cause the proxy to start listening again.
157
160
  def enable
158
161
  request = Net::HTTP::Post.new("/proxies/#{name}")
162
+ request["Content-Type"] = "application/json"
159
163
 
160
164
  hash = {enabled: true}
161
165
  request.body = hash.to_json
@@ -170,6 +174,7 @@ class Toxiproxy
170
174
  # of this connection.
171
175
  def create
172
176
  request = Net::HTTP::Post.new("/proxies")
177
+ request["Content-Type"] = "application/json"
173
178
 
174
179
  hash = {upstream: upstream, name: name, listen: listen, enabled: enabled}
175
180
  request.body = hash.to_json
@@ -1,6 +1,6 @@
1
1
  class Toxiproxy
2
2
  class Toxic
3
- attr_reader :name, :type, :attributes, :stream, :proxy
3
+ attr_reader :name, :type, :stream, :proxy
4
4
  attr_accessor :attributes, :toxicity
5
5
 
6
6
  def initialize(attrs)
@@ -15,6 +15,7 @@ class Toxiproxy
15
15
 
16
16
  def save
17
17
  request = Net::HTTP::Post.new("/proxies/#{proxy.name}/toxics")
18
+ request["Content-Type"] = "application/json"
18
19
 
19
20
  request.body = as_json
20
21
 
@@ -1,3 +1,3 @@
1
1
  class Toxiproxy
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toxiproxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Eskildsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-14 00:00:00.000000000 Z
12
+ date: 2018-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.5.2
112
+ rubygems_version: 2.6.14
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Ruby library for Toxiproxy