github-to-canvas-quiz 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9447384b555ce88188b53b1781b61fde9ea90a561ff9aeb43cc4814348c094a
4
- data.tar.gz: 908ee5738930ccc75f45393974d1153084aae97c25030b53bb1fe8889b0a9289
3
+ metadata.gz: 78e0f26ece8913c97dd4993b0552c8467b8cdee239f4286dc5d932034b71bb4b
4
+ data.tar.gz: 2af57075f88afa3a80937f68eb213825527730912ffa7aed9b76dd6a0c77b0b0
5
5
  SHA512:
6
- metadata.gz: ff3c1151b55aa5dde13e8ade9e8a9dddefa1401889e01c61a678aa50639c679f99b293b6bfeb07513117a451b52d9863588a1c7a69e4a62e21ef756eb526a114
7
- data.tar.gz: 80d5f2a76c7674995a39d56639fb1bbeabf2da890a72052ec415a5f36446c6261ebe694dc57e10dffd45225fa6644f1cb8ec20d246162c2288bb0ab61de5bb95
6
+ metadata.gz: ecf9295321db1df820cac349da264f86dbe2e18a57011c69520f326196a33f29789cff0991c1060edcc0d67564ca23366cdf39e5d4f6db51f1264e8f1fe316aa
7
+ data.tar.gz: b56c47bc9934f8c225b0857ccdd4c27a4d8a0c963a9643c2e8f508c27b9a32f805d306a2485fcdfcf262d0a0ca1ef74937feeb140f5869e67e0f0bf21937c018
@@ -7,7 +7,7 @@ module GithubToCanvasQuiz
7
7
  class Quiz
8
8
  attr_reader :client, :course_id, :quiz_id, :path
9
9
 
10
- def initialize(client, course_id, quiz_id, path = '.')
10
+ def initialize(client, course_id, quiz_id, path)
11
11
  @path = path
12
12
  @client = client
13
13
  @course_id = course_id
@@ -30,6 +30,7 @@ module GithubToCanvasQuiz
30
30
 
31
31
  def prepare_directory!
32
32
  Dir.mkdir(path) unless Pathname(path).directory?
33
+ @path = File.expand_path(path)
33
34
  end
34
35
 
35
36
  def save_quiz!
@@ -81,7 +82,7 @@ module GithubToCanvasQuiz
81
82
  @quiz = begin
82
83
  quiz = Parser::Canvas::Quiz.new(canvas_quiz_data).parse
83
84
  # use file path as repo if not present
84
- quiz.repo = path.split('/').last unless quiz.repo
85
+ quiz.repo = File.basename(path) unless quiz.repo
85
86
  quiz
86
87
  end
87
88
  end
@@ -52,9 +52,9 @@ module GithubToCanvasQuiz
52
52
 
53
53
  def sources_to_html
54
54
  comments = sources.map do |source|
55
- "<a href=\"#{source['url']}\">#{source['name']}</a>"
55
+ "<li><a href=\"#{source['url']}\">#{source['name']}</a></li>"
56
56
  end.join
57
- "<p><strong>Source/s:</strong> #{comments}</p>"
57
+ "<p><strong>Source/s:</strong><ul>#{comments}</ul></p>"
58
58
  end
59
59
  end
60
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GithubToCanvasQuiz
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-to-canvas-quiz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ihollander