aranea 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +3 -0
- data/aranea.gemspec +3 -1
- data/lib/aranea/rack/aranea_middleware.rb +2 -2
- data/lib/aranea/version.rb +1 -1
- data/lib/aranea.rb +1 -0
- metadata +32 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f95355bc1bd064c5a8a08ff5ba13f5632c908ad3b69d2cfecf463eb86487060
|
4
|
+
data.tar.gz: 5478f42f5772e7dac1e0271a7a885e0721f4f773ff34b796fc4192571071bf65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce5e10dd7cd3406bef5f0dc18c63bbe22d04bfad828380e46b9b65eab1c464ecaa77f38f73a97ba54c6f5202ebd39cc00f8c4c6b36b76f6e4619614d893792f
|
7
|
+
data.tar.gz: f610b53334f72d814fadd75c15450ad2237aac20a7e9849fb373ab5418386cd1778f61b3f156dd43362b58507d3ff7d3be849ad036750f3f1731f9e512a596f2
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -7,10 +7,10 @@ rvm:
|
|
7
7
|
- 2.6
|
8
8
|
- 2.7
|
9
9
|
- 3.0
|
10
|
+
- 3.1
|
10
11
|
|
11
12
|
before_install:
|
12
|
-
- gem update --system --force -N > /dev/null && echo "Rubygems version $(gem --version)"
|
13
|
-
- gem install bundler --force -N && bundle --version
|
13
|
+
- gem update --system --force -N > /dev/null && echo "Rubygems version $(gem --version)" && bundle --version
|
14
14
|
|
15
15
|
install: BUNDLE_JOBS=4 bundle install
|
16
16
|
|
@@ -23,4 +23,4 @@ deploy:
|
|
23
23
|
provider: rubygems
|
24
24
|
on:
|
25
25
|
tags: true
|
26
|
-
condition: $TRAVIS_RUBY_VERSION == 3.
|
26
|
+
condition: $TRAVIS_RUBY_VERSION == 3.1
|
data/CHANGELOG.md
CHANGED
data/aranea.gemspec
CHANGED
@@ -26,11 +26,13 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.require_paths = ["lib"]
|
27
27
|
|
28
28
|
s.add_dependency "activesupport", ">= 4.2"
|
29
|
-
s.add_dependency "faraday", ">= 0.9", "<
|
29
|
+
s.add_dependency "faraday", ">= 0.9", "< 3.0"
|
30
30
|
s.add_dependency "rack"
|
31
31
|
|
32
32
|
s.add_development_dependency "pry-byebug"
|
33
33
|
s.add_development_dependency "rails"
|
34
34
|
s.add_development_dependency "rspec"
|
35
|
+
s.add_development_dependency "rubocop", "= 1.26.1"
|
35
36
|
s.add_development_dependency "rubocop-mdsol", "~> 0.1"
|
37
|
+
s.add_development_dependency "rubocop-performance", "= 1.13.3"
|
36
38
|
end
|
@@ -46,7 +46,7 @@ module Aranea
|
|
46
46
|
response_hash = JSON.parse(CGI.unescape(response)).to_hash
|
47
47
|
response_headers_hash = JSON.parse(CGI.unescape(headers)).to_hash
|
48
48
|
|
49
|
-
unless
|
49
|
+
unless /\A((4|5)\d\d|timeout|ssl_error)\Z/i.match?(failure)
|
50
50
|
raise FailureFailure, "failure should be a 4xx or 5xx status code, timeout, or ssl_error; got #{failure}"
|
51
51
|
end
|
52
52
|
|
@@ -64,7 +64,7 @@ module Aranea
|
|
64
64
|
)
|
65
65
|
|
66
66
|
result = "For the next #{minutes} minutes, all requests to urls containing '#{dependency}' " \
|
67
|
-
|
67
|
+
"will #{failure.downcase}"
|
68
68
|
|
69
69
|
# TODO: injectable logger
|
70
70
|
puts "Aranea: #{result}"
|
data/lib/aranea/version.rb
CHANGED
data/lib/aranea.rb
CHANGED
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Weiner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
version: '0.9'
|
35
35
|
- - "<"
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
37
|
+
version: '3.0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: '0.9'
|
45
45
|
- - "<"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.0'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rack
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,6 +101,20 @@ dependencies:
|
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: rubocop
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.26.1
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.26.1
|
104
118
|
- !ruby/object:Gem::Dependency
|
105
119
|
name: rubocop-mdsol
|
106
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +129,20 @@ dependencies:
|
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0.1'
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: rubocop-performance
|
134
|
+
requirement: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.13.3
|
139
|
+
type: :development
|
140
|
+
prerelease: false
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.13.3
|
118
146
|
description: Rack and Faraday middleware to temporarily disable connections to external
|
119
147
|
dependencies
|
120
148
|
email:
|