jekyll-github-metadata 2.9.3 → 2.9.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
  SHA1:
3
- metadata.gz: 82553c0443622f76eaeee723bc56eaa5669e28c0
4
- data.tar.gz: e5b3376b4217126db47f9d9c29a02c47f2e3ea55
3
+ metadata.gz: ef3543499922abbc5abd53b23c0adb1fb8374286
4
+ data.tar.gz: bcfa24ec3833c456271b3fec85f2d221afb79dea
5
5
  SHA512:
6
- metadata.gz: 65a26531411f92e5f4b3667606b5e28715facf8d078b729bddb972bc414a4575e7b09852dca33c57b1a5bd6ac92c4e96c4e5693c08cb3fd631a491af1a472218
7
- data.tar.gz: 147c2f8b00c4bb4203809cbc019c640c56645feae415ac99b9fde5b07737ca7976d559cdc6893e1317a6f660f7c6ec43bf631aa3c3b8ddc9c2baeb05679b635e
6
+ metadata.gz: f44010f8c0794a577de8277656c9e0c990359e9b84aeedae95edba8acb01a9adc16a139a171fdf9abcea42b432cef21b03b74f5128c420b6ad65f3541ca95000
7
+ data.tar.gz: 83c76bdf1226e68ae7394acd3383afe0f1ad183771a0e464d74ad099d7813fe7f7ded80431af065da30232f5b153e22ed864ce6629142f98c0a705c7b44ba856
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "octokit"
2
4
  require "liquid"
3
5
  require "logger"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "digest"
2
4
 
3
5
  module Jekyll
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
5
  class EditLinkTag < Liquid::Tag
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "jekyll"
2
4
  require "forwardable"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
5
  class Pages
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
5
  class Repository
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
5
  class RepositoryCompat
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
5
  class RepositoryFinder
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
5
  module Sanitizer
@@ -47,20 +47,31 @@ module Jekyll
47
47
  site.config["baseurl"] = Value.new("baseurl", proc { |_c, r| r.baseurl })
48
48
  end
49
49
 
50
+ def add_title_and_description_fallbacks!
51
+ if should_warn_about_site_name?
52
+ msg = "site.name is set in _config.yml, but many plugins and themes expect "
53
+ msg << "site.title to be used instead. To avoid potential inconsistency, "
54
+ msg << "Jekyll GitHub Metadata will not set site.title to the repository's name."
55
+ Jekyll::GitHubMetadata.log :warn, msg
56
+ else
57
+ site.config["title"] ||= Value.new("title", proc { |_c, r| r.name })
58
+ end
59
+ site.config["description"] ||= Value.new("description", proc { |_c, r| r.tagline })
60
+ end
61
+
50
62
  # Set the baseurl only if it is `nil` or `/`
51
63
  # Baseurls should never be "/". See http://bit.ly/2s1Srid
52
64
  def should_set_baseurl?
53
65
  site.config["baseurl"].nil? || site.config["baseurl"] == "/"
54
66
  end
55
67
 
56
- def add_title_and_description_fallbacks!
57
- site.config["title"] ||= Value.new("title", proc { |_c, r| r.name })
58
- site.config["description"] ||= Value.new("description", proc { |_c, r| r.tagline })
59
- end
60
-
61
68
  def should_add_url_fallbacks?
62
69
  Jekyll.env == "production" || Pages.page_build?
63
70
  end
71
+
72
+ def should_warn_about_site_name?
73
+ site.config["name"] && !site.config["title"]
74
+ end
64
75
  end
65
76
  end
66
77
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "json"
2
4
 
3
5
  module Jekyll
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module GitHubMetadata
3
- VERSION = "2.9.3".freeze
5
+ VERSION = "2.9.4".freeze
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,49 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-github-metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.3
4
+ version: 2.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parker Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-07 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octokit
14
+ name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
20
- - - "!="
21
- - !ruby/object:Gem::Version
22
- version: 4.4.0
19
+ version: '3.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '4.0'
30
- - - "!="
31
- - !ruby/object:Gem::Version
32
- version: 4.4.0
26
+ version: '3.1'
33
27
  - !ruby/object:Gem::Dependency
34
- name: jekyll
28
+ name: octokit
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '3.1'
33
+ version: '4.0'
34
+ - - "!="
35
+ - !ruby/object:Gem::Version
36
+ version: 4.4.0
40
37
  type: :runtime
41
38
  prerelease: false
42
39
  version_requirements: !ruby/object:Gem::Requirement
43
40
  requirements:
44
41
  - - "~>"
45
42
  - !ruby/object:Gem::Version
46
- version: '3.1'
43
+ version: '4.0'
44
+ - - "!="
45
+ - !ruby/object:Gem::Version
46
+ version: 4.4.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.5'
61
61
  - !ruby/object:Gem::Dependency
62
- name: rake
62
+ name: netrc
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
@@ -73,7 +73,7 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: netrc
76
+ name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '0.37'
109
+ version: '0.51'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '0.37'
116
+ version: '0.51'
117
117
  description:
118
118
  email:
119
119
  - parkrmoore@gmail.com