active_brainz 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6629b4ff7aac1998318552da966868db78b5066ddd34639ed20a76954fa23f6
4
- data.tar.gz: f535b9d8467426a083124c7704be8a0d213ddbbc00fc34131e444260661a9d71
3
+ metadata.gz: db4ee97165d97510da481ad797366ee8dc34ca77028faad969e0c9d46a03feaf
4
+ data.tar.gz: f6cbfd57228df6cdeeacb4f7d6609c9ce5ea26d199c6746fe3e75de6c0225cb6
5
5
  SHA512:
6
- metadata.gz: 76fd96514ff169c3854bc6f05808c93f381c2a9050c5d88b923d4f3fb3152c2fc68e56d188b7da18caf00822345f71357d35126f24aafcfa1cb05be4e9a2e0fc
7
- data.tar.gz: 7150003ddd5bef8f3e2c20ee1c455c89a0e933b982978e31266d896edaeb9f14c2df3c99f9123e377dc563cfb1996c457558fc13bde3b22b17d86870432c690a
6
+ metadata.gz: 26f1fa7b022f0743bd63d25aa94b0fc7801cebf11d6acd8915de5256cb8c0fcd2da1eeb9ebf89c5f44fda3ca9680b81254e0793752fea0d42a576bb962d5262a
7
+ data.tar.gz: e56cf01cdd77e56847bb39550ab5cb00974847323c5180e2f67e7c6e3022a91f1928c9d2de394285f6b292862af5066490b231f0ea50a1c9f41b55efc97ed9e8
data/Gemfile CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ # TODO: remove when composite_primary_keys v13 is released
6
+ gem "composite_primary_keys", github: "composite-primary-keys/composite_primary_keys"
7
+
5
8
  # Specify your gem's dependencies in active_brainz.gemspec
6
9
  gemspec
7
10
 
data/README.md CHANGED
@@ -69,6 +69,13 @@ Github Actions will automatically run the test suite, build the `.gem` file and
69
69
 
70
70
  If MusicBrainz' database schema version gets bumped, don't forget to bump the schema version in `lib/active_brainz/version.rb` as well.
71
71
 
72
+ ### Implementing a new model
73
+
74
+ 1. Uncomment the table in `lib/active_brainz/database.rb`
75
+ 1. Run `rake active_brainz:models:render`
76
+ 1. Review the generated models, specs and factories
77
+ 1. Uncomment associations to new models in existing models
78
+
72
79
  ## Contributing
73
80
 
74
81
  Bug reports and pull requests are welcome on GitHub at [https://github.com/floriandejonckheere/active_brainz](https://github.com/floriandejonckheere/active_brainz).
@@ -3,22 +3,18 @@
3
3
  module ActiveBrainz
4
4
  class ArtistCreditName < Base
5
5
  self.table_name = "artist_credit_name"
6
- self.primary_key = %w(artist_credit position)
6
+ self.primary_keys = %w(artist_credit position)
7
7
 
8
8
  belongs_to :artist_credit_name_artist,
9
9
  class_name: "Artist",
10
- foreign_key: "artist",
11
- optional: true
10
+ foreign_key: "artist"
12
11
 
13
12
  belongs_to :artist_credit_name_artist_credit,
14
13
  class_name: "ArtistCredit",
15
- foreign_key: "artist_credit",
16
- optional: true
14
+ foreign_key: "artist_credit"
17
15
 
18
16
  attribute :name
19
-
20
17
  attribute :position, :integer
21
-
22
18
  attribute :join_phrase
23
19
  end
24
20
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_record"
4
+ require "composite_primary_keys"
4
5
 
5
6
  module ActiveBrainz
6
7
  class Base < ActiveRecord::Base
@@ -6,7 +6,7 @@ module ActiveBrainz
6
6
  module Version
7
7
  MAJOR = 0
8
8
  MINOR = 3
9
- PATCH = 0
9
+ PATCH = 1
10
10
  PRE = nil
11
11
 
12
12
  VERSION = [MAJOR, MINOR, PATCH].compact.join(".")
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_brainz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Dejonckheere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '6.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: composite_primary_keys
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: pg
29
43
  requirement: !ruby/object:Gem::Requirement