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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +23 -20
  3. data/.gem_comet.yml +1 -1
  4. data/.github/dependabot.yml +19 -0
  5. data/.rubocop.yml +5 -4
  6. data/.rubocop_todo.yml +3 -19
  7. data/CHANGELOG.md +106 -9
  8. data/Dockerfile +1 -1
  9. data/Gemfile +3 -3
  10. data/Gemfile.lock +32 -29
  11. data/README.md +125 -25
  12. data/Rakefile +4 -1
  13. data/bin/console +2 -3
  14. data/lib/redis/base_counter_object.rb +11 -38
  15. data/lib/redis/base_hash_key_object.rb +40 -0
  16. data/lib/redis/base_set_object.rb +28 -0
  17. data/lib/redis/objects/{daily-counter → periodical}/version.rb +2 -4
  18. data/lib/redis/objects/periodical_counters.rb +40 -0
  19. data/lib/redis/objects/periodical_hashes.rb +50 -0
  20. data/lib/redis/objects/periodical_sets.rb +50 -0
  21. data/lib/redis/periodical_counter.rb +15 -0
  22. data/lib/redis/periodical_hash_key.rb +15 -0
  23. data/lib/redis/periodical_set.rb +15 -0
  24. data/lib/redis/recurring_at_intervals/annual.rb +18 -0
  25. data/lib/redis/recurring_at_intervals/daily.rb +18 -0
  26. data/lib/redis/recurring_at_intervals/hourly.rb +18 -0
  27. data/lib/redis/recurring_at_intervals/minutely.rb +18 -0
  28. data/lib/redis/recurring_at_intervals/monthly.rb +18 -0
  29. data/lib/redis/recurring_at_intervals/weekly.rb +18 -0
  30. data/lib/redis/recurring_at_intervals.rb +79 -0
  31. data/lib/redis-objects-periodical.rb +36 -0
  32. data/redis-objects-daily-counter.gemspec +5 -4
  33. data/redis-objects-periodical.gemspec +36 -0
  34. metadata +26 -19
  35. data/lib/redis/annual_counter.rb +0 -18
  36. data/lib/redis/daily_counter.rb +0 -18
  37. data/lib/redis/hourly_counter.rb +0 -26
  38. data/lib/redis/minutely_counter.rb +0 -26
  39. data/lib/redis/monthly_counter.rb +0 -18
  40. data/lib/redis/objects/annual_counters.rb +0 -41
  41. data/lib/redis/objects/daily_counters.rb +0 -41
  42. data/lib/redis/objects/hourly_counters.rb +0 -41
  43. data/lib/redis/objects/minutely_counters.rb +0 -41
  44. data/lib/redis/objects/monthly_counters.rb +0 -41
  45. data/lib/redis/objects/weekly_counters.rb +0 -41
  46. data/lib/redis/weekly_counter.rb +0 -18
  47. 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