grade_runner 0.0.3.pre.4.pls.work.2 → 0.0.3.pre.4.pls.work.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 +4 -4
- data/VERSION +1 -1
- data/lib/tasks/grade.rake +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9b4cb69c976110ffafae6eeaebee2656d364263febef882bdf5dd2e6f47ffb3
|
4
|
+
data.tar.gz: d140cafc72352c27f98996e51e08256a2ce1470a5b5133397b7beea77ab1cab5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 702be470e2fbf06f17db9b4b8e57b2e61370e7b0db3e85d276557dd298bb231d35992822c8fb9ae5d2e3f9b1aa72de85f9e0b5d62d295ec8b0101d5eaafd8e20
|
7
|
+
data.tar.gz: 2da08e5a886073939875bff42902ca68103615e86477a96928c59c97fb6f16c91e956f3d6288e0654ad94a4a1bac7b709971d4bc488e05a658eb5cf88e348070
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.3.pre.4.pls.work.
|
1
|
+
0.0.3.pre.4.pls.work.3
|
data/lib/tasks/grade.rake
CHANGED
@@ -35,7 +35,7 @@ namespace :grade do
|
|
35
35
|
!input_token.nil? &&
|
36
36
|
input_token != [] &&
|
37
37
|
input_token != {}
|
38
|
-
|
38
|
+
|
39
39
|
token = input_token
|
40
40
|
student_config["personal_access_token"] = input_token
|
41
41
|
update_config_file(config_file_name, student_config)
|
@@ -57,6 +57,7 @@ namespace :grade do
|
|
57
57
|
new_personal_access_token = $stdin.gets.chomp.strip
|
58
58
|
|
59
59
|
if new_personal_access_token!= "" && is_valid_token?(submission_url, new_personal_access_token) == false
|
60
|
+
p "You entered: #{new_personal_access_token}"
|
60
61
|
puts "Please enter valid token"
|
61
62
|
new_personal_access_token = ""
|
62
63
|
end
|
@@ -119,6 +120,7 @@ end
|
|
119
120
|
|
120
121
|
def is_valid_token?(root_url, token)
|
121
122
|
return false unless token.is_a?(String) && token =~ /^[1-9A-Za-z][^OIl]{23}$/
|
123
|
+
p "remove me later"
|
122
124
|
url = "#{root_url}/submissions/validate_token?token=#{token}"
|
123
125
|
uri = URI.parse(url)
|
124
126
|
req = Net::HTTP::Get.new(uri, 'Content-Type' => 'application/json')
|