jekyll-frontadder 0.0.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.
- checksums.yaml +7 -0
- data/lib/jekyll-frontadder.rb +33 -0
- data/lib/jekyll_frontadder/version.rb +3 -0
- metadata +74 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 20d14f8b5543dc8267b1d58766f20af69c8ed06c
|
4
|
+
data.tar.gz: ee91c1bf47b23f935e8fc0758c81e22cd02f7230
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 903ac21dfaa798fc790bfb3d1f1b81055591577d9e9023c9e7c6c09de0382aff83539bb327d065c1c3da0ce4fa93dcaa9f9222f335305ab760ca394c3d215e1e
|
7
|
+
data.tar.gz: 3c8e29e80189ebfe43f9c33fd3f8aa6bce9e5b32c087f36c131d708a4d61e57644639b0cd242981b62167754b8ecd93d68663fdc45f2c34e5503f63871c1d08e
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This plugin adds up build hours from each build log entry and pushes a
|
2
|
+
# running total on each post
|
3
|
+
#
|
4
|
+
# V1 only handles hour summary
|
5
|
+
#
|
6
|
+
# TODO: Extend to process multiple types of efforts
|
7
|
+
module JekyllFrontAdder
|
8
|
+
# Here's our work horse class
|
9
|
+
class JekyllFrontAdderGen < Jekyll::Generator
|
10
|
+
def initialize(*)
|
11
|
+
@hours = { 'total' => 0 }
|
12
|
+
@parts = { 'total' => 0 }
|
13
|
+
@types = { 'total' => 0 }
|
14
|
+
@hours.default = 0
|
15
|
+
@parts.default = 0
|
16
|
+
@types.default = 0
|
17
|
+
end
|
18
|
+
|
19
|
+
def generate(site)
|
20
|
+
site.posts.docs.each do |post|
|
21
|
+
next if post.data['layout'] != 'buildlog'
|
22
|
+
Jekyll.logger.debug 'Processing: ', post.url
|
23
|
+
posthours = post.data['hours']
|
24
|
+
@hours['total'] = @hours['total'] + posthours['total']
|
25
|
+
post.data['tothours'] = { 'total' => @hours['total'], 'part' => @parts, 'type' => @types }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# This will add two hases together and return the result
|
30
|
+
def addhashes(h1, h2)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-frontadder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nitehawk
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jekyll
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.1.6
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.1.6
|
41
|
+
description: Jekyll generator to sum frontmatter elements
|
42
|
+
email:
|
43
|
+
- nite97m@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/jekyll-frontadder.rb
|
49
|
+
- lib/jekyll_frontadder/version.rb
|
50
|
+
homepage: https://github.com/nitehawk/jekyll-frontadder
|
51
|
+
licenses:
|
52
|
+
- MIT
|
53
|
+
metadata: {}
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 2.0.14
|
71
|
+
signing_key:
|
72
|
+
specification_version: 4
|
73
|
+
summary: Jekyll generator for frontmatter sums
|
74
|
+
test_files: []
|