github-pages 173 → 174

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: 4c6a22d8ef7f8bd43b5a41ee821153ca9bec8e85
4
- data.tar.gz: 16de4843b16e8fbd42cf87458e4f718f06ceac8d
3
+ metadata.gz: 6ca8ac599f93e9a5afaf1df85068cdcc589d2e39
4
+ data.tar.gz: 60026422083678039afe0771b2db28ad357f9c25
5
5
  SHA512:
6
- metadata.gz: 2a4ec6b19f7648f8cb9947529565490bd9a5b4eff3e575e597d185e9fab6c6431e9c76ec3e8bc436161be83ad1a037b79e5e18f10ee3f51a2c93287f0181c6d1
7
- data.tar.gz: dd8287992c382a81f63b088a21bbc97c872362b0af1a4949c06f76ffe9bcd42406077e86a0bb2f8ab6f0e29481d269be5f2ae5e01142d987c589423e0fc02dac
6
+ metadata.gz: 6746385d4eda8696cde9bad19ea465eec37fb23e500e64a3a8a0c974773afe79321c4512f56fd804e26db47515064902d675f9bc0236f5855f755c22a614cb86
7
+ data.tar.gz: c4599a2189d65e85dc8031c821d60c7c7d48aa7119610fa7d0c07eb73fec4a5eb69e153cebb49f187e443f08b2f197696af0cd43f62f1c5e71810f215f9b3fc5
@@ -70,6 +70,7 @@ Metrics/ClassLength:
70
70
  Exclude:
71
71
  - !ruby/regexp /spec\/.*.rb$/
72
72
  - !ruby/regexp /features\/.*.rb$/
73
+ - lib/github-pages/configuration.rb
73
74
 
74
75
  Style/PercentLiteralDelimiters:
75
76
  PreferredDelimiters:
@@ -119,6 +119,25 @@ module GitHubPages
119
119
  config
120
120
  end
121
121
 
122
+ # Set the site's configuration. Implemented as an `after_reset` hook.
123
+ # Equivalent #set! function contains the code of interest. This function
124
+ # guards against double-processing via the value in #processed.
125
+ def set(site)
126
+ return if processed? site
127
+ debug_print_versions
128
+ set!(site)
129
+ processed(site)
130
+ conditionally_require_plugins(site)
131
+ end
132
+
133
+ # Set the site's configuration with all the proper defaults and overrides.
134
+ # Should be called by #set to protect against multiple processings.
135
+ def set!(site)
136
+ site.config = effective_config(site.config)
137
+ end
138
+
139
+ private
140
+
122
141
  # Ensure we're using Kramdown or GFM. Force to Kramdown if
123
142
  # neither of these.
124
143
  #
@@ -137,16 +156,6 @@ module GitHubPages
137
156
  }
138
157
  end
139
158
 
140
- # Set the site's configuration. Implemented as an `after_reset` hook.
141
- # Equivalent #set! function contains the code of interest. This function
142
- # guards against double-processing via the value in #processed.
143
- def set(site)
144
- return if processed? site
145
- debug_print_versions
146
- set!(site)
147
- processed(site)
148
- end
149
-
150
159
  # Print the versions for github-pages and jekyll to the debug
151
160
  # stream for debugging purposes. See by running Jekyll with '--verbose'
152
161
  def debug_print_versions
@@ -154,10 +163,13 @@ module GitHubPages
154
163
  Jekyll.logger.debug "GitHub Pages:", "jekyll v#{Jekyll::VERSION}"
155
164
  end
156
165
 
157
- # Set the site's configuration with all the proper defaults and overrides.
158
- # Should be called by #set to protect against multiple processings.
159
- def set!(site)
160
- site.config = effective_config(site.config)
166
+ # To minimize erorrs, lazy-load plugins if they're requested by the user
167
+ def conditionally_require_plugins(site)
168
+ plugins = []
169
+ plugins.push "jekyll-remote-theme" if site.config.key? "remote_theme"
170
+ Jekyll::External.require_with_graceful_fail(
171
+ plugins.select { |plugin| site.plugin_manager.plugin_allowed?(plugin) }
172
+ )
161
173
  end
162
174
  end
163
175
  end
@@ -15,7 +15,6 @@ module GitHubPages
15
15
  jekyll-readme-index
16
16
  jekyll-default-layout
17
17
  jekyll-titles-from-headings
18
- jekyll-remote-theme
19
18
  ).freeze
20
19
 
21
20
  # Plugins allowed by GitHub Pages
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitHubPages
4
- VERSION = 173
4
+ VERSION = 174
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: '173'
4
+ version: '174'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-22 00:00:00.000000000 Z
11
+ date: 2018-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll