octopress-ink 1.1.2 → 1.1.4
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 +7 -0
- data/lib/octopress-ink/cache.rb +12 -4
- data/lib/octopress-ink/jekyll/hooks.rb +2 -0
- data/lib/octopress-ink/plugin.rb +4 -1
- data/lib/octopress-ink/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 393f90ab27ed225dd0e5c7c4ffbaf5be7b2e9a3d
|
4
|
+
data.tar.gz: 0ef937e4ecbb7f857a9de3ceb1f8aec3dc46d82c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd52d72b1b39bfa070e4e9709880dce5e893931be76301ff85ad60cd5b77542c0e5d672c754da0ff7baa6f43ff5265caf9344d738f1ba5fd390ae4b05d8dcec0
|
7
|
+
data.tar.gz: 21c32ec66c2bf8946ce6fd60be983f44e1338fef2a2ee01e6fd75fa12402a3d4295023c434da66ca8069470955a24efd63103d8493f4025595bf56796a818952
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
### 1.1.4 (2015-05-18)
|
4
|
+
- Fix: Cache writes no longer trigger Jekyll watch.
|
5
|
+
- Fix: Cache writes happen after site builds.
|
6
|
+
|
7
|
+
### 1.1.3 (2015-05-17)
|
8
|
+
- Fix: Ink assets filters files which shouldn't be included like .hidden_file, emacs.backup~, etc
|
9
|
+
|
3
10
|
### 1.1.2 (2015-05-12)
|
4
11
|
- Use Jekyll Hooks if you got 'em.
|
5
12
|
- Now supporting Jekyll 2 & 3
|
data/lib/octopress-ink/cache.rb
CHANGED
@@ -7,6 +7,7 @@ module Octopress
|
|
7
7
|
|
8
8
|
def reset
|
9
9
|
@cache_files = []
|
10
|
+
@write_cache = {}
|
10
11
|
end
|
11
12
|
|
12
13
|
def read_cache(asset, options)
|
@@ -18,9 +19,7 @@ module Octopress
|
|
18
19
|
def write_to_cache(asset, content, options)
|
19
20
|
FileUtils.mkdir_p(INK_CACHE_DIR) unless File.directory?(INK_CACHE_DIR)
|
20
21
|
path = get_cache_path(INK_CACHE_DIR, cache_label(asset), options.to_s << asset.content)
|
21
|
-
|
22
|
-
f.print(content)
|
23
|
-
end
|
22
|
+
@write_cache[path] = content
|
24
23
|
content
|
25
24
|
end
|
26
25
|
|
@@ -29,7 +28,16 @@ module Octopress
|
|
29
28
|
end
|
30
29
|
|
31
30
|
def get_cache_path(dir, label, str)
|
32
|
-
File.join(dir, "
|
31
|
+
File.join(dir, ".#{label}#{Digest::MD5.hexdigest(str)}.js")
|
32
|
+
end
|
33
|
+
|
34
|
+
def write
|
35
|
+
@write_cache.each do |path, contents|
|
36
|
+
File.open(path, 'w') do |f|
|
37
|
+
f.print(contents)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
@write_cache = {}
|
33
41
|
end
|
34
42
|
|
35
43
|
def clean
|
@@ -26,6 +26,7 @@ module Octopress
|
|
26
26
|
f.write(site.dest)
|
27
27
|
end
|
28
28
|
|
29
|
+
Octopress::Ink::Cache.write
|
29
30
|
Octopress::Ink::Cache.clean
|
30
31
|
end
|
31
32
|
else
|
@@ -52,6 +53,7 @@ module Octopress
|
|
52
53
|
f.write(site.dest)
|
53
54
|
end
|
54
55
|
|
56
|
+
Octopress::Ink::Cache.write
|
55
57
|
Octopress::Ink::Cache.clean
|
56
58
|
end
|
57
59
|
end
|
data/lib/octopress-ink/plugin.rb
CHANGED
@@ -513,7 +513,10 @@ module Octopress
|
|
513
513
|
def glob_assets(dir)
|
514
514
|
return [] unless Dir.exist? dir
|
515
515
|
Find.find(dir).to_a.reject do |file|
|
516
|
-
|
516
|
+
# Don't match directories or
|
517
|
+
# Files which begin or end with non-alpha characters
|
518
|
+
# like: .hidden_file or emacs.backup~
|
519
|
+
File.directory?(file) || !File.basename(file).match(/^\w.+?\w$/)
|
517
520
|
end
|
518
521
|
end
|
519
522
|
|
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.1.
|
4
|
+
version: 1.1.4
|
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-05-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|