faraday-rack 1.0.0 → 2.0.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: 143c8c75985d0d0f17bad4fe469bc4ff4df31c789fd09301e8509ecb2cab5ef8
4
- data.tar.gz: a4809a9f6ed7c030568d0afc19db711639a91b4316b0816200749705e4e35ffa
3
+ metadata.gz: c4c3c8b371d553ecc539913bcfa06064c3399f2206db867d288367b0c9c56783
4
+ data.tar.gz: 2e3f9bcd779023176d7d63cad7587e4255798a73dee8682d07d3972b78fa37f8
5
5
  SHA512:
6
- metadata.gz: 0c7fc77cff012d78684038c16e5dc0a8873d06bb07d0f5dc26d03823bbc97b1046021a4ca63dc8f9872396cf64cce3a0f7604d6d9f34bcf260920a662d4cc9e1
7
- data.tar.gz: 62bda4f576d8dd9ccd9a6431f624ffe75e1a0589154ef80067526122f5b31135c65b4be45f6304c3b730c705388ab89bafc3fb150f679d191d3ddb2fe054125d
6
+ metadata.gz: 51b863b365e94282e415d7e823692f08b89623ca2954f0e6adae45bcc6204c5da1bdb0a83a7044ac8ab6848906f3b2616bc211cce1f254c2c4d7b6d42f5e8101
7
+ data.tar.gz: 7a2702777bf875944e01402313998ece859a2248462f6331e86977e1b58eb65398e8e0dd2d64ca336d0b6d171e7547fd71625eac6a448954fbd93f237ca0b8aa
data/README.md CHANGED
@@ -38,7 +38,7 @@ For more information on how to setup your Faraday connection and adapters usage,
38
38
 
39
39
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
40
40
 
41
- 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](rubygems).
41
+ To release a new version, update the version number in `version.rb`, and then use the GitHub Releases feature and use the new version number as "new tag", which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](rubygems).
42
42
 
43
43
  ## Contributing
44
44
 
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'rack/test'
4
+ require 'timeout'
5
+
3
6
  module Faraday
4
7
  class Adapter
5
8
  # Sends requests to a Rack app.
@@ -16,8 +19,6 @@ module Faraday
16
19
  # conn.adapter :rack, MyRackApp.new
17
20
  # end
18
21
  class Rack < Faraday::Adapter
19
- dependency 'rack/test'
20
-
21
22
  # not prefixed with "HTTP_"
22
23
  SPECIAL_HEADERS = %w[CONTENT_LENGTH CONTENT_TYPE].freeze
23
24
 
@@ -40,7 +41,7 @@ module Faraday
40
41
  timeout = request_timeout(:open, env[:request])
41
42
  timeout ||= request_timeout(:read, env[:request])
42
43
  response = if timeout
43
- Timer.timeout(timeout, Faraday::TimeoutError) do
44
+ ::Timeout.timeout(timeout, Faraday::TimeoutError) do
44
45
  execute_request(env, rack_env)
45
46
  end
46
47
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module Rack
5
- VERSION = '1.0.0'
5
+ VERSION = '2.0.0'
6
6
  end
7
7
  end
data/lib/faraday/rack.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'faraday'
3
4
  require 'faraday/adapter/rack'
4
5
  require 'faraday/rack/version'
5
6
 
metadata CHANGED
@@ -1,169 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@iMacTia"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-01 00:00:00.000000000 Z
11
+ date: 2022-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rack-test
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.6'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0.6'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
17
  - - "~>"
46
18
  - !ruby/object:Gem::Version
47
19
  version: '2.0'
48
- type: :development
20
+ type: :runtime
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
24
  - - "~>"
53
25
  - !ruby/object:Gem::Version
54
26
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '13.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '13.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.19.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.19.0
97
- - !ruby/object:Gem::Dependency
98
- name: multipart-parser
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.1.1
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.1.1
111
- - !ruby/object:Gem::Dependency
112
- name: webmock
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3.4'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '3.4'
125
- - !ruby/object:Gem::Dependency
126
- name: rubocop
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: 1.12.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: 1.12.0
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop-packaging
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.5'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.5'
153
- - !ruby/object:Gem::Dependency
154
- name: rubocop-performance
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '1.0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '1.0'
167
27
  description: Faraday adapter for Rack
168
28
  email:
169
29
  - giuffrida.mattia@gmail.com