songle-song-uri-parser 1.1.5 → 1.1.6
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 +4 -4
- data/CHANGELOG.md +13 -10
- data/Gemfile.lock +1 -1
- data/lib/songle-song-uri-parser/version.rb +1 -1
- data/lib/songle/song_uri.rb +1 -1
- data/lib/songle/song_uri/mp3_song_uri.rb +3 -7
- metadata +2 -3
- data/.gitlab-ci.yml +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd067bff144a149a57d0e361274d997451bbfdcb9fb50d4fa447f95123a84239
|
4
|
+
data.tar.gz: 2e4958fa28e3f3e46e8533ecee0239c7e09bf86b1ff819987f63f4d2b7d75cfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa416928abb241061bc2dbb2bbd4b91deaf221db6041d3867884e4df9151cce5f8fbb9f9c6024250fa9597aa8941ce568b07e611bc83dc83cb24c15fee13e96f
|
7
|
+
data.tar.gz: 41eb195f09a62cac1ab70ebeafd50ddb38c03e12822e70b8d57935940f260ee9efa33347362a5e089c0ad4bbae808f197a5c954f113051af795ae10a9b7dd99b
|
data/CHANGELOG.md
CHANGED
@@ -1,25 +1,28 @@
|
|
1
1
|
# CHANGELOG.md
|
2
2
|
|
3
|
-
## v1.1.
|
3
|
+
## v1.1.6 (2019-07-27 JST)
|
4
|
+
- Resolved it issue, when included the whitespace in the URI (e.g. "https://he3.magnatune.com/all/05-Goodbye%20Perfectionist-Linda%20Woods.mp3")
|
5
|
+
|
6
|
+
## v1.1.5 (2019-07-19 JST)
|
4
7
|
- Deleted unused gems
|
5
8
|
|
6
|
-
## v1.1.4 (2019-07-08)
|
9
|
+
## v1.1.4 (2019-07-08 JST)
|
7
10
|
- Fixed minor bugs
|
8
11
|
- Supported the private song URI (e.g. "https://songle.jp/uploads/{ID}.mp3")
|
9
12
|
|
10
|
-
## v1.1.3 (2019-02-06)
|
13
|
+
## v1.1.3 (2019-02-06 JST)
|
11
14
|
- Updated README.md
|
12
15
|
|
13
|
-
## v1.1.2 (2019-01-31)
|
14
|
-
- Changed constractor parameters in `::Songle::SongURI` class
|
16
|
+
## v1.1.2 (2019-01-31 JST)
|
17
|
+
- Changed constractor parameters in a `::Songle::SongURI` class
|
15
18
|
- Improved about loading modules
|
16
19
|
|
17
|
-
## v1.1.1 (2019-01-26)
|
20
|
+
## v1.1.1 (2019-01-26 JST)
|
18
21
|
- Improved validation in constractor parameters
|
19
22
|
|
20
|
-
## v1.1.0 (2019-01-25)
|
21
|
-
- Changed return value of `Songle::SongURI#type` method (e.g. from "yt" to "youtube")
|
22
|
-
- Supported to the numeric URI (e.g. "https://songle.jp/songs/
|
23
|
+
## v1.1.0 (2019-01-25 JST)
|
24
|
+
- Changed return value of a `Songle::SongURI#type` method (e.g. from "yt" to "youtube")
|
25
|
+
- Supported to the numeric URI (e.g. "https://songle.jp/songs/{ID}")
|
23
26
|
|
24
|
-
## v1.0.0 (2019-01-09)
|
27
|
+
## v1.0.0 (2019-01-09 JST)
|
25
28
|
- Initial public release
|
data/Gemfile.lock
CHANGED
data/lib/songle/song_uri.rb
CHANGED
@@ -80,7 +80,7 @@ module ::Songle
|
|
80
80
|
#
|
81
81
|
def parse query_string, options = nil
|
82
82
|
query_string =
|
83
|
-
::URI.decode_www_form_component(query_string.to_s)
|
83
|
+
::URI.decode_www_form_component(query_string.to_s).gsub(/[+\s]/, "%20")
|
84
84
|
|
85
85
|
case
|
86
86
|
when query_string =~ ::Songle::SongURI::NnSongURI::URI_REGEXP
|
@@ -31,12 +31,8 @@ module ::Songle::SongURI
|
|
31
31
|
::URI.parse("//#{ query_string }")
|
32
32
|
|
33
33
|
@source_host = source_uri.host
|
34
|
-
@source_path = source_uri.path
|
34
|
+
@source_path = source_uri.path + (!!source_uri.query ? "?#{ source_uri.query }" : "")
|
35
35
|
@source_id = nil
|
36
|
-
|
37
|
-
if source_uri.query
|
38
|
-
@source_path += "?#{ source_uri.query }"
|
39
|
-
end
|
40
36
|
end
|
41
37
|
|
42
38
|
##
|
@@ -51,10 +47,10 @@ module ::Songle::SongURI
|
|
51
47
|
#
|
52
48
|
def to_s
|
53
49
|
encoded_source_host =
|
54
|
-
::URI.encode_www_form_component(self.source_host).gsub(
|
50
|
+
::URI.encode_www_form_component(self.source_host).gsub(/[+\s]/, "%2520")
|
55
51
|
|
56
52
|
encoded_source_path =
|
57
|
-
::URI.encode_www_form_component(self.source_path).gsub(
|
53
|
+
::URI.encode_www_form_component(self.source_path).gsub(/[+\s]/, "%2520")
|
58
54
|
|
59
55
|
return "#{ self.endpoint }#{ encoded_source_host }#{ encoded_source_path }"
|
60
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: songle-song-uri-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro INOUE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,7 +60,6 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
-
- ".gitlab-ci.yml"
|
64
63
|
- ".rspec"
|
65
64
|
- ".ruby-version"
|
66
65
|
- CHANGELOG.md
|
data/.gitlab-ci.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
####
|
2
|
-
## @see http://docs.gitlab.com/ce/ci/yaml/README.html
|
3
|
-
####
|
4
|
-
image: docker:git
|
5
|
-
|
6
|
-
stages:
|
7
|
-
- build_and_test
|
8
|
-
|
9
|
-
variables:
|
10
|
-
APP_ENV: develop
|
11
|
-
IMAGE_PATH: ${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}
|
12
|
-
|
13
|
-
build_and_test:
|
14
|
-
stage: build_and_test
|
15
|
-
script:
|
16
|
-
- docker build --build-arg RUBY_VERSION=2.3.8 -t ${IMAGE_PATH}:${APP_ENV} .
|
17
|
-
- docker run ${IMAGE_PATH}:${APP_ENV}
|
18
|
-
- docker build --build-arg RUBY_VERSION=2.4.6 -t ${IMAGE_PATH}:${APP_ENV} .
|
19
|
-
- docker run ${IMAGE_PATH}:${APP_ENV}
|
20
|
-
- docker build --build-arg RUBY_VERSION=2.5.3 -t ${IMAGE_PATH}:${APP_ENV} .
|
21
|
-
- docker run ${IMAGE_PATH}:${APP_ENV}
|
22
|
-
- docker build --build-arg RUBY_VERSION=2.6.3 -t ${IMAGE_PATH}:${APP_ENV} .
|
23
|
-
- docker run ${IMAGE_PATH}:${APP_ENV}
|
24
|
-
environment: ${APP_ENV}
|