jekyll-gh-contributors 1.0.3 → 1.0.4
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/Gemfile +8 -1
- data/Gemfile.lock +56 -2
- data/README.md +1 -3
- data/lib/jekyll-gh-contributors.rb +24 -22
- data/lib/jekyll-gh-contributors/version.rb +1 -1
- 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: 26bf2152573929074f862f4bf994a5e487ada5db5baf4e6927a274c1410f98fe
|
4
|
+
data.tar.gz: a01a6fcb1654c430956776fbc21c5afd6ba3372594504af0d6c353a638e9d9fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d138feb1828f160b944159a443059d0c7b9406ce9e711f35322a97a3d1d20d75bfe7c27ad33660ec59b5bd537387bf23bcf04c1c3bde72fbfc63cc3338291b
|
7
|
+
data.tar.gz: 80e2be6deaad3882506679fc929ce74012e304e6fe2d2516a2b75a483e8fab9b49cfcc4e9fa41fa29e68522f3ba5c0cabe65ac78e56e1abb5d18ab12dd8dd698
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,20 +1,68 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jekyll-gh-contributors (1.0.
|
4
|
+
jekyll-gh-contributors (1.0.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
addressable (2.8.0)
|
10
|
+
public_suffix (>= 2.0.2, < 5.0)
|
9
11
|
ast (2.4.2)
|
12
|
+
colorator (1.1.0)
|
13
|
+
concurrent-ruby (1.1.9)
|
10
14
|
diff-lcs (1.4.4)
|
15
|
+
em-websocket (0.5.2)
|
16
|
+
eventmachine (>= 0.12.9)
|
17
|
+
http_parser.rb (~> 0.6.0)
|
18
|
+
eventmachine (1.2.7)
|
19
|
+
ffi (1.15.3)
|
20
|
+
forwardable-extended (2.6.0)
|
21
|
+
http_parser.rb (0.6.0)
|
22
|
+
i18n (1.8.10)
|
23
|
+
concurrent-ruby (~> 1.0)
|
24
|
+
jekyll (4.2.0)
|
25
|
+
addressable (~> 2.4)
|
26
|
+
colorator (~> 1.0)
|
27
|
+
em-websocket (~> 0.5)
|
28
|
+
i18n (~> 1.0)
|
29
|
+
jekyll-sass-converter (~> 2.0)
|
30
|
+
jekyll-watch (~> 2.0)
|
31
|
+
kramdown (~> 2.3)
|
32
|
+
kramdown-parser-gfm (~> 1.0)
|
33
|
+
liquid (~> 4.0)
|
34
|
+
mercenary (~> 0.4.0)
|
35
|
+
pathutil (~> 0.9)
|
36
|
+
rouge (~> 3.0)
|
37
|
+
safe_yaml (~> 1.0)
|
38
|
+
terminal-table (~> 2.0)
|
39
|
+
jekyll-sass-converter (2.1.0)
|
40
|
+
sassc (> 2.0.1, < 3.0)
|
41
|
+
jekyll-watch (2.2.1)
|
42
|
+
listen (~> 3.0)
|
43
|
+
kramdown (2.3.1)
|
44
|
+
rexml
|
45
|
+
kramdown-parser-gfm (1.1.0)
|
46
|
+
kramdown (~> 2.0)
|
47
|
+
liquid (4.0.3)
|
48
|
+
listen (3.6.0)
|
49
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
50
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
51
|
+
mercenary (0.4.0)
|
11
52
|
parallel (1.20.1)
|
12
53
|
parser (3.0.2.0)
|
13
54
|
ast (~> 2.4.1)
|
55
|
+
pathutil (0.16.2)
|
56
|
+
forwardable-extended (~> 2.6)
|
57
|
+
public_suffix (4.0.6)
|
14
58
|
rainbow (3.0.0)
|
15
59
|
rake (13.0.6)
|
60
|
+
rb-fsevent (0.11.0)
|
61
|
+
rb-inotify (0.10.1)
|
62
|
+
ffi (~> 1.0)
|
16
63
|
regexp_parser (2.1.1)
|
17
64
|
rexml (3.2.5)
|
65
|
+
rouge (3.26.0)
|
18
66
|
rspec (3.10.0)
|
19
67
|
rspec-core (~> 3.10.0)
|
20
68
|
rspec-expectations (~> 3.10.0)
|
@@ -40,15 +88,21 @@ GEM
|
|
40
88
|
rubocop-ast (1.8.0)
|
41
89
|
parser (>= 3.0.1.1)
|
42
90
|
ruby-progressbar (1.11.0)
|
91
|
+
safe_yaml (1.0.5)
|
92
|
+
sassc (2.4.0)
|
93
|
+
ffi (~> 1.9)
|
94
|
+
terminal-table (2.0.0)
|
95
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
43
96
|
unicode-display_width (1.7.0)
|
44
97
|
|
45
98
|
PLATFORMS
|
46
99
|
arm64-darwin-21
|
47
100
|
|
48
101
|
DEPENDENCIES
|
102
|
+
jekyll
|
49
103
|
jekyll-gh-contributors!
|
50
104
|
rake (~> 13.0)
|
51
|
-
rspec
|
105
|
+
rspec
|
52
106
|
rubocop (~> 0.80)
|
53
107
|
|
54
108
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# JekyllGhContributors
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jekyll/gh/contributors`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
@@ -5,36 +5,38 @@ require 'uri'
|
|
5
5
|
require 'jekyll'
|
6
6
|
require 'jekyll-gh-contributors/version'
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
module Jekyll
|
9
|
+
class ContributorsTag < Liquid::Tag
|
10
|
+
def initialize(tag_name, text, tokens)
|
11
|
+
super
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def getContributors(repo_url)
|
15
|
+
uri = URI.parse('{repo_url}/contributors')
|
16
|
+
response = Net::HTTP.get_response(uri)
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
contributors = JSON.parse(response.body)
|
19
|
+
contributors
|
20
|
+
end
|
20
21
|
|
21
|
-
|
22
|
+
def render(_context)
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
repo_url = "#{context[@content.strip]}"
|
25
|
+
contributors = getContributors(repo_url)
|
25
26
|
|
26
|
-
|
27
|
+
element = "<style>.contributors{margin-top:30px;display:flex;flex-flow:row wrap}.contributors .contributor{width:39px;padding:1px}</style>"
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
element += "<div class='contributors scrollbar'>"
|
30
|
+
contributors.each do |contributor|
|
31
|
+
element += "<div class='contributor'>"
|
32
|
+
element += " <a href='#{contributor['html_url']}' title='#{contributor['title']}'>"
|
33
|
+
element += " <img class='User__image' src='#{contributor['avatar_url']}'>"
|
34
|
+
element += ' </a>'
|
35
|
+
element += '</div>'
|
36
|
+
end
|
34
37
|
element += '</div>'
|
38
|
+
element
|
35
39
|
end
|
36
|
-
element += '</div>'
|
37
|
-
element
|
38
40
|
end
|
39
41
|
end
|
40
42
|
|