musicbrainz 0.7.7 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/test.yml +26 -0
  3. data/.gitignore +2 -2
  4. data/Gemfile +11 -0
  5. data/Gemfile.lock +54 -0
  6. data/LICENSE +2 -2
  7. data/README.md +21 -10
  8. data/lib/musicbrainz/bindings/artist.rb +0 -1
  9. data/lib/musicbrainz/bindings/artist_search.rb +0 -1
  10. data/lib/musicbrainz/bindings/discid_releases.rb +13 -0
  11. data/lib/musicbrainz/bindings/recording.rb +19 -0
  12. data/lib/musicbrainz/bindings/{track_search.rb → recording_search.rb} +1 -2
  13. data/lib/musicbrainz/bindings/relations.rb +1 -2
  14. data/lib/musicbrainz/bindings/release_group_search.rb +0 -1
  15. data/lib/musicbrainz/client_modules/caching_proxy.rb +27 -13
  16. data/lib/musicbrainz/models/base_model.rb +12 -2
  17. data/lib/musicbrainz/models/recording.rb +20 -0
  18. data/lib/musicbrainz/models/release.rb +8 -1
  19. data/lib/musicbrainz/models/track.rb +0 -4
  20. data/lib/musicbrainz/version.rb +1 -1
  21. data/lib/musicbrainz.rb +4 -1
  22. data/musicbrainz.gemspec +3 -6
  23. data/spec/bindings/recording_search_spec.rb +48 -0
  24. data/spec/bindings/relations_spec.rb +45 -26
  25. data/spec/bindings/release_group_search_spec.rb +24 -6
  26. data/spec/bindings/release_spec.rb +94 -18
  27. data/spec/client_modules/cache_spec.rb +18 -17
  28. data/spec/deprecated/cache_config_spec.rb +4 -6
  29. data/spec/deprecated/proxy_config_spec.rb +4 -6
  30. data/spec/fixtures/artist/find_69b39eab-6577-46a4-a9f5-817839092033.xml +168 -0
  31. data/spec/fixtures/artist/release_groups_69b39eab-6577-46a4-a9f5-817839092033.xml +412 -0
  32. data/spec/fixtures/artist/search_kasabian.xml +104 -0
  33. data/spec/fixtures/recording/find_b3015bab-1540-4d4e-9f30-14872a1525f7.xml +8 -0
  34. data/spec/fixtures/recording/search_bound_for_the_floor_local_h.xml +647 -0
  35. data/spec/fixtures/release/find_2225dd4c-ae9a-403b-8ea0-9e05014c778f.xml +44 -0
  36. data/spec/fixtures/release/find_2225dd4c-ae9a-403b-8ea0-9e05014c778f_tracks.xml +151 -0
  37. data/spec/fixtures/release/find_b94cb547-cf7a-4357-894c-53c3bf33b093.xml +52 -0
  38. data/spec/fixtures/release/find_by_discid_pmzhT6ZlFiwSRCdVwV0eqire5_Y-.xml +141 -0
  39. data/spec/fixtures/release/list_6f33e0f0-cde2-38f9-9aee-2c60af8d1a61.xml +344 -0
  40. data/spec/fixtures/release_group/search_kasabian_empire_album.xml +117 -0
  41. data/spec/models/artist_spec.rb +77 -46
  42. data/spec/models/base_model_spec.rb +50 -22
  43. data/spec/models/recording_spec.rb +42 -0
  44. data/spec/models/release_group_spec.rb +61 -55
  45. data/spec/models/release_spec.rb +63 -28
  46. data/spec/models/track_spec.rb +19 -15
  47. data/spec/spec_helper.rb +7 -7
  48. data/spec/support/mock_helpers.rb +13 -0
  49. metadata +55 -93
  50. data/.rspec +0 -1
  51. data/.travis.yml +0 -4
  52. data/spec/bindings/track_search_spec.rb +0 -17
  53. data/spec/fixtures/artist/search.xml +0 -67
  54. data/spec/fixtures/kasabian.xml +0 -1
  55. data/spec/fixtures/release/list.xml +0 -344
  56. /data/spec/fixtures/release_group/{entity.xml → find_6f33e0f0-cde2-38f9-9aee-2c60af8d1a61.xml} +0 -0
  57. /data/spec/fixtures/release_group/{search.xml → search_kasabian_empire.xml} +0 -0
