jekyll_patternbot 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/_plugins/jekyll_patternbot/config.rb +10 -3
- data/_plugins/jekyll_patternbot/hooks/pattern_lib.rb +2 -5
- data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3986d77fc79a178e81396ccf24baef4bf9dddedd9788747edb98ce4a759b636a
|
|
4
|
+
data.tar.gz: be63bfee66cb0097fe84a928a66d9477b52b1c66fbe14efca22da2e019ae7a6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e884704e2ffbf0082ceca24b413e33a8e2008924dcd490f1866abeb20cae5fb96d2efbbcac47076b1f25ebb6805e1d5d1cb6057fb0421bb0c69a2fa1ba683798
|
|
7
|
+
data.tar.gz: 82b80e4503b82e38f75fe00d2084d46a79dcc2a2dab3c7ac7398d7a8aeb465e677151c67bc79e573c22b79f05861cc909a9045dd51bc71db94d0ba7ab20cc06f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
module JekyllPatternbot
|
|
2
2
|
Config = YAML.load_file File.expand_path('../../_config.yml', __dir__)
|
|
3
|
-
ConfigListener = nil
|
|
4
3
|
class << self; attr_accessor :PatternbotLogger; end
|
|
5
4
|
class << self; attr_accessor :PatternbotCache; end
|
|
6
5
|
class << self; attr_accessor :PatternbotLocale; end
|
|
7
6
|
class << self; attr_accessor :PatternbotData; end
|
|
8
7
|
|
|
8
|
+
@@config_listener = nil
|
|
9
|
+
|
|
9
10
|
Jekyll::Hooks.register :site, :after_init do |site|
|
|
10
11
|
unless site.config.key? 'theme' and site.config['theme'] == 'jekyll_patternbot'
|
|
11
12
|
raise 'Specify “theme: jekyll_patternbot” inside your Jekyll `_config.yml` file.'
|
|
@@ -26,7 +27,13 @@ module JekyllPatternbot
|
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
# Does this leave a running process when Jekyll shuts down?
|
|
29
|
-
|
|
30
|
+
begin
|
|
31
|
+
@@config_listener.stop
|
|
32
|
+
rescue
|
|
33
|
+
@@config_listener = nil
|
|
34
|
+
end
|
|
35
|
+
@@config_listener = nil
|
|
36
|
+
@@config_listener = Listen.to(site.source, only: /\_config\.yml/) do |modified, added, removed|
|
|
30
37
|
begin
|
|
31
38
|
new_config = YAML.load_file File.expand_path(site.source + '/_config.yml')
|
|
32
39
|
rescue Exception => err
|
|
@@ -41,6 +48,6 @@ module JekyllPatternbot
|
|
|
41
48
|
end
|
|
42
49
|
end
|
|
43
50
|
end
|
|
44
|
-
|
|
51
|
+
@@config_listener.start
|
|
45
52
|
end
|
|
46
53
|
end
|
|
@@ -57,11 +57,8 @@ module JekyllPatternbot
|
|
|
57
57
|
PatternbotData[:js][:main] = false
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
layouts = LayoutsFinder.new
|
|
61
|
-
PatternbotData[:
|
|
62
|
-
|
|
63
|
-
includes = IncludesFinder.new
|
|
64
|
-
PatternbotData[:includes] = includes.info
|
|
60
|
+
PatternbotData[:layouts] = LayoutsFinder.new.info
|
|
61
|
+
PatternbotData[:includes] = IncludesFinder.new.info
|
|
65
62
|
|
|
66
63
|
pattern_files = PatternsFinder.new
|
|
67
64
|
PatternbotData[:patterns] = {
|
data/version.rb
CHANGED