jekyll-gh-contributors 1.0.0 → 1.0.4

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: 4f6ee06c0525517703585140458782ff333700d6336d4eae544207804c52c51b
4
- data.tar.gz: 8ef753a30e71de715a3e775dea5d01e00e2f6a85597e8eaf44d58d720a780e69
3
+ metadata.gz: 26bf2152573929074f862f4bf994a5e487ada5db5baf4e6927a274c1410f98fe
4
+ data.tar.gz: a01a6fcb1654c430956776fbc21c5afd6ba3372594504af0d6c353a638e9d9fb
5
5
  SHA512:
6
- metadata.gz: 3907993025adcf8e15d1b75ef3bb124789c13860c1df81ba87e472935501a54a6e8a85f9227371bf8b1bfc831cdcee4dbd11f072660569645368f205b5390f26
7
- data.tar.gz: 22d1a33d17074b3a537063df05057d4f5899b494d25d5fee2773bcf87c2f1e19a90f8f04f09b89c1a7025c2365bf8584f4e3d5b5ef3b755d33782ac38a65b6c9
6
+ metadata.gz: 30d138feb1828f160b944159a443059d0c7b9406ce9e711f35322a97a3d1d20d75bfe7c27ad33660ec59b5bd537387bf23bcf04c1c3bde72fbfc63cc3338291b
7
+ data.tar.gz: 80e2be6deaad3882506679fc929ce74012e304e6fe2d2516a2b75a483e8fab9b49cfcc4e9fa41fa29e68522f3ba5c0cabe65ac78e56e1abb5d18ab12dd8dd698
@@ -0,0 +1,18 @@
1
+ name: Ruby
2
+
3
+ on: [push,pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 3.0.0
14
+ - name: Run the default task
15
+ run: |
16
+ gem install bundler -v 2.2.3
17
+ bundle install
18
+ bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ Style/StringLiterals:
2
+ Enabled: true
3
+ EnforcedStyle: double_quotes
4
+
5
+ Style/StringLiteralsInInterpolation:
6
+ Enabled: true
7
+ EnforcedStyle: double_quotes
8
+
9
+ Layout/LineLength:
10
+ Max: 120
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in jekyll-gh-contributors.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+
11
+
12
+ gem "rubocop", "~> 0.80"
13
+
14
+
15
+
16
+ group :test do
17
+ gem 'rspec'
18
+ gem "jekyll"
19
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,109 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ jekyll-gh-contributors (1.0.3)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ addressable (2.8.0)
10
+ public_suffix (>= 2.0.2, < 5.0)
11
+ ast (2.4.2)
12
+ colorator (1.1.0)
13
+ concurrent-ruby (1.1.9)
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)
52
+ parallel (1.20.1)
53
+ parser (3.0.2.0)
54
+ ast (~> 2.4.1)
55
+ pathutil (0.16.2)
56
+ forwardable-extended (~> 2.6)
57
+ public_suffix (4.0.6)
58
+ rainbow (3.0.0)
59
+ rake (13.0.6)
60
+ rb-fsevent (0.11.0)
61
+ rb-inotify (0.10.1)
62
+ ffi (~> 1.0)
63
+ regexp_parser (2.1.1)
64
+ rexml (3.2.5)
65
+ rouge (3.26.0)
66
+ rspec (3.10.0)
67
+ rspec-core (~> 3.10.0)
68
+ rspec-expectations (~> 3.10.0)
69
+ rspec-mocks (~> 3.10.0)
70
+ rspec-core (3.10.1)
71
+ rspec-support (~> 3.10.0)
72
+ rspec-expectations (3.10.1)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.10.0)
75
+ rspec-mocks (3.10.2)
76
+ diff-lcs (>= 1.2.0, < 2.0)
77
+ rspec-support (~> 3.10.0)
78
+ rspec-support (3.10.2)
79
+ rubocop (0.93.1)
80
+ parallel (~> 1.10)
81
+ parser (>= 2.7.1.5)
82
+ rainbow (>= 2.2.2, < 4.0)
83
+ regexp_parser (>= 1.8)
84
+ rexml
85
+ rubocop-ast (>= 0.6.0)
86
+ ruby-progressbar (~> 1.7)
87
+ unicode-display_width (>= 1.4.0, < 2.0)
88
+ rubocop-ast (1.8.0)
89
+ parser (>= 3.0.1.1)
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)
96
+ unicode-display_width (1.7.0)
97
+
98
+ PLATFORMS
99
+ arm64-darwin-21
100
+
101
+ DEPENDENCIES
102
+ jekyll
103
+ jekyll-gh-contributors!
104
+ rake (~> 13.0)
105
+ rspec
106
+ rubocop (~> 0.80)
107
+
108
+ BUNDLED WITH
109
+ 2.2.3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 joel ibaceta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1 +1,41 @@
1
- # jekyll-gh-contributors
1
+ # JekyllGhContributors
2
+
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
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'jekyll-gh-contributors'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install jekyll-gh-contributors
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-gh-contributors. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/jekyll-gh-contributors/blob/master/CODE_OF_CONDUCT.md).
34
+
35
+ ## License
36
+
37
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
38
+
39
+ ## Code of Conduct
40
+
41
+ Everyone interacting in the Jekyll::Gh::Contributors project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-gh-contributors/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "jekyll/gh/contributors"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/jekyll-gh-contributors/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "jekyll-gh-contributors"
7
+ spec.version = Jekyll::JekyllGHContributors::VERSION
8
+ spec.authors = ["joel ibaceta"]
9
+ spec.email = ["mail@joelibaceta.com"]
10
+
11
+ spec.summary = "Jekyll plugin to generate contributors pics grid"
12
+ spec.description = "Jekyll plugin to generate contributors pics grid"
13
+ spec.homepage = "https://github.com/joelibaceta/jekyll-gh-contributors"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/joelibaceta/jekyll-gh-contributors"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
24
+ end
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ # Uncomment to register a new dependency of your gem
30
+ # spec.add_dependency "example-gem", "~> 1.0"
31
+
32
+ # For more information and examples about making a new gem, checkout our
33
+ # guide at: https://bundler.io/guides/creating_gem.html
34
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'net/http'
4
+ require 'uri'
5
+ require 'jekyll'
6
+ require 'jekyll-gh-contributors/version'
7
+
8
+ module Jekyll
9
+ class ContributorsTag < Liquid::Tag
10
+ def initialize(tag_name, text, tokens)
11
+ super
12
+ end
13
+
14
+ def getContributors(repo_url)
15
+ uri = URI.parse('{repo_url}/contributors')
16
+ response = Net::HTTP.get_response(uri)
17
+
18
+ contributors = JSON.parse(response.body)
19
+ contributors
20
+ end
21
+
22
+ def render(_context)
23
+
24
+ repo_url = "#{context[@content.strip]}"
25
+ contributors = getContributors(repo_url)
26
+
27
+ element = "<style>.contributors{margin-top:30px;display:flex;flex-flow:row wrap}.contributors .contributor{width:39px;padding:1px}</style>"
28
+
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
37
+ element += '</div>'
38
+ element
39
+ end
40
+ end
41
+ end
42
+
43
+ Liquid::Template.register_tag('gh_contributors', Jekyll::ContributorsTag)
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ module JekyllGHContributors
3
+ VERSION = "1.0.4"
4
+ end
5
+ end
metadata CHANGED
@@ -1,69 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-gh-contributors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
- - Joel Ibaceta
7
+ - joel ibaceta
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2021-07-29 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: jekyll
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.10'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.10'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
55
- description: jekyll plugin to generate contributors grid from GitHub
12
+ dependencies: []
13
+ description: Jekyll plugin to generate contributors pics grid
56
14
  email:
57
15
  - mail@joelibaceta.com
58
16
  executables: []
59
17
  extensions: []
60
18
  extra_rdoc_files: []
61
19
  files:
20
+ - ".github/workflows/main.yml"
21
+ - ".gitignore"
22
+ - ".rspec"
23
+ - ".rubocop.yml"
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - LICENSE.txt
62
27
  - README.md
28
+ - Rakefile
29
+ - bin/console
30
+ - bin/setup
31
+ - jekyll-gh-contributors.gemspec
32
+ - lib/jekyll-gh-contributors.rb
33
+ - lib/jekyll-gh-contributors/version.rb
63
34
  homepage: https://github.com/joelibaceta/jekyll-gh-contributors
64
35
  licenses:
65
36
  - MIT
66
- metadata: {}
37
+ metadata:
38
+ homepage_uri: https://github.com/joelibaceta/jekyll-gh-contributors
39
+ source_code_uri: https://github.com/joelibaceta/jekyll-gh-contributors
67
40
  post_install_message:
68
41
  rdoc_options: []
69
42
  require_paths:
@@ -72,7 +45,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
45
  requirements:
73
46
  - - ">="
74
47
  - !ruby/object:Gem::Version
75
- version: '0'
48
+ version: 2.3.0
76
49
  required_rubygems_version: !ruby/object:Gem::Requirement
77
50
  requirements:
78
51
  - - ">="
@@ -82,5 +55,5 @@ requirements: []
82
55
  rubygems_version: 3.2.3
83
56
  signing_key:
84
57
  specification_version: 4
85
- summary: jekyll plugin to generate contributors grid from GitHub
58
+ summary: Jekyll plugin to generate contributors pics grid
86
59
  test_files: []