grade_runner 0.0.3.pre.4.pls.work.3.2 → 0.0.3.pre.4.pls.work.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/tasks/grade.rake +5 -0
- 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: '090560dd5a4881e87921401028494680336569b8fc9dc3b17ea36c55cbf22195'
|
4
|
+
data.tar.gz: f6167abb2b728eeb8228c13e754b497442a7f9939a8ba35ec72360dba9ab222b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 897dd67127ced4ab11ee2d2af4b019ed5e2339cc22fb292441c56e27a76ee90fccb664d6f63048a05b879a8ae0563537b9af259def4cb6f44ad98e7fe5dd46fb
|
7
|
+
data.tar.gz: 22dc23122a8f5a7442256344e42c771199814ce93b814c1ca0f79e551c006b613ab2c3e14fb93f4375fbd7006a1f23ec52c38d9318f424a54a1b939ae376535c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.3.pre.4.pls.work.3.
|
1
|
+
0.0.3.pre.4.pls.work.3.3
|
data/lib/tasks/grade.rake
CHANGED
@@ -122,15 +122,20 @@ def is_valid_token?(root_url, token)
|
|
122
122
|
return false unless token.is_a?(String) && token =~ /^[1-9A-Za-z][^OIl]{23}$/
|
123
123
|
p "remove me later"
|
124
124
|
url = "#{root_url}/submissions/validate_token?token=#{token}"
|
125
|
+
p "url: #{url}"
|
125
126
|
uri = URI.parse(url)
|
127
|
+
p "uri: #{uri.to_s}"
|
126
128
|
req = Net::HTTP::Get.new(uri, 'Content-Type' => 'application/json')
|
127
129
|
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
|
128
130
|
http.request(req)
|
131
|
+
p "httpi: #{http.request.to_s}"
|
129
132
|
end
|
130
133
|
result = JSON.parse(res.body)
|
131
134
|
p "Result: "
|
132
135
|
p result
|
133
136
|
result["success"]
|
134
137
|
rescue => e
|
138
|
+
p "error!"
|
139
|
+
p e
|
135
140
|
return false
|
136
141
|
end
|