files.com 1.0.133 → 1.0.134

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d035ac320deed565de483766b7bd1132c09c9cda2cb9e3fca6ea315e218b22b3
4
- data.tar.gz: 411f29ad91d887b4fd5074b42e2b551fdccac61bf764022de32d1bd345f4ddfe
3
+ metadata.gz: d09ff92ef54d2ff2b07c7677e9998262d07534c2f1970fec953066b6c646f769
4
+ data.tar.gz: 11d4e18d9ab273f09c9170dd6e12dc8ca5b55c17914df0764681c884d6a3fbc1
5
5
  SHA512:
6
- metadata.gz: ad1e0300e759301679cc8c6125f02aa5e962a686a057b6a158f4a52e430e3b2fe3f1d8e4a33eed6a330298bfd248327d43e50a2e8e29e999765174a69b195026
7
- data.tar.gz: 2495ec0411de523c389c0e6fb3872ec6859bd3484666848f9a63c7697791ab9a001f221ac2a48cc274ca710736c1ef7bcd7495987d9436fa4c3f27c347d45909
6
+ metadata.gz: 4f40491abab773ec451d0a880b4870a1bcb9796e4b5ee67c5fa2481cc0cfd10855c12d6bd460736541271b4a70300809caf10f4fb1d8f229236025a21ee0de6b
7
+ data.tar.gz: c0d39193c030c2004a0f2859142322ece43bec229aea4fcf6b47f05a998242aa055044ef78ded5da996e689f9c3f76e2459dbdb92f08fd39c93ee8025972e3e2
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.133
1
+ 1.0.134
@@ -34,17 +34,11 @@ module Files
34
34
  # here we need to, so switch to ASCII.
35
35
  component = component.dup
36
36
  component.force_encoding(Encoding::ASCII_8BIT)
37
- unencoded = Addressable::URI.unencode_component(component, String, leave_encoded)
38
- begin
39
- encoded = Addressable::URI.encode_component(
40
- # Addressable::IDNA.unicode_normalize_kc(unencoded),
41
- unencoded,
42
- character_class,
43
- leave_encoded
44
- )
45
- rescue ArgumentError
46
- encoded = encode_component(unencoded)
47
- end
37
+ encoded = Addressable::URI.encode_component(
38
+ component,
39
+ character_class,
40
+ leave_encoded
41
+ )
48
42
  encoded.force_encoding(Encoding::UTF_8)
49
43
  encoded
50
44
  end
@@ -2,10 +2,14 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Files::URI do
4
4
  describe "normalized_path" do
5
- it { expect(described_class.normalized_path("[[strange stuff]]#yes.text")).to eq("%5B%5Bstrange%20stuff%5D%5D%23yes.text") }
5
+ it { expect(described_class.normalized_path("path/[[strange stuff]]#yes.text")).to eq("path/%5B%5Bstrange%20stuff%5D%5D%23yes.text") }
6
6
  it { expect(Addressable::URI.unencode_component(described_class.normalized_path("[[strange stuff]]#yes.text"))).to eq("[[strange stuff]]#yes.text") }
7
7
 
8
8
  it { expect(described_class.normalized_path("folder/AdÇe")).to eq("folder/AdC%CC%A7e") }
9
9
  it { expect(Addressable::URI.unencode_component(described_class.normalized_path("AdÇe"))).to eq("AdÇe") }
10
+
11
+ it { expect(described_class.normalized_path("lorem%20ipsum.txt")).to eq("lorem%2520ipsum.txt") }
12
+ it { expect(described_class.normalized_path("lorem%ipsum.txt")).to eq("lorem%25ipsum.txt") }
13
+ it { expect(described_class.normalized_path("lorem ipsum.txt")).to eq("lorem%20ipsum.txt") }
10
14
  end
11
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.133
4
+ version: 1.0.134
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-21 00:00:00.000000000 Z
11
+ date: 2021-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable