faraday-decode_xml 0.2.0 → 0.2.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
2
  SHA256:
3
- metadata.gz: 8bdc97af12131dc407e82f530448e9445f5e45664df4f9775c67160850d8265b
4
- data.tar.gz: 9dec632278e082e185b81033a1eba5164ce1776c6ae7d048ea0917dcf3c7cc71
3
+ metadata.gz: 19eb8264a85fb487fcae71461282bb1be3a0a229687676823d1768bc63c0dc62
4
+ data.tar.gz: 9f33786a3d4dff673cfbe3179e5181ed7d7e071763a7e4873beb6c66e960a197
5
5
  SHA512:
6
- metadata.gz: d94975a292401e7e66ae6f08d16ff79628a51ebb37f0c69f370aa1b85fb4857a11fdea9da08a35fb76d84e73b5bdaef39d8582493495a4b1cc1ed33ae360fb08
7
- data.tar.gz: d5798b5564f3bbfa9956953ac17eadfc138809a8f400c1909e9b904f03ed84a2dfd7a3c56480152693e52554fb7cdbef96ffc19ee6e5480ff372c2e1a9f28ffb
6
+ metadata.gz: 3a7e90df89e223b8293316c528b76de88ad30bbaf799493dbb4a021beb2ec481982e1a450081d435a03835254cc64e7c0b4fb90a6bd54ca00ffc7a60c64d55ea
7
+ data.tar.gz: a77dd12dbb0c9a9ebac4dc3f0ced8f7621c7d69cee8aa0f4b5ccfa3cbac552f1b344097ed2877be2f81967740a293c7ac137aef3869b80692d43b63d7007e8ff
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.2.1
6
+
7
+ - Fix handling no Content-Type header (#3)
8
+
5
9
  ## 0.2.0
6
10
 
7
11
  - Add support for specifying content types to attempt to parse (#2)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Faraday Decode XML
2
2
 
3
- [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/soberstadt/faraday-decode_xml/ci)](https://github.com/soberstadt/faraday-decode_xml/actions?query=branch%3Amain)
3
+ [![GitHub Workflow Status](https://github.com/soberstadt/faraday-decode_xml/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/soberstadt/faraday-decode_xml/actions?query=branch%3Amain)
4
4
  [![Gem](https://img.shields.io/gem/v/faraday-decode_xml.svg?style=flat-square)](https://rubygems.org/gems/faraday-decode_xml)
5
5
  [![License](https://img.shields.io/github/license/soberstadt/faraday-decode_xml.svg?style=flat-square)](LICENSE.md)
6
6
 
@@ -11,7 +11,7 @@ Faraday middleware for decoding XML requests.
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'faraday-decode_xml'
14
+ gem "faraday-decode_xml"
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -29,11 +29,9 @@ gem install faraday-decode_xml
29
29
  ## Usage
30
30
 
31
31
  ```ruby
32
- require 'faraday/decode_xml'
32
+ require "faraday/decode_xml"
33
33
 
34
- Faraday.new do |faraday|
35
- faraday.response :xml
36
- end
34
+ Faraday.new { |faraday| faraday.response :xml }
37
35
  ```
38
36
 
39
37
  ## Development
@@ -47,6 +45,8 @@ To install this gem onto your local machine, run `rake build`.
47
45
  To release a new version, make a commit with a message such as "Bumped to 0.0.2" and then run `rake release`.
48
46
  See how it works [here](https://bundler.io/guides/creating_gem.html#releasing-the-gem).
49
47
 
48
+ To run prettier, run `rake prettier`
49
+
50
50
  ## Contributing
51
51
 
52
52
  Bug reports and pull requests are welcome on [GitHub](https://github.com/soberstadt/faraday-decode_xml).
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'multi_xml'
3
+ require "multi_xml"
4
4
 
5
5
  module Faraday
6
6
  module DecodeXML
@@ -33,13 +33,12 @@ module Faraday
33
33
  end
34
34
 
35
35
  def response_type(env)
36
- env.response_headers['Content-Type'].to_s.split(';', 2).first
36
+ env.response_headers["Content-Type"].to_s.split(";", 2).first.to_s
37
37
  end
38
38
 
39
39
  def process_response_type?(type)
40
- @content_types.empty? || @content_types.any? do |pattern|
41
- pattern.is_a?(Regexp) ? type.match?(pattern) : type == pattern
42
- end
40
+ @content_types.empty? ||
41
+ @content_types.any? { |pattern| pattern.is_a?(Regexp) ? type.match?(pattern) : type == pattern }
43
42
  end
44
43
 
45
44
  def parse_response?(env)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module DecodeXML
5
- VERSION = '0.2.0'
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'decode_xml/middleware'
4
- require_relative 'decode_xml/version'
3
+ require_relative "decode_xml/middleware"
4
+ require_relative "decode_xml/version"
5
5
 
6
6
  module Faraday
7
7
  # This will be your middleware main module, though the actual middleware implementation will go
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-decode_xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spencer Oberstadt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.21.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: prettier
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.1.2
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.1.2
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rubocop
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -170,8 +184,8 @@ licenses:
170
184
  - MIT
171
185
  metadata:
172
186
  bug_tracker_uri: https://github.com/soberstadt/faraday-decode_xml/issues
173
- changelog_uri: https://github.com/soberstadt/faraday-decode_xml/blob/v0.2.0/CHANGELOG.md
174
- documentation_uri: http://www.rubydoc.info/gems/faraday-decode_xml/0.2.0
187
+ changelog_uri: https://github.com/soberstadt/faraday-decode_xml/blob/v0.2.1/CHANGELOG.md
188
+ documentation_uri: http://www.rubydoc.info/gems/faraday-decode_xml/0.2.1
175
189
  homepage_uri: https://github.com/soberstadt/faraday-decode_xml
176
190
  rubygems_mfa_required: 'true'
177
191
  source_code_uri: https://github.com/soberstadt/faraday-decode_xml
@@ -184,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
198
  requirements:
185
199
  - - ">="
186
200
  - !ruby/object:Gem::Version
187
- version: '2.5'
201
+ version: 2.7.3
188
202
  - - "<"
189
203
  - !ruby/object:Gem::Version
190
204
  version: '4'