maremma 4.9 → 4.9.2

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: 8dea0b9b5cf0916542d904c1c3f0f4cbdfa325177b0dcd9bd3a096bea05bdeb0
4
- data.tar.gz: ded3d03c921a63b33b4a975fb9b75d020bc2a7feb250f37703c90dcf7d1a7716
3
+ metadata.gz: 2a9c0b30f4fe07434f05de62e4b64c54028ed22cebb285e8bee34850e34514f8
4
+ data.tar.gz: 18f09ec414eafd45610d458917787ca22bdd4db5bc286494634cdd5d80dac562
5
5
  SHA512:
6
- metadata.gz: 37a701b359497edce90b694a981204bb8c063b01b5c57c465c984cfd9162a9277be11628ec873588cc1772e02751b7c0fff9cf1407294a8655637b5efb8aa7b3
7
- data.tar.gz: e9d255bb82c76b5c4e9264233cb5185c8b52a066608fe765884b076ead364ff90bd534fc815cbf2c36f56ebab0dbab626bb05a45d133a0200c9a19b34bc6c31b
6
+ metadata.gz: 25aa844992e5aeebcdd5b0f127244e6546060f2de7fac3250f384641f060d616e1e448a6d8ae6eb8c27b2668299eef5d2ed5cd6d0375c6bae9f9ef68fc9602b3
7
+ data.tar.gz: 5e47a8f2d32e8f1380584c462e28221b19aebe285dff004253230ee98e502c909ceea85526854c513bd8321a7be2f550266590c2eac1f431ba119f6be9f6a809
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.9.1](https://github.com/datacite/maremma/tree/4.9.1) (2021-06-06)
4
+
5
+ [Full Changelog](https://github.com/datacite/maremma/compare/4.9...4.9.1)
6
+
3
7
  ## [4.9](https://github.com/datacite/maremma/tree/4.9) (2021-06-06)
4
8
 
5
9
  [Full Changelog](https://github.com/datacite/maremma/compare/4.7.4...4.9)
data/Gemfile.lock CHANGED
@@ -1,11 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maremma (4.9)
4
+ maremma (4.9.2)
5
5
  activesupport (>= 4.2.5)
6
6
  addressable (>= 2.3.6)
7
7
  builder (~> 3.2, >= 3.2.2)
8
- charlock_holmes (~> 0.7.7)
9
8
  excon (~> 0.71.0)
10
9
  faraday (~> 0.17.3)
11
10
  faraday-encoding (~> 0.0.4)
@@ -27,7 +26,6 @@ GEM
27
26
  public_suffix (>= 2.0.2, < 5.0)
28
27
  ast (2.4.2)
29
28
  builder (3.2.4)
30
- charlock_holmes (0.7.7)
31
29
  concurrent-ruby (1.1.9)
32
30
  crack (0.4.5)
33
31
  rexml
data/lib/maremma.rb CHANGED
@@ -11,7 +11,6 @@ require "uri"
11
11
  require "addressable/uri"
12
12
  require "maremma/xml_converter"
13
13
  require "maremma/version"
14
- require "charlock_holmes"
15
14
 
16
15
  module Maremma
17
16
  DEFAULT_TIMEOUT = 60
@@ -230,15 +229,10 @@ module Maremma
230
229
  end
231
230
 
232
231
  def self.parse_response(string, options = {})
233
- detection = CharlockHolmes::EncodingDetector.detect(string)
234
- utf8_encoded_content = CharlockHolmes::Converter.convert(string, detection[:encoding], "UTF-8")
235
- return utf8_encoded_content if options[:raw]
236
-
237
- from_json(utf8_encoded_content) || from_xml(utf8_encoded_content) || from_string(utf8_encoded_content)
238
- rescue ArgumentError
239
- # handle U_STRING_NOT_TERMINATED_WARNING
240
- from_json(string.force_encoding("UTF-8")) || from_xml(string.force_encoding("UTF-8")) ||
241
- from_string(string.force_encoding("UTF-8"))
232
+ string = string.dup.encode(Encoding.find("UTF-8"), invalid: :replace, undef: :replace, replace: "")
233
+ return string if options[:raw]
234
+
235
+ from_json(string) || from_xml(string) || from_string(string)
242
236
  end
243
237
 
244
238
  # currently supported by Twitter and Github
@@ -1,3 +1,3 @@
1
1
  module Maremma
2
- VERSION = "4.9".freeze
2
+ VERSION = "4.9.2".freeze
3
3
  end
data/maremma.gemspec CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency "activesupport", ">= 4.2.5"
22
22
  s.add_dependency "addressable", ">= 2.3.6"
23
23
  s.add_dependency "builder", "~> 3.2", ">= 3.2.2"
24
- s.add_dependency "charlock_holmes", "~> 0.7.7"
25
24
  s.add_dependency "excon", "~> 0.71.0"
26
25
  s.add_dependency "faraday", "~> 0.17.3"
27
26
  s.add_dependency "faraday-encoding", "~> 0.0.4"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maremma
3
3
  version: !ruby/object:Gem::Version
4
- version: '4.9'
4
+ version: 4.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-06 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -58,20 +58,6 @@ dependencies:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: 3.2.2
61
- - !ruby/object:Gem::Dependency
62
- name: charlock_holmes
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: 0.7.7
68
- type: :runtime
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: 0.7.7
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: excon
77
63
  requirement: !ruby/object:Gem::Requirement