jekyll-github-metadata 2.13.0 → 2.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-github-metadata/metadata_drop.rb +1 -0
- data/lib/jekyll-github-metadata/repository.rb +11 -1
- data/lib/jekyll-github-metadata/sanitizer.rb +4 -2
- data/lib/jekyll-github-metadata/site_github_munger.rb +7 -1
- data/lib/jekyll-github-metadata/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0aa9b80b06e98d57d4a18a9952b633e26bdd18743300b2a060fdf49ab9fd76a5
|
4
|
+
data.tar.gz: 750dc7e1fd1da0527ffe369bc6abd3b12170900ae3a7db30e041b35712ebe163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3768bf00efd6d4455c739cc84fe0e553c5569eb2548f1608845dd3cf8ca203bb83d47be001987152acd64d63962587c8d4748fa4bae9006b5a2a98963210c092
|
7
|
+
data.tar.gz: 62bfca12e088100b09b0343391cf2750778415062a9b2ef1da7cc4390ef56fa8b13ac60347bc37a891d504738ac6bce6a160b5ba5f680bd09bb792ce5dbe92bf
|
@@ -48,6 +48,7 @@ module Jekyll
|
|
48
48
|
def_delegator :repository, :tagline, :project_tagline
|
49
49
|
def_delegator :repository, :owner_metadata, :owner
|
50
50
|
def_delegator :repository, :owner, :owner_name
|
51
|
+
def_delegator :repository, :owner_display_name, :owner_display_name
|
51
52
|
def_delegator :repository, :owner_url, :owner_url
|
52
53
|
def_delegator :repository, :owner_gravatar_url, :owner_gravatar_url
|
53
54
|
def_delegator :repository, :repository_url, :repository_url
|
@@ -64,6 +64,10 @@ module Jekyll
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
def owner_display_name
|
68
|
+
owner_metadata.name
|
69
|
+
end
|
70
|
+
|
67
71
|
def owner_metadata
|
68
72
|
@owner_metadata ||= Jekyll::GitHubMetadata::Owner.new(owner)
|
69
73
|
end
|
@@ -113,7 +117,13 @@ module Jekyll
|
|
113
117
|
:type => "public",
|
114
118
|
:accept => "application/vnd.github.mercy-preview+json",
|
115
119
|
}
|
116
|
-
memoize_value :@owner_public_repositories, Value.new("owner_public_repositories", proc
|
120
|
+
memoize_value :@owner_public_repositories, Value.new("owner_public_repositories", proc do |c|
|
121
|
+
c.list_repos(owner, options).map do |r|
|
122
|
+
r[:releases] = Value.new("owner_public_repositories_releases", proc { c.releases(r[:full_name]) })
|
123
|
+
r[:contributors] = Value.new("owner_public_repositories_contributors", proc { c.contributors(r[:full_name]) })
|
124
|
+
r
|
125
|
+
end
|
126
|
+
end)
|
117
127
|
end
|
118
128
|
|
119
129
|
def organization_public_members
|
@@ -16,7 +16,7 @@ module Jekyll
|
|
16
16
|
# resource - an Object
|
17
17
|
#
|
18
18
|
# Returns the sanitized resource.
|
19
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
19
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength
|
20
20
|
def sanitize(resource)
|
21
21
|
case resource
|
22
22
|
when Array
|
@@ -31,6 +31,8 @@ module Jekyll
|
|
31
31
|
nil
|
32
32
|
when String
|
33
33
|
resource
|
34
|
+
when Value
|
35
|
+
resource.render
|
34
36
|
else
|
35
37
|
if resource.respond_to?(:to_hash)
|
36
38
|
sanitize_resource(resource)
|
@@ -39,7 +41,7 @@ module Jekyll
|
|
39
41
|
end
|
40
42
|
end
|
41
43
|
end
|
42
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
44
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/MethodLength
|
43
45
|
|
44
46
|
# Sanitize the Sawyer Resource or Hash
|
45
47
|
# Note: the object must respond to :to_hash for this to work.
|
@@ -55,7 +55,13 @@ module Jekyll
|
|
55
55
|
msg << "Jekyll GitHub Metadata will not set site.title to the repository's name."
|
56
56
|
Jekyll::GitHubMetadata.log :warn, msg
|
57
57
|
else
|
58
|
-
site.config["title"] ||= Value.new("title", proc { |
|
58
|
+
site.config["title"] ||= Value.new("title", proc { |_context, repository|
|
59
|
+
if repository.project_page?
|
60
|
+
repository.name
|
61
|
+
else
|
62
|
+
repository.owner_display_name || repository.owner
|
63
|
+
end
|
64
|
+
})
|
59
65
|
end
|
60
66
|
site.config["description"] ||= Value.new("description", proc { |_c, r| r.tagline })
|
61
67
|
end
|
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.14.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: 2022-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -112,28 +112,28 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 3.
|
115
|
+
version: 3.11.0
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
120
|
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 3.
|
122
|
+
version: 3.11.0
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: rubocop-jekyll
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 0.
|
129
|
+
version: 0.12.0
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 0.
|
136
|
+
version: 0.12.0
|
137
137
|
description:
|
138
138
|
email:
|
139
139
|
- parkrmoore@gmail.com
|
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
|
-
rubygems_version: 3.
|
176
|
+
rubygems_version: 3.1.6
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: The site.github namespace
|