dimples 8.0.0 → 9.0.0

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
  SHA256:
3
- metadata.gz: 119a5b996b99fd1cf525e2928fcee146d226463d589d0c90cc8fc35234556006
4
- data.tar.gz: 7556145973db1abb0245c1684b600b162000806d13bd7a4074740f41b8581d52
3
+ metadata.gz: ca018b45bc347dc68c099d77fe18cba848f878c9c79dd4cd094b7a84db01cb37
4
+ data.tar.gz: 10e92c94c701b63a2d2d1c4c66087605b29b82f37d6f6bf99f5a5cf8f0b7ccf5
5
5
  SHA512:
6
- metadata.gz: 9f33146ac6dde0b55514b55e7abe3c39bb70c6d5c9d23faf1bf043ec9d16047c0b795b28693a00d0c570e42a6491e566043e4f0cc5a30fd8af502917e19b2f1b
7
- data.tar.gz: a6199859fa63efa39d2d4b772e2836b539ccc86c54b3a435fd791b9a97c90f6271f42e6020254cac735a159bfadc80f2c88d97b15dc4c2cdeca91e7054466256
6
+ metadata.gz: 29f96b52b84bcbc10cf7d46779573d87fb7ea6918d4767c0686e1eb98e079cfee9bae15859b793421375eb898e36eaadbc081814a82c87c9f948c1e5b0ab6cb8
7
+ data.tar.gz: 730b91d62a8b121b0a43ba5d3e1183600381335195dc49934414dc06f3df75ffe1be458e960cc9e756259160f6a39dc34b3ca34a62e84983365769c4b1e0ed6e
data/lib/dimples/site.rb CHANGED
@@ -8,7 +8,7 @@ require "date"
8
8
 
9
9
  module Dimples
10
10
  class Site
11
- DEFAULT_CONFIG = { overwrite_directory: false }
11
+ DEFAULT_CONFIG = { generation: { overwrite_directory: false }, paths: { posts: "posts" } }
12
12
 
13
13
  def self.generate(source_path, output_path, config)
14
14
  new(source_path, output_path, config).generate
@@ -36,8 +36,8 @@ module Dimples
36
36
 
37
37
  def generate
38
38
  if Dir.exist?(@paths[:destination])
39
- unless @config[:overwrite_directory]
40
- raise GenerationError.new("The build directory (#{@paths[:destination]}) already exists.")
39
+ unless @config.dig(:generation, :overwrite_directory)
40
+ raise GenerationError.new("The site directory (#{@paths[:destination]}) already exists.")
41
41
  end
42
42
 
43
43
  FileUtils.rm_rf(@paths[:destination])
@@ -114,7 +114,7 @@ module Dimples
114
114
  end
115
115
 
116
116
  def generate_posts
117
- directory_path = File.join(@paths[:destination], @config.dig(:paths, :posts) || "posts")
117
+ directory_path = File.join(@paths[:destination], @config.dig(:paths, :posts))
118
118
  Dir.mkdir(directory_path)
119
119
 
120
120
  @posts.each do |post|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = "8.0.0"
4
+ VERSION = "9.0.0"
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: 8.0.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-26 00:00:00.000000000 Z
11
+ date: 2023-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubi