kgmusic 0.1.0pre1 → 0.1.0pre3
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/Gemfile +1 -0
- data/kgmusic.gemspec +1 -6
- data/lib/kgmusic.rb +5 -2
- data/lib/kgmusic/version.rb +1 -1
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 525b9556e5707ec2b2da80069cc417950e56846a
|
4
|
+
data.tar.gz: 4427436ab96bc56e91fdc0ce40aab2abb306ff14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf25d4365229435b1c41f0d2980f64f427d4787142a691e9a7696a89003eaac791cdb978f198a2ba4bcc1afb1e40e2ef30bdbb0c5af61f29d177b5a082262385
|
7
|
+
data.tar.gz: 6fb3ff84c119309a3eacacec4c0b0b7a975cae438a0d0b52df63fe2cc5ac31895f715134a2d4618a913db96587aab395f5c62bd7bf7d6adae845c26148ab5845
|
data/Gemfile
CHANGED
data/kgmusic.gemspec
CHANGED
@@ -14,15 +14,10 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = "GPL-3.0"
|
15
15
|
spec.homepage = "https://github.com/vitvegl/kgmusic.git"
|
16
16
|
|
17
|
-
if spec.respond_to?(:metadata)
|
18
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
19
|
-
else
|
20
|
-
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
21
|
-
end
|
22
|
-
|
23
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
18
|
spec.require_paths = ["lib"]
|
25
19
|
|
20
|
+
spec.add_runtime_dependency "unicode_utils", "1.4.0"
|
26
21
|
spec.add_runtime_dependency "rest-client", "~> 1.8", ">= 1.8.0"
|
27
22
|
spec.add_runtime_dependency "nokogiri", "~> 1.6", ">= 1.6.0"
|
28
23
|
spec.add_development_dependency "bundler", "~> 1.11"
|
data/lib/kgmusic.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'kgmusic/version'
|
2
|
+
require 'unicode_utils/titlecase'
|
2
3
|
require 'rest-client'
|
3
4
|
require 'nokogiri'
|
4
5
|
|
@@ -6,6 +7,8 @@ module KgMusic
|
|
6
7
|
|
7
8
|
class Search
|
8
9
|
|
10
|
+
include UnicodeUtils
|
11
|
+
|
9
12
|
attr_reader :artist, :album
|
10
13
|
attr_reader :doc, :info, :result, :download_page, :direct_link
|
11
14
|
|
@@ -39,9 +42,9 @@ module KgMusic
|
|
39
42
|
strip_unallowed_symbols(key) if has_unallowed_symbols?(key)
|
40
43
|
words = key.split
|
41
44
|
if words.size == 1
|
42
|
-
key[0] =~ /^[[:lower:]]$/ ? key
|
45
|
+
key[0] =~ /^[[:lower:]]$/ ? titlecase(key) : key
|
43
46
|
elsif words.size > 1
|
44
|
-
words.
|
47
|
+
words.map {|w| titlecase(w) unless (w[0].ord === w[0])}.join(" ")
|
45
48
|
end
|
46
49
|
end
|
47
50
|
|
data/lib/kgmusic/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kgmusic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.0pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitvegl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: unicode_utils
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.4.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.4.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rest-client
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,8 +127,7 @@ files:
|
|
113
127
|
homepage: https://github.com/vitvegl/kgmusic.git
|
114
128
|
licenses:
|
115
129
|
- GPL-3.0
|
116
|
-
metadata:
|
117
|
-
allowed_push_host: https://rubygems.org
|
130
|
+
metadata: {}
|
118
131
|
post_install_message:
|
119
132
|
rdoc_options: []
|
120
133
|
require_paths:
|