zarchitect 1.7.0 → 1.7.2

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
  SHA256:
3
- metadata.gz: 872696fbcc1fdcac5bbe6f4e797c66f1a11a40ef3a09156f2f95841224c11fc4
4
- data.tar.gz: 556377e367f457acc7e9a6381e141a17f5bebf028c2f6bd9efafba149cef3e93
3
+ metadata.gz: 9aa34b3381e8c7c34dc36062a92864e84a0e98db1c5ad21a0fc2e0c941c6eb43
4
+ data.tar.gz: 7aca9ff4c0b761fdcdc10a48a06684352f1ea7541a10a8299441e9e6839481db
5
5
  SHA512:
6
- metadata.gz: 635a6add041ba9cf2e9ed5c862796e80eb107c66526f12aeeb75d026513f6b301b6c22716d7724703d2f36fb947a05cf565b7d1c12e4075619ed733b92a2b2e1
7
- data.tar.gz: 55197b4d53a57c1003e177a5d33d0504f282d3fdd7adeaa2c1635caa3a898f65e59c2e6271bbc76457a9c7f28cc1b63592f9bc0375f416b0f87741349f33c6c4
6
+ metadata.gz: ddcd6a76992a79454ed31aee8998f0b97b1212a9322ed1053883985ae65c6b5c0b037630d6975d28b54166d6c7d30bd13cf085886c3a30cbc8c52db349b0c749
7
+ data.tar.gz: 26e342e8984e2cbc696ff6d3d1f7f228f191a7903bed77477b3881f85b31349fd5d2b0aa585a409f8062a7914eada020f30185536170dc402771c71ed7dcbd22
@@ -8,8 +8,11 @@ class Assets < Zarchitect
8
8
  end
9
9
 
10
10
  def update
11
- Dir[ File.join(@from, '**', '*') ].reject do |fullpath|
11
+ Dir.glob(File.join(@from, '**', '*'), File::FNM_DOTMATCH).reject do |fullpath|
12
12
  path = fullpath[(@from.length)..-1]
13
+ next if path[-1] == '.'
14
+ next if path.include?('.sass-cache')
15
+
13
16
  if path.include?(HTMLDIR)
14
17
  realpath = path[1..-1]
15
18
  else
@@ -205,8 +205,8 @@ class Config
205
205
 
206
206
  def validate_zrconf
207
207
  GPI.print "Validating #{@file}."
208
- unless @hash.has_key?("symlink_assets")
209
- @hash["symlink_assets"] = false
208
+ unless @hash.has_key?("symlink_files")
209
+ @hash["symlink_files"] = true
210
210
  end
211
211
  unless @hash.has_key?("url")
212
212
  GPI.print "config key [url] missing in _config/_zarchitect.yaml."
@@ -12,8 +12,9 @@ class FileManager < Zarchitect
12
12
 
13
13
  def run
14
14
  # iterate FROM
15
- Dir[ File.join(@from, '**', '*') ].reject do |fullpath|
15
+ Dir.glob(File.join(@from, '**', '*'), File::FNM_DOTMATCH).reject do |fullpath|
16
16
  path = fullpath[(@from.length)..-1]
17
+ next if path[-1] == '.'
17
18
  realpath = File.join(@to, path) # path of new dir/symlink
18
19
 
19
20
  # dir handling / create copies in TO
@@ -42,14 +43,14 @@ class FileManager < Zarchitect
42
43
  # create symlink in _html/files to physical files _files (if process did
43
44
  # not abort)
44
45
  unless File.exist?(realpath)
45
- if Zarchitect.conf.symlink_assets
46
+ if Zarchitect.conf.symlink_files
46
47
  symlink(rrealpath, realpath)
47
48
  else
48
49
  copy(rrealpath, realpath)
49
50
  end
50
51
  else
51
52
  if File.stat(rrealpath).mtime > File.stat(realpath).mtime
52
- if Zarchitect.conf.symlink_assets
53
+ if Zarchitect.conf.symlink_files
53
54
  symlink(rrealpath, realpath)
54
55
  else
55
56
  copy(rrealpath, realpath)
data/lib/zarchitect.rb CHANGED
@@ -9,7 +9,7 @@ require 'sitemap_generator'
9
9
 
10
10
  class Zarchitect
11
11
 
12
- VERSION = "1.7.0"
12
+ VERSION = "1.7.2"
13
13
  HTMLDIR = "_html"
14
14
  BUILDIR = "_build"
15
15
  NODEDIR = "_build/nodes"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zarchitect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryu