counter_culture 0.1.16 → 0.1.17

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: d255dba9072e3f8fee1a78ac3bbd9112cbe449f6
4
- data.tar.gz: 69b380ba4f103f791e2bd307d45dd9a0fb2dd3f2
3
+ metadata.gz: 3bf55ab884e9f76030002f56bc3602e3e604d3da
4
+ data.tar.gz: e4d81c1554c982ad4990dbecdb26e98996d4d665
5
5
  SHA512:
6
- metadata.gz: 7ad44a5e6be12700b283205746f62557b84e79aacddaa310c5132d15d12c799d4ad3ddbe9cfed39f8af49e877e128db6602c3381cb08a953df3abe3406e49e10
7
- data.tar.gz: aae6886bea436036391dad5370ca83f69590fe88e0cdbd22c4dfcfac2c57eaab8b5fce2b999ca4688113c610fcf4fe5ce0a0a90a4f308e13026de97945f4599c
6
+ metadata.gz: c573939173201d15d2709230b4000401d032cdd684fae5175e6a21e1730461efa7968505757c6147fc13a72a9fc9ff148ea877043f6e5172e20651f9a5273394
7
+ data.tar.gz: 0c047ebfc7d0b00b5a0b508d7a37c6ca78588544fa412e48c4418a4df47c6d0dd7c71ab97d062876a1674cc1c4b5ab00990263419d3e8e1cdf4d6b326e245aea
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.17 (October 7, 2013)
2
+
3
+ Bugfixes:
4
+ - Avoid Rails 4 deprecation warning
5
+
1
6
  ## 0.1.16 (October 5, 2013)
2
7
 
3
8
  Features:
@@ -12,5 +17,4 @@ Improvements:
12
17
  - delta_column now supports float values
13
18
 
14
19
  Bugfixes:
15
-
16
20
  - Prevent running out of memory when running counter_culture_fix_counts in large tables
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.16
1
+ 0.1.17
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "counter_culture"
8
- s.version = "0.1.16"
8
+ s.version = "0.1.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Magnus von Koeller"]
12
- s.date = "2013-10-05"
12
+ s.date = "2013-10-08"
13
13
  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."
14
14
  s.email = "magnus@vonkoeller.de"
15
15
  s.extra_rdoc_files = [
@@ -279,7 +279,7 @@ module CounterCulture
279
279
  operator = options[:increment] ? '+' : '-'
280
280
 
281
281
  # we don't use Rails' update_counters because we support changing the timestamp
282
- quoted_column = connection.quote_column_name(options[:counter_column])
282
+ quoted_column = self.class.connection.quote_column_name(options[:counter_column])
283
283
 
284
284
  updates = []
285
285
  # this updates the actual counter
@@ -1052,7 +1052,7 @@ describe "CounterCulture" do
1052
1052
  SimpleDependent.delete_all
1053
1053
  SimpleMain.delete_all
1054
1054
 
1055
- 10000.times do |i|
1055
+ 1000.times do |i|
1056
1056
  main = SimpleMain.create
1057
1057
  3.times { main.simple_dependents.create }
1058
1058
  end
@@ -1060,7 +1060,7 @@ describe "CounterCulture" do
1060
1060
  SimpleMain.find_each { |main| main.simple_dependents_count.should == 3 }
1061
1061
 
1062
1062
  SimpleMain.order('random()').limit(50).update_all simple_dependents_count: 1
1063
- SimpleDependent.counter_culture_fix_counts
1063
+ SimpleDependent.counter_culture_fix_counts :batch_size => 100
1064
1064
 
1065
1065
  SimpleMain.find_each { |main| main.simple_dependents_count.should == 3 }
1066
1066
  end
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: 0.1.16
4
+ version: 0.1.17
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: 2013-10-05 00:00:00.000000000 Z
11
+ date: 2013-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails