elo_rankable 0.2.1 → 0.2.2

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: 5301ca9d389672548e302fc188a284b615dfe051d6eb567a4414616fe9b3844e
4
- data.tar.gz: 5e95c93f2f631c50650b3a5795f6a27a848df764f5a06f8c337760b093291d5d
3
+ metadata.gz: 3a2a102c791479f6bbdad8add9ce7126df69d8e45e77ab5ce8398e24964590f3
4
+ data.tar.gz: dc01897ab2b06287568dbb5fee8274df3f642156632adf468feb8d91ec15075a
5
5
  SHA512:
6
- metadata.gz: 778ea1d6d4826cb295267ae7974c453b40eaeb512581ba9c1863e1cf8a2d3ca2734627ee73c364eb6c7571cfeb774d7af5f97a54d93b2bbfd0916ac2e6a6c9e3
7
- data.tar.gz: 269c6ab72293e2d61eb44c679acd666af9c4239a3f389c656f0aef32442e9e90abf2d639910a53ed1f5b28d203bdadf1a6cc81ee763657667637bf75283bc880
6
+ metadata.gz: 28baecec5d8f7f31356896511391c753f4031123a383dd0277784eb5f87c61304cada7c805d85fda89338883ed2baf56052c351b8197eb9f7c14a82a6d48de45
7
+ data.tar.gz: 99b47e4c90d0ac00cf2a6b75705ac331e0ed8acbfcc8e9710a4825009b322feadec08350f1d3ef6bc16bec0005de99e0568b4fa9fb7af2b37884eefbb4cea656
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.2] - 2025-08-10
9
+
10
+ - Fixed compatibility with Rails 8.1 and ActiveRecord 8.1
11
+ - Updated `create_elo_rankings` migration to use the current ActiveRecord version
12
+
8
13
  ## [0.2.1] - 2025-08-09
9
14
 
10
15
  - Changed dependency versions to ensure compatibility with Rails 8.1 and ActiveRecord 8.1
data/elo_rankable.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['Aberen']
9
9
  spec.email = ['nijoergensen@gmail.com']
10
10
 
11
- spec.summary = 'Add ELO rating capabilities to any ActiveRecord model'
12
- spec.description = 'Adds ELO rating to any ActiveRecord model via has_elo_ranking. It stores ratings in a separate EloRanking model to keep your host model clean, and provides domain-style methods for updating rankings after matches.'
11
+ spec.summary = 'Add Elo rating capabilities to any ActiveRecord model'
12
+ spec.description = 'Adds Elo rating to any ActiveRecord model via has_elo_ranking. It stores ratings in a separate EloRanking model to keep your host model clean, and provides domain-style methods for updating rankings after matches.'
13
13
  spec.homepage = 'https://github.com/Aberen/elo_rankable'
14
14
  spec.license = 'MIT'
15
15
  spec.required_ruby_version = '>= 2.7.0'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EloRankable
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
@@ -1,14 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/generators/active_record'
3
+ require 'rails/generators'
4
+ require 'rails/generators/migration'
4
5
 
5
6
  module EloRankable
6
7
  module Generators
7
- class InstallGenerator < ActiveRecord::Generators::Base
8
+ class InstallGenerator < Rails::Generators::Base
9
+ include Rails::Generators::Migration
10
+
8
11
  desc 'Create migration for EloRankable'
9
12
 
10
13
  source_root File.expand_path('templates', __dir__)
11
14
 
15
+ def self.next_migration_number(dirname)
16
+ next_migration_number = current_migration_number(dirname) + 1
17
+ ActiveRecord::Migration.next_migration_number(next_migration_number)
18
+ end
19
+
12
20
  def self.default_generator_root
13
21
  File.dirname(__FILE__)
14
22
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class CreateEloRankings < ActiveRecord::Migration[6.0]
3
+ class CreateEloRankings < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
4
4
  def change
5
5
  create_table :elo_rankings do |t|
6
6
  t.references :rankable, polymorphic: true, null: false, index: true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elo_rankable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aberen
@@ -50,7 +50,7 @@ dependencies:
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '9.0'
53
- description: Adds ELO rating to any ActiveRecord model via has_elo_ranking. It stores
53
+ description: Adds Elo rating to any ActiveRecord model via has_elo_ranking. It stores
54
54
  ratings in a separate EloRanking model to keep your host model clean, and provides
55
55
  domain-style methods for updating rankings after matches.
56
56
  email:
@@ -100,5 +100,5 @@ requirements: []
100
100
  rubygems_version: 3.5.11
101
101
  signing_key:
102
102
  specification_version: 4
103
- summary: Add ELO rating capabilities to any ActiveRecord model
103
+ summary: Add Elo rating capabilities to any ActiveRecord model
104
104
  test_files: []