octopress-ink 1.0.0.rc.45 → 1.0.0.rc.46

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3991200528afefe0ea49e4150bd019acccc67997
4
- data.tar.gz: 3f62a023eabbf02b0745ee650be59ed0b60c3494
3
+ metadata.gz: c06bc8cc89eb550204b2b126b8bc9e0be46d7243
4
+ data.tar.gz: 8abd0edc93bc79e482782b7b8b086da351490b39
5
5
  SHA512:
6
- metadata.gz: c9572974e45577364ed82fd4ac9a3d5110fd25adc4d214fd211711360c5889e6f30c4e7fa65ecd161aee686da7645e1ad6cd30be0e2bdf667ce7d53fc071ef99
7
- data.tar.gz: fa8ed94d8a097d79d09b5f49545aa6372476c19a3c8d937d7afc644e413e266628bd3a80bce37fc8527c82fd64343868106051164a62041cbe54c8aa108045b9
6
+ metadata.gz: 9c9ab16dd4750d607c2cf91547997039454c0ef1dde942fa2c14789ef7befb9214914ce2cba3c46aae73db53c86904ba192dfc40409c09da20db016deb3f2451
7
+ data.tar.gz: 402ebad5ee47d2ae3203168a5b4d924bafc6a680149d29b556f6630085de85af0119056da935613e23c510fb60b0fc49bb96d0645b98c82247c71ea7e970bdd8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.0.0 RC46 - 2015-02-18
4
+ - Fix: Site reset triggers reset method on each plugin.
5
+
3
6
  ### 1.0.0 RC45 - 2015-02-18
4
7
  - Fix: Plugins weren't being initialized properly due to a race condition
5
8
 
data/lib/octopress-ink.rb CHANGED
@@ -71,8 +71,8 @@ module Octopress
71
71
  #
72
72
  # plugin - A subclass of Plugin
73
73
  #
74
- def self.register_plugin(plugin)
75
- Plugins.register_plugin(plugin)
74
+ def self.register_plugin(plugin, options={})
75
+ Plugins.register_plugin(plugin, options)
76
76
  end
77
77
 
78
78
  # Create a new plugin from a configuration hash
@@ -3,7 +3,9 @@ module Octopress
3
3
  class SiteHook < Hooks::Site
4
4
 
5
5
  def reset(site)
6
- Plugins.reset
6
+ if Plugins.registered
7
+ Plugins.reset
8
+ end
7
9
  end
8
10
 
9
11
  def post_read(site)
@@ -13,7 +13,7 @@ module Octopress
13
13
  :layouts, :includes, :images, :fonts, :files, :pages, :templates, :docs
14
14
 
15
15
  def initialize(options)
16
- options = Jekyll::Utils.symbolize_hash_keys(options || configuration)
16
+ @options = Jekyll::Utils.symbolize_hash_keys(options || configuration)
17
17
 
18
18
  DEFAULT_CONFIG.merge(options).each { |k,v| set_config(k,v) }
19
19
 
@@ -27,6 +27,11 @@ module Octopress
27
27
  @javascripts_dir = 'javascripts'
28
28
  @stylesheets_dir = 'stylesheets'
29
29
  @templates_dir = 'templates'
30
+ @slug ||= @name
31
+ @assets_path ||= File.join(@path, 'assets')
32
+ end
33
+
34
+ def reset
30
35
  @lang_configs = []
31
36
  @layouts = []
32
37
  @includes = []
@@ -40,11 +45,10 @@ module Octopress
40
45
  @files = []
41
46
  @pages = []
42
47
  @templates = []
43
- @slug ||= @name
44
- @assets_path ||= File.join(@path, 'assets')
45
48
  end
46
49
 
47
50
  def register
51
+ reset
48
52
  unless @assets_path.nil?
49
53
  disable_assets
50
54
  add_assets
@@ -2,6 +2,11 @@ module Octopress
2
2
  module Ink
3
3
  module Plugins
4
4
  extend self
5
+ attr_reader :registered
6
+
7
+ @registered = false
8
+ @plugins = []
9
+ @user_plugins = []
5
10
 
6
11
  def theme
7
12
  @theme
@@ -39,11 +44,9 @@ module Octopress
39
44
 
40
45
  def reset
41
46
  @static_files = []
42
- @plugins = []
43
- @user_plugins = []
47
+ @registered = false
44
48
  @css_tags = []
45
49
  @js_tags = []
46
- @registered = false
47
50
  end
48
51
 
49
52
  def register
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.rc.45"
3
+ VERSION = "1.0.0.rc.46"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-ink
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.45
4
+ version: 1.0.0.rc.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-18 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll