grade_runner 0.0.3.pre.4 → 0.0.3.pre.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78d36c19cabfff00aa753ae3971b98ee8b322706920fdb2615502afe9db192e2
4
- data.tar.gz: bcee602c1f6a1dbf4579c74a71643ed1f4984bcad6af35afdab3e2088fa92999
3
+ metadata.gz: 1998d265196255aef4a6fbd0cac907a6ea4a7644d404b18d5efb6d5206894037
4
+ data.tar.gz: 5b8ed5a4739025ba141effcfec6b79806d515847908735f0823e2f01e27cf8ae
5
5
  SHA512:
6
- metadata.gz: 1c98546b7953efd45a09b14b8357cc4bb2c69bc74d81962596496c9099e6956b3c81626320db5ae40a67cee742fe372a9ff8d664af72c8ae73f3f4e2adbd45fc
7
- data.tar.gz: b839f46883a83fd28fe957ff5b2be8fecd2250f1567c4502d0fc377d9f16a59d34025f020fd09f5abe166637a75b0acd010732262e38b32f1f45c2ce5a3c52f9
6
+ metadata.gz: 90f0f25e47b308eba572a313f40e0738fb675724477e0095e2341fe510cc920820d71d8ff60892f2a71d56cab1655b7896c21227c074e7e8be1437bf5a01cf7a
7
+ data.tar.gz: cd28875fdbd93a38d25afdab2b612d2a4de0896418c891417cd9a2c2dc881f2b6dd4c7199fda1f182abe13f6867d3c0e8f22495ec9ec7cd9ae6b69e3beafaf4c
data/Rakefile CHANGED
@@ -40,7 +40,7 @@ task :default => :spec
40
40
 
41
41
  require 'rdoc/task'
42
42
  Rake::RDocTask.new do |rdoc|
43
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
43
+ version = File.file?('VERSION') ? File.read('VERSION') : ""
44
44
 
45
45
  rdoc.rdoc_dir = 'rdoc'
46
46
  rdoc.title = "grade_runner #{version}"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3.pre.4
1
+ 0.0.3.pre.4.1
data/lib/tasks/grade.rake CHANGED
@@ -13,7 +13,7 @@ namespace :grade do
13
13
  student_config = {}
14
14
  student_config["submission_url"] = "https://grades.firstdraft.com"
15
15
 
16
- if File.exist?(config_file_name)
16
+ if File.file?(config_file_name)
17
17
  begin
18
18
  config = YAML.load_file(config_file_name)
19
19
  rescue
@@ -26,11 +26,11 @@ namespace :grade do
26
26
  submission_url = "https://grades.firstdraft.com"
27
27
  end
28
28
 
29
- if input_token.present?
29
+ if input_token.nil?
30
30
  token = input_token
31
31
  student_config["personal_access_token"] = input_token
32
32
  update_config_file(config_file_name, student_config)
33
- elsif input_token.nil? && file_token.present?
33
+ elsif input_token.nil? && file_token.nil?
34
34
  token = file_token
35
35
  elsif input_token.nil? && file_token.nil?
36
36
  puts "Enter your access token for this project"
@@ -53,7 +53,7 @@ namespace :grade do
53
53
  end
54
54
  end
55
55
 
56
- if token.present?
56
+ if token.nil?
57
57
  if is_valid_token?(submission_url, token) == false
58
58
  student_config["personal_access_token"] = nil
59
59
  update_config_file(config_file_name, student_config)
@@ -79,7 +79,7 @@ namespace :grade do
79
79
  desc "Run only the next failing test."
80
80
  task :next do
81
81
  path = File.join(__dir__, "examples.txt")
82
- if File.exist?(path)
82
+ if File.file?(path)
83
83
  # `bin/rails db:migrate RAILS_ENV=test`
84
84
  # puts `RAILS_ENV=test bundle exec rspec --next-failure --format HintFormatter`
85
85
  puts `bundle exec rspec --next-failure --format HintFormatter`
@@ -4,7 +4,7 @@ namespace :grade_runner do
4
4
  default_submission_url = "https://grades.firstdraft.com"
5
5
  config = {}
6
6
  path = File.join(__dir__,"grades.yml")
7
- if File.exist?(path)
7
+ if File.file?(path)
8
8
  begin
9
9
  config = YAML.load_file(path)
10
10
  rescue
@@ -16,7 +16,7 @@ namespace :grade_runner do
16
16
  reponame = ENV["CIRCLE_PROJECT_REPONAME"]
17
17
  sha = ENV["CIRCLE_SHA1"]
18
18
  token = ENV['GRADES_PERSONAL_ACCESS_TOKEN']
19
- if token.present?
19
+ if token.nil?
20
20
  GradeRunner::Runner.new('', config['submission_url'] || default_submission_url, token, rspec_output_json, username, reponame, sha, 'circle_ci').process
21
21
  else
22
22
  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."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grade_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.pre.4
4
+ version: 0.0.3.pre.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raghu Betina