net-hippie 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/ci.yml +31 -0
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +35 -26
- data/LICENSE.txt +1 -1
- data/README.md +9 -2
- data/bin/console +0 -7
- data/bin/setup +5 -5
- data/bin/shipit +1 -3
- data/bin/style +8 -0
- data/bin/test +1 -0
- data/lib/net/hippie/client.rb +1 -1
- data/lib/net/hippie/connection.rb +1 -1
- data/lib/net/hippie/version.rb +1 -1
- data/lib/net/hippie.rb +1 -1
- data/net-hippie.gemspec +8 -3
- metadata +29 -14
- data/.github/workflows/test.yml +0 -17
- data/.gitlab-ci.yml +0 -11
- data/bin/cibuild +0 -22
- data/bin/lint +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8022bf107e849103e21fc49ea92cfc570394c301cae3568fc57173471432578f
|
4
|
+
data.tar.gz: f0b3442b8b5ccf7fd51fb09e31f85877d66ea0368eaa713ac689c7ed58e5340c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7239565953fd5222222cb4f0b4181443dd96fdf01389deb27e352389b90707c16f44d01548b4277935a31ced02224c5f821441db6f0ae116d75402beaadba163
|
7
|
+
data.tar.gz: 818f4b089eb080640819a153259267ff54152f1429b525ae6ac82c3ae192e67f4ca38e2a7b114c731047126a91b1f17a433ff60f19c1b199edb42caa24384ff7
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: ci
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [main]
|
5
|
+
pull_request:
|
6
|
+
branches: [main]
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby-version }}
|
19
|
+
bundler-cache: true
|
20
|
+
- name: Running tests…
|
21
|
+
run: sh bin/test
|
22
|
+
style:
|
23
|
+
runs-on: ubuntu-latest
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: '3.4'
|
29
|
+
bundler-cache: true
|
30
|
+
- name: Running style checks…
|
31
|
+
run: sh bin/style
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Version 1.
|
1
|
+
Version 1.2.0
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
All notable changes to this project will be documented in this file.
|
@@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
8
8
|
|
9
9
|
## [Unreleased]
|
10
|
+
## [1.2.0] - 2024-12-05
|
11
|
+
### Changed
|
12
|
+
- Disable logger by default
|
13
|
+
|
14
|
+
## [1.1.1] - 2021-01-30
|
15
|
+
### Changed
|
16
|
+
- Update Gem Metadata
|
10
17
|
|
11
18
|
## [1.1.0] - 2020-12-26
|
12
19
|
### Added
|
@@ -74,30 +81,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
74
81
|
|
75
82
|
## [0.2.1] - 2019-02-01
|
76
83
|
### Added
|
77
|
-
- with\_retry.
|
84
|
+
- with\_retry.
|
78
85
|
- authorization header helpers
|
79
86
|
|
80
|
-
[Unreleased]: https://github.com/
|
81
|
-
[1.
|
82
|
-
[1.
|
83
|
-
[1.
|
84
|
-
[0.
|
85
|
-
[0.
|
86
|
-
[0.3.
|
87
|
-
[0.
|
88
|
-
[0.
|
89
|
-
[0.2.
|
90
|
-
[0.2.
|
91
|
-
[0.2.
|
92
|
-
[0.2.
|
93
|
-
[0.2.
|
94
|
-
[0.2.
|
95
|
-
[0.1
|
96
|
-
[0.
|
97
|
-
[0.1.
|
98
|
-
[0.1.
|
99
|
-
[0.1.
|
100
|
-
[0.1.
|
101
|
-
[0.1.
|
102
|
-
[0.1.
|
103
|
-
[0.1.
|
87
|
+
[Unreleased]: https://github.com/xlgmokha/net-hippie/compare/v1.2.0...HEAD
|
88
|
+
[1.2.0]: https://github.com/xlgmokha/net-hippie/compare/v1.1.1...v1.2.0
|
89
|
+
[1.1.1]: https://github.com/xlgmokha/net-hippie/compare/v1.1.0...v1.1.1
|
90
|
+
[1.1.0]: https://github.com/xlgmokha/net-hippie/compare/v1.0.1...v1.1.0
|
91
|
+
[1.0.1]: https://github.com/xlgmokha/net-hippie/compare/v1.0.0...v1.0.1
|
92
|
+
[1.0.0]: https://github.com/xlgmokha/net-hippie/compare/v0.3.2...v1.0.0
|
93
|
+
[0.3.2]: https://github.com/xlgmokha/net-hippie/compare/v0.3.1...v0.3.2
|
94
|
+
[0.3.1]: https://github.com/xlgmokha/net-hippie/compare/v0.3.0...v0.3.1
|
95
|
+
[0.3.0]: https://github.com/xlgmokha/net-hippie/compare/v0.2.7...v0.3.0
|
96
|
+
[0.2.7]: https://github.com/xlgmokha/net-hippie/compare/v0.2.6...v0.2.7
|
97
|
+
[0.2.6]: https://github.com/xlgmokha/net-hippie/compare/v0.2.5...v0.2.6
|
98
|
+
[0.2.5]: https://github.com/xlgmokha/net-hippie/compare/v0.2.4...v0.2.5
|
99
|
+
[0.2.4]: https://github.com/xlgmokha/net-hippie/compare/v0.2.3...v0.2.4
|
100
|
+
[0.2.3]: https://github.com/xlgmokha/net-hippie/compare/v0.2.2...v0.2.3
|
101
|
+
[0.2.2]: https://github.com/xlgmokha/net-hippie/compare/v0.2.1...v0.2.2
|
102
|
+
[0.2.1]: https://github.com/xlgmokha/net-hippie/compare/v0.2.0...v0.2.1
|
103
|
+
[0.2.0]: https://github.com/xlgmokha/net-hippie/compare/v0.1.9...v0.2.0
|
104
|
+
[0.1.9]: https://github.com/xlgmokha/net-hippie/compare/v0.1.8...v0.1.9
|
105
|
+
[0.1.8]: https://github.com/xlgmokha/net-hippie/compare/v0.1.7...v0.1.8
|
106
|
+
[0.1.7]: https://github.com/xlgmokha/net-hippie/compare/v0.1.6...v0.1.7
|
107
|
+
[0.1.6]: https://github.com/xlgmokha/net-hippie/compare/v0.1.5...v0.1.6
|
108
|
+
[0.1.5]: https://github.com/xlgmokha/net-hippie/compare/v0.1.4...v0.1.5
|
109
|
+
[0.1.4]: https://github.com/xlgmokha/net-hippie/compare/v0.1.3...v0.1.4
|
110
|
+
[0.1.3]: https://github.com/xlgmokha/net-hippie/compare/v0.1.2...v0.1.3
|
111
|
+
[0.1.2]: https://github.com/xlgmokha/net-hippie/compare/v0.1.1...v0.1.2
|
112
|
+
[0.1.1]: https://github.com/xlgmokha/net-hippie/compare/v0.1.0...v0.1.1
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Net::Hippie
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/net-hippie.svg)](https://rubygems.org/gems/net-hippie)
|
4
|
-
[![Build Status](https://github.com/
|
4
|
+
[![Build Status](https://github.com/xlgmokha/net-hippie/actions/workflows/ci.yml/badge.svg))](https://github.com/xlgmokha/net-hippie/actions)
|
5
|
+
|
5
6
|
|
6
7
|
`Net::Hippie` is a light weight wrapper around `net/http` that defaults to
|
7
8
|
sending `JSON` messages.
|
@@ -65,6 +66,12 @@ client = Net::Hippie::Client.new(
|
|
65
66
|
)
|
66
67
|
```
|
67
68
|
|
69
|
+
To disable logging you will need to override the default logger.
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
client = Net::Hippie::Client.new(logger: nil)
|
73
|
+
```
|
74
|
+
|
68
75
|
### Basic Auth
|
69
76
|
|
70
77
|
```ruby
|
@@ -95,7 +102,7 @@ push git commits and tags, and push the `.gem` file to [rubygems.org](https://ru
|
|
95
102
|
|
96
103
|
## Contributing
|
97
104
|
|
98
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
105
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/xlgmokha/net-hippie.
|
99
106
|
|
100
107
|
## License
|
101
108
|
|
data/bin/console
CHANGED
@@ -4,12 +4,5 @@
|
|
4
4
|
require 'bundler/setup'
|
5
5
|
require 'net/hippie'
|
6
6
|
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
7
|
require 'irb'
|
15
8
|
IRB.start(__FILE__)
|
data/bin/setup
CHANGED
data/bin/shipit
CHANGED
data/bin/style
ADDED
data/bin/test
CHANGED
data/lib/net/hippie/client.rb
CHANGED
@@ -84,7 +84,7 @@ module Net
|
|
84
84
|
raise error if attempt == max
|
85
85
|
|
86
86
|
delay = ((2**attempt) * 0.1) + Random.rand(0.05) # delay + jitter
|
87
|
-
logger
|
87
|
+
logger&.warn("`#{error.message}` #{attempt + 1}/#{max} Delay: #{delay}s")
|
88
88
|
sleep delay
|
89
89
|
end
|
90
90
|
|
@@ -10,7 +10,7 @@ module Net
|
|
10
10
|
http.open_timeout = options.fetch(:open_timeout, 10)
|
11
11
|
http.use_ssl = scheme == 'https'
|
12
12
|
http.verify_mode = options.fetch(:verify_mode, Net::Hippie.verify_mode)
|
13
|
-
http.set_debug_output(options
|
13
|
+
http.set_debug_output(options[:logger]) if options[:logger]
|
14
14
|
apply_client_tls_to(http, options)
|
15
15
|
@http = http
|
16
16
|
end
|
data/lib/net/hippie/version.rb
CHANGED
data/lib/net/hippie.rb
CHANGED
data/net-hippie.gemspec
CHANGED
@@ -12,10 +12,14 @@ Gem::Specification.new do |spec|
|
|
12
12
|
|
13
13
|
spec.summary = 'net/http for hippies. ☮️ '
|
14
14
|
spec.description = 'net/http for hippies. ☮️ '
|
15
|
-
spec.homepage = 'https://
|
15
|
+
spec.homepage = 'https://rubygems.org/gems/net-hippie'
|
16
16
|
spec.license = 'MIT'
|
17
|
+
spec.metadata = {
|
18
|
+
'source_code_uri' => 'https://github.com/xlgmokha/net-hippie',
|
19
|
+
'rubygems_mfa_required' => 'true'
|
20
|
+
}
|
17
21
|
|
18
|
-
spec.files
|
22
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
23
|
f.match(%r{^(test|spec|features)/})
|
20
24
|
end
|
21
25
|
spec.bindir = 'exe'
|
@@ -23,9 +27,10 @@ Gem::Specification.new do |spec|
|
|
23
27
|
spec.require_paths = ['lib']
|
24
28
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
25
29
|
|
30
|
+
spec.add_dependency 'logger', '~> 1.0'
|
26
31
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
27
32
|
spec.add_development_dependency 'rake', '~> 13.0'
|
28
|
-
spec.add_development_dependency 'rubocop', '~>
|
33
|
+
spec.add_development_dependency 'rubocop', '~> 1.9'
|
29
34
|
spec.add_development_dependency 'vcr', '~> 6.0'
|
30
35
|
spec.add_development_dependency 'webmock', '~> 3.4'
|
31
36
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-hippie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: logger
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: minitest
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +58,14 @@ dependencies:
|
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '1.9'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '1.9'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: vcr
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,20 +102,19 @@ executables:
|
|
88
102
|
extensions: []
|
89
103
|
extra_rdoc_files: []
|
90
104
|
files:
|
91
|
-
- ".github/
|
105
|
+
- ".github/dependabot.yml"
|
106
|
+
- ".github/workflows/ci.yml"
|
92
107
|
- ".gitignore"
|
93
|
-
- ".gitlab-ci.yml"
|
94
108
|
- ".rubocop.yml"
|
95
109
|
- CHANGELOG.md
|
96
110
|
- Gemfile
|
97
111
|
- LICENSE.txt
|
98
112
|
- README.md
|
99
113
|
- Rakefile
|
100
|
-
- bin/cibuild
|
101
114
|
- bin/console
|
102
|
-
- bin/lint
|
103
115
|
- bin/setup
|
104
116
|
- bin/shipit
|
117
|
+
- bin/style
|
105
118
|
- bin/test
|
106
119
|
- exe/net-hippie
|
107
120
|
- lib/net/hippie.rb
|
@@ -110,11 +123,13 @@ files:
|
|
110
123
|
- lib/net/hippie/content_type_mapper.rb
|
111
124
|
- lib/net/hippie/version.rb
|
112
125
|
- net-hippie.gemspec
|
113
|
-
homepage: https://
|
126
|
+
homepage: https://rubygems.org/gems/net-hippie
|
114
127
|
licenses:
|
115
128
|
- MIT
|
116
|
-
metadata:
|
117
|
-
|
129
|
+
metadata:
|
130
|
+
source_code_uri: https://github.com/xlgmokha/net-hippie
|
131
|
+
rubygems_mfa_required: 'true'
|
132
|
+
post_install_message:
|
118
133
|
rdoc_options: []
|
119
134
|
require_paths:
|
120
135
|
- lib
|
@@ -129,8 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
144
|
- !ruby/object:Gem::Version
|
130
145
|
version: '0'
|
131
146
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
133
|
-
signing_key:
|
147
|
+
rubygems_version: 3.5.23
|
148
|
+
signing_key:
|
134
149
|
specification_version: 4
|
135
150
|
summary: net/http for hippies. ☮️
|
136
151
|
test_files: []
|
data/.github/workflows/test.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
name: Test
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
test:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
strategy:
|
9
|
-
matrix:
|
10
|
-
ruby: [ '2.5', '2.6', '2.7' ]
|
11
|
-
steps:
|
12
|
-
- uses: actions/checkout@v1
|
13
|
-
- uses: actions/setup-ruby@v1
|
14
|
-
with:
|
15
|
-
ruby-version: ${{ matrix.ruby }}
|
16
|
-
- name: cibuild
|
17
|
-
run: bin/cibuild
|
data/.gitlab-ci.yml
DELETED
data/bin/cibuild
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
set -e
|
4
|
-
[ -z "$DEBUG" ] || set -x
|
5
|
-
|
6
|
-
cd "$(dirname "$0")/.."
|
7
|
-
|
8
|
-
export RUBY_GC_MALLOC_LIMIT=79000000
|
9
|
-
export RUBY_GC_HEAP_INIT_SLOTS=800000
|
10
|
-
export RUBY_HEAP_FREE_MIN=100000
|
11
|
-
export RUBY_HEAP_SLOTS_INCREMENT=400000
|
12
|
-
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
|
13
|
-
export CIBUILD=1
|
14
|
-
|
15
|
-
echo "[$(date "+%H:%M:%S")] ==> Running setup…"
|
16
|
-
bin/setup
|
17
|
-
|
18
|
-
echo "[$(date "+%H:%M:%S")] ==> Running tests…"
|
19
|
-
bin/test
|
20
|
-
|
21
|
-
echo "[$(date "+%H:%M:%S")] ==> Running linters…"
|
22
|
-
bin/lint
|