active_musicbrainz 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/Rakefile +0 -0
- data/active_musicbrainz.gemspec +0 -0
- data/lib/active_musicbrainz.rb +0 -0
- data/lib/active_musicbrainz/config.rb +0 -0
- data/lib/active_musicbrainz/models/base.rb +0 -6
- data/lib/active_musicbrainz/models/factory.rb +0 -0
- data/lib/active_musicbrainz/models/model.rb +0 -16
- data/lib/active_musicbrainz/version.rb +1 -1
- data/test/config.yml +0 -0
- data/test/models/model_test.rb +0 -0
- data/test/test_helper.rb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d31602d4d4aeeedaf36ba1a0247c29aa8e9e59a
|
4
|
+
data.tar.gz: 22e2940d127605c9b0eab9450abb59f9c9bc9efc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14bca336a57ce85e92ae6fd7ef26f58119171c94d4e9c9cb4f4258a0a05d8c810b5de3e63413c1bead2bd960b01a486859f6c0f2a722e4999caef83fce18e049
|
7
|
+
data.tar.gz: 87f964f9963a1b0202a521150881bfbcc727557cc97ab956a82145db7141a4d56eee834dfbf5960583ce5a90d263a3fdff2109fb7dbc1108e0a36c0b70f318f4
|
data/.gitignore
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/active_musicbrainz.gemspec
CHANGED
File without changes
|
data/lib/active_musicbrainz.rb
CHANGED
File without changes
|
File without changes
|
@@ -6,12 +6,6 @@ module ActiveMusicbrainz
|
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
-
def has_name association_name
|
10
|
-
define_method :name do
|
11
|
-
send(association_name).name
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
9
|
def has_artist_credits
|
16
10
|
belongs_to :artist_credit, foreign_key: :artist_credit
|
17
11
|
has_many :artist_credit_names, through: :artist_credit
|
File without changes
|
@@ -11,7 +11,6 @@ module ActiveMusicbrainz
|
|
11
11
|
|
12
12
|
Factory.define do
|
13
13
|
model :artist do
|
14
|
-
belongs_to :artist_name, foreign_key: :name
|
15
14
|
has_many :artist_credit_name, foreign_key: :artist
|
16
15
|
has_many :artist_credits, through: :artist_credit_name
|
17
16
|
has_many :release_groups, through: :artist_credits
|
@@ -19,7 +18,6 @@ module ActiveMusicbrainz
|
|
19
18
|
has_many :recordings, through: :artist_credits
|
20
19
|
has_many :tracks, through: :artist_credits
|
21
20
|
has_many :aliases, foreign_key: :artist, class_name: 'ArtistAlias'
|
22
|
-
has_name :artist_name
|
23
21
|
has_many :l_artist_urls, foreign_key: :entity0
|
24
22
|
has_many :urls, through: :l_artist_urls
|
25
23
|
has_gid
|
@@ -32,26 +30,20 @@ module ActiveMusicbrainz
|
|
32
30
|
|
33
31
|
model :artist_credit_name do
|
34
32
|
belongs_to :artist_credit, foreign_key: :artist_credit
|
35
|
-
belongs_to :artist_name, foreign_key: :name
|
36
33
|
belongs_to :artist, foreign_key: :artist
|
37
|
-
has_name :artist_name
|
38
34
|
end
|
39
35
|
|
40
36
|
model :artist_credit do
|
41
|
-
belongs_to :artist_name, foreign_key: :name
|
42
37
|
has_many :artist_credit_names, foreign_key: :artist_credit
|
43
38
|
has_many :artists, through: :artist_credit_names
|
44
39
|
has_many :recordings, foreign_key: :artist_credit
|
45
40
|
has_many :tracks, foreign_key: :artist_credit
|
46
41
|
has_many :releases, foreign_key: :artist_credit
|
47
42
|
has_many :release_groups, foreign_key: :artist_credit
|
48
|
-
has_name :artist_name
|
49
43
|
end
|
50
44
|
|
51
45
|
model :artist_alias do
|
52
|
-
belongs_to :artist_name, foreign_key: :name
|
53
46
|
belongs_to :artist, foreign_key: :artist
|
54
|
-
has_name :artist_name
|
55
47
|
end
|
56
48
|
|
57
49
|
model :url do
|
@@ -60,11 +52,9 @@ module ActiveMusicbrainz
|
|
60
52
|
end
|
61
53
|
|
62
54
|
model :track do
|
63
|
-
belongs_to :track_name, foreign_key: :name
|
64
55
|
belongs_to :recording, foreign_key: :recording
|
65
56
|
belongs_to :medium, foreign_key: :medium
|
66
57
|
has_one :release, through: :medium
|
67
|
-
has_name :track_name
|
68
58
|
has_artist_credits
|
69
59
|
has_gid
|
70
60
|
end
|
@@ -80,9 +70,7 @@ module ActiveMusicbrainz
|
|
80
70
|
end
|
81
71
|
|
82
72
|
model :release_group do
|
83
|
-
belongs_to :release_name, foreign_key: :name
|
84
73
|
has_many :releases, foreign_key: :release_group
|
85
|
-
has_name :release_name
|
86
74
|
has_many :recordings, through: :releases
|
87
75
|
belongs_to :type, class_name: 'ReleaseGroupPrimaryType', foreign_key: :type
|
88
76
|
has_many :release_group_secondary_type_joins, foreign_key: :release_group
|
@@ -92,11 +80,9 @@ module ActiveMusicbrainz
|
|
92
80
|
end
|
93
81
|
|
94
82
|
model :release do
|
95
|
-
belongs_to :release_name, foreign_key: :name
|
96
83
|
belongs_to :release_group, foreign_key: :release_group
|
97
84
|
has_many :mediums, -> { order('medium.position') }, foreign_key: :release
|
98
85
|
has_many :recordings, through: :mediums
|
99
|
-
has_name :release_name
|
100
86
|
has_many :tracks, through: :mediums
|
101
87
|
belongs_to :status, class_name: 'ReleaseStatus', foreign_key: :status
|
102
88
|
belongs_to :packaging, class_name: 'ReleasePackaging', foreign_key: :packaging
|
@@ -115,13 +101,11 @@ module ActiveMusicbrainz
|
|
115
101
|
end
|
116
102
|
|
117
103
|
model :recording do
|
118
|
-
belongs_to :track_name, foreign_key: :name
|
119
104
|
has_many :tracks, foreign_key: :recording
|
120
105
|
has_many :release_groups, through: :tracks
|
121
106
|
has_many :releases, through: :mediums
|
122
107
|
has_many :release_groups, through: :releases
|
123
108
|
has_many :mediums, through: :tracks
|
124
|
-
has_name :track_name
|
125
109
|
has_artist_credits
|
126
110
|
has_gid
|
127
111
|
end
|
data/test/config.yml
CHANGED
File without changes
|
data/test/models/model_test.rb
CHANGED
File without changes
|
data/test/test_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_musicbrainz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Franz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.0.
|
97
|
+
rubygems_version: 2.0.6
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: ActiveRecord models the MusicBrainz database
|