jekyll-github-meta 0.0.2 → 0.1.0

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
  SHA1:
3
- metadata.gz: aaa8f288f8aec5e4b90d782545b63d41c39211a7
4
- data.tar.gz: '0294e530c7cb74e46a6e5e60a4761b6713f6183b'
3
+ metadata.gz: 490cef4feb38ec486593b1ae8def56bff86126e1
4
+ data.tar.gz: 0db524459efbd71d61c32959aad8d6cc126f4dd0
5
5
  SHA512:
6
- metadata.gz: 669420a1140384d885ca34ee2c0adf29fc2b500e0257483498c39d1f6c51fca71172bec26b6c73f536f25738d1f95c07f9f8d10f821850ca3d43837ef397201b
7
- data.tar.gz: 291e0b011c610d6b5c316436c495c0c1f2a4ccaf56c97bbc6f66225d25cdf22afab08dd75f34aa402ef82c83e0c4ab6f3756b00b579d65c008de194d1746d4ca
6
+ metadata.gz: fe6baad5816b21754b338652765721fa959288ecf4264142b1c36cf75d2b6bd9035a5df6168ca9d052ed83ed6fa8d940973975413ed7d3fe762981f7ce09913d
7
+ data.tar.gz: 2b69ccd1126dc26d5099936178f6a46292ed24294339520a8cdef9e1832a8e83a0feadb7f94c3ac638299fbac0be8c78d0ae4ca78a7c3f6fc92d66168f3935ed
data/.gitignore CHANGED
@@ -1,25 +1,4 @@
1
+ _site
2
+ .sass-cache
3
+ .jekyll-metadata
1
4
  *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
- .dat*
13
- .repl_history
14
- build/
15
- *.bridgesupport
16
- build-iPhoneOS/
17
- build-iPhoneSimulator/
18
- /.yardoc/
19
- /_yardoc/
20
- /doc/
21
- /rdoc/
22
- /.bundle/
23
- /vendor/bundle
24
- /lib/bundler/man/
25
- .rvmrc
@@ -0,0 +1,24 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <style type="text/css" media="screen">
6
+ .container {
7
+ margin: 10px auto;
8
+ max-width: 600px;
9
+ text-align: center;
10
+ }
11
+ h1 {
12
+ margin: 30px 0;
13
+ font-size: 4em;
14
+ line-height: 1;
15
+ letter-spacing: -1px;
16
+ }
17
+ </style>
18
+
19
+ <div class="container">
20
+ <h1>404</h1>
21
+
22
+ <p><strong>Page not found :(</strong></p>
23
+ <p>The requested page could not be found.</p>
24
+ </div>
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "jekyll", "~> 3.7.2"
4
+ gem "minima", "~> 2.0"
5
+
6
+ group :jekyll_plugins do
7
+ gem "jekyll-feed", "~> 0.6"
8
+ gem "jekyll-site-config", "~> 0.1"
9
+ gem "octokit", "~> 4.8"
10
+ gem "faraday-http-cache", "~> 2.0"
11
+ end
12
+
13
+ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
14
+ gem "wdm", "~> 0.1.0" if Gem.win_platform?
@@ -0,0 +1,89 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ addressable (2.5.2)
5
+ public_suffix (>= 2.0.2, < 4.0)
6
+ colorator (1.1.0)
7
+ concurrent-ruby (1.0.5)
8
+ em-websocket (0.5.1)
9
+ eventmachine (>= 0.12.9)
10
+ http_parser.rb (~> 0.6.0)
11
+ eventmachine (1.2.5)
12
+ faraday (0.14.0)
13
+ multipart-post (>= 1.2, < 3)
14
+ faraday-http-cache (2.0.0)
15
+ faraday (~> 0.8)
16
+ ffi (1.9.21)
17
+ forwardable-extended (2.6.0)
18
+ http_parser.rb (0.6.0)
19
+ i18n (0.9.5)
20
+ concurrent-ruby (~> 1.0)
21
+ jekyll (3.7.2)
22
+ addressable (~> 2.4)
23
+ colorator (~> 1.0)
24
+ em-websocket (~> 0.5)
25
+ i18n (~> 0.7)
26
+ jekyll-sass-converter (~> 1.0)
27
+ jekyll-watch (~> 2.0)
28
+ kramdown (~> 1.14)
29
+ liquid (~> 4.0)
30
+ mercenary (~> 0.3.3)
31
+ pathutil (~> 0.9)
32
+ rouge (>= 1.7, < 4)
33
+ safe_yaml (~> 1.0)
34
+ jekyll-feed (0.9.3)
35
+ jekyll (~> 3.3)
36
+ jekyll-sass-converter (1.5.2)
37
+ sass (~> 3.4)
38
+ jekyll-seo-tag (2.4.0)
39
+ jekyll (~> 3.3)
40
+ jekyll-site-config (0.1.0)
41
+ jekyll (~> 3.0)
42
+ jekyll-watch (2.0.0)
43
+ listen (~> 3.0)
44
+ kramdown (1.16.2)
45
+ liquid (4.0.0)
46
+ listen (3.1.5)
47
+ rb-fsevent (~> 0.9, >= 0.9.4)
48
+ rb-inotify (~> 0.9, >= 0.9.7)
49
+ ruby_dep (~> 1.2)
50
+ mercenary (0.3.6)
51
+ minima (2.3.0)
52
+ jekyll (~> 3.5)
53
+ jekyll-feed (~> 0.9)
54
+ jekyll-seo-tag (~> 2.1)
55
+ multipart-post (2.0.0)
56
+ octokit (4.8.0)
57
+ sawyer (~> 0.8.0, >= 0.5.3)
58
+ pathutil (0.16.1)
59
+ forwardable-extended (~> 2.6)
60
+ public_suffix (3.0.2)
61
+ rb-fsevent (0.10.2)
62
+ rb-inotify (0.9.10)
63
+ ffi (>= 0.5.0, < 2)
64
+ rouge (3.1.1)
65
+ ruby_dep (1.5.0)
66
+ safe_yaml (1.0.4)
67
+ sass (3.5.5)
68
+ sass-listen (~> 4.0.0)
69
+ sass-listen (4.0.0)
70
+ rb-fsevent (~> 0.9, >= 0.9.4)
71
+ rb-inotify (~> 0.9, >= 0.9.7)
72
+ sawyer (0.8.1)
73
+ addressable (>= 2.3.5, < 2.6)
74
+ faraday (~> 0.8, < 1.0)
75
+
76
+ PLATFORMS
77
+ ruby
78
+
79
+ DEPENDENCIES
80
+ faraday-http-cache (~> 2.0)
81
+ jekyll (~> 3.7.2)
82
+ jekyll-feed (~> 0.6)
83
+ jekyll-site-config (~> 0.1)
84
+ minima (~> 2.0)
85
+ octokit (~> 4.8)
86
+ tzinfo-data
87
+
88
+ BUNDLED WITH
89
+ 1.16.1
data/Makefile CHANGED
@@ -3,11 +3,21 @@ CWD := $(shell pwd)
3
3
  .PHONY: all
4
4
  all: build
5
5
 
6
+ .PHONY: start
7
+ start:
8
+ @bundle exec jekyll serve --verbose
9
+
6
10
  .PHONY: build
7
11
  build: clean
8
12
  @gem build *.gemspec
9
13
  @echo ::: BUILD :::
10
14
 
15
+ .PHONY: install
16
+ install: deps
17
+ -@rm -f Gemfile.lock &>/dev/null || true
18
+ @bundle install
19
+ @echo ::: INSTALL :::
20
+
11
21
  .PHONY: push
12
22
  push: build
13
23
  @gem push *.gem
@@ -17,3 +27,10 @@ push: build
17
27
  clean:
18
28
  -@rm -rf *.gem &>/dev/null || true
19
29
  @echo ::: CLEAN :::
30
+
31
+ .PHONY: deps
32
+ deps: bundle
33
+ @echo ::: DEPS :::
34
+ .PHONY: bundle
35
+ bundle:
36
+ @if ! o=$$(which bundle); then gem install bundle jekyll; fi
@@ -0,0 +1,14 @@
1
+ title: Your awesome title
2
+ email: your-email@example.com
3
+ description: >-
4
+ Write an awesome description for your new site here. You can edit this
5
+ line in _config.yml. It will appear in your document head meta (for
6
+ Google search results) and in your feed.xml site description.
7
+ baseurl: ""
8
+ url: ""
9
+ twitter_username: jekyllrb
10
+ github_username: jekyll
11
+ markdown: kramdown
12
+ theme: minima
13
+ plugins:
14
+ - jekyll-feed
@@ -0,0 +1,7 @@
1
+ module Jekyll
2
+ class EnvironmentVariablesGenerator < Generator
3
+ def generate(site)
4
+ site.config['github_token'] = ENV['GITHUB_TOKEN'] || 'development'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ require_relative "../lib/jekyll-github-meta"
@@ -0,0 +1,16 @@
1
+ ---
2
+ layout: post
3
+ title: "Jekyll GitHub Meta"
4
+ date: 2018-02-22 18:29:32 +0000
5
+ categories: jekyll update
6
+ ---
7
+
8
+ Github Login: {{site.github_meta.user.login }}
9
+ <br />
10
+ <br />
11
+ Github Email: {{site.github_meta.user.email }}
12
+ <br />
13
+ {% for repo in site.github_meta.repos %}
14
+ Repo Name: {{repo.name}}
15
+ <br />
16
+ {% endfor %}
@@ -0,0 +1,25 @@
1
+ ---
2
+ layout: post
3
+ title: "Welcome to Jekyll!"
4
+ date: 2018-02-22 18:29:32 +0000
5
+ categories: jekyll update
6
+ ---
7
+ You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
8
+
9
+ To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
10
+
11
+ Jekyll also offers powerful support for code snippets:
12
+
13
+ {% highlight ruby %}
14
+ def print_hi(name)
15
+ puts "Hi, #{name}"
16
+ end
17
+ print_hi('Tom')
18
+ #=> prints 'Hi, Tom' to STDOUT.
19
+ {% endhighlight %}
20
+
21
+ Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
22
+
23
+ [jekyll-docs]: https://jekyllrb.com/docs/home
24
+ [jekyll-gh]: https://github.com/jekyll/jekyll
25
+ [jekyll-talk]: https://talk.jekyllrb.com/
@@ -0,0 +1,18 @@
1
+ ---
2
+ layout: page
3
+ title: About
4
+ permalink: /about/
5
+ ---
6
+
7
+ This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/)
8
+
9
+ You can find the source code for Minima at GitHub:
10
+ [jekyll][jekyll-organization] /
11
+ [minima](https://github.com/jekyll/minima)
12
+
13
+ You can find the source code for Jekyll at GitHub:
14
+ [jekyll][jekyll-organization] /
15
+ [jekyll](https://github.com/jekyll/jekyll)
16
+
17
+
18
+ [jekyll-organization]: https://github.com/jekyll
@@ -0,0 +1,6 @@
1
+ ---
2
+ # You don't need to edit this file, it's empty on purpose.
3
+ # Edit theme's home layout instead if you wanna make some changes
4
+ # See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
5
+ layout: home
6
+ ---
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.add_dependency "jekyll", "~> 3.0"
16
16
  spec.add_dependency "octokit", "~> 4.8"
17
17
  spec.add_dependency "jekyll-site-config", "~> 0.1"
18
+ spec.add_dependency "faraday-http-cache", "~> 2.0"
18
19
  spec.add_development_dependency "rake", "~> 11.0"
19
20
  spec.add_development_dependency "rspec", "~> 3.5"
20
21
  spec.add_development_dependency "rubocop", "~> 0.52"
@@ -1,5 +1,5 @@
1
- require "jekyll-github-meta/version"
2
- require "jekyll-github-meta/generator"
1
+ require_relative "jekyll-github-meta/version"
2
+ require_relative "jekyll-github-meta/generator"
3
3
 
4
4
  module JekyllGithubMeta
5
5
  end
@@ -1,18 +1,28 @@
1
1
  require "jekyll"
2
2
  require "jekyll-site-config"
3
3
  require "octokit"
4
+ require "faraday-http-cache"
5
+ require "json"
4
6
 
5
7
  module JekyllGithubMeta
6
8
  class Generator < Jekyll::Generator
7
9
  def generate(site)
10
+ stack = Faraday::RackBuilder.new do |builder|
11
+ builder.use Faraday::HttpCache, serializer: Marshal, shared_cache: false
12
+ builder.use Octokit::Response::RaiseError
13
+ builder.adapter Faraday.default_adapter
14
+ end
15
+ Octokit.middleware = stack
16
+ Octokit.auto_paginate = true
8
17
  client = Octokit::Client.new(:access_token => site.config["github_token"])
9
- user = client.user
10
- github_meta = {
11
- "user" => {
12
- "name" => user.name
13
- }
18
+ repos = []
19
+ client.repos.each do |repo|
20
+ repos.push(JSON.parse(repo.attrs.to_json))
21
+ end
22
+ site.config["github_meta"] = {
23
+ "user" => JSON.parse(client.user.attrs.to_json),
24
+ "repos" => repos
14
25
  }
15
- JekyllSiteConfig.set_config("github_meta", github_meta)
16
26
  end
17
27
  end
18
28
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllGithubMeta
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.1.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-github-meta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jam Risser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-09 00:00:00.000000000 Z
11
+ date: 2018-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: faraday-http-cache
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -103,9 +117,19 @@ extra_rdoc_files: []
103
117
  files:
104
118
  - ".editorconfig"
105
119
  - ".gitignore"
120
+ - 404.html
121
+ - Gemfile
122
+ - Gemfile.lock
106
123
  - LICENSE
107
124
  - Makefile
108
125
  - README.md
126
+ - _config.yml
127
+ - _plugins/environment_variables.rb
128
+ - _plugins/jekyll-github-meta.rb
129
+ - _posts/2018-02-22-jekyll-github-meta.md
130
+ - _posts/2018-02-22-welcome-to-jekyll.markdown
131
+ - about.md
132
+ - index.md
109
133
  - jekyll-github-meta.gemspec
110
134
  - lib/jekyll-github-meta.rb
111
135
  - lib/jekyll-github-meta/generator.rb