octopress-ink 1.0.0.rc.54 → 1.0.0.rc.55
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 +3 -0
- data/lib/octopress-ink.rb +6 -1
- data/lib/octopress-ink/jekyll/hooks.rb +1 -0
- data/lib/octopress-ink/version.rb +1 -1
- data/lib/octopress-ink/watch.rb +39 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f517835b210f170331ea8cd934bf152e3c3ad1c2
|
4
|
+
data.tar.gz: ae3be19c27549ace16b73f659d18d18035da7ea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03d00856c6ca3b2ad4c3d95e098caeaa5ee12dfe7267efb4257f0fcc67e3fab4a1aeed9bda25390cdecb4777a791aba6018ce5650e725dd27cdceb9e96b26ee9
|
7
|
+
data.tar.gz: 0257488cc68a4a887e2f44e9044e6ac8fdfd261f55a78334486f591686ddbf2dd3ed2b3cb110da7c1d9a995caaad76c9c48631cb762b27dc6fdabbf1292c78fd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 1.0.0 RC55 - 2015-03-14
|
4
|
+
- Added `ink_watch` site configuration, allowing plugin authors to add their plugin assets directory to Jekyll's watch list.
|
5
|
+
|
3
6
|
### 1.0.0 RC54 - 2015-03-10
|
4
7
|
- Added `new_page` method to page assets to mirror template functionality.
|
5
8
|
- Generated pages can now reference the asset instance that generated them.
|
data/lib/octopress-ink.rb
CHANGED
@@ -97,6 +97,12 @@ module Octopress
|
|
97
97
|
Docs.register_docs options
|
98
98
|
end
|
99
99
|
|
100
|
+
def watch_assets(site)
|
101
|
+
if site.config['ink_watch']
|
102
|
+
require 'octopress-ink/watch'
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
100
106
|
def config
|
101
107
|
@config ||= Configuration.config
|
102
108
|
end
|
@@ -109,7 +115,6 @@ module Octopress
|
|
109
115
|
begin
|
110
116
|
Plugins.plugin(name)
|
111
117
|
rescue
|
112
|
-
return false
|
113
118
|
end
|
114
119
|
end
|
115
120
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'jekyll-watch'
|
2
|
+
|
3
|
+
# Add assets directories for selected Octopress Ink plugins to Jekyll's watch directories,
|
4
|
+
# allowing plugin authors to dynamically preview changes to their plugin's assets.
|
5
|
+
#
|
6
|
+
module Jekyll
|
7
|
+
module Watcher
|
8
|
+
extend self
|
9
|
+
|
10
|
+
def build_listener(site, options)
|
11
|
+
require 'listen'
|
12
|
+
paths = [options['source']].concat(ink_watch_paths(site)).compact
|
13
|
+
Listen.to(
|
14
|
+
*paths,
|
15
|
+
:ignore => listen_ignore_paths(options),
|
16
|
+
:force_polling => options['force_polling'],
|
17
|
+
&(listen_handler(site))
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def ink_watch_paths(site)
|
22
|
+
if plugins = site.config['ink_watch']
|
23
|
+
if plugins == 'all'
|
24
|
+
Octopress::Ink.plugins.dup.map(&:asset_paths)
|
25
|
+
else
|
26
|
+
plugin_paths Array(plugins)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def plugin_paths(plugins)
|
32
|
+
plugins.dup.map do |plugin|
|
33
|
+
if plugin = Octopress::Ink.plugin(plugin)
|
34
|
+
plugin.assets_path
|
35
|
+
end
|
36
|
+
end.compact
|
37
|
+
end
|
38
|
+
end
|
39
|
+
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.
|
4
|
+
version: 1.0.0.rc.55
|
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-03-
|
11
|
+
date: 2015-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/octopress-ink/tags/stylesheet.rb
|
250
250
|
- lib/octopress-ink/utils.rb
|
251
251
|
- lib/octopress-ink/version.rb
|
252
|
+
- lib/octopress-ink/watch.rb
|
252
253
|
homepage: https://github.com/octopress/ink
|
253
254
|
licenses:
|
254
255
|
- MIT
|