proforma-html-renderer 1.0.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +8 -0
- data/.gitignore +5 -0
- data/.rubocop.yml +11 -0
- data/.ruby-version +1 -0
- data/.travis.yml +20 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +111 -0
- data/Guardfile +16 -0
- data/LICENSE +7 -0
- data/README.md +141 -0
- data/Rakefile +8 -0
- data/bin/console +11 -0
- data/bin/render +34 -0
- data/bin/snapshot +23 -0
- data/lib/proforma/html_renderer/object_writer.rb +42 -0
- data/lib/proforma/html_renderer/proforma_writer.rb +51 -0
- data/lib/proforma/html_renderer/version.rb +14 -0
- data/lib/proforma/html_renderer/writer.rb +77 -0
- data/lib/proforma/html_renderer.rb +47 -0
- data/proforma-html-renderer.gemspec +34 -0
- data/spec/fixtures/aloha.txt.erb +1 -0
- data/spec/fixtures/snapshot/config.yml +103 -0
- data/spec/fixtures/snapshot/images/logo.png +0 -0
- data/spec/fixtures/snapshot/output/0.User List.html +1936 -0
- data/spec/proforma/html_renderer/object_writer_spec.rb +40 -0
- data/spec/proforma/html_renderer/proforma_writer_spec.rb +19 -0
- data/spec/proforma/html_renderer/writer_spec.rb +49 -0
- data/spec/proforma/html_renderer_spec.rb +33 -0
- data/spec/rendering_helper.rb +98 -0
- data/spec/spec_helper.rb +25 -0
- data/templates/banner.html.erb +33 -0
- data/templates/header.html.erb +3 -0
- data/templates/pane.html.erb +36 -0
- data/templates/prototype.html.erb +73 -0
- data/templates/separator.html.erb +1 -0
- data/templates/spacer.html.erb +1 -0
- data/templates/table.html.erb +42 -0
- data/templates/text.html.erb +3 -0
- metadata +222 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
|
5
|
+
#
|
6
|
+
# This source code is licensed under the MIT license found in the
|
7
|
+
# LICENSE file in the root directory of this source tree.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'spec_helper'
|
11
|
+
|
12
|
+
describe Proforma::HtmlRenderer::ObjectWriter do
|
13
|
+
let(:string_name) { 'string.txt.erb' }
|
14
|
+
|
15
|
+
let(:string_template) { 'String Value: <%= object %>' }
|
16
|
+
|
17
|
+
let(:writer) do
|
18
|
+
Proforma::HtmlRenderer::Writer.new(
|
19
|
+
files: { string_name => string_template }
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
subject do
|
24
|
+
described_class.new(
|
25
|
+
names_by_class: {
|
26
|
+
String => 'string.txt.erb'
|
27
|
+
},
|
28
|
+
writer: writer
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'when using cached files' do
|
33
|
+
it 'renders template for String object' do
|
34
|
+
object = 'ABC123'
|
35
|
+
expected = "String Value: #{object}"
|
36
|
+
|
37
|
+
expect(subject.render(object)).to eq(expected)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
|
5
|
+
#
|
6
|
+
# This source code is licensed under the MIT license found in the
|
7
|
+
# LICENSE file in the root directory of this source tree.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'spec_helper'
|
11
|
+
|
12
|
+
describe Proforma::HtmlRenderer::ProformaWriter do
|
13
|
+
it 'should provide a singleton instance' do
|
14
|
+
first_call = described_class.instance
|
15
|
+
second_call = described_class.instance
|
16
|
+
|
17
|
+
expect(first_call).to eq(second_call)
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
|
5
|
+
#
|
6
|
+
# This source code is licensed under the MIT license found in the
|
7
|
+
# LICENSE file in the root directory of this source tree.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'spec_helper'
|
11
|
+
|
12
|
+
describe Proforma::HtmlRenderer::Writer do
|
13
|
+
let(:intro_name) { 'example.txt.erb' }
|
14
|
+
let(:aloha_name) { 'aloha.txt.erb' }
|
15
|
+
|
16
|
+
let(:intro_template) { 'My name is <%= first_name %>' }
|
17
|
+
|
18
|
+
subject do
|
19
|
+
described_class.new(
|
20
|
+
directory: File.join(__dir__, '..', '..', 'fixtures'),
|
21
|
+
files: { intro_name => intro_template }
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#initialize with no arguments' do
|
26
|
+
it 'should set directory to this libraries template dir' do
|
27
|
+
actual = File.expand_path(described_class.new.send(:directory))
|
28
|
+
expected = File.expand_path(File.join(__dir__, '..', '..', '..', 'templates'))
|
29
|
+
|
30
|
+
expect(actual).to eq(expected)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when using cached files' do
|
35
|
+
it 'renders ERB template' do
|
36
|
+
expected = 'My name is Earl'
|
37
|
+
|
38
|
+
expect(subject.render(intro_name, first_name: 'Earl')).to eq(expected)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'when not using cached files' do
|
43
|
+
it 'renders ERB template' do
|
44
|
+
expected = 'Aloha, Matty Cakes!'
|
45
|
+
|
46
|
+
expect(subject.render(aloha_name, full_name: 'Matty Cakes')).to eq(expected)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
|
5
|
+
#
|
6
|
+
# This source code is licensed under the MIT license found in the
|
7
|
+
# LICENSE file in the root directory of this source tree.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'rendering_helper'
|
11
|
+
require 'spec_helper'
|
12
|
+
|
13
|
+
describe Proforma::HtmlRenderer do
|
14
|
+
specify 'snapshot has been un-modified' do
|
15
|
+
snapshot_dir = File.expand_path(File.join(__dir__, '..', 'fixtures', 'snapshot'))
|
16
|
+
rendering_helper = RenderingHelper.new(snapshot_dir)
|
17
|
+
|
18
|
+
actual_output = rendering_helper.render.map.with_index do |output, index|
|
19
|
+
[
|
20
|
+
rendering_helper.output_filename(output, index),
|
21
|
+
output.contents
|
22
|
+
]
|
23
|
+
end.to_h
|
24
|
+
|
25
|
+
output_glob = File.join(snapshot_dir, 'output', '*')
|
26
|
+
|
27
|
+
expected_output = Dir[output_glob].map do |filename|
|
28
|
+
[File.basename(filename), File.open(filename, 'rb').read]
|
29
|
+
end.to_h
|
30
|
+
|
31
|
+
expect(actual_output).to eq(expected_output)
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
|
5
|
+
#
|
6
|
+
# This source code is licensed under the MIT license found in the
|
7
|
+
# LICENSE file in the root directory of this source tree.
|
8
|
+
#
|
9
|
+
|
10
|
+
require './lib/proforma/html_renderer'
|
11
|
+
|
12
|
+
# This class can render based on a conventional directory structure of input files.
|
13
|
+
class RenderingHelper
|
14
|
+
class << self
|
15
|
+
def folders(path)
|
16
|
+
Dir.entries(path).select do |entry|
|
17
|
+
File.directory?(File.join(path, entry)) && !%w[. ..].include?(entry)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
attr_reader :path
|
23
|
+
|
24
|
+
def initialize(path)
|
25
|
+
@path = path
|
26
|
+
end
|
27
|
+
|
28
|
+
def render
|
29
|
+
images = images_hash(images_dir)
|
30
|
+
config = yaml_read(config_filename)
|
31
|
+
data = data_merge(config['data'], images)
|
32
|
+
template = config['template'] || {}
|
33
|
+
evaluator = config['evaluator'] || Proforma::HashEvaluator.new
|
34
|
+
renderer = config['renderer'] || Proforma::HtmlRenderer.new
|
35
|
+
|
36
|
+
Proforma.render(
|
37
|
+
data,
|
38
|
+
template,
|
39
|
+
evaluator: evaluator,
|
40
|
+
renderer: renderer
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
def render_and_save
|
45
|
+
output_dir = File.join(path, 'output')
|
46
|
+
|
47
|
+
FileUtils.mkdir_p(output_dir)
|
48
|
+
|
49
|
+
render.each_with_index do |output, index|
|
50
|
+
name = output_filename(output, index)
|
51
|
+
full_path = File.join(output_dir, name)
|
52
|
+
|
53
|
+
IO.write(full_path, output.contents)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def output_filename(output, index)
|
58
|
+
name_without_extension = [
|
59
|
+
index.to_s,
|
60
|
+
output.title.to_s
|
61
|
+
].reject(&:empty?).join('.')
|
62
|
+
|
63
|
+
"#{name_without_extension}#{output.extension}"
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def images_dir
|
69
|
+
File.join(path, 'images')
|
70
|
+
end
|
71
|
+
|
72
|
+
def config_filename
|
73
|
+
File.join(path, 'config.yml')
|
74
|
+
end
|
75
|
+
|
76
|
+
def yaml_read(file)
|
77
|
+
YAML.safe_load(File.open(file))
|
78
|
+
end
|
79
|
+
|
80
|
+
def data_merge(data, hash)
|
81
|
+
if data.is_a?(Array)
|
82
|
+
data.map do |record|
|
83
|
+
record.merge(hash)
|
84
|
+
end
|
85
|
+
elsif data.is_a?(Hash)
|
86
|
+
data.merge(hash)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def images_hash(path)
|
91
|
+
images_glob = File.join(path, '*')
|
92
|
+
|
93
|
+
Dir[images_glob].map do |image_filename|
|
94
|
+
key = File.basename(image_filename, File.extname(image_filename))
|
95
|
+
[key, File.open(image_filename, 'rb')]
|
96
|
+
end.to_h
|
97
|
+
end
|
98
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2018-present, Blue Marble Payroll, LLC
|
5
|
+
#
|
6
|
+
# This source code is licensed under the MIT license found in the
|
7
|
+
# LICENSE file in the root directory of this source tree.
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'fileutils'
|
11
|
+
require 'pry'
|
12
|
+
require 'pry-byebug'
|
13
|
+
require 'yaml'
|
14
|
+
|
15
|
+
unless ENV['DISABLE_SIMPLECOV'] == 'true'
|
16
|
+
require 'simplecov'
|
17
|
+
require 'simplecov-console'
|
18
|
+
|
19
|
+
SimpleCov.formatter = SimpleCov::Formatter::Console
|
20
|
+
SimpleCov.start do
|
21
|
+
add_filter %r{\A/spec/}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
require './lib/proforma/html_renderer'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%
|
2
|
+
def image_style
|
3
|
+
[].tap do |style|
|
4
|
+
style << "width: #{object.image_width}px" if object.image_width
|
5
|
+
style << "height: #{object.image_height}px" if object.image_height
|
6
|
+
end.join(';')
|
7
|
+
end
|
8
|
+
|
9
|
+
def image_cell_style
|
10
|
+
['padding-right: 5px'].tap do |style|
|
11
|
+
style << "width: #{object.image_width}px" if object.image_width && object.image
|
12
|
+
end.join(';')
|
13
|
+
end
|
14
|
+
%>
|
15
|
+
|
16
|
+
<table class="banner">
|
17
|
+
<tbody>
|
18
|
+
<tr>
|
19
|
+
<% if object.image -%>
|
20
|
+
<td style="<%= image_cell_style -%>">
|
21
|
+
<img style="<%= image_style -%>" src="data:image/jpeg;charset=utf-8;base64,<%= Base64.encode64(object.image.read) -%>" />
|
22
|
+
</td>
|
23
|
+
<% end -%>
|
24
|
+
<td>
|
25
|
+
<% if !object.title.empty? -%>
|
26
|
+
<strong><%= object.title -%></strong>
|
27
|
+
<br>
|
28
|
+
<% end -%>
|
29
|
+
<%= object.details -%>
|
30
|
+
</td>
|
31
|
+
</tr>
|
32
|
+
</tbody>
|
33
|
+
</table>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%
|
2
|
+
col_count = object.columns&.length || 0
|
3
|
+
row_count = object.columns&.map { |c| c.lines.length }&.max || 0
|
4
|
+
|
5
|
+
def label_cell_style(column)
|
6
|
+
return unless column
|
7
|
+
|
8
|
+
["font-weight: #{options.bold_weight}"].tap do |styles|
|
9
|
+
styles << "width: #{column.label_width}%" if column.label_width
|
10
|
+
end.join(';')
|
11
|
+
end
|
12
|
+
|
13
|
+
def value_cell_style(column)
|
14
|
+
return unless column
|
15
|
+
|
16
|
+
[].tap do |styles|
|
17
|
+
styles << "text-align: #{column.align}" if !column.align.to_s.empty?
|
18
|
+
styles << "width: #{column.value_width}%" if column.value_width
|
19
|
+
end.join(';')
|
20
|
+
end
|
21
|
+
%>
|
22
|
+
|
23
|
+
<table class="pane">
|
24
|
+
<tbody>
|
25
|
+
<% (0...row_count).each do |row_index| -%>
|
26
|
+
<tr>
|
27
|
+
<% (0...col_count).each do |col_index| -%>
|
28
|
+
<% column = object.columns[col_index] -%>
|
29
|
+
<% line = column&.lines[row_index] -%>
|
30
|
+
<td style="<%= label_cell_style(column) -%>"><%= line&.label %></td>
|
31
|
+
<td style="<%= value_cell_style(column) -%>"><%= line&.value %></td>
|
32
|
+
<% end -%>
|
33
|
+
<tr>
|
34
|
+
<% end -%>
|
35
|
+
</tbody>
|
36
|
+
</table>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<style>
|
7
|
+
* {
|
8
|
+
box-sizing: border-box;
|
9
|
+
font-family: <%= options.font_family %>;
|
10
|
+
font-size: <%= options.text_font_size %>px;
|
11
|
+
line-height: <%= options.text_font_size + options.line_height_increase %>px;
|
12
|
+
font-weight: normal;
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
strong {
|
18
|
+
font-weight: <%= options.bold_weight %>;
|
19
|
+
}
|
20
|
+
|
21
|
+
p, h1, table {
|
22
|
+
margin: 8px 0;
|
23
|
+
}
|
24
|
+
|
25
|
+
hr {
|
26
|
+
border-top: 1px solid black;
|
27
|
+
}
|
28
|
+
|
29
|
+
h1 {
|
30
|
+
font-size: <%= options.header_font_size %>px;
|
31
|
+
font-weight: <%= options.bold_weight %>;
|
32
|
+
}
|
33
|
+
|
34
|
+
body {
|
35
|
+
margin: 15px;
|
36
|
+
}
|
37
|
+
|
38
|
+
table {
|
39
|
+
border-collapse: collapse;
|
40
|
+
border-spacing: 0;
|
41
|
+
width: 100%;
|
42
|
+
}
|
43
|
+
|
44
|
+
td, th {
|
45
|
+
vertical-align: top;
|
46
|
+
text-align: left;
|
47
|
+
padding: 5px;
|
48
|
+
}
|
49
|
+
|
50
|
+
table.table th {
|
51
|
+
border-bottom: 1px solid black;
|
52
|
+
}
|
53
|
+
|
54
|
+
table.table tbody td {
|
55
|
+
border-bottom: 1px solid black;
|
56
|
+
}
|
57
|
+
|
58
|
+
table.table tfoot td, table.table th {
|
59
|
+
background-color: #D3D3D3;
|
60
|
+
font-weight: <%= options.bold_weight %>;
|
61
|
+
}
|
62
|
+
|
63
|
+
table.pane td, table.pane th {
|
64
|
+
padding: 5px 5px 5px 0;
|
65
|
+
}
|
66
|
+
</style>
|
67
|
+
</head>
|
68
|
+
<body>
|
69
|
+
<% object.children.each do |child| -%>
|
70
|
+
<%= ProformaWriter.render(child, options) %>
|
71
|
+
<% end -%>
|
72
|
+
</body>
|
73
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<hr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<br>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<%
|
2
|
+
def cell_style(cell)
|
3
|
+
[].tap do |styles|
|
4
|
+
styles << "text-align: #{cell.align}" if !cell.align.to_s.empty?
|
5
|
+
styles << "width: #{cell.width}%" if cell.width
|
6
|
+
end.join(';')
|
7
|
+
end
|
8
|
+
%>
|
9
|
+
|
10
|
+
<% if object.body.rows.any? -%>
|
11
|
+
<table class="table">
|
12
|
+
<thead>
|
13
|
+
<% object.header.rows.each do |row| -%>
|
14
|
+
<tr>
|
15
|
+
<% row.cells.each do |cell| -%>
|
16
|
+
<th style="<%= cell_style(cell) %>"><%= cell.text %></th>
|
17
|
+
<% end -%>
|
18
|
+
</tr>
|
19
|
+
<% end -%>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<% object.body.rows.each do |row| -%>
|
23
|
+
<tr>
|
24
|
+
<% row.cells.each do |cell| -%>
|
25
|
+
<td style="<%= cell_style(cell) %>"><%= cell.text %></td>
|
26
|
+
<% end -%>
|
27
|
+
</tr>
|
28
|
+
<% end -%>
|
29
|
+
</tbody>
|
30
|
+
<tfoot>
|
31
|
+
<% object.footer.rows.each do |row| -%>
|
32
|
+
<tr>
|
33
|
+
<% row.cells.each do |cell| -%>
|
34
|
+
<td style="<%= cell_style(cell) %>"><%= cell.text %></td>
|
35
|
+
<% end -%>
|
36
|
+
</tr>
|
37
|
+
<% end -%>
|
38
|
+
</tfoot>
|
39
|
+
</table>
|
40
|
+
<% elsif !object.empty_message.to_s.empty? -%>
|
41
|
+
<p><%= object.empty_message %></p>
|
42
|
+
<% end -%>
|
metadata
ADDED
@@ -0,0 +1,222 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: proforma-html-renderer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.pre.alpha
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matthew Ruggio
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-06-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: proforma
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard-rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry-byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.8'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.8'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.63.1
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.63.1
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.16.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.16.1
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov-console
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.4.2
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.4.2
|
139
|
+
description: " Proforma is a virtual document object model. This library allows
|
140
|
+
you to output HTML for a virtual Proforma document.\n"
|
141
|
+
email:
|
142
|
+
- mruggio@bluemarblepayroll.com
|
143
|
+
executables:
|
144
|
+
- console
|
145
|
+
- render
|
146
|
+
- snapshot
|
147
|
+
extensions: []
|
148
|
+
extra_rdoc_files: []
|
149
|
+
files:
|
150
|
+
- ".editorconfig"
|
151
|
+
- ".gitignore"
|
152
|
+
- ".rubocop.yml"
|
153
|
+
- ".ruby-version"
|
154
|
+
- ".travis.yml"
|
155
|
+
- CHANGELOG.md
|
156
|
+
- Gemfile
|
157
|
+
- Gemfile.lock
|
158
|
+
- Guardfile
|
159
|
+
- LICENSE
|
160
|
+
- README.md
|
161
|
+
- Rakefile
|
162
|
+
- bin/console
|
163
|
+
- bin/render
|
164
|
+
- bin/snapshot
|
165
|
+
- lib/proforma/html_renderer.rb
|
166
|
+
- lib/proforma/html_renderer/object_writer.rb
|
167
|
+
- lib/proforma/html_renderer/proforma_writer.rb
|
168
|
+
- lib/proforma/html_renderer/version.rb
|
169
|
+
- lib/proforma/html_renderer/writer.rb
|
170
|
+
- proforma-html-renderer.gemspec
|
171
|
+
- spec/fixtures/aloha.txt.erb
|
172
|
+
- spec/fixtures/snapshot/config.yml
|
173
|
+
- spec/fixtures/snapshot/images/logo.png
|
174
|
+
- spec/fixtures/snapshot/output/0.User List.html
|
175
|
+
- spec/proforma/html_renderer/object_writer_spec.rb
|
176
|
+
- spec/proforma/html_renderer/proforma_writer_spec.rb
|
177
|
+
- spec/proforma/html_renderer/writer_spec.rb
|
178
|
+
- spec/proforma/html_renderer_spec.rb
|
179
|
+
- spec/rendering_helper.rb
|
180
|
+
- spec/spec_helper.rb
|
181
|
+
- templates/banner.html.erb
|
182
|
+
- templates/header.html.erb
|
183
|
+
- templates/pane.html.erb
|
184
|
+
- templates/prototype.html.erb
|
185
|
+
- templates/separator.html.erb
|
186
|
+
- templates/spacer.html.erb
|
187
|
+
- templates/table.html.erb
|
188
|
+
- templates/text.html.erb
|
189
|
+
homepage: https://github.com/bluemarblepayroll/proforma-html-renderer
|
190
|
+
licenses:
|
191
|
+
- MIT
|
192
|
+
metadata: {}
|
193
|
+
post_install_message:
|
194
|
+
rdoc_options: []
|
195
|
+
require_paths:
|
196
|
+
- lib
|
197
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 2.3.8
|
202
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - ">"
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: 1.3.1
|
207
|
+
requirements: []
|
208
|
+
rubygems_version: 3.0.1
|
209
|
+
signing_key:
|
210
|
+
specification_version: 4
|
211
|
+
summary: Proforma renderer plugin for generating HTML.
|
212
|
+
test_files:
|
213
|
+
- spec/fixtures/aloha.txt.erb
|
214
|
+
- spec/fixtures/snapshot/config.yml
|
215
|
+
- spec/fixtures/snapshot/images/logo.png
|
216
|
+
- spec/fixtures/snapshot/output/0.User List.html
|
217
|
+
- spec/proforma/html_renderer/object_writer_spec.rb
|
218
|
+
- spec/proforma/html_renderer/proforma_writer_spec.rb
|
219
|
+
- spec/proforma/html_renderer/writer_spec.rb
|
220
|
+
- spec/proforma/html_renderer_spec.rb
|
221
|
+
- spec/rendering_helper.rb
|
222
|
+
- spec/spec_helper.rb
|