github-to-canvas 0.0.16 → 0.0.21

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: 3152fc876a1490ceeb473de2839518c2ced04e535ea246de7fd49c0a07003ff6
4
- data.tar.gz: d13329c8279a5b6cc971b6d3ef75a34bec6c4a4f329aba35f34a1bb7eb59a337
3
+ metadata.gz: 448a4a84a6539abab1189c190f3888a68c1521b54129ffed7a3d558f9ba1b75d
4
+ data.tar.gz: 55bf7acb67cc93c5fd9c009a8f5fae4b1bcfdd7a5c4d565d8fb6124c6c5f0868
5
5
  SHA512:
6
- metadata.gz: 208aa644d3bcdec1c7f393c12cacaee4ad80b16ec818603cca5ff97f75d1414d7743219430e28d00a49b66d27caa9afbed49e00ecca31f1ae1df6442006866bc
7
- data.tar.gz: e7539b042e5650952e1880da35a8b16b50da481eb59902e9012c2e3f964e2aacb8c3ec06f180c321bf256a8744e30c367e4f14566f62312cbb4c5006c08e5963
6
+ metadata.gz: 270b759448944e453816e85c5516c029e308ec107d095c845838251f87f55d7c388add59e95a727118ebd38ae69e09270ee8b0929a408845fe0c3f7b16b9ea81
7
+ data.tar.gz: b779833f54c2d55c1c5541121222d73fb44400dd448cb697d8f38b29d6c29f279094a205a7abac98557b4a9e51003c5d7e79b938623722947be92baf13ed36d3
@@ -48,7 +48,7 @@ OptionParser.new do |opts|
48
48
  end
49
49
  opts.on("-tTYPE", "--type TYPE",
50
50
  "Sets the type Canvas lesson to be created (page or assignment). If no type, type decided based on repository structure") do |type|
51
- if t == 'page' || t == 'assignment'
51
+ if type == 'page' || type == 'assignment'
52
52
  options[:type] = type
53
53
  else
54
54
  puts "Invalid type. Defaulting to page"
@@ -74,10 +74,12 @@ if options[:version]
74
74
  GithubToCanvas.new(mode: 'version', course: nil)
75
75
  end
76
76
 
77
- if Dir.glob("**/*/").empty?
78
- options[:type] = "page"
79
- else
80
- options[:type] = "assignment"
77
+ if !options[:type]
78
+ if Dir.glob("**/*/").empty?
79
+ options[:type] = "page"
80
+ else
81
+ options[:type] = "assignment"
82
+ end
81
83
  end
82
84
 
83
85
  if !options[:branch]
@@ -1,5 +1,4 @@
1
1
  require 'redcarpet'
2
-
3
2
  class RepositoryConverter
4
3
 
5
4
  def self.convert(filepath, readme, branch)
@@ -16,6 +15,7 @@ class RepositoryConverter
16
15
  def self.set_raw_image_remote_url(filepath)
17
16
  remote = GithubInterface.git_remote(filepath)
18
17
  remote.gsub!("git@github.com:","https://raw.githubusercontent.com/")
18
+ remote.gsub!("https://github.com/","https://raw.githubusercontent.com/")
19
19
  remote.gsub!(/.git$/,"")
20
20
  remote.strip!
21
21
  end
@@ -1,3 +1,3 @@
1
1
  class GithubToCanvas
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.21"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-to-canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - maxwellbenton