rack-vcr 0.1.5 → 0.1.6

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: e80386d7ba3c01401cd583f36035ec8edf04551c
4
- data.tar.gz: 7b884cfd4ed83e53ea5bf9f1d1d4162db3730503
2
+ SHA256:
3
+ metadata.gz: dd81d08f1fea87a51788e471948f8209f83a3ca27d7b1e9476a2442e36910038
4
+ data.tar.gz: 1ae3ef6efcce039cf0de32f252aa432514ffe038087aa0273470dc77f6838c78
5
5
  SHA512:
6
- metadata.gz: a3dad85b5264f30e7464774a632125ad5b7438a3c21607a7136521a1ff05f92f74a40a961e460b125d0a2efaa261018951290e667fce22dee18cc045a4db18cc
7
- data.tar.gz: f72b6b9025dd2aa30422eaf99f49671462a9766ce4446946d74633b0111e78810bf93578af2994bc06fd10eea25613fa403310152073c916e1cd7bc20dde5d3a
6
+ metadata.gz: 957402e260aa2976b59e84260172e296984451c6c5d09591ab03f94e1f0bb28ef63aa5a9fba0d29da484c02ae89e6cb85b522359fb62234781f187df7dc5a509
7
+ data.tar.gz: a89328c6aade966b0fa30af74ed5b04f995c984ede7bbf14282a5bc91968c25660834614e3975b6e5f1048bbc57f5284eb343092805e419d6fcd860c0088caa1
@@ -0,0 +1,32 @@
1
+ name: Run tests
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+
8
+ strategy:
9
+ matrix:
10
+ ruby_version:
11
+ - 2.4
12
+ - 2.5
13
+ - 2.6
14
+ - 2.7
15
+ rack_version:
16
+ - ~> 1.6
17
+ - ~> 2.0.9
18
+ - ~> 2.1.4
19
+ - ~> 2.2.3
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - uses: ruby/setup-ruby@v1
24
+ with:
25
+ bundler-cache: true
26
+ ruby-version: ${{ matrix.ruby_version }}
27
+ - name: Run tests on ruby ${{ matrix.ruby_version }} with rack ${{ matrix.rack_version }}
28
+ run: |
29
+ bundle check || bundle update
30
+ bundle exec rake
31
+ env:
32
+ RACK_VERSION: ${{ matrix.rack_version }}
@@ -1,3 +1,6 @@
1
+ ## 0.1.6 (2020/10/31)
2
+ - Support Rack 2.1+ (#10)
3
+
1
4
  ## 0.1.5 (2017/07/11)
2
5
  - Documentation fixes
3
6
  - Support VCR 3+
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rack-vcr.gemspec
4
4
  gemspec
5
+
6
+ gem 'rack', ENV['RACK_VERSION']
@@ -29,7 +29,7 @@ module Rack
29
29
  ::VCR::Response.new(
30
30
  ::VCR::ResponseStatus.new(@res.status, nil),
31
31
  @res.headers,
32
- @res.body.join(''),
32
+ @res.body.to_enum.to_a.join(''),
33
33
  )
34
34
  end
35
35
 
@@ -46,8 +46,10 @@ module Rack
46
46
  end
47
47
 
48
48
  def headers_hash_from_env
49
- fields = @req.env.select {|k, v| k.start_with? 'HTTP_' }
50
- .collect { |k, v| [normalize_header_field(k), v] }
49
+ fields = @req.env
50
+ .map { |k, v| [k.to_s, v] }
51
+ .select {|k, v| k.start_with?('HTTP_') }
52
+ .collect { |k, v| [normalize_header_field(k), v] }
51
53
  Hash[fields]
52
54
  end
53
55
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class VCR
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
@@ -21,11 +21,11 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency "vcr", ">= 2.9"
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.10"
25
- spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "bundler", ">= 1.10"
25
+ spec.add_development_dependency "rake", ">= 10.0"
26
26
  spec.add_development_dependency "rspec"
27
27
 
28
- spec.add_development_dependency "sinatra", "~> 1.4"
28
+ spec.add_development_dependency "sinatra", ">= 1.4"
29
29
  spec.add_development_dependency "rack-test", "~> 0.6"
30
- spec.add_development_dependency "webmock", "~> 1.21"
30
+ spec.add_development_dependency "webmock", "~> 3"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-vcr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuhiko Miyagawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-12 00:00:00.000000000 Z
11
+ date: 2020-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vcr
@@ -28,28 +28,28 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.10'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
55
  - !ruby/object:Gem::Dependency
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: sinatra
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.4'
83
83
  - !ruby/object:Gem::Dependency
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.21'
103
+ version: '3'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '1.21'
110
+ version: '3'
111
111
  description: This Rack middleware records incoming Rack request and responses in a
112
112
  VCR compatible format.
113
113
  email:
@@ -118,9 +118,9 @@ executables:
118
118
  extensions: []
119
119
  extra_rdoc_files: []
120
120
  files:
121
+ - ".github/workflows/test.yml"
121
122
  - ".gitignore"
122
123
  - ".rspec"
123
- - ".travis.yml"
124
124
  - CHANGELOG.md
125
125
  - Gemfile
126
126
  - LICENSE.txt
@@ -151,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.4.6
154
+ rubygems_version: 3.0.3
156
155
  signing_key:
157
156
  specification_version: 4
158
157
  summary: Record incoming Rack request as VCR cassettes
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.0
4
- before_install: gem install bundler -v 1.10.3