ft_42 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ft_42 +9 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d767841b4e32ac4ee1a850bd7eaa0b428682eb64
|
4
|
+
data.tar.gz: 5cd984c027df793225fb99eb46e197e24683b7e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75e789b750ef553b4ce0a7dfc52eacdddb3e1ae11c9fd829d96915a664b11123d42b72485e8e05438e2bcb6131d7520688f57154558abea12c36cf6303a8eaa5
|
7
|
+
data.tar.gz: ca4bebaee42b69ab9d5ad739b22ea407166d0e0331c3cce68fac0e41122e62ddc109674b8252062627384b923db7582d0015787bdce543bc2ce6148a83e1cd61
|
data/bin/ft_42
CHANGED
@@ -4,6 +4,7 @@ require "action_view"
|
|
4
4
|
require "pastel"
|
5
5
|
require "oauth2"
|
6
6
|
require "ruby-progressbar"
|
7
|
+
require "pp"
|
7
8
|
|
8
9
|
HOURS_NEEDED = 38
|
9
10
|
USERNAME = ARGV[0]
|
@@ -55,8 +56,10 @@ puts pastel.bright_green.bold("#{user['first_name']} #{user['last_name']}")
|
|
55
56
|
active = false
|
56
57
|
sessions.each do |session|
|
57
58
|
if session["begin_at"].to_time - session["end_at"].to_time == -600.0
|
58
|
-
|
59
|
-
|
59
|
+
unless active
|
60
|
+
puts "Is #{pastel.bright_green.bold('active')} at " + pastel.bright_green.bold("#{cluster(session['host'])}") + " computer #{session['host']}."
|
61
|
+
end
|
62
|
+
unless session["primary"]
|
60
63
|
puts pastel.red.bold("Warning: Logged in on more than one computer. Please logout from #{session['host']} ASAP.")
|
61
64
|
end
|
62
65
|
active = true
|
@@ -76,6 +79,7 @@ if (percent_complete <= 100)
|
|
76
79
|
puts progressbar_needed
|
77
80
|
end
|
78
81
|
|
79
|
-
puts "
|
80
|
-
puts "
|
81
|
-
puts "
|
82
|
+
puts "Is working on #{pastel.bright_green.bold(in_progress.to_sentence)}."
|
83
|
+
puts "Is level #{pastel.bright_green.bold(ActiveSupport::NumberHelper.number_to_rounded(user['cursus_users'].select { |cursus| cursus['cursus']['name'] == "42" }.first['level'], precision: 2))}"
|
84
|
+
puts "Has #{pastel.bright_green.bold(ActionView::Base.new.pluralize(user['correction_point'], 'correction point'))}.#{' *grabs pitchfork*' if user['correction_point'] > 6}"
|
85
|
+
puts "You can contact #{user['first_name'].titleize} at #{pastel.bright_green.bold(ActiveSupport::NumberHelper.number_to_phone(phone))}."
|