metadata CHANGED
@@ -1,109 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: musicbrainz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
5
- prerelease:
4
+ version: 0.8.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Gregory Eremin
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-12-01 00:00:00.000000000 Z
11
+ date: 2024-03-31 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: nokogiri
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: rspec
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: awesome_print
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 10.4.0
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 10.4.0
94
- description:
41
+ description:
95
42
  email:
96
43
  - magnolia_fan@me.com
97
44
  executables: []
98
45
  extensions: []
99
46
  extra_rdoc_files: []
100
47
  files:
101
- - .gitignore
102
- - .rspec
103
- - .travis.yml
48
+ - ".github/workflows/test.yml"
49
+ - ".gitignore"
104
50
  - CHANGELOG.md
105
51
  - Contributors
106
52
  - Gemfile
53
+ - Gemfile.lock
107
54
  - LICENSE
108
55
  - README.md
109
56
  - Rakefile
@@ -112,6 +59,9 @@ files:
112
59
  - lib/musicbrainz/bindings/artist.rb
113
60
  - lib/musicbrainz/bindings/artist_release_groups.rb
114
61
  - lib/musicbrainz/bindings/artist_search.rb
62
+ - lib/musicbrainz/bindings/discid_releases.rb
63
+ - lib/musicbrainz/bindings/recording.rb
64
+ - lib/musicbrainz/bindings/recording_search.rb
115
65
  - lib/musicbrainz/bindings/relations.rb
116
66
  - lib/musicbrainz/bindings/release.rb
117
67
  - lib/musicbrainz/bindings/release_group.rb
@@ -119,7 +69,6 @@ files:
119
69
  - lib/musicbrainz/bindings/release_group_search.rb
120
70
  - lib/musicbrainz/bindings/release_tracks.rb
121
71
  - lib/musicbrainz/bindings/track.rb
122
- - lib/musicbrainz/bindings/track_search.rb
123
72
  - lib/musicbrainz/client.rb
124
73
  - lib/musicbrainz/client_modules/caching_proxy.rb
125
74
  - lib/musicbrainz/client_modules/failsafe_proxy.rb
@@ -129,76 +78,89 @@ files:
129
78
  - lib/musicbrainz/middleware.rb
130
79
  - lib/musicbrainz/models/artist.rb
131
80
  - lib/musicbrainz/models/base_model.rb
81
+ - lib/musicbrainz/models/recording.rb
132
82
  - lib/musicbrainz/models/release.rb
133
83
  - lib/musicbrainz/models/release_group.rb
134
84
  - lib/musicbrainz/models/track.rb
135
85
  - lib/musicbrainz/version.rb
136
86
  - musicbrainz.gemspec
87
+ - spec/bindings/recording_search_spec.rb
137
88
  - spec/bindings/relations_spec.rb
138
89
  - spec/bindings/release_group_search_spec.rb
139
90
  - spec/bindings/release_spec.rb
140
- - spec/bindings/track_search_spec.rb
141
91
  - spec/client_modules/cache_spec.rb
142
92
  - spec/deprecated/cache_config_spec.rb
143
93
  - spec/deprecated/proxy_config_spec.rb
