grade_runner 0.0.3.pre.4.pls.work → 0.0.3.pre.4.pls.work.1
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 +14 -4
- data/lib/tasks/grade_runner.rake +6 -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: 20a0d860f36d698206193285689cd0214668c0420c0cfd74c423e846af484e96
|
4
|
+
data.tar.gz: fb395f76d83830c607e2bcfb98a10d9e1c746d39d48d22e1761b238d1103d019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daa7d638887301c579e6e7ddcb9f538a3133da3296cb2180ff59968bc940d767ecc45b00027f1d7ea0e85bab3b7f9bb2e3c697ecb5eb76abd91a333a793151d4
|
7
|
+
data.tar.gz: 2a92132ca19751fe86a9856e4db7af374474eab1bd280604df86a0d8fb5a7e6c9d952c5e528c62fa4c6f6035a1a7bdb757e7e38e8349b3f06f2d4e4985f51cef
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.3.pre.4.pls.work
|
1
|
+
0.0.3.pre.4.pls.work.1
|
data/lib/tasks/grade.rake
CHANGED
@@ -29,13 +29,18 @@ namespace :grade do
|
|
29
29
|
submission_url = "https://grades.firstdraft.com"
|
30
30
|
end
|
31
31
|
|
32
|
-
if
|
32
|
+
if input_token != false &&
|
33
|
+
input_token != "" &&
|
34
|
+
input_token != " " &&
|
35
|
+
!input_token.nil? &&
|
36
|
+
input_token != [] &&
|
37
|
+
input_token != {}
|
33
38
|
token = input_token
|
34
39
|
student_config["personal_access_token"] = input_token
|
35
40
|
update_config_file(config_file_name, student_config)
|
36
|
-
elsif
|
41
|
+
elsif input_token.nil? && file_token.nil?
|
37
42
|
token = file_token
|
38
|
-
elsif
|
43
|
+
elsif input_token.nil? && file_token.nil?
|
39
44
|
puts "Enter your access token for this project"
|
40
45
|
new_personal_access_token = ""
|
41
46
|
|
@@ -56,7 +61,12 @@ namespace :grade do
|
|
56
61
|
end
|
57
62
|
end
|
58
63
|
|
59
|
-
if
|
64
|
+
if token != false &&
|
65
|
+
token != "" &&
|
66
|
+
token != " " &&
|
67
|
+
!token.nil? &&
|
68
|
+
token != [] &&
|
69
|
+
token != {}
|
60
70
|
if is_valid_token?(submission_url, token) == false
|
61
71
|
student_config["personal_access_token"] = nil
|
62
72
|
update_config_file(config_file_name, student_config)
|
data/lib/tasks/grade_runner.rake
CHANGED
@@ -18,7 +18,12 @@ namespace :grade_runner do
|
|
18
18
|
reponame = ENV["CIRCLE_PROJECT_REPONAME"]
|
19
19
|
sha = ENV["CIRCLE_SHA1"]
|
20
20
|
token = ENV['GRADES_PERSONAL_ACCESS_TOKEN']
|
21
|
-
if
|
21
|
+
if token != false &&
|
22
|
+
token != "" &&
|
23
|
+
token != " " &&
|
24
|
+
!token.nil? &&
|
25
|
+
token != [] &&
|
26
|
+
token != {}
|
22
27
|
GradeRunner::Runner.new('', config['submission_url'] || default_submission_url, token, rspec_output_json, username, reponame, sha, 'circle_ci').process
|
23
28
|
else
|
24
29
|
puts "We couldn't find your access token, so we couldn't record your grade. Please click on the assignment link again and run the rake grade ... command shown there."
|