acts_as_favoritor 6.0.1 → 6.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e7abb0179e3a83dda0945043c82201b26b14c1b0d8308539de9739ba341a405
4
- data.tar.gz: a6fd92d24e2ab1eeb1900f564ce9bc8b19d881095a77d40cd2d2dbde0a97129e
3
+ metadata.gz: c6c53d74f59dc8acf2361540896c5a5664d5b1b58241db15f9e1a0da93fd76d1
4
+ data.tar.gz: c0497e355fa5901ffec3eebd26c868182865f57ca165a7a3648f0a1a4393e29c
5
5
  SHA512:
6
- metadata.gz: 33cbc78fb53444ead0d3841a9d5b6ea4401efeaf2eebc98b30049823fa6afe45e4ea498780dabd39d67947d6dc4b74369910e24a0b2347fa15a68271cd83af67
7
- data.tar.gz: f9378c666b34f2be834ae2500ec14af029db76ab2ec0275becaeab4296c439abab6ad79c37c2c2d9ec01705376f8cf2523b89305f37cf75194b12a070bc1d73e
6
+ metadata.gz: f3a14b50c5935c7039fdf327bf8923bff9fc9d10da0c3ffe9e1b493737f7179982c03b62a6010936fb68f2d927a5ad434819ce84fc468408a39d6b0e3891f8f5
7
+ data.tar.gz: 48e9198c0290def553015a9f083ed9f37687edab912fee2eb8bbde46b7dbe08c3f66f380ac905f666cda2045f922795e7f5ee92d3c0e1862156408dc36dc2e7b
@@ -9,8 +9,8 @@ module ActsAsFavoritor
9
9
  module ClassMethods
10
10
  def acts_as_favoritable
11
11
  if ActsAsFavoritor.configuration&.cache
12
- serialize :favoritable_score, Hash
13
- serialize :favoritable_total, Hash
12
+ serialize :favoritable_score, type: Hash
13
+ serialize :favoritable_total, type: Hash
14
14
  end
15
15
 
16
16
  has_many :favorited, as: :favoritable, dependent: :destroy,
@@ -9,8 +9,8 @@ module ActsAsFavoritor
9
9
  module ClassMethods
10
10
  def acts_as_favoritor
11
11
  if ActsAsFavoritor.configuration&.cache
12
- serialize :favoritor_score, Hash
13
- serialize :favoritor_total, Hash
12
+ serialize :favoritor_score, type: Hash
13
+ serialize :favoritor_total, type: Hash
14
14
  end
15
15
 
16
16
  has_many :favorites, as: :favoritor, dependent: :destroy
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActsAsFavoritor
4
- VERSION = '6.0.1'
4
+ VERSION = '6.0.2'
5
5
  end
@@ -9,8 +9,16 @@ class ActsAsFavoritorGenerator < Rails::Generators::Base
9
9
  source_root(File.join(File.dirname(__FILE__), 'templates'))
10
10
  desc 'Install acts_as_favoritor'
11
11
 
12
+ def self.timestamped_migrations
13
+ if ActiveRecord.respond_to?(:timestamped_migrations)
14
+ ActiveRecord.timestamped_migrations
15
+ elsif ActiveRecord::Base.respond_to?(:timestamped_migrations)
16
+ ActiveRecord::Base.timestamped_migrations
17
+ end
18
+ end
19
+
12
20
  def self.next_migration_number(dirname)
13
- if ActiveRecord::Base.timestamped_migrations
21
+ if timestamped_migrations
14
22
  Time.now.utc.strftime('%Y%m%d%H%M%S')
15
23
  else
16
24
  format('%<migration_number>.3d',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_favoritor
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 6.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -61,14 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: '2.7'
64
+ version: '3.0'
65
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 3.3.26
71
+ rubygems_version: 3.3.27
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: A Rubygem to add Favorite, Follow, Vote, etc. functionality to ActiveRecord