pew_pew 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- shared_context 'domain resource', :domain do
1
+ RSpec.shared_context 'domain resource', :domain do
2
2
  context 'options' do
3
3
  subject { described_class.new(client, options) }
4
4
 
data/spec/support/vcr.rb CHANGED
@@ -1,6 +1,41 @@
1
+ require 'cgi'
1
2
  require 'vcr'
2
3
 
3
4
  VCR.configure do |config|
5
+ config.hook_into :faraday
6
+
4
7
  config.cassette_library_dir = File.expand_path('../../fixtures', __FILE__)
5
- config.hook_into(:faraday)
8
+
9
+ config.register_request_matcher :multipart_body do |request_1, request_2|
10
+ pattern = /RubyMultipartPost-\w+$/
11
+
12
+ content_type_1 = request_1.headers['Content-Type']
13
+ content_type_2 = request_2.headers['Content-Type']
14
+
15
+ if content_type_1 && content_type_2 && content_type_1[0] =~ pattern
16
+ boundary_1 = $~[0]
17
+ boundary_2 = content_type_2[0].match(pattern)[0]
18
+
19
+ request_1.body.gsub(boundary_1, boundary_2) == request_2.body
20
+ else
21
+ CGI.parse(request_1.body) == CGI.parse(request_2.body)
22
+ end
23
+ end
24
+
25
+ config.register_request_matcher :multipart_headers do |request_1, request_2|
26
+ content_type_1 = request_1.headers['Content-Type']
27
+ content_type_2 = request_2.headers['Content-Type']
28
+
29
+ if content_type_1 && content_type_1[0] =~ /RubyMultipartPost/ &&
30
+ content_type_2 && content_type_2[0] =~ /RubyMultipartPost/ &&
31
+ headers_1 =
32
+ request_1.headers.dup.delete_if { |key| key == 'Content-Type' }
33
+ headers_2 =
34
+ request_2.headers.dup.delete_if { |key| key == 'Content-Type' }
35
+
36
+ headers_1 == headers_2
37
+ else
38
+ request_1.headers == request_2.headers
39
+ end
40
+ end
6
41
  end
metadata CHANGED
@@ -1,111 +1,146 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pew_pew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tyler Hunt
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-06-05 00:00:00.000000000 Z
11
+ date: 2022-11-18 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: faraday_middleware
14
+ name: faraday-mashify
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: 0.8.0
19
+ version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 0.8.0
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday-multipart
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: hashie
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
- - - ~>
45
+ - - "~>"
36
46
  - !ruby/object:Gem::Version
37
47
  version: '1.1'
38
48
  type: :runtime
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
51
  requirements:
43
- - - ~>
52
+ - - "~>"
44
53
  - !ruby/object:Gem::Version
45
54
  version: '1.1'
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: relax
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
- - - ~>
59
+ - - "~>"
52
60
  - !ruby/object:Gem::Version
53
- version: 0.2.0
61
+ version: 0.3.0
54
62
  type: :runtime
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
- - - ~>
66
+ - - "~>"
60
67
  - !ruby/object:Gem::Version
61
- version: 0.2.0
68
+ version: 0.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: appraisal
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.4'
62
83
  - !ruby/object:Gem::Dependency
63
84
  name: rspec
64
85
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
86
  requirements:
67
- - - ~>
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.12'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.12'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-its
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
68
102
  - !ruby/object:Gem::Version
69
- version: '2.6'
103
+ version: '1.3'
70
104
  type: :development
71
105
  prerelease: false
72
106
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
107
  requirements:
75
- - - ~>
108
+ - - "~>"
76
109
  - !ruby/object:Gem::Version
77
- version: '2.6'
110
+ version: '1.3'
78
111
  - !ruby/object:Gem::Dependency
79
112
  name: vcr
80
113
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
114
  requirements:
83
- - - ~>
115
+ - - "~>"
84
116
  - !ruby/object:Gem::Version
85
- version: '2.2'
117
+ version: '6.1'
86
118
  type: :development
87
119
  prerelease: false
88
120
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
121
  requirements:
91
- - - ~>
122
+ - - "~>"
92
123
  - !ruby/object:Gem::Version
93
- version: '2.2'
94
- description:
95
- email:
124
+ version: '6.1'
125
+ description:
126
+ email:
96
127
  executables: []
97
128
  extensions: []
98
129
  extra_rdoc_files: []
99
130
  files:
100
- - .gitignore
101
- - .rspec
102
- - .travis.yml
103
- - .yardopts
131
+ - ".github/workflows/build.yml"
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".travis.yml"
135
+ - ".yardopts"
136
+ - Appraisals
104
137
  - CHANGELOG.md
105
138
  - Gemfile
106
139
  - LICENSE
107
140
  - README.md
108
141
  - Rakefile
142
+ - gemfiles/faraday_2.0.gemfile
143
+ - gemfiles/faraday_2.7.gemfile
109
144
  - lib/pew_pew.rb
110
145
  - lib/pew_pew/client.rb
111
146
  - lib/pew_pew/config.rb
@@ -156,28 +191,27 @@ files:
156
191
  - spec/support/contexts/domain_resource.rb
157
192
  - spec/support/vcr.rb
158
193
  homepage: http://github.com/tylerhunt/pew_pew
159
- licenses: []
160
- post_install_message:
194
+ licenses:
195
+ - MIT
196
+ metadata: {}
197
+ post_install_message:
161
198
  rdoc_options: []
162
199
  require_paths:
163
200
  - lib
164
201
  required_ruby_version: !ruby/object:Gem::Requirement
165
- none: false
166
202
  requirements:
167
- - - ! '>='
203
+ - - ">="
168
204
  - !ruby/object:Gem::Version
169
- version: '1.9'
205
+ version: '2.6'
170
206
  required_rubygems_version: !ruby/object:Gem::Requirement
171
- none: false
172
207
  requirements:
173
- - - ! '>='
208
+ - - ">="
174
209
  - !ruby/object:Gem::Version
175
210
  version: '0'
176
211
  requirements: []
177
- rubyforge_project:
178
- rubygems_version: 1.8.24
179
- signing_key:
180
- specification_version: 3
212
+ rubygems_version: 3.3.7
213
+ signing_key:
214
+ specification_version: 4
181
215
  summary: A Ruby client library for using the Mailgun web service.
182
216
  test_files:
183
217
  - spec/fixtures/bounces.yml