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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2744be4a620f72ecba9af9c7547b2436cccde77d9a96007167e40feba44487eb
4
- data.tar.gz: 76a0e97b08d766d2fd3644d63e3e49f6c6019400db2af32f049304f543dd462a
3
+ metadata.gz: 1f95355bc1bd064c5a8a08ff5ba13f5632c908ad3b69d2cfecf463eb86487060
4
+ data.tar.gz: 5478f42f5772e7dac1e0271a7a885e0721f4f773ff34b796fc4192571071bf65
5
5
  SHA512:
6
- metadata.gz: e92d3166f8335b61cce5fa3b634cd1184742c081f7e777b6c1263da831eef9892286bf985fc3d77e156ca4f0aadbfcc6b1753123984c17783527166b08ea292a
7
- data.tar.gz: '0598ac41d882147de25488ceadb78694573a84a74df5fd8d40b819327f2506e5defcf1619911d10fc378367eb80d5ead97d0c5fed43ac6af14622fa9ba031d78'
6
+ metadata.gz: 6ce5e10dd7cd3406bef5f0dc18c63bbe22d04bfad828380e46b9b65eab1c464ecaa77f38f73a97ba54c6f5202ebd39cc00f8c4c6b36b76f6e4619614d893792f
7
+ data.tar.gz: f610b53334f72d814fadd75c15450ad2237aac20a7e9849fb373ab5418386cd1778f61b3f156dd43362b58507d3ff7d3be849ad036750f3f1731f9e512a596f2
data/.rubocop.yml CHANGED
@@ -1,6 +1,12 @@
1
1
  inherit_gem:
2
2
  rubocop-mdsol: rubocop.yml
3
3
 
4
+ require:
5
+ - rubocop-performance
6
+
7
+ Gemspec/RequireMFA:
8
+ Enabled: false
9
+
4
10
  Layout/ArgumentAlignment:
5
11
  EnforcedStyle: with_fixed_indentation
6
12
 
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.0
26
+ condition: $TRAVIS_RUBY_VERSION == 3.1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.2.0
2
+ - Allow Faraday 2.x.
3
+
1
4
  # 0.1.0
2
5
  - Require Ruby 2.5 and up.
3
6
  - Require ActiveSupport 4.2 and up.
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", "< 2.0"
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 failure =~ /\A((4|5)\d\d|timeout|ssl_error)\Z/i
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
- "will #{failure.downcase}"
67
+ "will #{failure.downcase}"
68
68
 
69
69
  # TODO: injectable logger
70
70
  puts "Aranea: #{result}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aranea
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/aranea.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support"
3
4
  require "active_support/cache"
4
5
  require "active_support/core_ext/numeric/time"
5
6
  require "active_support/notifications"
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.1.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: 2021-04-21 00:00:00.000000000 Z
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: '2.0'
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: '2.0'
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: