dimples 5.2.0 → 5.3.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
  SHA1:
3
- metadata.gz: 5fa928f6e8cdb69b69c12f2eded48d17444e4bcb
4
- data.tar.gz: f23dd25c082f731bcf1d9a65575ad3e99de43431
3
+ metadata.gz: 8de1cf00a275eddf10f14ea1ce492a5531dcb87a
4
+ data.tar.gz: 995b71622c8887d45bf7c71e88c97629605e9717
5
5
  SHA512:
6
- metadata.gz: 05ce67b7f86f9777edd5c8e96637ffd13dff09037af861a6ff2de84dcc20de6ddd93fccb24a195e62fd4b801037e48186fc802d070cbe9f5be9fc8bfdce4d135
7
- data.tar.gz: 24bcaeaa44f62782645ca8f4367a1dacdd4ce2c02201fa5db03fb90d86997dc6619425cb52fe6ca239f9053aacdff389b0aa0a43a19cfa95e7ec68c2a7e73aa5
6
+ metadata.gz: c37e1859f642bb688a97e8eb8e362d0624c1ae118a30969ce1705d945eea613f59d399e756ce0ece57fb41e1704744df2733668eccc0542ba15e5224ad221c2b
7
+ data.tar.gz: d40e715a139a239ae335196c1c2c7082a9d026a93770caf07145a8e92fbdb3650881d8f0e958989d41148e4248dac5942a0b7862eecf126df10a1abe571954f7
data/bin/dimples CHANGED
@@ -26,6 +26,7 @@ dimples <#{valid_commands.join('|')}> [options]
26
26
  Options:
27
27
  BANNER
28
28
  opt :config, 'Config file path', type: :string
29
+ opt :output, 'Destination directory', type: :string
29
30
  opt :verbose, 'Verbose mode', default: false
30
31
  end
31
32
 
@@ -58,6 +59,8 @@ if Dir.exist?(plugins_path)
58
59
  end
59
60
  end
60
61
 
62
+ config[:paths][:output] = options[:output] if options[:output]
63
+
61
64
  site = Dimples::Site.new(config)
62
65
 
63
66
  case command.to_sym
@@ -67,7 +70,7 @@ when :build
67
70
  site.generate
68
71
 
69
72
  if site.errors.empty?
70
- puts 'Done! Your site has been built.'
73
+ puts "Done! Your site has been built (#{site.paths[:output]})."
71
74
  else
72
75
  puts 'Generation failed:'
73
76
  site.errors.each { |error| puts error }
@@ -18,7 +18,7 @@ module Dimples
18
18
 
19
19
  def self.default_paths
20
20
  {
21
- output: 'public',
21
+ output: './public',
22
22
  archives: 'archives',
23
23
  posts: 'archives/%Y/%m/%d',
24
24
  categories: 'archives/categories'
data/lib/dimples/site.rb CHANGED
@@ -17,7 +17,8 @@ module Dimples
17
17
 
18
18
  @paths = {}.tap do |paths|
19
19
  paths[:base] = Dir.pwd
20
- paths[:output] = File.join(paths[:base], @config.paths.output)
20
+ paths[:output] = File.expand_path(@config.paths.output)
21
+
21
22
  paths[:sources] = {}.tap do |sources|
22
23
  %w[pages posts static templates].each do |type|
23
24
  sources[type.to_sym] = File.join(paths[:base], type)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = '5.2.0'
4
+ VERSION = '5.3.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan