jekyll-github-metadata 2.9.4 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/jekyll-github-metadata.rb +4 -15
- data/lib/jekyll-github-metadata/metadata_drop.rb +7 -7
- data/lib/jekyll-github-metadata/pages.rb +1 -1
- data/lib/jekyll-github-metadata/repository_finder.rb +11 -10
- data/lib/jekyll-github-metadata/site_github_munger.rb +2 -2
- data/lib/jekyll-github-metadata/version.rb +1 -1
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7bd19cc5c1797ac829abde53d1008003675fcabaf6d4e2370f76342faea43ee5
|
4
|
+
data.tar.gz: e2d6401feb3be9354eb7829b187e864aecce0c615e9f1f0f3e384888e8d1f382
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df04b9684967e06a748632a32ebaed6238e9e7102fc66709de61b834445cabcd0eeba12772fe0928101ffa108b00d028fdbf6bc3f69020713b96aea686ac38f7
|
7
|
+
data.tar.gz: a9b2d3f6cfb0bc2e620d7b4ffcd6da85db038425ba0649f8af06d058fe87079acb5efe8e3005c455e527c29b9de2f9ce0fc4cebf26deccd620eaff9fd245ece0
|
@@ -1,10 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "jekyll"
|
3
4
|
require "octokit"
|
4
|
-
require "liquid"
|
5
|
-
require "logger"
|
6
5
|
|
7
|
-
if
|
6
|
+
if Jekyll.env == "development"
|
8
7
|
begin
|
9
8
|
require "dotenv"
|
10
9
|
Dotenv.load
|
@@ -14,12 +13,6 @@ if defined?(Jekyll) && Jekyll.respond_to?(:env) && Jekyll.env == "development"
|
|
14
13
|
end
|
15
14
|
|
16
15
|
module Jekyll
|
17
|
-
unless const_defined? :Errors
|
18
|
-
module Errors
|
19
|
-
FatalException = Class.new(::RuntimeError) unless const_defined? :FatalException
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
16
|
module GitHubMetadata
|
24
17
|
autoload :Client, "jekyll-github-metadata/client"
|
25
18
|
autoload :EditLinkTag, "jekyll-github-metadata/edit-link-tag"
|
@@ -47,15 +40,11 @@ module Jekyll
|
|
47
40
|
end
|
48
41
|
|
49
42
|
def environment
|
50
|
-
Jekyll.
|
43
|
+
Jekyll.env
|
51
44
|
end
|
52
45
|
|
53
46
|
def logger
|
54
|
-
@logger ||=
|
55
|
-
Jekyll.logger
|
56
|
-
else
|
57
|
-
Logger.new($stdout)
|
58
|
-
end
|
47
|
+
@logger ||= Jekyll.logger
|
59
48
|
end
|
60
49
|
|
61
50
|
def log(severity, message)
|
@@ -32,14 +32,14 @@ module Jekyll
|
|
32
32
|
super.sort
|
33
33
|
end
|
34
34
|
|
35
|
-
def_delegator
|
36
|
-
def_delegator
|
37
|
-
def_delegator
|
38
|
-
def_delegator
|
39
|
-
def_delegator
|
40
|
-
def_delegator
|
35
|
+
def_delegator Jekyll::GitHubMetadata::Pages, :env, :environment
|
36
|
+
def_delegator Jekyll::GitHubMetadata::Pages, :env, :pages_env
|
37
|
+
def_delegator Jekyll::GitHubMetadata::Pages, :github_hostname, :hostname
|
38
|
+
def_delegator Jekyll::GitHubMetadata::Pages, :pages_hostname, :pages_hostname
|
39
|
+
def_delegator Jekyll::GitHubMetadata::Pages, :api_url, :api_url
|
40
|
+
def_delegator Jekyll::GitHubMetadata::Pages, :help_url, :help_url
|
41
41
|
|
42
|
-
private def_delegator
|
42
|
+
private def_delegator Jekyll::GitHubMetadata, :repository
|
43
43
|
|
44
44
|
def_delegator :repository, :owner_public_repositories, :public_repositories
|
45
45
|
def_delegator :repository, :organization_public_members, :organization_members
|
@@ -45,16 +45,12 @@ module Jekyll
|
|
45
45
|
repo if repo && repo.is_a?(String) && repo.include?("/")
|
46
46
|
end
|
47
47
|
|
48
|
-
def git_exe_path
|
49
|
-
ENV["PATH"].to_s
|
50
|
-
.split(File::PATH_SEPARATOR)
|
51
|
-
.map { |path| File.join(path, "git") }
|
52
|
-
.find { |path| File.exist?(path) }
|
53
|
-
end
|
54
|
-
|
55
48
|
def git_remotes
|
56
|
-
|
57
|
-
|
49
|
+
_process, output = Jekyll::Utils::Exec.run("git", "remote", "--verbose")
|
50
|
+
output.to_s.strip.split("\n")
|
51
|
+
rescue Errno::ENOENT => e
|
52
|
+
Jekyll.logger.warn "Not Installed:", e.message
|
53
|
+
[]
|
58
54
|
end
|
59
55
|
|
60
56
|
def git_remote_url
|
@@ -65,9 +61,14 @@ module Jekyll
|
|
65
61
|
|
66
62
|
def nwo_from_git_origin_remote
|
67
63
|
return unless Jekyll.env == "development" || Jekyll.env == "test"
|
68
|
-
matches = git_remote_url.chomp(".git").match
|
64
|
+
matches = git_remote_url.chomp(".git").match github_remote_regex
|
69
65
|
matches[2..3].join("/") if matches
|
70
66
|
end
|
67
|
+
|
68
|
+
def github_remote_regex
|
69
|
+
github_host_regex = Regexp.escape(Jekyll::GitHubMetadata::Pages.github_hostname)
|
70
|
+
%r!#{github_host_regex}(:|/)([\w-]+)/([\w\.-]+)!
|
71
|
+
end
|
71
72
|
end
|
72
73
|
end
|
73
74
|
end
|
@@ -6,8 +6,8 @@ module Jekyll
|
|
6
6
|
class SiteGitHubMunger
|
7
7
|
extend Forwardable
|
8
8
|
|
9
|
-
def_delegators
|
10
|
-
private
|
9
|
+
def_delegators Jekyll::GitHubMetadata, :site, :repository
|
10
|
+
private :repository
|
11
11
|
|
12
12
|
def initialize(site)
|
13
13
|
Jekyll::GitHubMetadata.site = site
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-github-metadata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: octokit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,20 +100,34 @@ dependencies:
|
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: pry
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: rubocop
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
106
120
|
requirements:
|
107
121
|
- - "~>"
|
108
122
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
123
|
+
version: 0.57.2
|
110
124
|
type: :development
|
111
125
|
prerelease: false
|
112
126
|
version_requirements: !ruby/object:Gem::Requirement
|
113
127
|
requirements:
|
114
128
|
- - "~>"
|
115
129
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
130
|
+
version: 0.57.2
|
117
131
|
description:
|
118
132
|
email:
|
119
133
|
- parkrmoore@gmail.com
|
@@ -152,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
166
|
- !ruby/object:Gem::Version
|
153
167
|
version: '0'
|
154
168
|
requirements: []
|
155
|
-
|
156
|
-
rubygems_version: 2.6.11
|
169
|
+
rubygems_version: 3.0.1
|
157
170
|
signing_key:
|
158
171
|
specification_version: 4
|
159
172
|
summary: The site.github namespace
|