jekyll_patternbot 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/_plugins/jekyll_patternbot.rb +1 -0
- data/_plugins/jekyll_patternbot/config.rb +5 -19
- data/_plugins/jekyll_patternbot/hooks/pattern_lib.rb +14 -12
- data/_plugins/jekyll_patternbot/parsers/config.rb +20 -0
- data/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e7a65e72e14fcdfaff8cf21d079c3c2dc75b1f225af614f9fa7c01f78b6ddf4
|
4
|
+
data.tar.gz: dcc20432b31495913b7ac21852b90aab882a40984df61ece77687647e537b066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f181344dac581222ac7569153f3e4759a6f3f1fe52e4ece007d605feabafe9c2f520d9f9a64d77ffdaf3ff0855f46e39fed64d17541092ddd152628a0ac5e9
|
7
|
+
data.tar.gz: fe9c3fbc7de612c147d1f3f399d8a7ea048d1457234e7cdd38d9bb56e24315a1f1652ede64621ae6d4d7b2c55f7294afcd79bfa0b48a27c02e68c4f7cbe57728
|
data/CHANGELOG.md
CHANGED
@@ -20,6 +20,7 @@ module JekyllPatternbot
|
|
20
20
|
require 'jekyll_patternbot/helpers/jekyll'
|
21
21
|
require 'jekyll_patternbot/helpers/pattern'
|
22
22
|
|
23
|
+
require 'jekyll_patternbot/parsers/config'
|
23
24
|
require 'jekyll_patternbot/parsers/web_dev_tool'
|
24
25
|
require 'jekyll_patternbot/parsers/modulifier'
|
25
26
|
require 'jekyll_patternbot/parsers/gridifier'
|
@@ -27,27 +27,13 @@ module JekyllPatternbot
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# Does this leave a running process when Jekyll shuts down?
|
30
|
-
|
31
|
-
@@config_listener.
|
32
|
-
|
33
|
-
|
34
|
-
end
|
35
|
-
@@config_listener = nil
|
36
|
-
@@config_listener = Listen.to(site.source, only: /\_config\.yml/) do |modified, added, removed|
|
37
|
-
begin
|
38
|
-
new_config = YAML.load_file File.expand_path(site.source + '/_config.yml')
|
39
|
-
rescue Exception => err
|
40
|
-
log = PatternbotConsoleLogger.new
|
41
|
-
log.fatal(err.message)
|
42
|
-
else
|
43
|
-
if new_config.key? 'patternbot'
|
44
|
-
Config['patternbot'].deep_merge! new_config['patternbot']
|
45
|
-
if site
|
46
|
-
site.process
|
47
|
-
end
|
30
|
+
unless @@config_listener
|
31
|
+
@@config_listener = Listen.to(site.source, only: /\_config\.yml/) do |modified, added, removed|
|
32
|
+
if site
|
33
|
+
site.process
|
48
34
|
end
|
49
35
|
end
|
36
|
+
@@config_listener.start
|
50
37
|
end
|
51
|
-
@@config_listener.start
|
52
38
|
end
|
53
39
|
end
|
@@ -1,21 +1,23 @@
|
|
1
1
|
module JekyllPatternbot
|
2
2
|
PatternbotLogger = PatternbotConsoleLogger.new
|
3
3
|
PatternbotCache = {}
|
4
|
-
PatternbotData = {
|
5
|
-
|
6
|
-
|
7
|
-
:
|
8
|
-
:
|
4
|
+
PatternbotData = {}
|
5
|
+
|
6
|
+
Jekyll::Hooks.register :site, :post_read do |site|
|
7
|
+
PatternbotData[:css] = {}
|
8
|
+
PatternbotData[:js] = {}
|
9
|
+
PatternbotData[:logos] = {}
|
10
|
+
PatternbotData[:icons] = {
|
9
11
|
:spritesheets => [],
|
10
12
|
:classes => [],
|
11
|
-
}
|
12
|
-
:layouts
|
13
|
-
:patterns
|
14
|
-
:patterns_order
|
15
|
-
:pages
|
16
|
-
|
13
|
+
}
|
14
|
+
PatternbotData[:layouts] = []
|
15
|
+
PatternbotData[:patterns] = {}
|
16
|
+
PatternbotData[:patterns_order] = []
|
17
|
+
PatternbotData[:pages] = []
|
18
|
+
|
19
|
+
ConfigChangeParser.new.parse site
|
17
20
|
|
18
|
-
Jekyll::Hooks.register :site, :post_read do |site|
|
19
21
|
# File.open('/Users/thomasjbradley/Desktop/patternbot-config.json', 'w') do |f|
|
20
22
|
# f.write(JSON.pretty_generate(Config))
|
21
23
|
# end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module JekyllPatternbot
|
2
|
+
class ConfigChangeParser
|
3
|
+
|
4
|
+
def parse(site)
|
5
|
+
begin
|
6
|
+
new_config = YAML.load_file File.expand_path(site.source + '/_config.yml')
|
7
|
+
rescue Exception => err
|
8
|
+
PatternbotLogger.fatal(err.message)
|
9
|
+
else
|
10
|
+
if new_config.key? 'patternbot'
|
11
|
+
config_base = YAML.load_file File.expand_path('../../../_config.yml', __dir__)
|
12
|
+
Config['patternbot'] = config_base['patternbot']
|
13
|
+
Config['patternbot'][:version] = JekyllPatternbot::VERSION
|
14
|
+
Config['patternbot'].deep_merge! new_config['patternbot']
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_patternbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas J Bradley
|
@@ -268,6 +268,7 @@ files:
|
|
268
268
|
- _plugins/jekyll_patternbot/helpers/pattern.rb
|
269
269
|
- _plugins/jekyll_patternbot/hooks/pattern_lib.rb
|
270
270
|
- _plugins/jekyll_patternbot/loggers/patternbot.rb
|
271
|
+
- _plugins/jekyll_patternbot/parsers/config.rb
|
271
272
|
- _plugins/jekyll_patternbot/parsers/css_color.rb
|
272
273
|
- _plugins/jekyll_patternbot/parsers/css_comment_tag.rb
|
273
274
|
- _plugins/jekyll_patternbot/parsers/css_font.rb
|