redis-objects-daily-counter 0.2.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +23 -20
- data/.gem_comet.yml +1 -1
- data/.github/dependabot.yml +19 -0
- data/.rubocop.yml +5 -4
- data/.rubocop_todo.yml +3 -19
- data/CHANGELOG.md +106 -9
- data/Dockerfile +1 -1
- data/Gemfile +3 -3
- data/Gemfile.lock +32 -29
- data/README.md +125 -25
- data/Rakefile +4 -1
- data/bin/console +2 -3
- data/lib/redis/base_counter_object.rb +11 -38
- data/lib/redis/base_hash_key_object.rb +40 -0
- data/lib/redis/base_set_object.rb +28 -0
- data/lib/redis/objects/{daily-counter → periodical}/version.rb +2 -4
- data/lib/redis/objects/periodical_counters.rb +40 -0
- data/lib/redis/objects/periodical_hashes.rb +50 -0
- data/lib/redis/objects/periodical_sets.rb +50 -0
- data/lib/redis/periodical_counter.rb +15 -0
- data/lib/redis/periodical_hash_key.rb +15 -0
- data/lib/redis/periodical_set.rb +15 -0
- data/lib/redis/recurring_at_intervals/annual.rb +18 -0
- data/lib/redis/recurring_at_intervals/daily.rb +18 -0
- data/lib/redis/recurring_at_intervals/hourly.rb +18 -0
- data/lib/redis/recurring_at_intervals/minutely.rb +18 -0
- data/lib/redis/recurring_at_intervals/monthly.rb +18 -0
- data/lib/redis/recurring_at_intervals/weekly.rb +18 -0
- data/lib/redis/recurring_at_intervals.rb +79 -0
- data/lib/redis-objects-periodical.rb +36 -0
- data/redis-objects-daily-counter.gemspec +5 -4
- data/redis-objects-periodical.gemspec +36 -0
- metadata +26 -19
- data/lib/redis/annual_counter.rb +0 -18
- data/lib/redis/daily_counter.rb +0 -18
- data/lib/redis/hourly_counter.rb +0 -26
- data/lib/redis/minutely_counter.rb +0 -26
- data/lib/redis/monthly_counter.rb +0 -18
- data/lib/redis/objects/annual_counters.rb +0 -41
- data/lib/redis/objects/daily_counters.rb +0 -41
- data/lib/redis/objects/hourly_counters.rb +0 -41
- data/lib/redis/objects/minutely_counters.rb +0 -41
- data/lib/redis/objects/monthly_counters.rb +0 -41
- data/lib/redis/objects/weekly_counters.rb +0 -41
- data/lib/redis/weekly_counter.rb +0 -18
- data/lib/redis-objects-daily-counter.rb +0 -37
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'redis-objects'
|
4
|
-
|
5
|
-
class Redis
|
6
|
-
autoload :DailyCounter, 'redis/daily_counter'
|
7
|
-
autoload :WeeklyCounter, 'redis/weekly_counter'
|
8
|
-
autoload :MonthlyCounter, 'redis/monthly_counter'
|
9
|
-
autoload :AnnualCounter, 'redis/annual_counter'
|
10
|
-
autoload :HourlyCounter, 'redis/hourly_counter'
|
11
|
-
autoload :MinutelyCounter, 'redis/minutely_counter'
|
12
|
-
|
13
|
-
module Objects
|
14
|
-
autoload :DailyCounters, 'redis/objects/daily_counters'
|
15
|
-
autoload :WeeklyCounters, 'redis/objects/weekly_counters'
|
16
|
-
autoload :MonthlyCounters, 'redis/objects/monthly_counters'
|
17
|
-
autoload :AnnualCounters, 'redis/objects/annual_counters'
|
18
|
-
autoload :HourlyCounters, 'redis/objects/hourly_counters'
|
19
|
-
autoload :MinutelyCounters, 'redis/objects/minutely_counters'
|
20
|
-
|
21
|
-
class << self
|
22
|
-
alias original_included included
|
23
|
-
|
24
|
-
def included(klass)
|
25
|
-
original_included(klass)
|
26
|
-
|
27
|
-
# Pull in each object type
|
28
|
-
klass.send :include, Redis::Objects::DailyCounters
|
29
|
-
klass.send :include, Redis::Objects::WeeklyCounters
|
30
|
-
klass.send :include, Redis::Objects::MonthlyCounters
|
31
|
-
klass.send :include, Redis::Objects::AnnualCounters
|
32
|
-
klass.send :include, Redis::Objects::HourlyCounters
|
33
|
-
klass.send :include, Redis::Objects::MinutelyCounters
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|