octopress-ink 1.1.2 → 1.1.4

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
  SHA1:
3
- metadata.gz: 6a3b15b45d91c027ba553ed2389bd8f2eda786f5
4
- data.tar.gz: e5ad4861c19163e4887bedee72e26936a3601623
3
+ metadata.gz: 393f90ab27ed225dd0e5c7c4ffbaf5be7b2e9a3d
4
+ data.tar.gz: 0ef937e4ecbb7f857a9de3ceb1f8aec3dc46d82c
5
5
  SHA512:
6
- metadata.gz: 5ec39b805dbe73ebd301ae499e1e63e7a4f16b8a221779237263c363f0799d441569e8621f09af3297155702eb3d68d762cf42129d797c43e18b67c2716d9037
7
- data.tar.gz: 43285a10de3685141b7fd2c5401d7f877716a538c47a126c31dd11bf9f40d4fe902ed4b43f5b9991fbe6ffb7e288daa98e5e0771f445de16506db117c25ba866
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
@@ -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
- File.open(path, 'w') do |f|
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, "#{label}#{Digest::MD5.hexdigest(str)}.js")
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
@@ -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
- File.directory?(file) || File.basename(file).start_with?('.')
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
 
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.4"
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.1.2
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-13 00:00:00.000000000 Z
11
+ date: 2015-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll