sitepress-cli 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sitepress/compiler.rb +13 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41755633b83a13d9fc0f8c4aa0a637a40736e446
|
4
|
+
data.tar.gz: 630e38e57b6f05a2c4a47db58d05c10ec970e50f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7e23214bdeec503ebf013a19de64edb7697e68d455f5b99fc61b75e7b0b58a79e3d0ffc097c4a760df63b9b9b54dc66a2aef6a4270930990478b04955550e3c
|
7
|
+
data.tar.gz: 6389afc5fbf0177e7285b335c8e448962ab1dceb6c6f9cbbf55c30267c4c67df11f1e9bbe866e29c9f37ae4fb3e68ea27c64b7a0250d30f205fa2ebdf3821544
|
data/lib/sitepress/compiler.rb
CHANGED
@@ -16,16 +16,21 @@ module Sitepress
|
|
16
16
|
target_path = Pathname.new(target_path)
|
17
17
|
mkdir_p target_path
|
18
18
|
root = Pathname.new("/")
|
19
|
+
cache_resources = @site.cache_resources
|
19
20
|
@stdout.puts "Compiling #{@site.root_path.expand_path}"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
begin
|
22
|
+
@site.cache_resources = true
|
23
|
+
@site.resources.each do |resource|
|
24
|
+
derooted = Pathname.new(resource.request_path).relative_path_from(root)
|
25
|
+
path = target_path.join(derooted)
|
26
|
+
mkdir_p path.dirname
|
27
|
+
@stdout.puts " #{path}"
|
28
|
+
File.open(path.expand_path, "w"){ |f| f.write render(resource) }
|
29
|
+
end
|
30
|
+
@stdout.puts "Successful compilation to #{target_path.expand_path}"
|
31
|
+
ensure
|
32
|
+
@site.cache_resources = cache_resources
|
27
33
|
end
|
28
|
-
@stdout.puts "Successful compilation to #{target_path.expand_path}"
|
29
34
|
end
|
30
35
|
|
31
36
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sitepress-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sitepress-server
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.25
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.25
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|