faraday_persistent_excon 0.3.0 → 0.3.1

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
- SHA1:
3
- metadata.gz: 60b6db2679ae22d227327fe73885fe687bdfd026
4
- data.tar.gz: 8a40b8f2860d2cabf0fdb4a123985a5bf5a8d1c9
2
+ SHA256:
3
+ metadata.gz: '098cfd97e416642ae98c160f6bf13f986dd46759cdfc75a9ac4659ed226d8912'
4
+ data.tar.gz: 64438f71f4e73b8a7a5d3661bcf447cba33132324fa3f8623ed6644beec461c9
5
5
  SHA512:
6
- metadata.gz: 7183a66296ca9d76e6a8968fc4d9627a03c1450e70363f4d18266603ea7017cb797de4dd4e1e97615195f2302695701d689e3aca10185907e492b283b889dc23
7
- data.tar.gz: 86a3e03601d0657125d31656a89460f6a448fd66a14b1e888108ae1836e5a06ed7bbed56a5c72307689b5bec419ab1f577a5e94b5ee1281a3587f36f6c0b1aff
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
+ [![Code Climate](https://codeclimate.com/github/aceofsales/faraday_persistent_excon/badges/gpa.svg)](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
- **Alpha**
9
+ **Beta**
8
10
 
9
- All testing for this gem is currently in the form of bench testing. We're evaulating this gem in our production stack.
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
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
44
+ - `docker-compose build --pull`
45
+ - `docker-compose run --rm faraday_persistent_excon` to run specs
43
46
 
44
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
 
@@ -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],
@@ -1,3 +1,3 @@
1
1
  module FaradayPersistentExcon
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
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.0
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: 2015-08-26 00:00:00.000000000 Z
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
- rubyforge_project:
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