anyfetch 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/anyfetch.rb +3 -4
- data/lib/anyfetch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64448adfab299c1b4c89f9ab347e00412226cd19
|
4
|
+
data.tar.gz: 162903ef49a02492561791aa1a3ab2db3fcfd49e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 440b8dee4e48bf7e74d272870778c1fb6d9747e58c3a61c12353e46777855fb95bafbbcfcc598150c3857a566ff39012734915f669301fd6274542a30b9ca083
|
7
|
+
data.tar.gz: 52b3be162cb4d24ffea775c9dfe7688e5ec6efc3ea4349a9c93ca4b6d538acdeae192a96b8c06ed5aeea57ec1d47e22cbb66457c86877fee077c72a99e0482ee
|
data/lib/anyfetch.rb
CHANGED
@@ -8,16 +8,15 @@ require "anyfetch/version"
|
|
8
8
|
|
9
9
|
module Anyfetch extend self
|
10
10
|
def open(uri, options = {})
|
11
|
-
uri =
|
11
|
+
uri = to_uri(uri)
|
12
12
|
handler(uri, options).open
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
16
16
|
|
17
17
|
def to_uri(uri)
|
18
|
-
|
19
|
-
|
20
|
-
URI.parse(uri)
|
18
|
+
encoded = URI.encode(URI.decode(uri.to_s))
|
19
|
+
URI.parse(encoded)
|
21
20
|
end
|
22
21
|
|
23
22
|
def handler(uri, options = {})
|
data/lib/anyfetch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anyfetch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Szajbe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocaine
|