dsm-portfolio-plugin 0.1.0 → 0.1.1

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 +5 -14
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ebff37fe1013c2e503587f6c6d3187d6240ddcf
4
- data.tar.gz: aa39ab0051a8bee4225e4f50ab974499b00d680c
3
+ metadata.gz: 143f2e0e9cf3ed1c2ec287e1c2d8cf5f5e67e706
4
+ data.tar.gz: 9fbbb2c40e8cdc0b0a080ed93b68b64b946247ea
5
5
  SHA512:
6
- metadata.gz: ab41647481ac871085868dc17795fe9ed65fb95a6918f3ff8b2e8178eb86267fcf720a3e078d6693b0955e1adf852905c28495b50fed0711ef6fe5c123f0b0ac
7
- data.tar.gz: b0a27f295cdf1817ec26d676c2e07f1b6c20792b91cf9f10c06773bebc4b5507809093ecdc2b2688934520d79d4425e88675945902fe4fe036aa5bd40d168e07
6
+ metadata.gz: 3f046ab2cec28845004e1721720cf19d5bc6b1f9e4a82acfcfe2dd2e4f7778f16edd6fda4e6c62575cd5a9e05da85c5eaad2c1947583363cd3423d2c687a78b8
7
+ data.tar.gz: db2f9c13a821fcc0f067247440ec827609f150a05f4286a2347cf6264d58390c8dba7a1594ad4aa09078317fc3218cbd80dfe94a9ea4de979591d9de5d816f66
@@ -57,11 +57,6 @@ module Jekyll
57
57
 
58
58
  # Create file.
59
59
  IO.copy_stream("_layouts/examples/#{post_type['template_file']}", post_path)
60
-
61
- # File.open(post_path, "w") do |f|
62
- # # Fill it with appropriate front-matter.
63
- # f.puts(front_matter(post_type[:post_type], title))
64
- # end
65
60
  end
66
61
 
67
62
  puts "New posts created at ./_posts/#{date.strftime('%Y-%m-%d')}-#{name}.\n"
@@ -71,18 +66,9 @@ module Jekyll
71
66
  "_posts/#{date.strftime('%Y-%m-%d')}-#{name}"
72
67
  end
73
68
 
74
- # Returns the filename of the draft, as a String
75
69
  def self.file_name(name, post_type, ext, date)
76
70
  "_posts/#{date.strftime('%Y-%m-%d')}-#{name}/#{post_type}.#{ext}"
77
71
  end
78
-
79
- # TODO: Replace this with smart filling from data file and template file.
80
- def self.front_matter(layout, title)
81
- "---
82
- layout: #{layout}
83
- title: #{title}
84
- ---"
85
- end
86
72
  end
87
73
  end
88
74
 
@@ -100,6 +86,7 @@ module Jekyll
100
86
  projectFiles = grouping[1]
101
87
 
102
88
  projectUrls = {}
89
+ projectCode = -1
103
90
 
104
91
  # Give each file one-off values and assess availability.
105
92
  projectFiles.each do |file|
@@ -110,12 +97,16 @@ module Jekyll
110
97
  # Give each a type
111
98
  file.data['type'] = file.basename_without_ext
112
99
 
100
+ if !file.data['project_code'].nil?
101
+ projectCode = file.data['project_code']
102
+
113
103
  projectUrls[file.data['type']] = file.url
114
104
  end
115
105
 
116
106
  # Add singling URLs based on type.
117
107
  projectFiles.each do |file|
118
108
  file.data['project_urls'] = projectUrls
109
+ file.data['project_code'] = projectCode
119
110
  end
120
111
  end
121
112
  end
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Hills