github-to-canvas 0.0.12 → 0.0.13
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 +4 -4
- data/README.md +8 -2
- data/lib/github-to-canvas/repository_converter.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d54831d66ba0cb1fa64c3fcdd88316bdc49b05e92a66c9efb26c5a3e969bf9f
|
|
4
|
+
data.tar.gz: 8b712c82ca2d2c2963cb2afa63fb51a3440942502460e0243c2f6d0d90364c76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8048d01da1fa1e62c53b369748ad25e4408078ed3f879c367806451c9e078133f28fc87f3ecd31e14b519b2fc4665e2e791d86041f7492aa1a35eda6acbce3af
|
|
7
|
+
data.tar.gz: 7940c42a9915fcbe7f2a838d931da579471b8aa90f0037b159a9bf2441ea6fc96dfad1e8ee8d5cd4ec29d160e79e12ddaef150f1f5c1ca150fa221a7a0994887
|
data/README.md
CHANGED
|
@@ -31,7 +31,7 @@ called `CANVAS_API_KEY`. Use the following command to add your new key to
|
|
|
31
31
|
`~/.zshrc`:
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
echo "$(
|
|
34
|
+
echo "$(export 'CANVAS_API_KEY=<your-new-API-key-here>' | cat - ~/.zshrc)" > ~/.zshrc
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
> **Note:** The command above assumes you are using Zsh. Change the dotfile if
|
|
@@ -44,7 +44,7 @@ Flatiron School's base path is `https://learning.flatironschool.com/api/v1`. Add
|
|
|
44
44
|
as an `ENV` variable like the API key. **Do not add a `/` at the end after `/api/v1`.**
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
echo "$(
|
|
47
|
+
echo "$(export 'CANVAS_API_PATH=<your-base-api-path>' | cat - ~/.zshrc)" > ~/.zshrc
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
After both the API key and path are added to `~/.zshrc`, run `source ~/.zshrc`
|
|
@@ -106,5 +106,11 @@ You can override the default behaviors with the following arguments:
|
|
|
106
106
|
appropriate Canvas lesson type instead of relying on the repository's
|
|
107
107
|
directory structure
|
|
108
108
|
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
<p align="center">
|
|
112
|
+
<img src="https://curriculum-content.s3.amazonaws.com/fewpjs/fewpjs-fetch-lab/Image_25_AsynchronousJavaScript.png" width="500">
|
|
113
|
+
</p>
|
|
114
|
+
|
|
109
115
|
[Canvas LMS API]: https://canvas.instructure.com/doc/api/index.html
|
|
110
116
|
[Flatiron School]: https://flatironschool.com/
|
|
@@ -35,12 +35,14 @@ class RepositoryConverter
|
|
|
35
35
|
|
|
36
36
|
def self.adjust_local_html_images(readme, raw_remote_url)
|
|
37
37
|
readme.gsub!(/src=\"[\s\S]*?" /) { |img|
|
|
38
|
-
if !
|
|
38
|
+
if !img.match('amazonaws.com') && !img.match('https://') && !img.match('youtube')
|
|
39
39
|
img.gsub!(/\"/, "")
|
|
40
40
|
img.gsub!(/src=/, '')
|
|
41
41
|
img.strip!
|
|
42
|
+
'src="' + raw_remote_url + '/master/' + img + '"'
|
|
43
|
+
else
|
|
44
|
+
img
|
|
42
45
|
end
|
|
43
|
-
'src="' + raw_remote_url + '/master/' + img + '"'
|
|
44
46
|
}
|
|
45
47
|
end
|
|
46
48
|
|