linkhum-url 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/CHANGELOG.md +4 -0
- data/lib/linkhum/url.rb +4 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 149759d5df9572e66a76c54488440775366fbdce
|
4
|
+
data.tar.gz: ef7fb7cba5c2c8a5af0787c2ee4d83f90eee3303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a5e52c506981a6da241325f8e6c461935e6567d05d9724e3939c411258ff008d09b001b39c076d834925373f346f433fd9480d2fd62683f6af9efb18a65722e
|
7
|
+
data.tar.gz: f2fbd2619a0e99b92866f703d51ef954e4d4a3952a333d6fcab974e28549dc599eb7092dd933d602959784dc0e45b1bc2b9b6cf05e12d8746ad66364a85b0d2f
|
data/CHANGELOG.md
CHANGED
data/lib/linkhum/url.rb
CHANGED
@@ -17,6 +17,9 @@ module Linkhum
|
|
17
17
|
end
|
18
18
|
url_encoded[:host] = au.normalized_host
|
19
19
|
|
20
|
+
url_encoded[:port] = au.port ? ":#{au.port}" : ""
|
21
|
+
human_readable[:port] = url_encoded[:port]
|
22
|
+
|
20
23
|
human_readable[:path] = Addressable::URI.unencode_component(au.path)
|
21
24
|
# this code handles bug in Addressable::URI (up to 2.5.0), which
|
22
25
|
# converts paths to Unicode NFKC (it should only do that for
|
@@ -59,7 +62,7 @@ module Linkhum
|
|
59
62
|
userinfo_part = parts[:userinfo] ? "#{parts[:userinfo]}@" : ""
|
60
63
|
query_part = parts[:query] ? "?#{parts[:query]}" : ""
|
61
64
|
fragment_part = parts[:fragment] ? "##{parts[:fragment]}" : ""
|
62
|
-
"#{parts[:scheme]}://#{userinfo_part}#{parts[:host]}#{parts[:path]}#{query_part}#{fragment_part}"
|
65
|
+
"#{parts[:scheme]}://#{userinfo_part}#{parts[:host]}#{parts[:port]}#{parts[:path]}#{query_part}#{fragment_part}"
|
63
66
|
end
|
64
67
|
end
|
65
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkhum-url
|
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
|
- Alexey Makhotkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -80,8 +80,8 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.8'
|
83
|
-
description: 'Input URL could be
|
84
|
-
returned as result: human-readable and URL-encoded'
|
83
|
+
description: 'Input URL could be either human-readable, or URL-encoded. Two URLs
|
84
|
+
are returned as result: human-readable and URL-encoded.'
|
85
85
|
email: squadette@gmail.com
|
86
86
|
executables: []
|
87
87
|
extensions: []
|
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
104
|
requirements:
|
105
105
|
- - "~>"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '2.
|
107
|
+
version: '2.0'
|
108
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.5.
|
115
|
+
rubygems_version: 2.5.2
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Linkhum-URL creates both URL-encoded and readable versions of URLs
|