rbrainz 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/CHANGES +13 -1
  2. data/LICENSE +1 -1
  3. data/README +2 -2
  4. data/Rakefile +2 -2
  5. data/TODO +9 -2
  6. data/doc/README.rdoc +5 -5
  7. data/examples/getartist.rb +3 -2
  8. data/examples/getlabel.rb +3 -2
  9. data/examples/getrelease.rb +5 -2
  10. data/examples/getreleasegroup.rb +53 -0
  11. data/examples/gettrack.rb +3 -2
  12. data/examples/getuser.rb +2 -1
  13. data/examples/rate.rb +44 -0
  14. data/examples/searchartists.rb +3 -2
  15. data/examples/searchcdstubs.rb +41 -0
  16. data/examples/searchlabels.rb +3 -2
  17. data/examples/searchreleasegroups.rb +36 -0
  18. data/examples/searchreleases.rb +6 -4
  19. data/examples/searchtracks.rb +3 -2
  20. data/examples/submit_isrcs.rb +52 -0
  21. data/examples/tag.rb +3 -2
  22. data/lib/rbrainz.rb +2 -1
  23. data/lib/rbrainz/core_ext.rb +2 -1
  24. data/lib/rbrainz/core_ext/mbid.rb +2 -1
  25. data/lib/rbrainz/core_ext/net_http_digest.rb +3 -2
  26. data/lib/rbrainz/core_ext/range.rb +3 -2
  27. data/lib/rbrainz/core_ext/range/equality.rb +2 -1
  28. data/lib/rbrainz/data/countrynames.rb +6 -3
  29. data/lib/rbrainz/data/languagenames.rb +3 -2
  30. data/lib/rbrainz/data/releasetypenames.rb +3 -2
  31. data/lib/rbrainz/data/scriptnames.rb +3 -2
  32. data/lib/rbrainz/model.rb +3 -2
  33. data/lib/rbrainz/model/alias.rb +3 -2
  34. data/lib/rbrainz/model/artist.rb +11 -3
  35. data/lib/rbrainz/model/collection.rb +3 -2
  36. data/lib/rbrainz/model/default_factory.rb +18 -6
  37. data/lib/rbrainz/model/disc.rb +3 -2
  38. data/lib/rbrainz/model/entity.rb +2 -102
  39. data/lib/rbrainz/model/incomplete_date.rb +3 -2
  40. data/lib/rbrainz/model/individual.rb +11 -2
  41. data/lib/rbrainz/model/isrc.rb +100 -0
  42. data/lib/rbrainz/model/label.rb +5 -2
  43. data/lib/rbrainz/model/mbid.rb +28 -9
  44. data/lib/rbrainz/model/rateable.rb +34 -0
  45. data/lib/rbrainz/model/rating.rb +56 -0
  46. data/lib/rbrainz/model/relateable.rb +118 -0
  47. data/lib/rbrainz/model/relation.rb +2 -1
  48. data/lib/rbrainz/model/release.rb +17 -3
  49. data/lib/rbrainz/model/release_event.rb +3 -2
  50. data/lib/rbrainz/model/release_group.rb +97 -0
  51. data/lib/rbrainz/model/scored_collection.rb +3 -2
  52. data/lib/rbrainz/model/tag.rb +5 -4
  53. data/lib/rbrainz/model/taggable.rb +27 -0
  54. data/lib/rbrainz/model/track.rb +15 -2
  55. data/lib/rbrainz/model/user.rb +3 -2
  56. data/lib/rbrainz/utils.rb +2 -1
  57. data/lib/rbrainz/utils/data.rb +3 -2
  58. data/lib/rbrainz/utils/helper.rb +8 -2
  59. data/lib/rbrainz/version.rb +3 -2
  60. data/lib/rbrainz/webservice.rb +12 -7
  61. data/lib/rbrainz/webservice/filter.rb +53 -4
  62. data/lib/rbrainz/webservice/includes.rb +72 -11
  63. data/lib/rbrainz/webservice/mbxml.rb +129 -67
  64. data/lib/rbrainz/webservice/query.rb +156 -16
  65. data/lib/rbrainz/webservice/webservice.rb +104 -116
  66. data/test/lib/mock_webservice.rb +9 -2
  67. data/test/lib/test_entity.rb +2 -97
  68. data/test/lib/test_factory.rb +9 -1
  69. data/test/lib/test_rateable.rb +31 -0
  70. data/test/lib/test_relateable.rb +103 -0
  71. data/test/lib/test_taggable.rb +36 -0
  72. data/test/lib/testing_helper.rb +17 -2
  73. data/test/test-data/invalid/artist/ratings_1.xml +6 -0
  74. data/test/test-data/invalid/artist/ratings_2.xml +6 -0
  75. data/test/test-data/valid/artist/Tchaikovsky-2.xml +6 -0
  76. data/test/test-data/valid/label/Atlantic_Records_3.xml +6 -0
  77. data/test/test-data/valid/release-group/The_Cure_1.xml +36 -0
  78. data/test/test-data/valid/release/Highway_61_Revisited_2.xml +6 -0
  79. data/test/test-data/valid/track/Silent_All_These_Years_4.xml +3 -0
  80. data/test/test-data/valid/track/Silent_All_These_Years_6.xml +8 -0
  81. data/test/test_alias.rb +2 -1
  82. data/test/test_artist.rb +24 -2
  83. data/test/test_artist_filter.rb +2 -1
  84. data/test/test_artist_includes.rb +13 -3
  85. data/test/test_collection.rb +3 -2
  86. data/test/test_default_factory.rb +8 -1
  87. data/test/test_disc.rb +2 -1
  88. data/test/test_incomplete_date.rb +2 -1
  89. data/test/test_isrc.rb +87 -0
  90. data/test/test_label.rb +8 -1
  91. data/test/test_label_filter.rb +2 -1
  92. data/test/test_label_includes.rb +10 -3
  93. data/test/test_mbid.rb +2 -1
  94. data/test/test_mbxml.rb +93 -2
  95. data/test/test_query.rb +68 -5
  96. data/test/test_range_equality.rb +2 -1
  97. data/test/test_rating.rb +46 -0
  98. data/test/test_relation.rb +2 -1
  99. data/test/test_release.rb +37 -2
  100. data/test/test_release_event.rb +2 -1
  101. data/test/test_release_filter.rb +15 -2
  102. data/test/test_release_group.rb +104 -0
  103. data/test/test_release_group_filter.rb +61 -0
  104. data/test/test_release_group_includes.rb +46 -0
  105. data/test/test_release_includes.rb +16 -3
  106. data/test/test_scored_collection.rb +3 -2
  107. data/test/test_tag.rb +2 -1
  108. data/test/test_track.rb +28 -1
  109. data/test/test_track_filter.rb +2 -1
  110. data/test/test_track_includes.rb +13 -3
  111. data/test/test_utils.rb +2 -1
  112. data/test/test_webservice.rb +11 -1
  113. metadata +38 -20
  114. data/debian/changelog +0 -11
  115. data/debian/compat +0 -1
  116. data/debian/control +0 -13
  117. data/debian/copyright +0 -25
  118. data/debian/rules +0 -48
