dimples 4.0.4 → 4.0.5
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/bin/dimples +3 -3
- data/lib/dimples/page.rb +1 -1
- data/lib/dimples/site.rb +2 -2
- data/lib/dimples/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: 42abb37b95fe875b2f44961205c412129ecb9f88
|
|
4
|
+
data.tar.gz: 887efb3a2b6563ab5866cf1ba5e98202fc5ed128
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1f7c3370e59d5b69a20f9fd84d64d340ea6d1d24cbb854fbe54977877bbc5980a3a4f17c7d8a74cf4d9c0ed02e48bdac0fc2fc741e596fb9b13b5c45a0b2160
|
|
7
|
+
data.tar.gz: cdf975b68665564ae6a86782eafc1789533afb6145cc854985f81178f20fd00cee818bfefb09ad5c6af6307096fdcc3a7c6f014051292181c57b3a068a57342c
|
data/bin/dimples
CHANGED
|
@@ -17,14 +17,14 @@ valid_commands = %w[build]
|
|
|
17
17
|
|
|
18
18
|
options = Trollop.options do
|
|
19
19
|
version "dimples v#{Dimples::VERSION}"
|
|
20
|
-
banner <<-
|
|
20
|
+
banner <<-BANNER
|
|
21
21
|
A very, very simple static site generator.
|
|
22
22
|
|
|
23
23
|
Usage:
|
|
24
24
|
dimples <#{valid_commands.join('|')}> [options]
|
|
25
25
|
|
|
26
26
|
Options:
|
|
27
|
-
|
|
27
|
+
BANNER
|
|
28
28
|
opt :config, 'Config file path', type: :string
|
|
29
29
|
opt :lib, 'Library file path', default: 'lib'
|
|
30
30
|
opt :verbose, 'Verbose mode', default: false
|
|
@@ -46,7 +46,7 @@ if File.exist?(config_path)
|
|
|
46
46
|
Trollop.die "Config file is empty (#{config_path})" if file_contents.empty?
|
|
47
47
|
|
|
48
48
|
config = JSON.parse(file_contents, symbolize_names: true)
|
|
49
|
-
rescue
|
|
49
|
+
rescue JSON::ParserError
|
|
50
50
|
Trollop.die "Invalid or malformed config file (#{config_path})"
|
|
51
51
|
end
|
|
52
52
|
else
|
data/lib/dimples/page.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Dimples
|
|
|
56
56
|
FileUtils.mkdir_p(@output_directory) unless Dir.exist?(@output_directory)
|
|
57
57
|
|
|
58
58
|
File.open(output_path, 'w+') do |file|
|
|
59
|
-
file.write(
|
|
59
|
+
file.write(layout ? render(context) : contents)
|
|
60
60
|
end
|
|
61
61
|
rescue SystemCallError => e
|
|
62
62
|
error_message = "Failed to write #{path} (#{e.message})"
|
data/lib/dimples/site.rb
CHANGED
|
@@ -138,7 +138,7 @@ module Dimples
|
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
Dir.mkdir(@output_paths[:site])
|
|
141
|
-
rescue => e
|
|
141
|
+
rescue StandardError => e
|
|
142
142
|
error_message = "Couldn't prepare the output directory (#{e.message})"
|
|
143
143
|
raise Errors::GenerationError, error_message
|
|
144
144
|
end
|
|
@@ -260,7 +260,7 @@ module Dimples
|
|
|
260
260
|
path = File.join(@source_paths[:public], '.')
|
|
261
261
|
FileUtils.cp_r(path, @output_paths[:site])
|
|
262
262
|
end
|
|
263
|
-
rescue => e
|
|
263
|
+
rescue StandardError => e
|
|
264
264
|
raise Errors::GenerationError, "Site assets failed to copy (#{e.message})"
|
|
265
265
|
end
|
|
266
266
|
|
data/lib/dimples/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dimples
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Bogan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tilt
|