counter_culture 1.8.0 → 1.8.1

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
  SHA1:
3
- metadata.gz: d2851375f488ec2d44fad34f75bc463cc7b6d30e
4
- data.tar.gz: e8cee5f97368554bd04a0acc97b9feffb7e9fe5c
3
+ metadata.gz: 5495ff50331ad38e5543733232a54d77605f5b68
4
+ data.tar.gz: 87bbafc46cee9282a6e809f9aa912357db60722d
5
5
  SHA512:
6
- metadata.gz: b6af5865d97f22a07be30100266b5b2ee67778c9447c3e74e45c82d21e268912f83d295431cc4ad5ed26d3cc86eee95277a846044b9247ef61b238e6b98ac411
7
- data.tar.gz: f8ac7e975612ddb98bb955b090db7d29511b602797fa3d684a1743a1d000f95e8a5bd8d2c0b6092c8a6cec236cd932a7437517e2da33c2e39c5e64e69d21fbca
6
+ metadata.gz: 5f776a977831ea9aae705529c3010ee60d4e253b63d77c8aa808c6d907207c60ab30e386d62ed1778b9b8e05ecd8015f2cd3a55a2820ddcfe6833c913c740e4b
7
+ data.tar.gz: b5a9c5f30dff001b9fb50d0d723a14a77395243a7b628d76be3187cf4657ddc192f47bb55a13b735439a5a9b9c57fec0114b9ffd8a276796be4b502b9687ee4a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.8.1 (September 5, 2018)
2
+
3
+ Improvements:
4
+ - Use ActiveRecord version, not Rails version, in `Reconciler`, makeing it possible to use `counter_culture_fix_counts` without Rails
5
+
1
6
  ## 1.8.0 (August 30, 2017)
2
7
 
3
8
  Improvements:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.0
1
+ 1.8.1
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: counter_culture 1.8.0 ruby lib
5
+ # stub: counter_culture 1.8.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "counter_culture"
9
- s.version = "1.8.0"
9
+ s.version = "1.8.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Magnus von Koeller"]
14
- s.date = "2017-08-30"
14
+ s.date = "2017-09-05"
15
15
  s.description = "counter_culture provides turbo-charged counter caches that are kept up-to-date not just on create and destroy, that support multiple levels of indirection through relationships, allow dynamic column names and that avoid deadlocks by updating in the after_commit callback."
16
16
  s.email = "magnus@vonkoeller.de"
17
17
  s.extra_rdoc_files = [
@@ -3,6 +3,8 @@ require 'active_support/core_ext/module/attribute_accessors'
3
3
 
4
4
  module CounterCulture
5
5
  class Reconciler
6
+ ACTIVE_RECORD_VERSION = Gem.loaded_specs["activerecord"].version
7
+
6
8
  attr_reader :counter, :options, :changes
7
9
 
8
10
  delegate :model, :relation, :full_primary_key, :relation_reflect, :polymorphic?, :to => :counter
@@ -221,7 +223,7 @@ module CounterCulture
221
223
  end
222
224
 
223
225
  def parameterize(string)
224
- if Rails.version < '5.0'
226
+ if ACTIVE_RECORD_VERSION < Gem::Version.new("5.0")
225
227
  string.parameterize('_')
226
228
  else
227
229
  string.parameterize(separator: '_')
@@ -1825,6 +1825,10 @@ describe "CounterCulture" do
1825
1825
 
1826
1826
  describe "with papertrail support", versioning: true do
1827
1827
  it "creates a papertrail version when changed" do
1828
+ if Rails.version > "4.0.0" && Rails.version < "4.1.0"
1829
+ skip("Unsupported in this version of Rails")
1830
+ end
1831
+
1828
1832
  user = User.create
1829
1833
  product = Product.create
1830
1834
 
@@ -1840,6 +1844,10 @@ describe "CounterCulture" do
1840
1844
  end
1841
1845
 
1842
1846
  it "does not create a papertrail version when papertrail flag not set" do
1847
+ if Rails.version > "4.0.0" && Rails.version < "4.1.0"
1848
+ skip("Unsupported in this version of Rails")
1849
+ end
1850
+
1843
1851
  user = User.create
1844
1852
  product = Product.create
1845
1853
 
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: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus von Koeller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: after_commit_action