gracenote-rb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ff142be64295e04fc90a1d074c5ae20961b7e9a
4
- data.tar.gz: 9a08354c78f8f318fc0ddaed49ecbdccbf7328d3
3
+ metadata.gz: b5a1a27e3f1fe97f477f46fd955d03ad16c3b3e3
4
+ data.tar.gz: aa59476c5f9a13a7c7a9bbe13c7d8ae572ac603d
5
5
  SHA512:
6
- metadata.gz: 2e7a2ad729e4ad6dc16e329d060f18cfe45f850839bfb9bd8fd291f96f43be902b4df21058275409515bc0febead352b45b44bb728fdad647fd8394c8c2adbf9
7
- data.tar.gz: 8458aab6e5ab45cd46547a7cfb4e134cbba72fb54842452ab31e77a2b2dc3ca1e3e2c8711e827ce53276f2fc050e721e3cc489e3be8f7363c6eeed1cbe30267f
6
+ metadata.gz: 9697b42ecb48be63962dc505426dc37e0fe114d0ca2b7efae6a576129e4a5fcb5133a2737afd43bef1df6970044b72f9b406a1b583a4a8ae4fea2c621093526c
7
+ data.tar.gz: 717a22cfa673935f2aa739d1d3041ff3ad566cafe87f48edcd6511ec6c9de3c5093e0119802475a1b066581876f0f8a13d178c6647c8dd06eec4c0ad1f6e32d4
data/README.md CHANGED
@@ -67,7 +67,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
67
67
 
68
68
  ## Contributing
69
69
 
70
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gracenote-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
70
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tomoya55/gracenote-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
71
71
 
72
72
 
73
73
  ## License
@@ -9,12 +9,8 @@ module Gracenote
9
9
  def search(artist: nil, album: nil, track: nil, mode: nil, range: nil)
10
10
  query("album_search", auth: auth, lang: lang, country: country) do |xml|
11
11
  xml.MODE { xml.text mode } if mode
12
- if range
13
- xml.RANGE {
14
- xml.START range[:start]
15
- xml.END range[:end] if range[:end]
16
- }
17
- end
12
+ set_range(xml, range) if range
13
+
18
14
  xml.TEXT(TYPE: "ARTIST") { xml.text artist } if artist
19
15
  xml.TEXT(TYPE: "ALBUM_TITLE") { xml.text album } if album
20
16
  xml.TEXT(TYPE: "TRACK_TITLE") { xml.text track } if track
@@ -24,6 +20,16 @@ module Gracenote
24
20
  Option.new(xml, options).render
25
21
  end
26
22
  end
23
+
24
+ private
25
+
26
+ def set_range(xml, range)
27
+ range[:end] ||= range[:start] + 10
28
+ xml.RANGE {
29
+ xml.START range[:start]
30
+ xml.END range[:end]
31
+ }
32
+ end
27
33
  end
28
34
  end
29
35
  end
@@ -1,3 +1,3 @@
1
1
  module Gracenote
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gracenote-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoya Hirano
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  version: '0'
249
249
  requirements: []
250
250
  rubyforge_project:
251
- rubygems_version: 2.4.5
251
+ rubygems_version: 2.5.1
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: Gracenote Client for modern Ruby