counter_culture 3.8.1 → 3.8.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: 4355ba12c0a0ecf776641647648a3422d5aafc76c48a5db418d381f51f0890de
4
- data.tar.gz: 8b1dd8e1de14b7b5377deaa9143c0ffbc8e6f4418524931dcd494417de49d1ca
3
+ metadata.gz: 13f043a04b7cca0b364e7692c19425b049b45b4e965ed5caac0dbac2f91622c1
4
+ data.tar.gz: 50dfedf030e3c3823829aedc5e3b2a08fe65b63b50fc439d229afb5ab3fa5d5d
5
5
  SHA512:
6
- metadata.gz: d3c7ec219454d12a50d79815da7fa920cd1644ca268fceea089d9eac28438b7a28df3949f969bc9c63ee60a56c0d6d4e8f56e42f0e2218cb9e42e9a157ca1420
7
- data.tar.gz: 63c4cd5958f0a3a2fa9eb6b6018cc0891ced1f2ad2708d02ea49f9cce8416ffc42a62ae01eb7b2cf2dad5334e16061eac517c7f8be40b35068694b63a238c748
6
+ metadata.gz: 604bd858a6660d3e83b74b339a2675366b5d7908c87c37241ed9eb9a2b245ddb4d02b19d6782d3c30df793cd895be45e22455e34f9aca88e5fee462f472c2a48
7
+ data.tar.gz: a5828bb5f0bd66b6717401b47f8494687a371546c6f3df89c93dd9a524a055e074aeffc3fa6c02e0b2e2cd25c3e706e76c2ef654e22a0b3f48cfb3d0c0c401b7
data/Appraisals CHANGED
@@ -7,7 +7,7 @@
7
7
  7.2
8
8
  ].each do |rails_version|
9
9
  appraise "rails-#{rails_version}" do
10
- gem 'rails', "~> #{rails_version}.0"
10
+ gem 'activerecord', "~> #{rails_version}.0"
11
11
  if Gem::Version.new(rails_version) < Gem::Version.new("7.2")
12
12
  gem 'sqlite3', "~> 1.4"
13
13
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 3.8.2 (October 21, 2024)
2
+
3
+ Bugfixes:
4
+ - Use ActiveRecord version, not Rails version, to make it possible to use `counter_culture_fix_counts` without Rails
5
+ - Tests no longer require Rails, making sure we do not introduce this regression again
6
+
1
7
  ## 3.8.1 (October 18, 2024)
2
8
 
3
9
  Bugfixes:
@@ -268,7 +274,7 @@ Bugfixes:
268
274
  ## 1.8.1 (September 5, 2017)
269
275
 
270
276
  Improvements:
271
- - Use ActiveRecord version, not Rails version, in `Reconciler`, makeing it possible to use `counter_culture_fix_counts` without Rails
277
+ - Use ActiveRecord version, not Rails version, in `Reconciler`, making it possible to use `counter_culture_fix_counts` without Rails
272
278
 
273
279
  ## 1.8.0 (August 30, 2017)
274
280
 
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'paper_trail'
37
37
  spec.add_development_dependency 'paranoia'
38
38
  spec.add_development_dependency 'after_commit_action'
39
- spec.add_development_dependency 'rails', '>= 4.2'
39
+ spec.add_development_dependency 'activerecord', '>= 4.2'
40
40
  spec.add_development_dependency 'rake', '>= 10.0'
41
41
  spec.add_development_dependency 'rdoc', ">= 6.3.1"
42
42
  spec.add_development_dependency 'rspec', '~> 3.0'
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 5.2.0"
5
+ gem "activerecord", "~> 5.2.0"
6
6
  gem "sqlite3", "~> 1.4"
7
7
 
8
8
  gemspec path: "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 6.0.0"
5
+ gem "activerecord", "~> 6.0.0"
6
6
  gem "sqlite3", "~> 1.4"
7
7
 
8
8
  gemspec path: "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 6.1.0"
5
+ gem "activerecord", "~> 6.1.0"
6
6
  gem "sqlite3", "~> 1.4"
7
7
 
8
8
  gemspec path: "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 7.0.0"
5
+ gem "activerecord", "~> 7.0.0"
6
6
  gem "sqlite3", "~> 1.4"
7
7
 
8
8
  gemspec path: "../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 7.1.0"
5
+ gem "activerecord", "~> 7.1.0"
6
6
  gem "sqlite3", "~> 1.4"
7
7
 
8
8
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 7.2.0"
5
+ gem "activerecord", "~> 7.2.0"
6
6
 
7
7
  gemspec path: "../"
@@ -181,17 +181,17 @@ module CounterCulture
181
181
  def log(message)
182
182
  return unless log?
183
183
 
184
- Rails.logger.info(message)
184
+ ActiveRecord::Base.logger.info(message)
185
185
  end
186
186
 
187
187
  def log_without_newline(message)
188
188
  return unless log?
189
189
 
190
- Rails.logger << message if Rails.logger.info?
190
+ ActiveRecord::Base.logger << message if ActiveRecord::Base.logger.info?
191
191
  end
192
192
 
193
193
  def log?
194
- options[:verbose] && Rails.logger
194
+ options[:verbose] && ActiveRecord::Base.logger
195
195
  end
196
196
 
197
197
  # keep track of what we fixed, e.g. for a notification email
@@ -1,3 +1,3 @@
1
1
  module CounterCulture
2
- VERSION = '3.8.1'.freeze
2
+ VERSION = '3.8.2'.freeze
3
3
  end
@@ -23,11 +23,11 @@ module CounterCulture
23
23
  private
24
24
 
25
25
  def rails_7_1?
26
- Gem::Requirement.new('~> 7.1.0').satisfied_by?(Gem::Version.new(Rails.version))
26
+ Gem::Requirement.new('~> 7.1.0').satisfied_by?(ActiveRecord.version)
27
27
  end
28
28
 
29
29
  def rails_7_2_or_greater?
30
- Gem::Requirement.new('>= 7.2.0').satisfied_by?(Gem::Version.new(Rails.version))
30
+ Gem::Requirement.new('>= 7.2.0').satisfied_by?(ActiveRecord.version)
31
31
  end
32
32
  end
33
33
  end
@@ -27,8 +27,8 @@ class CounterCultureGenerator < ActiveRecord::Generators::Base
27
27
  end
28
28
 
29
29
  def migration_version
30
- if Gem::Version.new(Rails.version) >= Gem::Version.new('5.0.0')
31
- "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
30
+ if ActiveRecord.version >= Gem::Version.new('5.0.0')
31
+ "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
32
32
  end
33
33
  end
34
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: counter_culture
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus von Koeller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-18 00:00:00.000000000 Z
11
+ date: 2024-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -151,7 +151,7 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: rails
154
+ name: activerecord
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="