github-to-canvas 0.0.55 → 0.0.56
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/lib/github-to-canvas/repository_converter.rb +10 -4
- data/lib/github-to-canvas/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b2320509da12ac07b0a2905c4302b8a2d3d492f2fc04bcd5dc606b8fb36cb3
|
4
|
+
data.tar.gz: 7964bd362c1315ddf7203f6f9599e8a69469d59579457fb6dd632c80c0127be5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c55a64f4a56fcb795af943a9db7e9799164cd19c5119738c0899ce3b73e1b8998a5c16ce676d5553828bf6d0f54b55d804c2066c2702e113ace009649e0ece3d
|
7
|
+
data.tar.gz: 37e1f2a57675d8ec0cb9dc6e36716b35b7ca8ab38b243e4cb6186a17fe0894c4b1ef8fde65dc0fbdaf3bb242d0bafcd08dd243abbb83acf03139de75597f95a4
|
@@ -74,13 +74,15 @@ class RepositoryConverter
|
|
74
74
|
|
75
75
|
def self.add_fis_links(filepath, readme, forkable)
|
76
76
|
repo_path = self.get_repo_url(filepath)
|
77
|
+
repo_name = repo_path.split('/')[-1]
|
78
|
+
repo_org = repo_path.split('/')[-2]
|
79
|
+
|
77
80
|
header = self.create_github_link_header(repo_path, forkable)
|
78
|
-
|
81
|
+
data_element = self.create_data_element(repo_org, repo_name)
|
82
|
+
data_element + header + readme
|
79
83
|
end
|
80
84
|
|
81
85
|
def self.create_github_link_header(repo_path, forkable)
|
82
|
-
repo_name = repo_path.split('/')[-1]
|
83
|
-
|
84
86
|
# add link to associated repository
|
85
87
|
# github_repo_link = "<a class='fis-git-link' href='#{repo_path}' target='_blank' rel='noopener'><img id='repo-img' title='Open GitHub Repo' alt='GitHub Repo' /></a>"
|
86
88
|
|
@@ -89,11 +91,15 @@ class RepositoryConverter
|
|
89
91
|
|
90
92
|
# add link to fork (forking handled by separate Flatiron server, generation of link handled via custom Canvas JS theme file)
|
91
93
|
if (forkable)
|
92
|
-
github_fork_link = "<a class='fis-fork-link' id='fork-link'
|
94
|
+
github_fork_link = "<a class='fis-fork-link' id='fork-link' href='#' target='_blank' rel='noopener'><img id='fork-img' title='Fork This Assignment' alt='Fork This Assignment' /></a>"
|
93
95
|
"<header class='fis-header' style='visibility: hidden;'>#{github_fork_link}#{github_issue_link}</header>"
|
94
96
|
else
|
95
97
|
"<header class='fis-header' style='visibility: hidden;'>#{github_issue_link}</header>"
|
96
98
|
end
|
97
99
|
end
|
98
100
|
|
101
|
+
def self.create_data_element(repo_org, repo_name)
|
102
|
+
"<div id='git-data-element' data-org='#{repo_org}' data-repo='#{repo_name}'></div>"
|
103
|
+
end
|
104
|
+
|
99
105
|
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-to-canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maxwellbenton
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2020-05-12 00:00:00.000000000 Z
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.3'
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email: maxwell@flatironschool.com
|
71
71
|
executables:
|
72
72
|
- github-to-canvas
|
@@ -91,7 +91,7 @@ homepage: https://github.com/learn-co-curriculum/github-to-canvas
|
|
91
91
|
licenses:
|
92
92
|
- MIT
|
93
93
|
metadata: {}
|
94
|
-
post_install_message:
|
94
|
+
post_install_message:
|
95
95
|
rdoc_options: []
|
96
96
|
require_paths:
|
97
97
|
- lib
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubygems_version: 3.1.4
|
110
|
-
signing_key:
|
110
|
+
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: github-to-canvas is a tool for migrating and aligning GitHub content with
|
113
113
|
the Canvas LMS
|