rrschedule 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rrschedule.rb +5 -3
  3. metadata +5 -5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
data/lib/rrschedule.rb CHANGED
@@ -40,7 +40,9 @@ module RRSchedule
40
40
  team_b = t.reverse!.shift
41
41
  t.reverse!
42
42
 
43
- matchup = {:team_a => team_a, :team_b => team_b}
43
+
44
+ x = [team_a,team_b].shuffle
45
+ matchup = {:team_a => x[0], :team_b => x[1]}
44
46
  games << matchup
45
47
  end
46
48
  #done processing round
@@ -205,12 +207,12 @@ module RRSchedule
205
207
  if @cur_rule_index < @rules.size-1
206
208
  last_rule=@cur_rule
207
209
  @cur_rule_index += 1
208
- @cur_rule = @rules[@cur_rule_index]
210
+ @cur_rule = @rules[@cur_rule_index]
209
211
  #Go to the next date (except if the new rule is for the same weekday)
210
212
  @cur_date = next_game_date(@cur_date+=1,@cur_rule.wday) if last_rule.wday != @cur_rule.wday
211
213
  else
212
214
  @cur_rule_index = 0
213
- @cur_rule = @rules[@cur_rule_index]
215
+ @cur_rule = @rules[@cur_rule_index]
214
216
  @cur_date = next_game_date(@cur_date+=1,@cur_rule.wday)
215
217
  end
216
218
  @gt_stack = @cur_rule.gt.clone; @cur_gt = @gt_stack.shift
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrschedule
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 5
10
- version: 0.2.5
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - flamontagne
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-19 00:00:00 -05:00
18
+ date: 2011-02-25 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -87,5 +87,5 @@ signing_key:
87
87
  specification_version: 3
88
88
  summary: Round-Robin schedule generator
89
89
  test_files:
90
- - test/test_rrschedule.rb
91
90
  - test/helper.rb
91
+ - test/test_rrschedule.rb