aranea 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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjFiZjY1OTNlMjBhNmJhM2RkYmFmZDE1ZjI2ZGE1N2QxNWFkMmQ1NQ==
5
- data.tar.gz: !binary |-
6
- YWNmYTc1YjVjZTQ1OTI0MTIwODNjMjYzMDM0YzBiMDk2YmE4MmE0Mw==
2
+ SHA1:
3
+ metadata.gz: 6a184b98902cedd5d8be59b73ee94754d5c0fa7b
4
+ data.tar.gz: f872ebf508064ad595d241adab883a6395a417ca
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NDU3ZGNjYmIwNDI4NWI4NmZhODgxYTEwNTUzZjcyZmRmOGEyZTczYzQwNzg3
10
- MDEyMjA4YzUyMjk4NDM0Mzc3NGRkYmEzNzVlNjc3YzhjM2ZkZGI3ZjM1NmZk
11
- NTk1MDkxZWMyMjEzOTJlNDUxMTQ4OTQ1MDBhMWJmZTUzYjMxM2M=
12
- data.tar.gz: !binary |-
13
- ZjRkMzYzYmQ3OWJmYjE1OGRmODliNDZkOGRiMzM4N2Y5ZDU2NmRhMTAwOWM0
14
- Yzc5ZmI0ZTc2Zjc4OWM4MWZkMTBiMmFlYTA0YTM4YWI1ODVhYmUxMDNmNWFk
15
- MTRlZjM0ZGE1ODIwNGE5MzljNTdlODk1ZTBhZGVlN2ZiNDFkNTU=
6
+ metadata.gz: 214640adf11d303b1e2a9596ddff42ce46742342c469dbbb8c811126716d14780f5719a189b3d528822930c2e094afcb104f3e44bb19253cf8a4f5262d4281f4
7
+ data.tar.gz: 872111ae07fdffee852754d94e07f495ad17b0804a16d6e9940b761d6ea4a83077ab7d896bc17a7fcf3a75100f31ad6230d7fec78a7d1175ba6d2632be8bda09
@@ -42,6 +42,8 @@ module Aranea
42
42
  def respond!
43
43
  if @response == 'timeout'
44
44
  raise ::Faraday::Error::TimeoutError, 'Fake failure from Aranea'
45
+ elsif @response == 'ssl_error'
46
+ raise ::Faraday::SSLError, 'Fake failure from Aranea'
45
47
  else
46
48
  ::Faraday::Response.new(status: @response.to_i, body: 'Fake failure from Aranea', response_headers: {})
47
49
  end
@@ -42,8 +42,8 @@ module Aranea
42
42
  minutes = options.fetch('minutes') { 5 }
43
43
  failure = options.fetch('failure') { '500' }
44
44
 
45
- unless failure =~ /\A((4|5)\d\d|timeout)\Z/
46
- raise FailureFailure, "failure should be a 4xx or 5xx status code or timeout, got #{failure}"
45
+ unless failure =~ /\A((4|5)\d\d|timeout|ssl_error)\Z/i
46
+ raise FailureFailure, "failure should be a 4xx or 5xx status code, timeout, or ssl_error; got #{failure}"
47
47
  end
48
48
 
49
49
  unless ALLOWED_MINUTES.cover?(minutes.to_i)
@@ -52,7 +52,7 @@ module Aranea
52
52
 
53
53
  Failure.create(pattern: dependency, minutes: minutes.to_i, failure: failure)
54
54
 
55
- result = "For the next #{minutes} minutes, all requests to urls containing '#{dependency}' will #{failure}"
55
+ result = "For the next #{minutes} minutes, all requests to urls containing '#{dependency}' will #{failure.downcase}"
56
56
 
57
57
  #TODO: injectable logger
58
58
  puts "Aranea: #{result}"
@@ -1,5 +1,5 @@
1
1
  module Aranea
2
2
 
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aranea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Weiner
@@ -9,104 +9,104 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-15 00:00:00.000000000 Z
12
+ date: 2017-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
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
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rack
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
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
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: activesupport
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rails
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
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
69
  version: '0'
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
76
  version: '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
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: timecop
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ! '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '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
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
- name: debugger
99
+ name: pry-byebug
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ! '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
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
111
  version: '0'
112
112
  description: Rack and Faraday middleware to temporarily disable connections to external
@@ -118,11 +118,11 @@ executables: []
118
118
  extensions: []
119
119
  extra_rdoc_files: []
120
120
  files:
121
+ - lib/aranea.rb
121
122
  - lib/aranea/failure_repository.rb
122
123
  - lib/aranea/faraday/aranea_middleware.rb
123
124
  - lib/aranea/rack/aranea_middleware.rb
124
125
  - lib/aranea/version.rb
125
- - lib/aranea.rb
126
126
  homepage: https://github.com/mdsol/aranea
127
127
  licenses:
128
128
  - MIT
@@ -133,19 +133,18 @@ require_paths:
133
133
  - lib
134
134
  required_ruby_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ! '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ! '>='
141
+ - - ">="
142
142
  - !ruby/object:Gem::Version
143
143
  version: 1.3.5
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.1.10
146
+ rubygems_version: 2.6.12
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Middleware for fault tolerance testing
150
150
  test_files: []
151
- has_rdoc: