event-counter 0.3.0 → 0.3.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 +4 -0
- data/README.md +1 -1
- data/gemfiles/pg_ar_30.gemfile.lock +1 -1
- data/gemfiles/pg_ar_31.gemfile.lock +1 -1
- data/gemfiles/pg_ar_32.gemfile.lock +1 -1
- data/gemfiles/pg_ar_40.gemfile.lock +1 -1
- data/gemfiles/pg_ar_41.gemfile.lock +1 -1
- data/lib/event_counter/active_record_extension.rb +1 -1
- data/lib/event_counter/version.rb +1 -1
- data/spec/spec_helper.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e96e3d7d0cb196c379e9989606677fde34f1a7b
|
4
|
+
data.tar.gz: 84320e90a25619c11d1c3bc033af1c80569adf51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 900c5d1a1575b8202fd92c0f4624b42cb8019e42d46c598d2ed8101db3749909a254b2b21f1cde05a2a510870f36851c5a4877a72c131c4ab7d3e63aaf3632ef
|
7
|
+
data.tar.gz: 7d624a8d626091a9af525aa608b9316f56c3e288716d042701b86c0881fdbcea483130f002403a373e6a77b82cfcd72456c281f6c3ddcff500ed65db8650bdcf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Let's define counters in model
|
|
10
10
|
|
11
11
|
```ruby
|
12
12
|
class Article < ActiveRecord::Base
|
13
|
-
has_counter :views, interval: 5.minutes
|
13
|
+
has_counter :views, interval: 5.minutes # default interval is :day
|
14
14
|
|
15
15
|
# :year, :month, :week and :day symbols are supported
|
16
16
|
has_counter :views_by_week, interval: :week
|
data/spec/spec_helper.rb
CHANGED
@@ -39,11 +39,11 @@ end
|
|
39
39
|
|
40
40
|
# :nodoc:
|
41
41
|
class Ball < ActiveRecord::Base
|
42
|
-
has_counter :rotations, 5.minutes
|
43
|
-
has_counter :rotations_by_week, :week
|
44
|
-
has_counter :rotations_by_month, :month
|
45
|
-
has_counter :rotations_by_year, :year
|
46
|
-
has_counter :rotations_by_two_year, 2.years
|
42
|
+
has_counter :rotations, interval: 5.minutes
|
43
|
+
has_counter :rotations_by_week, interval: :week
|
44
|
+
has_counter :rotations_by_month, interval: :month
|
45
|
+
has_counter :rotations_by_year, interval: :year
|
46
|
+
has_counter :rotations_by_two_year, interval: 2.years
|
47
47
|
end
|
48
48
|
|
49
49
|
Dir[File.expand_path('../support/*.rb', __FILE__)].each do |file|
|