jekyll-gh-contributors 1.0.4 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-gh-contributors.rb +3 -2
- 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: f916df19cda5cf791551e9dc612d3cf5c80871ccf1f869f58de5c2b660e10641
|
4
|
+
data.tar.gz: eec19c1a1ebc03674bc20ceef3d7ad2661ba2810cd7b5efe63ff38dc59b2029a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17c54b5983bcfd0bbd8027389f751eeb2b23557975d5083b29ddf783ce423f59c478ce3191c9a49f062cce6bdd7325a8717bf5016202774be1162727eb795c6c
|
7
|
+
data.tar.gz: bed9aa0751b3aebc400d61fc252d5ed715e18d89d2aaedeb9ae6ca88f765aed4621d0de31b904f27a46274a268c140dbef5028f167b2dc6bcbdc68cc885ad479
|
@@ -9,17 +9,18 @@ module Jekyll
|
|
9
9
|
class ContributorsTag < Liquid::Tag
|
10
10
|
def initialize(tag_name, text, tokens)
|
11
11
|
super
|
12
|
+
@content = text
|
12
13
|
end
|
13
14
|
|
14
15
|
def getContributors(repo_url)
|
15
|
-
uri = URI.parse(
|
16
|
+
uri = URI.parse("https://api.github.com/repos/#{repo_url}/contributors")
|
16
17
|
response = Net::HTTP.get_response(uri)
|
17
18
|
|
18
19
|
contributors = JSON.parse(response.body)
|
19
20
|
contributors
|
20
21
|
end
|
21
22
|
|
22
|
-
def render(
|
23
|
+
def render(context)
|
23
24
|
|
24
25
|
repo_url = "#{context[@content.strip]}"
|
25
26
|
contributors = getContributors(repo_url)
|