dimples 4.0.4 → 4.0.5

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: 0755cd5a0b034bff5a1c769df13879e69a379000
4
- data.tar.gz: 5f0d161f272a6797891d921e50bfc06eb6a7d595
3
+ metadata.gz: 42abb37b95fe875b2f44961205c412129ecb9f88
4
+ data.tar.gz: 887efb3a2b6563ab5866cf1ba5e98202fc5ed128
5
5
  SHA512:
6
- metadata.gz: 4ef8335352b2a0fa0b3c2c7ac8e3e25235f6f3be4e466a7f6ae8a00a67253969eed15717a9f34b2ca4599a9a6b9e06302fba228e64383f02ba167baacc95a95a
7
- data.tar.gz: c7fadf424dd0d86e873f3c133fece02abbca101d76f0be50a5ace06c396b1ab20837481677d96f6a6507d2859e8acceb052ed78b26032d4b81ddeb07fc40f10a
6
+ metadata.gz: a1f7c3370e59d5b69a20f9fd84d64d340ea6d1d24cbb854fbe54977877bbc5980a3a4f17c7d8a74cf4d9c0ed02e48bdac0fc2fc741e596fb9b13b5c45a0b2160
7
+ data.tar.gz: cdf975b68665564ae6a86782eafc1789533afb6145cc854985f81178f20fd00cee818bfefb09ad5c6af6307096fdcc3a7c6f014051292181c57b3a068a57342c
@@ -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 <<-EOS
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
- EOS
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
@@ -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(context ? render(context) : contents)
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})"
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = '4.0.4'
4
+ VERSION = '4.0.5'
5
5
  end
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
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-10-01 00:00:00.000000000 Z
11
+ date: 2017-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt