pairing_shuffler 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pairing_shuffler.rb +5 -5
- data/lib/pairing_shuffler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82af333d0dd95d6f2eb77080e57849b5ba2e74b0
|
4
|
+
data.tar.gz: a2dd7765f9206325c828240125747ad02f0878c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e9c78a1bee35a0c9d322451c576729ac4afe7fdc8af315e9dfe9d7f9a78e6e8aac5e6f25f95a89bcb50d3073a98be52a7dc59210775a53b776dd994c7c0b933
|
7
|
+
data.tar.gz: c0b723b36ae536aaa5966c39921b20589968b5e55f78e9c77151cb4af9b2656576964bf5aed1d11f6f6c3c8a3be029e76eab289637f2316bb6f08f98091c2a07
|
data/lib/pairing_shuffler.rb
CHANGED
@@ -55,14 +55,14 @@ module PairingShuffler
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def present?(row)
|
58
|
-
away_until = content.map { |row| row.index("Away until") }.compact.first
|
59
|
-
|
60
|
-
|
61
|
-
parse_time(row[away_until]) + DAY < Time.now
|
58
|
+
return true unless away_until = content.map { |row| row.index("Away until") }.compact.first
|
59
|
+
return true unless time = parse_time(row[away_until])
|
60
|
+
time + DAY < Time.now
|
62
61
|
end
|
63
62
|
|
64
63
|
def parse_time(time)
|
65
|
-
|
64
|
+
return unless date = time.to_s[/\d+\/\d+\/\d+/]
|
65
|
+
Time.strptime(date, "%m/%d/%Y")
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pairing_shuffler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google_drive
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
54
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.
|
55
|
+
rubygems_version: 2.5.1
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Assign random pairs from a google docs spreadsheet
|