144
- - spec/fixtures/artist/search.xml
145
- - spec/fixtures/kasabian.xml
146
- - spec/fixtures/release/list.xml
147
- - spec/fixtures/release_group/entity.xml
148
- - spec/fixtures/release_group/search.xml
94
+ - spec/fixtures/artist/find_69b39eab-6577-46a4-a9f5-817839092033.xml
95
+ - spec/fixtures/artist/release_groups_69b39eab-6577-46a4-a9f5-817839092033.xml
96
+ - spec/fixtures/artist/search_kasabian.xml
97
+ - spec/fixtures/recording/find_b3015bab-1540-4d4e-9f30-14872a1525f7.xml
98
+ - spec/fixtures/recording/search_bound_for_the_floor_local_h.xml
99
+ - spec/fixtures/release/find_2225dd4c-ae9a-403b-8ea0-9e05014c778f.xml
100
+ - spec/fixtures/release/find_2225dd4c-ae9a-403b-8ea0-9e05014c778f_tracks.xml
101
+ - spec/fixtures/release/find_b94cb547-cf7a-4357-894c-53c3bf33b093.xml
102
+ - spec/fixtures/release/find_by_discid_pmzhT6ZlFiwSRCdVwV0eqire5_Y-.xml
103
+ - spec/fixtures/release/list_6f33e0f0-cde2-38f9-9aee-2c60af8d1a61.xml
104
+ - spec/fixtures/release_group/find_6f33e0f0-cde2-38f9-9aee-2c60af8d1a61.xml
105
+ - spec/fixtures/release_group/search_kasabian_empire.xml
106
+ - spec/fixtures/release_group/search_kasabian_empire_album.xml
149
107
  - spec/models/artist_spec.rb
150
108
  - spec/models/base_model_spec.rb
109
+ - spec/models/recording_spec.rb
151
110
  - spec/models/release_group_spec.rb
152
111
  - spec/models/release_spec.rb
153
112
  - spec/models/track_spec.rb
154
113
  - spec/spec_helper.rb
155
- homepage: http://github.com/magnolia-fan/musicbrainz
114
+ - spec/support/mock_helpers.rb
115
+ homepage: http://github.com/localhots/musicbrainz
156
116
  licenses:
157
117
  - MIT
158
- post_install_message:
118
+ metadata: {}
119
+ post_install_message:
159
120
  rdoc_options: []
160
121
  require_paths:
161
122
  - lib
162
123
  required_ruby_version: !ruby/object:Gem::Requirement
163
- none: false
164
124
  requirements:
165
- - - ! '>='
125
+ - - ">="
166
126
  - !ruby/object:Gem::Version
167
127
  version: '0'
168
- segments:
169
- - 0
170
- hash: -3495484927768384955
171
128
  required_rubygems_version: !ruby/object:Gem::Requirement
172
- none: false
173
129
  requirements:
174
- - - ! '>='
130
+ - - ">="
175
131
  - !ruby/object:Gem::Version
176
132
  version: '0'
177
- segments:
178
- - 0
179
- hash: -3495484927768384955
180
133
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 1.8.23
183
- signing_key:
184
- specification_version: 3
134
+ rubygems_version: 3.3.26
135
+ signing_key:
136
+ specification_version: 4
185
137
  summary: MusicBrainz Web Service wrapper with ActiveRecord-style models
186
138
  test_files:
139
+ - spec/bindings/recording_search_spec.rb
187
140
  - spec/bindings/relations_spec.rb
188
141
  - spec/bindings/release_group_search_spec.rb
189
142
  - spec/bindings/release_spec.rb
190
- - spec/bindings/track_search_spec.rb
191
143
  - spec/client_modules/cache_spec.rb
192
144
  - spec/deprecated/cache_config_spec.rb
193
145
  - spec/deprecated/proxy_config_spec.rb
