jekyll-gh-contributors 1.0.3 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d178a954dfbe9eb3c4e2757e82f80540f77e25d9392ed51006be703910b5b059
4
- data.tar.gz: 7006d182a395b681e2894342d59ba72a40fdd4310be9e69d6c95680771ee2f29
3
+ metadata.gz: e976cbf0b26927d18a433548d28321d80c7966dbd0969f547b83e1e744b2ff4e
4
+ data.tar.gz: 1aea8e43c30d7a94abd2bff769d23a229a6b087ab6b1b82b17b4d723d5e9d47e
5
5
  SHA512:
6
- metadata.gz: 0612b7aeb641aae917af44401b4823e67bfc330eab272ccb0386bf08de90e8ee7f85ebabfcaf0f238b9a4e405ab861648f04070367429686112dd587bb7cb440
7
- data.tar.gz: 2dc9f2ca94f750a10085827b2e2015c0d5e0b2f13b928769341cba253c9ca19dba2a333d40ce1747ae8d43514aeb1cf2181096733ae4caa2ce1b32e353c82853
6
+ metadata.gz: 1bb56233c6e27fd252569a994598b98a6cf439c15eeebdff636841981b8b983c13a02618fc2a2d44442529f934389a25b6a02370cef56d5a44adc213e1fdac35
7
+ data.tar.gz: 697717c583e4f428dc922c671ffa3a13f5083542771ec89bc3291d7da6bc252924d97aeeedcb1df74a895b9dcb132eed978923badc561ae021dffb13384fd53e
data/Gemfile CHANGED
@@ -7,6 +7,13 @@ gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
9
 
10
- gem "rspec", "~> 3.0"
10
+
11
11
 
12
12
  gem "rubocop", "~> 0.80"
13
+
14
+
15
+
16
+ group :test do
17
+ gem 'rspec'
18
+ gem "jekyll"
19
+ end
data/Gemfile.lock CHANGED
@@ -1,20 +1,68 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-gh-contributors (1.0.2)
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 (~> 3.0)
105
+ rspec
52
106
  rubocop (~> 0.80)
53
107
 
54
108
  BUNDLED WITH
data/README.md CHANGED
@@ -1,9 +1,7 @@
1
- # Jekyll::Gh::Contributors
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,39 @@ require 'uri'
5
5
  require 'jekyll'
6
6
  require 'jekyll-gh-contributors/version'
7
7
 
8
- class ContributorsTag < Liquid::Tag
9
- def initialize(tag_name, text, tokens)
10
- super
11
- end
8
+ module Jekyll
9
+ class ContributorsTag < Liquid::Tag
10
+ def initialize(tag_name, text, tokens)
11
+ super
12
+ @content = text
13
+ end
12
14
 
13
- def getContributors(repo_url)
14
- uri = URI.parse('{repo_url}/contributors')
15
- response = Net::HTTP.get_response(uri)
15
+ def getContributors(repo_url)
16
+ uri = URI.parse("#{repo_url}/contributors")
17
+ response = Net::HTTP.get_response(uri)
16
18
 
17
- contributors = JSON.parse(response.body)
18
- contributors
19
- end
19
+ contributors = JSON.parse(response.body)
20
+ contributors
21
+ end
20
22
 
21
- def render(_context)
23
+ def render(context)
22
24
 
23
- repo_url = "#{context[@content.strip]}"
24
- contributors = getContributors(repo_url)
25
+ repo_url = "#{context[@content.strip]}"
26
+ contributors = getContributors(repo_url)
25
27
 
26
- element = "<style>.contributors{margin-top:30px;display:flex;flex-flow:row wrap}.contributors .contributor{width:39px;padding:1px}</style>"
28
+ element = "<style>.contributors{margin-top:30px;display:flex;flex-flow:row wrap}.contributors .contributor{width:39px;padding:1px}</style>"
27
29
 
28
- element += "<div class='contributors scrollbar'>"
29
- contributors.each do |contributor|
30
- element += "<div class='contributor'>"
31
- element += " <a href='#{contributor['html_url']}' title='#{contributor['title']}'>"
32
- element += " <img class='User__image' src='#{contributor['avatar_url']}'>"
33
- element += ' </a>'
30
+ element += "<div class='contributors scrollbar'>"
31
+ contributors.each do |contributor|
32
+ element += "<div class='contributor'>"
33
+ element += " <a href='#{contributor['html_url']}' title='#{contributor['title']}'>"
34
+ element += " <img class='User__image' src='#{contributor['avatar_url']}'>"
35
+ element += ' </a>'
36
+ element += '</div>'
37
+ end
34
38
  element += '</div>'
39
+ element
35
40
  end
36
- element += '</div>'
37
- element
38
41
  end
39
42
  end
40
43
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module JekyllGHContributors
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-gh-contributors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - joel ibaceta