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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/counter_culture.gemspec +3 -3
- data/lib/counter_culture/reconciler.rb +3 -1
- data/spec/counter_culture_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5495ff50331ad38e5543733232a54d77605f5b68
|
4
|
+
data.tar.gz: 87bbafc46cee9282a6e809f9aa912357db60722d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f776a977831ea9aae705529c3010ee60d4e253b63d77c8aa808c6d907207c60ab30e386d62ed1778b9b8e05ecd8015f2cd3a55a2820ddcfe6833c913c740e4b
|
7
|
+
data.tar.gz: b5a9c5f30dff001b9fb50d0d723a14a77395243a7b628d76be3187cf4657ddc192f47bb55a13b735439a5a9b9c57fec0114b9ffd8a276796be4b502b9687ee4a
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.1
|
data/counter_culture.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
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
|
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.
|
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-
|
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
|