194
- - spec/fixtures/artist/search.xml
195
- - spec/fixtures/kasabian.xml
196
- - spec/fixtures/release/list.xml
197
- - spec/fixtures/release_group/entity.xml
198
- - spec/fixtures/release_group/search.xml
146
+ - spec/fixtures/artist/find_69b39eab-6577-46a4-a9f5-817839092033.xml
147
+ - spec/fixtures/artist/release_groups_69b39eab-6577-46a4-a9f5-817839092033.xml
148
+ - spec/fixtures/artist/search_kasabian.xml
149
+ - spec/fixtures/recording/find_b3015bab-1540-4d4e-9f30-14872a1525f7.xml
150
+ - spec/fixtures/recording/search_bound_for_the_floor_local_h.xml
151
+ - spec/fixtures/release/find_2225dd4c-ae9a-403b-8ea0-9e05014c778f.xml
152
+ - spec/fixtures/release/find_2225dd4c-ae9a-403b-8ea0-9e05014c778f_tracks.xml
153
+ - spec/fixtures/release/find_b94cb547-cf7a-4357-894c-53c3bf33b093.xml
154
+ - spec/fixtures/release/find_by_discid_pmzhT6ZlFiwSRCdVwV0eqire5_Y-.xml
155
+ - spec/fixtures/release/list_6f33e0f0-cde2-38f9-9aee-2c60af8d1a61.xml
156
+ - spec/fixtures/release_group/find_6f33e0f0-cde2-38f9-9aee-2c60af8d1a61.xml
157
+ - spec/fixtures/release_group/search_kasabian_empire.xml
158
+ - spec/fixtures/release_group/search_kasabian_empire_album.xml
199
159
  - spec/models/artist_spec.rb
200
160
  - spec/models/base_model_spec.rb
161
+ - spec/models/recording_spec.rb
201
162
  - spec/models/release_group_spec.rb
202
163
  - spec/models/release_spec.rb
203
164
  - spec/models/track_spec.rb
204
165
  - spec/spec_helper.rb
