dsm-portfolio-plugin 0.0.9 → 0.0.10

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dsm-portfolio-plugin.rb +7 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb57f6fc370e01f604981bb3a8d4db783df8d4f0
4
- data.tar.gz: c2f4ab027aac4f5930ae1447826d7c86f511dbb6
3
+ metadata.gz: bf056dbff2adb37c50ea2cd0994293e3b68593ac
4
+ data.tar.gz: b08df746b2fde3ab2de805030a18f3ff99c46609
5
5
  SHA512:
6
- metadata.gz: 1284b39fb17e8f7fadafb3066421ee54a38ecfe0b8b7c2f91dc4846c9f49dddbd66950a7c884c64f54e08378c58045eaee41090f7d57937edaa6dbb9ffa4356c
7
- data.tar.gz: 3c01caeb8d698c3602ec43e71b191d9f5f0cf7611c149d654e17c66edd694b19aaf39c10e61737ba8d879fa9badda1aaec07ae6545901d4f6c32c506fa3221a4
6
+ metadata.gz: 3c15feefcd5aadaa81acf7ff87d3ff9eaa40029ad635c85b07c0d7b9005b76046a2dc291d1e4f9a97d1175717e8c689e9d007bf2265c3cbca1277cd787f45258
7
+ data.tar.gz: 5b1ecb8c7dc38cfbda48ad47155a9f57d1bcca127d6ab198dcb2db891f6aee7bef026b693ddbc48ebf42dfbe43fe07c45ef22c8752213f57b054194336d59591
@@ -37,6 +37,9 @@ module Jekyll
37
37
 
38
38
  # raise ArgumentError.new("A post already exists at ./#{post_path}") if File.exist?(post_path) and !options["force"]
39
39
 
40
+ # Make subdirectory.
41
+ FileUtils.mkdir_p directory_name(name, date)
42
+
40
43
  # For every post-type in subfolder...
41
44
  post_types.each do |post_type|
42
45
  # Format file path.
@@ -52,6 +55,10 @@ module Jekyll
52
55
  puts "New posts created at ./_posts/#{date.strftime('%Y-%m-%d')}-#{name}.\n"
53
56
  end
54
57
 
58
+ def self.directory_name(name, date)
59
+ "_posts/#{date.strftime('%Y-%m-%d')}-#{name}"
60
+ end
61
+
55
62
  # Returns the filename of the draft, as a String
56
63
  def self.file_name(name, post_type, ext, date)
57
64
  "_posts/#{date.strftime('%Y-%m-%d')}-#{name}/#{post_type}.#{ext}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsm-portfolio-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Hills