easy_rr 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd22717eefebca5d6593a89445e7430f93aa33be
4
- data.tar.gz: f029d4489b183a05e84ce289f82398dd0a70eee9
3
+ metadata.gz: 9a8f6e88664834ef252bfacf09c50e9a59373335
4
+ data.tar.gz: c31253f54f572f1c0bc377c042cf00a23dc04cdb
5
5
  SHA512:
6
- metadata.gz: 54af9b307a564a7ee858f1da68a0f99e7f79c5665cec6e9b712da367ea902e1c06189009a04370f5f4a01d1ff37b554033eff0f7c0cc3c5f63b8b3f3a1da8238
7
- data.tar.gz: 618707a155eb57f167fd9bad63e7cda0f0cdfac92e2587e2f8ce19ec98d6d9a6d1951fa0b02fd19c80a03fe20948879f05446a56f1e036f24b837e37c88757ae
6
+ metadata.gz: c208538da2e70e2b6b75481017814f6409fb0da6329cb7fabcfa2917cfbad67c7d80ca70aea58d9c245862ab62939cfe7dca475d13dc2083ce04e60c5c83b78c
7
+ data.tar.gz: 760d6d95c578880d6d7a980ad1adcfd8a069d5d31613720b2745ad3f5ec3ba7a42727e851e80e65a7c9c04933953fa2e365652eb0ff7313bf2cc3d122d449b93
Binary file
Binary file
@@ -9,16 +9,17 @@ module EasyRr
9
9
 
10
10
  fMatches = !facingMatches[0].nil? ? facingMatches[0] : 1
11
11
 
12
- if participants.size%2 != 0
12
+ if participants.size.odd?
13
13
  participants.push nil
14
14
  end
15
15
 
16
16
  length = participants.size
17
+
17
18
  last_e = participants.pop
18
19
 
19
- matches = ( ( ( fMatches*length )/2 ) + fMatches ).times.map do
20
+ matches = ( ( ( fMatches*length ) ) - fMatches ).times.map do
20
21
  participants.rotate!
21
- [[participants.first, last_e]] + (1...(length / 2)).map { |j| [participants[j], participants[length - 1 - j]] }
22
+ [[participants.first, last_e]] + (1...(length/2)).map { |j| [participants[j], participants[length - 1 - j]] }
22
23
  end
23
24
 
24
25
  unless last_e.nil?
@@ -1,3 +1,3 @@
1
1
  module EasyRr
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_rr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rosillo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,6 +54,8 @@ files:
54
54
  - bin/console
55
55
  - bin/setup
56
56
  - easy_rr-0.1.0.gem
57
+ - easy_rr-1.0.0.gem
58
+ - easy_rr-1.0.1.gem
57
59
  - easy_rr.gemspec
58
60
  - lib/easy_rr.rb
59
61
  - lib/easy_rr/version.rb