166
+ - spec/support/mock_helpers.rb
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- rvm:
2
- - 1.9.2
3
- - 1.9.3
4
- script: "bundle exec rspec"
@@ -1,17 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- require "spec_helper"
4
-
5
- describe MusicBrainz::Bindings::TrackSearch do
6
- describe '.parse' do
7
- it "gets correct Track (really recording) data" do
8
- response = '<metadata xmlns="http://musicbrainz.org/ns/mmd-2.0#" xmlns:ext="http://musicbrainz.org/ns/ext#-2.0"><recording-list offset="0" count="1"><recording id="0b382a13-32f0-4743-9248-ba5536a6115e" ext:score="100"><title>King Fred</title><artist-credit><name-credit><artist id="f52f7a92-d495-4d32-89e7-8b1e5b8541c8"><name>Too Much Joy</name></artist></name-credit></artist-credit><release-list><release id="8442e42b-c40a-4817-89a0-dbe663c94d2d"><title>Green Eggs and Crack</title></release></release-list></recording></recording-list></metadata>'
9
- described_class.parse(Nokogiri::XML.parse(response).remove_namespaces!.xpath('/metadata')).should == [
10
- {
11
- id: '0b382a13-32f0-4743-9248-ba5536a6115e', mbid: '0b382a13-32f0-4743-9248-ba5536a6115e',
12
- title: 'King Fred', artist: 'Too Much Joy', releases: ['Green Eggs and Crack'], score: 100
13
- }
14
- ]
15
- end
16
- end
17
- end
@@ -1,67 +0,0 @@
1
- <?xml version="1.0" standalone="yes"?>
2
- <metadata created="2013-06-11T14:02:53.104Z" xmlns="http://musicbrainz.org/ns/mmd-2.0#" xmlns:ext="http://musicbrainz.org/ns/ext#-2.0">
3
- <artist-list count="5" offset="0">
4
- <artist id="90fff570-a4ef-4cd4-ba21-e00c7261b05a" type="Person" ext:score="100">
5
- <name>Chris Martin</name>
6
- <sort-name>Martin, Chris</sort-name>
7
- <disambiguation>Reggae / Dancehall singer Christopher Martin</disambiguation>
8
- <life-span>
9
- <ended>false</ended>
10
- </life-span>
11
- </artist>
12
- <artist id="b732a912-af95-472c-be52-b14610734c64" type="Person" ext:score="100">
13
- <name>Chris Martin</name>
14
- <sort-name>Martin, Chris</sort-name>
15
- <disambiguation>Illustrator</disambiguation>
16
- <life-span>
17
- <ended>false</ended>
18
- </life-span>
19
- </artist>
20
- <artist id="98d1ec5a-dd97-4c0b-9c83-7928aac89bca" type="Person" ext:score="100">
21
- <name>Chris Martin</name>
22
- <sort-name>Martin, Chris</sort-name>
23
- <gender>male</gender>
24
- <country>GB</country>
25
- <area id="8a754a16-0027-3a29-b6d7-2b40ea0481ed">
26
- <name>United Kingdom</name>
27
- <sort-name>United Kingdom</sort-name>
28
- </area>
29
- <disambiguation>lead singer of Coldplay</disambiguation>
30
- <ipi-list>
31
- <ipi>00280536565</ipi>
32
- </ipi-list>
33
- <life-span>
34
- <begin>1977-03-02</begin>
35
- <ended>false</ended>
36
- </life-span>
37
- <alias-list>
38
- <alias sort-name="Martin, Christopher Anthony John" type="Legal name">Christopher Anthony John Martin</alias>
39
- </alias-list>
40
- <tag-list>
41
- <tag count="1">
42
- <name>pop/rock</name>
43
- </tag>
44
- </tag-list>
45
- </artist>
46
- <artist id="af2ab893-3212-4226-9e73-73a1660b6952" type="Person" ext:score="100">
47
- <name>Chris Martin</name>
48
- <sort-name>Martin, Chris</sort-name>
49
- <disambiguation>hip hop producer DJ Premier, DJ Primo</disambiguation>
50
- <life-span>
51
- <begin>1965-05-05</begin>
52
- <ended>false</ended>
53
- </life-span>
54
- <alias-list>
55
- <alias sort-name="Christopher Edward Martin">Christopher Edward Martin</alias>
56
- </alias-list>
57
- </artist>
58
- <artist id="444d1b63-534b-4ea6-89f0-0af6ab2e20c3" type="Person" ext:score="100">
59
- <name>Chris Martin</name>
60
- <sort-name>Martin, Chris</sort-name>
61
- <disambiguation>Disney songwriter/composer</disambiguation>
62
- <life-span>
63
- <ended>false</ended>
64
- </life-span>
65
- </artist>
66
- </artist-list>
67
- </metadata>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?><metadata xmlns="http://musicbrainz.org/ns/mmd-2.0#"><artist type="Group" id="69b39eab-6577-46a4-a9f5-817839092033"><name>Kasabian</name><sort-name>Kasabian</sort-name><country>GB</country><life-span><begin>1999</begin></life-span><relation-list target-type="url"><relation type="allmusic"><target>http://allmusic.com/artist/p678134</target></relation><relation type="wikipedia"><target>http://en.wikipedia.org/wiki/Kasabian</target></relation><relation type="microblog"><target>http://twitter.com/kasabianhq</target></relation><relation type="BBC Music page"><target>http://www.bbc.co.uk/music/artists/69b39eab-6577-46a4-a9f5-817839092033</target></relation><relation type="discogs"><target>http://www.discogs.com/artist/Kasabian</target></relation><relation type="social network"><target>http://www.facebook.com/kasabian</target></relation><relation type="IMDb"><target>http://www.imdb.com/name/nm1868442/</target></relation><relation type="official homepage"><target>http://www.kasabian.co.uk/</target></relation><relation type="myspace"><target>http://www.myspace.com/kasabian</target></relation><relation type="youtube"><target>http://www.youtube.com/kasabianvevo</target></relation><relation type="youtube"><target>http://www.youtube.com/user/KasabianTour</target></relation></relation-list></artist></metadata>