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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c22979f371c6a5784ddcc87e0fd53fd19037fa20be068220024642cfdf7db9e1
4
- data.tar.gz: 030ba845ee09c70a6593a44043bf2c2aafb33eb76b58f55c7efaa2ccb0a2dd4e
3
+ metadata.gz: fd067bff144a149a57d0e361274d997451bbfdcb9fb50d4fa447f95123a84239
4
+ data.tar.gz: 2e4958fa28e3f3e46e8533ecee0239c7e09bf86b1ff819987f63f4d2b7d75cfb
5
5
  SHA512:
6
- metadata.gz: a961f911dba3c51b657b97bad55d0832e1a385f05ca1fefd32f649cb2e987d843bda3717e8b9e55d30bab204c8dd8c87e2cb5175b5cfccffac70fcc48b6dae2b
7
- data.tar.gz: d5c554eba8d3d27154c18004e7b3a291a522c65a8b1e599c18cbc6703157aa6e2e98d62b0999c123316b2f52442d96d54a0bb87a137d1188415137720f4c5e82
6
+ metadata.gz: aa416928abb241061bc2dbb2bbd4b91deaf221db6041d3867884e4df9151cce5f8fbb9f9c6024250fa9597aa8941ce568b07e611bc83dc83cb24c15fee13e96f
7
+ data.tar.gz: 41eb195f09a62cac1ab70ebeafd50ddb38c03e12822e70b8d57935940f260ee9efa33347362a5e089c0ad4bbae808f197a5c954f113051af795ae10a9b7dd99b
@@ -1,25 +1,28 @@
1
1
  # CHANGELOG.md
2
2
 
3
- ## v1.1.5 (2019-07-19)
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/12345")
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- songle-song-uri-parser (1.1.5)
4
+ songle-song-uri-parser (1.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,4 +1,4 @@
1
1
  #@# vim: set filetype=ruby:
2
2
  module ::SongleSongURIParser
3
- VERSION = "1.1.5"
3
+ VERSION = "1.1.6"
4
4
  end
@@ -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("+", "%2520")
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("+", "%2520")
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.5
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-19 00:00:00.000000000 Z
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
@@ -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}