best_boy 2.1.3 → 2.1.4

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: 69e60353b5ea6a4d7b8c4f4242e1542523b6d4ec
4
- data.tar.gz: 8dc7fe4cb8e74049d039cb235c2d6e52fe6f41e1
3
+ metadata.gz: 530485c8a6a8e6dd348781770d3e01ae65823aff
4
+ data.tar.gz: 71f4eae9ea849d7f00c871a91515e603c7ccc3fb
5
5
  SHA512:
6
- metadata.gz: 68fffd159493c86f5263dc7ba0156b8a9b94792e7f230280e1d25e7b25d73ddd06e4982c752214772c8e4bcb9044130444c6777fd36d6dd90830a9cac160b8e5
7
- data.tar.gz: bb131973d121f12932e250ff1d735927939d616fa01e71b8834e4307484155fb0d4418a9667b020b772150c86c7150889cd7597af7cde32f7c9483756d156207
6
+ metadata.gz: 17c1c0bdb6fc7c32b964215153bdf5cdc74ca9acba042d4b90a28ad473e86b1e882bff9ac86b850cace7f08ac52d8a87b2914dc32a390291670c3e0fa3a7f240
7
+ data.tar.gz: e7ee3fb16e1a1cf00b1713bcba216db27e3ed9408d0f7efd78c129ee71297a23ba94b561e026c0635ddb8d983eb019d032250c135f5fefafd0e64df6e9f564c1
data/README.md CHANGED
@@ -61,6 +61,9 @@ Run the migration
61
61
 
62
62
  Changelog
63
63
  ---------
64
+ #### 2.1.4
65
+ * Bugfix for report recovery rake task
66
+
64
67
  #### 2.1.3
65
68
  * Compatible with Rails 4.1
66
69
  * Loosened kaminari dependency requirements
@@ -210,7 +213,7 @@ Contributors in alphabetic order
210
213
  * [carpodaster](https://github.com/carpodaster)
211
214
  * [cseydel](https://github.com/cseydel)
212
215
  * [danscho](https://github.com/danscho)
213
- * [neumannrq](https://github.com/neumannrq)
216
+ * [neumanrq](https://github.com/neumannrq)
214
217
 
215
218
  Thanks
216
219
  ------
@@ -1,3 +1,3 @@
1
1
  module BestBoy
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.4"
3
3
  end
@@ -6,8 +6,8 @@ namespace :best_boy do
6
6
  #
7
7
  #
8
8
 
9
- def month_report_id_for(year, owner_type, source, event)
10
- date = Date.parse("#{year}-01-01")
9
+ def month_report_id_for(year, month, owner_type, source, event)
10
+ date = Date.parse("#{year}-#{month}-01")
11
11
  BestBoy::MonthReport.where(created_at: date.beginning_of_day..date.end_of_year.end_of_day,
12
12
  owner_type: owner_type,
13
13
  event_source: source,
@@ -118,7 +118,7 @@ namespace :best_boy do
118
118
  day_report_with_source.event_source = source
119
119
  day_report_with_source.occurrences = daily_occurrences
120
120
  day_report_with_source.created_at = day_scope.first.created_at
121
- day_report_with_source.month_report_id = month_report_id_for(day.year, owner_type, source, event)
121
+ day_report_with_source.month_report_id = month_report_id_for(day.year, day.month, owner_type, source, event)
122
122
  day_report_with_source.save!
123
123
  end
124
124
 
@@ -128,7 +128,7 @@ namespace :best_boy do
128
128
  day_report_without_source.event_source = nil
129
129
  day_report_without_source.occurrences = daily_occurrences
130
130
  day_report_without_source.created_at = day_scope.first.created_at
131
- day_report_without_source.month_report_id = month_report_id_for(day.year, owner_type, nil, event)
131
+ day_report_without_source.month_report_id = month_report_id_for(day.year, day.month, owner_type, nil, event)
132
132
  day_report_without_source.save!
133
133
  end
134
134
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: best_boy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Seydel, Robin Neumann, Daniel Schoppmann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
11
+ date: 2014-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails