github-to-canvas 0.0.31 → 0.0.32
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a6fe16f342f2f527fb2a604b4028c1f9bcbcbdd6d41221898f5bd35cec4d3065
|
|
4
|
+
data.tar.gz: 8946a22cb1c8d962803225eef376859cad05f6e3b84f40d32eaa544a8fa2f27e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5129fb84f310b37771de203f27a0686e732f9b8dc4e921321aa00f4934b88e19ccb95c2c649544d90f59ac6b71baa558fad245dcb62c7f16ea182e015dcb55f
|
|
7
|
+
data.tar.gz: 0ae0a6ca4da122216a8095c825ec7cee5c2be3b4002a4e9865a639ea17ef8df52a63160c5bdb8ca12ed52b4594e5e27fa76e28dc2658b51494ff5335c5509661
|
data/bin/github-to-canvas
CHANGED
|
@@ -93,10 +93,6 @@ if options[:version]
|
|
|
93
93
|
GithubToCanvas.new(mode: 'version', course: nil)
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
if !options[:file_to_convert]
|
|
97
|
-
options[:file_to_convert] = "README.md"
|
|
98
|
-
end
|
|
99
|
-
|
|
100
96
|
if !options[:type]
|
|
101
97
|
if Dir.glob("**/*/").empty?
|
|
102
98
|
options[:type] = "page"
|
|
@@ -114,6 +110,7 @@ if !options[:name]
|
|
|
114
110
|
options[:name] = options[:file_to_convert]
|
|
115
111
|
else
|
|
116
112
|
options[:name] = File.basename(Dir.getwd)
|
|
113
|
+
options[:file_to_convert] = "README.md"
|
|
117
114
|
end
|
|
118
115
|
end
|
|
119
116
|
|
|
@@ -7,7 +7,7 @@ class CreateCanvasLesson
|
|
|
7
7
|
puts "#{file_to_convert} not found in current directory. Exiting..."
|
|
8
8
|
abort
|
|
9
9
|
end
|
|
10
|
-
create_canvas_lesson(markdown, course, filepath, branch, name, type, save_to_github, fis_links, remove_header_and_footer)
|
|
10
|
+
create_canvas_lesson(markdown, course, filepath, file_to_convert, branch, name, type, save_to_github, fis_links, remove_header_and_footer)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def create_canvas_lesson(markdown, course, filepath, branch, name, type, save_to_github, fis_links, remove_header_and_footer)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class UpdateCanvasLesson
|
|
2
2
|
|
|
3
|
-
def initialize(filepath, branch, name, type, save_to_github, fis_links, remove_header_and_footer)
|
|
3
|
+
def initialize(filepath, file_to_convert, branch, name, type, save_to_github, fis_links, remove_header_and_footer)
|
|
4
4
|
name = name.split(/[- _]/).map(&:capitalize).join(' ')
|
|
5
5
|
markdown = File.read("#{filepath}/#{file_to_convert}")
|
|
6
6
|
if !markdown
|