linkhum-url 0.1.7 → 0.1.9
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 +5 -5
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +1 -1
- data/README.md +4 -5
- data/lib/linkhum/url.rb +5 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 590545b8c0e80193622074b125f5f3a4c82f6379bcf6ad109d30a3a0f8d84493
|
4
|
+
data.tar.gz: ed82b9cba1e0b4e152213f5213b9917e9286558b93f8432626ad85c62cd9974b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06eb89a2710ae3ceed95fa9ee03b0353808d2a5591904e77091f81780cedfa718a0b32110a2411dc1b55d86da2ebd7bee7f07a67432c83f5171c7b868dec8505
|
7
|
+
data.tar.gz: 82c0caa1f5716fda19ecf58daaa2e0915c60c580955db2df9d1ea3e4fc18eee77f5f8dfeac3556e914973602599057995cb2b00901bed3d7c3661692292c6282
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -10,8 +10,6 @@ scenes `addressable` gem is used to handle actual URL parsing.
|
|
10
10
|
This is a sister gem to
|
11
11
|
[`linkhum`](https://github.com/zverok/linkhum).
|
12
12
|
|
13
|
-
[](https://travis-ci.org/squadette/linkhum-url)
|
14
|
-
|
15
13
|
## Usage
|
16
14
|
|
17
15
|
`linkhum-url` has only one method: `Linkhum::URL.parse(url)`. It
|
@@ -33,8 +31,9 @@ embedding etc.
|
|
33
31
|
|
34
32
|
## Install
|
35
33
|
|
36
|
-
$ sudo apt-get install
|
37
|
-
$
|
34
|
+
$ sudo apt-get install libidn11 libidn11-dev # Ubuntu Xenial
|
35
|
+
$ sudo apt-get install idn # Older Debian/Ubuntu
|
36
|
+
$ brew install libidn # Mac OS X
|
38
37
|
|
39
38
|
$ gem install linkhum-url
|
40
39
|
|
@@ -42,4 +41,4 @@ embedding etc.
|
|
42
41
|
|
43
42
|
`linkhum-url` released under MIT License.
|
44
43
|
|
45
|
-
Copyright (C) Alexey Makhotkin, 2016-
|
44
|
+
Copyright (C) Alexey Makhotkin, 2016-2019.
|
data/lib/linkhum/url.rb
CHANGED
@@ -30,6 +30,11 @@ module Linkhum
|
|
30
30
|
end
|
31
31
|
au_path.force_encoding(Encoding::ASCII_8BIT)
|
32
32
|
url_encoded[:path] = encode_component(au_path)
|
33
|
+
decoded_path = human_readable[:path].dup
|
34
|
+
if !decoded_path.force_encoding(Encoding::UTF_8).valid_encoding?
|
35
|
+
human_readable[:path] = au.path
|
36
|
+
end
|
37
|
+
|
33
38
|
human_readable[:query] = unencode_component(au.query, false)
|
34
39
|
if au.query
|
35
40
|
decoded_query = human_readable[:query].dup
|
@@ -37,7 +42,6 @@ module Linkhum
|
|
37
42
|
human_readable[:query] = au.query
|
38
43
|
end
|
39
44
|
end
|
40
|
-
|
41
45
|
if au.query
|
42
46
|
# see above
|
43
47
|
au_query = au.query.dup
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Makhotkin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -67,19 +67,19 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: json
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.6.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 2.6.0
|
83
83
|
description: 'Input URL could be either human-readable, or URL-encoded. Two URLs
|
84
84
|
are returned as result: human-readable and URL-encoded.'
|
85
85
|
email: squadette@gmail.com
|
@@ -96,24 +96,23 @@ homepage: http://rubygems.org/gems/linkhum-url
|
|
96
96
|
licenses:
|
97
97
|
- MIT
|
98
98
|
metadata: {}
|
99
|
-
post_install_message:
|
99
|
+
post_install_message:
|
100
100
|
rdoc_options: []
|
101
101
|
require_paths:
|
102
102
|
- lib
|
103
103
|
required_ruby_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- - "
|
105
|
+
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '2.
|
107
|
+
version: '2.00'
|
108
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
|
-
|
115
|
-
|
116
|
-
signing_key:
|
114
|
+
rubygems_version: 3.2.3
|
115
|
+
signing_key:
|
117
116
|
specification_version: 4
|
118
117
|
summary: Linkhum-URL creates both URL-encoded and readable versions of URLs
|
119
118
|
test_files: []
|