faraday_persistent_excon 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Dockerfile +27 -0
- data/README.md +10 -4
- data/docker-compose.yml +24 -0
- data/docker-entrypoint.sh +20 -0
- data/lib/faraday_persistent_excon/request_options.rb +4 -1
- data/lib/faraday_persistent_excon/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '098cfd97e416642ae98c160f6bf13f986dd46759cdfc75a9ac4659ed226d8912'
|
4
|
+
data.tar.gz: 64438f71f4e73b8a7a5d3661bcf447cba33132324fa3f8623ed6644beec461c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41a63fea72edb19d8099d417d09a4acbb1318669691904a202db843266b92aec4825a0ff553dcbb3c090c6941d9182aadb03e97ed5beedb69a69bf7fa622cd0
|
7
|
+
data.tar.gz: 88ef2fe4d7d3028a9d5ed9b414dcfed31ef775fb6216d2c3cb603c74d6c6871868be5822298da70eb8a7babc4403163712ffb4e3b56d174836532c513dfa1587
|
data/Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
FROM ruby:2.6.3-alpine3.10
|
2
|
+
MAINTAINER Ryan Schlesinger <ryan@outstand.com>
|
3
|
+
|
4
|
+
RUN addgroup -g 1000 -S gem && \
|
5
|
+
adduser -u 1000 -S -s /bin/ash -G gem gem && \
|
6
|
+
apk add --no-cache \
|
7
|
+
ca-certificates \
|
8
|
+
tini \
|
9
|
+
su-exec \
|
10
|
+
build-base \
|
11
|
+
git \
|
12
|
+
openssh
|
13
|
+
|
14
|
+
WORKDIR /srv
|
15
|
+
RUN chown -R gem:gem /srv
|
16
|
+
USER gem
|
17
|
+
|
18
|
+
COPY --chown=gem:gem Gemfile faraday_persistent_excon.gemspec /srv/
|
19
|
+
COPY --chown=gem:gem lib/faraday_persistent_excon/version.rb /srv/lib/faraday_persistent_excon/
|
20
|
+
RUN git config --global push.default simple
|
21
|
+
COPY --chown=gem:gem . /srv/
|
22
|
+
|
23
|
+
USER root
|
24
|
+
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
25
|
+
|
26
|
+
ENTRYPOINT ["/sbin/tini", "-g", "--", "/docker-entrypoint.sh"]
|
27
|
+
CMD ["rspec", "spec"]
|
data/README.md
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
# FaradayPersistentExcon
|
2
2
|
|
3
|
+
[](https://codeclimate.com/github/aceofsales/faraday_persistent_excon)
|
4
|
+
|
3
5
|
Adds configurable connection pools per host for persistent http connections
|
4
6
|
|
5
7
|
## Status
|
6
8
|
|
7
|
-
**
|
9
|
+
**Beta**
|
8
10
|
|
9
|
-
All testing for this gem is currently in the form of bench testing. We're
|
11
|
+
All testing for this gem is currently in the form of bench testing. We're using this gem in our production stack.
|
10
12
|
|
11
13
|
## Installation
|
12
14
|
|
@@ -39,9 +41,13 @@ FaradayPersistentExcon.connection_pools = {
|
|
39
41
|
|
40
42
|
## Development
|
41
43
|
|
42
|
-
|
44
|
+
- `docker-compose build --pull`
|
45
|
+
- `docker-compose run --rm faraday_persistent_excon` to run specs
|
43
46
|
|
44
|
-
To
|
47
|
+
To release a new version:
|
48
|
+
- Update the version number in `version.rb` and commit the result.
|
49
|
+
- `docker-compose build --pull`
|
50
|
+
- `docker-compose run --rm release`
|
45
51
|
|
46
52
|
## Contributing
|
47
53
|
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
version: '3.6'
|
2
|
+
services:
|
3
|
+
faraday_persistent_excon:
|
4
|
+
build: .
|
5
|
+
image: outstand/faraday_persistent_excon:dev
|
6
|
+
stdin_open: true
|
7
|
+
tty: true
|
8
|
+
volumes:
|
9
|
+
- bundler-data:/usr/local/bundle
|
10
|
+
- .:/srv
|
11
|
+
release:
|
12
|
+
image: outstand/faraday_persistent_excon:dev
|
13
|
+
stdin_open: true
|
14
|
+
tty: true
|
15
|
+
command: rake release
|
16
|
+
volumes:
|
17
|
+
- bundler-data:/usr/local/bundle
|
18
|
+
- ~/.gitconfig:/home/gem/.gitconfig
|
19
|
+
- ~/.gitconfig.user:/home/gem/.gitconfig.user
|
20
|
+
- ~/.ssh/id_rsa:/home/gem/.ssh/id_rsa
|
21
|
+
- ~/.gem:/home/gem/.gem
|
22
|
+
|
23
|
+
volumes:
|
24
|
+
bundler-data:
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
set -e
|
3
|
+
|
4
|
+
if [ "$(which "$1")" = '' ]; then
|
5
|
+
if [ "$(ls -A /usr/local/bundle/bin)" = '' ]; then
|
6
|
+
echo 'command not in path and bundler not initialized'
|
7
|
+
echo 'running bundle install'
|
8
|
+
su-exec gem bundle install
|
9
|
+
fi
|
10
|
+
fi
|
11
|
+
|
12
|
+
if [ "$1" = 'bundle' ]; then
|
13
|
+
set -- su-exec gem "$@"
|
14
|
+
elif ls /usr/local/bundle/bin | grep -q "\b$1\b"; then
|
15
|
+
set -- su-exec gem bundle exec "$@"
|
16
|
+
|
17
|
+
su-exec gem ash -c 'bundle check || bundle install'
|
18
|
+
fi
|
19
|
+
|
20
|
+
exec "$@"
|
@@ -12,6 +12,9 @@ module FaradayPersistentExcon
|
|
12
12
|
opts[:client_key] = ssl[:client_key] if ssl[:client_key]
|
13
13
|
opts[:certificate] = ssl[:certificate] if ssl[:certificate]
|
14
14
|
opts[:private_key] = ssl[:private_key] if ssl[:private_key]
|
15
|
+
opts[:ssl_version] = ssl[:version] if ssl[:version]
|
16
|
+
opts[:ssl_min_version] = ssl[:min_version] if ssl[:min_version]
|
17
|
+
opts[:ssl_max_version] = ssl[:max_version] if ssl[:max_version]
|
15
18
|
end
|
16
19
|
|
17
20
|
if ( req = env[:request] )
|
@@ -23,12 +26,12 @@ module FaradayPersistentExcon
|
|
23
26
|
|
24
27
|
if req[:open_timeout]
|
25
28
|
opts[:connect_timeout] = req[:open_timeout]
|
26
|
-
opts[:write_timeout] = req[:open_timeout]
|
27
29
|
end
|
28
30
|
|
29
31
|
if req[:proxy]
|
30
32
|
opts[:proxy] = {
|
31
33
|
host: req[:proxy][:uri].host,
|
34
|
+
hostname: req[:proxy][:uri].hostname,
|
32
35
|
port: req[:proxy][:uri].port,
|
33
36
|
scheme: req[:proxy][:uri].scheme,
|
34
37
|
user: req[:proxy][:user],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday_persistent_excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Schlesinger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -132,12 +132,15 @@ files:
|
|
132
132
|
- ".gitignore"
|
133
133
|
- ".rspec"
|
134
134
|
- ".travis.yml"
|
135
|
+
- Dockerfile
|
135
136
|
- Gemfile
|
136
137
|
- LICENSE.md
|
137
138
|
- README.md
|
138
139
|
- Rakefile
|
139
140
|
- bin/console
|
140
141
|
- bin/setup
|
142
|
+
- docker-compose.yml
|
143
|
+
- docker-entrypoint.sh
|
141
144
|
- faraday_persistent_excon.gemspec
|
142
145
|
- lib/faraday_persistent_excon.rb
|
143
146
|
- lib/faraday_persistent_excon/adapter.rb
|
@@ -164,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
167
|
- !ruby/object:Gem::Version
|
165
168
|
version: '0'
|
166
169
|
requirements: []
|
167
|
-
|
168
|
-
rubygems_version: 2.4.7
|
170
|
+
rubygems_version: 3.0.3
|
169
171
|
signing_key:
|
170
172
|
specification_version: 4
|
171
173
|
summary: Persistent connections with faraday and excon
|