github-to-canvas 0.1.9 → 0.1.14

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: 71e183a1ea3659fdc71af9af4c1ce0370be119f4241e8773ac82fdee9400cf48
4
- data.tar.gz: ce08e0ec8f3f64471a4966a955e454d8a25cd95e9b9555dd61ca550ec77fe41b
3
+ metadata.gz: 7b94622944d8bc1fca2bf802c4fcb9705c8fb9e51072b363cfe8be85c5304680
4
+ data.tar.gz: ba10efd6629d42c8bf53d729c4a739f7ee5954c978357382841079020d32386f
5
5
  SHA512:
6
- metadata.gz: 2b04300b61b6301f32512ca328f27affaa186082e0e35d8eeab7c748b77ba3c10a07a7309ba1d3e92563007910da3c9e70a7a1db37ce184b48763cc8d455ffb7
7
- data.tar.gz: 2cbe19f6cd61338619072f9f07e215762ce45ffbd3b3aa0672d3f77a1c3bd3a8e7837b5e237bf6b01bd4058ac05afaf5c547b82c1b829a8787b344c88fc21276
6
+ metadata.gz: dc71149053f243875c46622f376a13996b16b892e09153af2d6189652f082d1fa5b4d6d2cd5adb920484f30bb91e303d3d89b50aa3ccacb2a0885570b548ea61
7
+ data.tar.gz: facf3dbde83c5d033f08aadbcf399d9112364e57da18056da6c0fbd65634df6718fc3ae41c16d7e84252369dbeca57e1b8c151d13f8135ffc0b70273993e68b6
@@ -1,7 +1,7 @@
1
1
  require 'json'
2
2
  require 'rest-client'
3
3
  require 'yaml'
4
- require 'byebug'
4
+ # require 'byebug'
5
5
  class CanvasInterface
6
6
 
7
7
  def self.create_course(course_info)
@@ -98,11 +98,11 @@ class CanvasInterface
98
98
  lesson_info = lesson_info[0] if lesson_info.kind_of?(Array)
99
99
  url = url.sub(/[^\/]+$/, lesson_info["page_id"].to_s)
100
100
  end
101
-
102
101
  response = RestClient.put(url, payload, headers)
103
- rescue
102
+ rescue Exception => e
104
103
  puts "Something went wrong while pushing lesson #{options[:id]} to course #{options[:course_id]}"
105
104
  puts "Make sure you are working on lessons that are not locked"
105
+ raise e
106
106
  abort
107
107
  end
108
108
  JSON.parse(response.body)
@@ -162,7 +162,7 @@ class RepositoryConverter
162
162
  remote = GithubInterface.git_remote(filepath)
163
163
  end
164
164
  raw_remote = remote.gsub("git@github.com:","https://raw.githubusercontent.com/")
165
- raw_remote = raw_remo te.gsub("https://github.com/","https://raw.githubusercontent.com/")
165
+ raw_remote = raw_remote.gsub("https://github.com/","https://raw.githubusercontent.com/")
166
166
  raw_remote = raw_remote.gsub(/\/blob\/master\/.*$/,"")
167
167
  raw_remote = raw_remote.gsub(/\/blob\/main\/.*$/,"")
168
168
  raw_remote = raw_remote.gsub(/.git$/,"")
@@ -1,3 +1,3 @@
1
1
  class GithubToCanvas
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.14"
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.1.9
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - maxwellbenton