jekyll_patternbot 1.5.0 → 1.5.1

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
  SHA256:
3
- metadata.gz: 884f2906dc4a4f8b9bb847ce46049501e583a5bca7e9c5b79b897c407a430b88
4
- data.tar.gz: '0587e5339f5b5da4a73e3c6b509c3c60563ee21673ad656c74acc32da714537e'
3
+ metadata.gz: 3986d77fc79a178e81396ccf24baef4bf9dddedd9788747edb98ce4a759b636a
4
+ data.tar.gz: be63bfee66cb0097fe84a928a66d9477b52b1c66fbe14efca22da2e019ae7a6f
5
5
  SHA512:
6
- metadata.gz: 0e1f3fbbfd9ed231b0453cfe81682c98e0c409671f03bf72b82dc56def73082a9339ee0e4157c97f5ea3016feaac56e91f9e38faefefa18bb8fc6d92b43aad92
7
- data.tar.gz: 580a3bac4bd5d6634eddbf30815e7035c6e256f2efc82691fbd4b969c9e99b422e7eedb23d1cd9d8ad7640f121d98c964fc6899b728f194bb244c5739da87217
6
+ metadata.gz: e884704e2ffbf0082ceca24b413e33a8e2008924dcd490f1866abeb20cae5fb96d2efbbcac47076b1f25ebb6805e1d5d1cb6057fb0421bb0c69a2fa1ba683798
7
+ data.tar.gz: 82b80e4503b82e38f75fe00d2084d46a79dcc2a2dab3c7ac7398d7a8aeb465e677151c67bc79e573c22b79f05861cc909a9045dd51bc71db94d0ba7ab20cc06f
@@ -5,6 +5,14 @@ Jekyll Patternbot adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ---
7
7
 
8
+ ## [1.5.1] — 2020-01-04
9
+
10
+ ### Fixed
11
+
12
+ - Fixed a constant initialization error.
13
+
14
+ ---
15
+
8
16
  ## [1.5.0] — 2020-01-04
9
17
 
10
18
  ### Added
@@ -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
- ConfigListener = Listen.to(site.source, only: /\_config\.yml/) do |modified, added, removed|
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
- ConfigListener.start
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[:layouts] = layouts.info
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
@@ -1,3 +1,3 @@
1
1
  module JekyllPatternbot
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
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.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas J Bradley