@@ -1,13 +0,0 @@
1
- Source: rbrainz
2
- Section: libs
3
- Priority: optional
4
- Maintainer: Philipp Wolfer <phw@rubyforge.org>
5
- Build-Depends: debhelper (>= 5), ruby (>= 1.8), rdoc (>= 1.8), rake (>= 0.7), rubygems
6
- Standards-Version: 3.7.3
7
-
8
- Package: rbrainz
9
- Architecture: all
10
- Depends: ruby (>= 1.8)
11
- Description: Ruby MusicBrainz library
12
- RBrainz is a Ruby client library to access the MusicBrainz XML web
13
- service, which can be used to query the MusicBrainz database.
@@ -1,25 +0,0 @@
1
- RBrainz is Copyright (c) 2007 Philipp Wolfer and Nigel Graham.
2
-
3
- Redistribution and use in source and binary forms, with or without
4
- modification, are permitted provided that the following conditions
5
- are met:
6
- 1. Redistributions of source code must retain the above copyright
7
- notice, this list of conditions and the following disclaimer.
8
- 2. Redistributions in binary form must reproduce the above copyright
9
- notice, this list of conditions and the following disclaimer in the
10
- documentation and/or other materials provided with the distribution.
11
- 3. Neither the name of the RBrainz project nor the names of the
12
- contributors may be used to endorse or promote products derived from
13
- this software without specific prior written permission.
14
-
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,48 +0,0 @@
1
- #!/usr/bin/make -f
2
-
3
- config = $(shell ruby -rrbconfig -e 'puts Config::CONFIG["$(1)"]')
4
- #site_ruby := $(call config,rubylibdir)
5
- ruby := $(call config,ruby_install_name)
6
-
7
- clean:
8
- dh_testdir
9
- dh_testroot
10
- rm -rf *-stamp
11
- ruby setup.rb clean
12
- rake clobber_rdoc
13
- dh_clean
14
-
15
- build-stamp:
16
- dh_testdir
17
- ruby setup.rb config --prefix=/usr
18
- ruby setup.rb setup
19
- rake rdoc
20
- touch build-stamp
21
-
22
- build: build-stamp
23
-
24
- install: build
25
- dh_testdir
26
- dh_testroot
27
- ruby setup.rb install --prefix=debian/rbrainz
28
-
29
- binary-indep: install
30
- dh_testdir
31
- dh_testroot
32
- dh_installchangelogs CHANGES
33
- dh_installdocs README TODO
34
- dh_install doc/api/* usr/share/doc/rbrainz/api
35
- dh_installexamples examples/*
36
- dh_compress
37
- dh_fixperms
38
- dh_installdeb
39
- dh_md5sums
40
- dh_gencontrol
41
- dh_builddeb
42
-
43
- binary-arch: install
44
-
45
- binary: binary-indep binary-arch
46
-
47
- .PHONY: clean build install binary-indep binary-arch binary
48
-