time_distribution 2.1.0 → 2.1.1

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: 8a71a5c2af5b49832a2045860f26499d7f4dffe7
4
- data.tar.gz: 000bb37d8f5d219162d92e79b3ca7a7b708166ef
3
+ metadata.gz: 8bc7bb856bfde62758faa48f53bde0e6340ecfc6
4
+ data.tar.gz: d82cf1850876b336bde67cc29b0bf1f29fd033fe
5
5
  SHA512:
6
- metadata.gz: 1bffa9227b70531563e5a90a34a1c7b39f445061a379d252e4ef5975d42f31e4ae504dd6b925a31a0842d0a6c87b8eee3d98c8729192982a8bbb835971659ff3
7
- data.tar.gz: 3833eeb5d729993caef2518de9785b04a1e47b43e0c67af8aae9933c4447e6a6a5cd2a73ff40a14ffc4e46f28924d771f7cbf07a703e654f16c84db696ce11ce
6
+ metadata.gz: e6cfb3c17016e0fd6047b973d187c6c1e3f46c5242d7cc2249851e4f2d2245bbcc405ef324799de4f3c5b022f6f270d660264525070b6943fde002bfea2a681f
7
+ data.tar.gz: bcd3854b1ea7856fa8dfd0279ceaddf983a73ce87f2f9dcdd931b8802487aba09a849908dfd7397535126403b17aea690875f22f4c0a402584844f4bab9bdf14
@@ -1,3 +1,3 @@
1
1
  module TimeDistribution
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
@@ -136,9 +136,13 @@ module TimeDistribution
136
136
  hours = []
137
137
  week = 1
138
138
  work_days_by_weeks do |week_collection|
139
+ subjects_this_week = week_collection.subjects
140
+ unless task_types.empty?
141
+ subjects_this_week &= task_types
142
+ end
139
143
  string += (
140
144
  "# #{week_collection.first.date.strftime('%b %-d, %Y')}\n" +
141
- "# #{week_collection.subjects.join(', ')}\n"
145
+ "# #{subjects_this_week.join(', ')}\n"
142
146
  )
143
147
  week_hours = week_collection.map do |day|
144
148
  day.to_hours(*task_types)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_distribution
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin