Skip to content

Commit

Permalink
Minor monthly counter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvilleneuve committed Dec 14, 2023
1 parent c909af9 commit 3cc1117
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
statisfy (0.0.9)
statisfy (0.0.10)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion lib/statisfy/monthly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def values_grouped_by_month(scope: nil, start_at: nil, stop_at: nil)

if start_at.present? || scope&.created_at.present?
start_at ||= scope.created_at
n_months = (Time.zone.today.year + Time.zone.today.month) - (start_at.year + start_at.month)
n_months = (Time.zone.today.year * 12 + Time.zone.today.month) - (start_at.year * 12 + start_at.month)
end

relevant_months = (0..n_months).map do |i|
Expand Down
Binary file removed statisfy-0.0.3.gem
Binary file not shown.
Binary file removed statisfy-0.0.4.gem
Binary file not shown.
Binary file removed statisfy-0.0.5.gem
Binary file not shown.
Binary file removed statisfy-0.0.6.gem
Binary file not shown.
Binary file removed statisfy-0.0.7.gem
Binary file not shown.
Binary file removed statisfy-0.0.8.gem
Binary file not shown.
Binary file removed statisfy-0.0.9.gem
Binary file not shown.
2 changes: 1 addition & 1 deletion statisfy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = "statisfy"
s.version = "0.0.9"
s.version = "0.0.10"
s.required_ruby_version = ">= 3.2.0"
s.date = "2023-12-13"
s.summary = "A performant and flexible counter solution"
Expand Down

0 comments on commit 3cc1117

Please sign in to comment.