proforma 1.0.0.pre.alpha → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99a81eae5ad4326d4a525793b02615f3bcd5b7ac9bf3dd2e77d06b39f6fafe62
4
- data.tar.gz: 4c3a71da8fa80f4a93117153ffb2a72ff35bbb624233f814d1669f821e3656d5
3
+ metadata.gz: 817f85bba720714f1805a67d79a890f4c54348c5960b2bbe5ada6cf580dd9895
4
+ data.tar.gz: 40a77e4fe0c8db140eedaa3a1632abcb43a5e5f94fb366126dd9eda6b7324eb6
5
5
  SHA512:
6
- metadata.gz: 1c77a46115ad3804aa9752ef9d118e2e068a7a4d446b59c93eb6184d8f6101dadedeae52e2764957443533549d275cdea8647c1c49cb5c5fc4dd802cba3b13c7
7
- data.tar.gz: 3ef60250c4a60b014fe28ae9dc1917f01ef5cab6217ba1310c0662ac920172fa14c4599e9a502dcf6380b6aa70ed63d14e7f8cc38038417ba9aa15c4d5d0d9be
6
+ metadata.gz: ee6d3dc842c7c75a43df463508d61228adc55683b439f846f35adbf487be59cd45bb517773609f45f58ae7a4441707a02dd64fc6a468d1e945ac66a38575f206
7
+ data.tar.gz: ff63785b94954ab0e21a725d98279d384d3d39912cdaf2c2184116d45ded4d85cc888191947f3f15ad4d7ce9a0023fd487c5998879121bdedb45c527d86c47b6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
- # 1.0.0 (April 20th, 2019)
1
+ # 1.0.0 (April 24th, 2019)
2
2
 
3
- Initial implementation.
3
+ Publishing first release.
4
+
5
+ # 1.0.0-alpha (April 19th, 2019)
6
+
7
+ Publishing first candidate of initial release.
4
8
 
5
9
  # 0.0.1 (March 14th, 2019)
6
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proforma (1.0.0.pre.alpha)
4
+ proforma (1.0.0)
5
5
  acts_as_hashable (~> 1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -8,25 +8,25 @@ Proforma is a Ruby-based document rendering framework with a focus on being:
8
8
  2. Simple: basic set of controls that limit flexibility but increase simplicity and standardization
9
9
  3. Extendable: different value resolvers and document rendering engines can be plugged in
10
10
 
11
- The basic premise is you input a dataset and a template and Proforma:
11
+ The basic premise is you input a dataset and a template and Proforma will:
12
12
 
13
- 1. Evaluate and data-bind each component
14
- 2. Render as a file
13
+ 1. Evaluate and data-bind each component.
14
+ 2. Render given data and template as a file.
15
15
 
16
16
  When a component is in the process of being data-bound it will be evaluated against the current data being read. The evaluator serves two purposes:
17
17
 
18
- 1. Given a record and an expression, find me a raw value (resolving)
19
- 2. Given a record and an expression, return me a formatted string-based value (text templating)
18
+ 1. Given a record and an expression, find me a raw value (resolving.)
19
+ 2. Given a record and an expression, return me a formatted string-based value (text templating.)
20
20
 
21
21
  The basic evaluator that comes with this library is Proforma::HashEvaluator. It is limited to:
22
22
 
23
- 1. only resolving values for hash objects and cannot handle nesting / recursion / dot notation.
24
- 2. only text templating simple expressions: if the expression starts with a ```$:``` then it is noted as being a data-bound value. The value proceeding the ```$:``` will be resolved and returned. If it does not begin with this special string then it is deemed just a basic string and it will be returned verbatim.
23
+ 1. Only resolving values for hash objects and cannot handle nesting / recursion / dot notation.
24
+ 2. Only text templating simple expressions: if the expression starts with a `$` then it is noted as being a data-bound value. The value proceeding the `$` will be resolved and returned. If it does not begin with this special string then the value following the $ will be resolved and returned.
25
25
 
26
26
  Other libraries that can be plugged in, such as:
27
27
 
28
- 1. [![proforma-extended-evaluator](https://github.com/bluemarblepayroll/proforma-extended-evaluator): adds nested dot-notation object value resolution and rich text templating.
29
- 2. [![proforma-prawn-renderer](https://github.com/bluemarblepayroll/proforma-prawn-renderer)]: adds PDF rendering.
28
+ 1. [proforma-extended-evaluator](https://github.com/bluemarblepayroll/proforma-extended-evaluator): adds nested dot-notation object value resolution and rich text templating.
29
+ 2. [proforma-prawn-renderer](https://github.com/bluemarblepayroll/proforma-prawn-renderer): adds PDF rendering.
30
30
 
31
31
  See the libraries respective README files for more information.
32
32
 
@@ -80,9 +80,9 @@ template = {
80
80
  {
81
81
  type: 'DataTable',
82
82
  columns: [
83
- { header: 'ID Number', body: '$:id' },
84
- { header: 'First Name', body: '$:first' },
85
- { header: 'Last Name', body: '$:last' }
83
+ { header: 'ID Number', body: '$id' },
84
+ { header: 'First Name', body: '$first' },
85
+ { header: 'Last Name', body: '$last' }
86
86
  ]
87
87
  }
88
88
  ]
@@ -125,13 +125,13 @@ template = {
125
125
  columns: [
126
126
  {
127
127
  lines: [
128
- { label: 'ID Number', value: '$:id' },
129
- { label: 'First Name', value: '$:first' }
128
+ { label: 'ID Number', value: '$id' },
129
+ { label: 'First Name', value: '$first' }
130
130
  ]
131
131
  },
132
132
  {
133
133
  lines: [
134
- { label: 'Last Name', value: '$:last' }
134
+ { label: 'Last Name', value: '$last' }
135
135
  ]
136
136
  }
137
137
  ]
@@ -211,9 +211,9 @@ template = {
211
211
  {
212
212
  type: 'DataTable',
213
213
  columns: [
214
- { header: 'ID Number', body: '$:id' },
215
- { header: 'First Name', body: '$:first' },
216
- { header: 'Last Name', body: '$:last' }
214
+ { header: 'ID Number', body: '$id' },
215
+ { header: 'First Name', body: '$first' },
216
+ { header: 'Last Name', body: '$last' }
217
217
  ]
218
218
  },
219
219
  { type: 'Spacer' },
@@ -228,13 +228,13 @@ template = {
228
228
  columns: [
229
229
  {
230
230
  lines: [
231
- { label: 'ID Number', value: '$:id' },
232
- { label: 'First Name', value: '$:first' }
231
+ { label: 'ID Number', value: '$id' },
232
+ { label: 'First Name', value: '$first' }
233
233
  ]
234
234
  },
235
235
  {
236
236
  lines: [
237
- { label: 'Last Name', value: '$:last' }
237
+ { label: 'Last Name', value: '$last' }
238
238
  ]
239
239
  }
240
240
  ]
@@ -243,8 +243,8 @@ template = {
243
243
  type: 'DataTable',
244
244
  property: 'phone_numbers',
245
245
  columns: [
246
- { header: 'Type', body: '$:type' },
247
- { header: 'Number', body: '$:number' }
246
+ { header: 'Type', body: '$type' },
247
+ { header: 'Number', body: '$number' }
248
248
  ]
249
249
  },
250
250
  { type: 'Spacer' }
@@ -275,6 +275,8 @@ The `contents` attribute will now contain:
275
275
  * user details pane (one per user)
276
276
  * user phone numbers table (one per user)
277
277
 
278
+ The full contents can be seen in [this fixture file](https://github.com/bluemarblepayroll/proforma/blob/master/spec/fixtures/bringing_it_all_together.txt).
279
+
278
280
  ## Contributing
279
281
 
280
282
  ### Development Environment Configuration
data/bin/console CHANGED
@@ -1,6 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
+ #
5
+ # Copyright (c) 2018-present, Blue Marble Payroll, LLC
6
+ #
7
+ # This source code is licensed under the MIT license found in the
8
+ # LICENSE file in the root directory of this source tree.
9
+ #
10
+
4
11
  require 'bundler/setup'
5
12
  require 'proforma'
6
13
 
data/bin/render CHANGED
@@ -1,6 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
+ #
5
+ # Copyright (c) 2018-present, Blue Marble Payroll, LLC
6
+ #
7
+ # This source code is licensed under the MIT license found in the
8
+ # LICENSE file in the root directory of this source tree.
9
+ #
10
+
4
11
  require 'bundler/setup'
5
12
  require 'proforma'
6
13
  require 'fileutils'
@@ -8,9 +15,7 @@ require 'yaml'
8
15
  require 'pry'
9
16
 
10
17
  def read_yaml(filename)
11
- # rubocop:disable Security/YAMLLoad
12
- YAML.load(read(filename))
13
- # rubocop:enable Security/YAMLLoad
18
+ YAML.safe_load(read(filename))
14
19
  end
15
20
 
16
21
  def read(filename)
data/lib/proforma.rb CHANGED
@@ -12,19 +12,16 @@ require 'bigdecimal'
12
12
  require 'forwardable'
13
13
  require 'stringio'
14
14
 
15
- # Monkey-patching core libaries
16
- require_relative 'proforma/core_ext/hash'
17
- Hash.include ::Proforma::CoreExt::Hash
18
-
19
15
  require_relative 'proforma/compiling'
20
16
  require_relative 'proforma/document'
21
17
  require_relative 'proforma/hash_evaluator'
18
+ require_relative 'proforma/hash_refinements'
19
+ require_relative 'proforma/model_factory'
22
20
  require_relative 'proforma/modeling'
23
21
  require_relative 'proforma/plain_text_renderer'
24
22
  require_relative 'proforma/prototype'
25
23
  require_relative 'proforma/template'
26
24
  require_relative 'proforma/type_factory'
27
- require_relative 'proforma/model_factory'
28
25
 
29
26
  # The top-level API that should be seen as the main entry point into this library.
30
27
  module Proforma
@@ -19,6 +19,8 @@ module Proforma
19
19
  @aggregators = Array(aggregators)
20
20
  @counters = {}
21
21
  @evaluator = evaluator
22
+
23
+ freeze
22
24
  end
23
25
 
24
26
  def add(records)
@@ -35,7 +37,7 @@ module Proforma
35
37
  self
36
38
  end
37
39
 
38
- def to_hash
40
+ def to_h
39
41
  aggregators.map { |aggregator| execute(aggregator) }.to_h
40
42
  end
41
43
 
@@ -28,6 +28,8 @@ module Proforma
28
28
  end
29
29
 
30
30
  def ave
31
+ return BigDecimal(0) if count.zero?
32
+
31
33
  sum / count
32
34
  end
33
35
  end
@@ -14,24 +14,20 @@ module Proforma
14
14
  # This, being a prototype for customizable evaluators, just provides basic evaluation:
15
15
  # - it can only handle hashes for value extraction
16
16
  # - if text is prefixed with a dollar sign and colon then it means it will be dynamically
17
- # evaluated against the record. For example: $:id
17
+ # evaluated against the record. For example: $id
18
18
  class HashEvaluator
19
- PROPERTY_PREFIX = '$:'
19
+ PROPERTY_PREFIX = '$'
20
20
 
21
21
  def value(object, expression)
22
22
  return object if expression.to_s.empty?
23
23
  return nil unless object.is_a?(Hash)
24
24
 
25
- if object.key?(expression.to_s)
26
- object[expression.to_s]
27
- elsif object.key?(expression.to_s.to_sym)
28
- object[expression.to_s.to_sym]
29
- end
25
+ object[expression.to_s] || object[expression.to_s.to_sym]
30
26
  end
31
27
 
32
28
  def text(object, expression)
33
29
  if expression.to_s.start_with?(PROPERTY_PREFIX)
34
- value(object, expression.to_s[2..-1])
30
+ value(object, expression.to_s[PROPERTY_PREFIX.length..-1])
35
31
  else
36
32
  expression
37
33
  end
@@ -0,0 +1,20 @@
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
+ module Proforma
11
+ # Let's provide a refinenment instead of monkey-patching Hash. That way we can stop
12
+ # polluting other libraries and internalize our specific needs.
13
+ module HashRefinements
14
+ refine Hash do
15
+ def symbolize_keys
16
+ map { |k, v| [k.to_sym, v] }.to_h
17
+ end
18
+ end
19
+ end
20
+ end
@@ -7,6 +7,8 @@
7
7
  # LICENSE file in the root directory of this source tree.
8
8
  #
9
9
 
10
+ require_relative 'modeling'
11
+
10
12
  module Proforma
11
13
  # This class serves as a singleton that can make Proforma::Modeling components.
12
14
  class ModelFactory
@@ -9,6 +9,7 @@
9
9
 
10
10
  require_relative 'modeling/generic_container'
11
11
  require_relative 'modeling/types'
12
+
12
13
  require_relative 'modeling/banner'
13
14
  require_relative 'modeling/collection'
14
15
  require_relative 'modeling/data_table'
@@ -64,7 +64,7 @@ module Proforma
64
64
  private
65
65
 
66
66
  def make_aggregator_meta_data(records, evaluator)
67
- Compiling::Aggregation.new(aggregators, evaluator).add(records).to_hash
67
+ Compiling::Aggregation.new(aggregators, evaluator).add(records).to_h
68
68
  end
69
69
 
70
70
  def footer?
@@ -40,9 +40,7 @@ module Proforma
40
40
  def compile(data, evaluator)
41
41
  compiled_children = children.map { |child| child.compile(data, evaluator) }
42
42
 
43
- args = {}.tap { |hash| hash[child_key] = compiled_children }
44
-
45
- self.class.new(args)
43
+ self.class.new(child_key => compiled_children)
46
44
  end
47
45
 
48
46
  private
@@ -10,6 +10,8 @@
10
10
  module Proforma
11
11
  # A TypeFactory object understands how to build objects using a special designated '$type' key.
12
12
  class TypeFactory
13
+ using HashRefinements
14
+
13
15
  DEFAULT_TYPE_KEY = :type
14
16
 
15
17
  attr_reader :registry, :type_key
@@ -8,5 +8,5 @@
8
8
  #
9
9
 
10
10
  module Proforma
11
- VERSION = '1.0.0-alpha'
11
+ VERSION = '1.0.0'
12
12
  end
@@ -0,0 +1,42 @@
1
+ ========================================
2
+ System A
3
+ ========================================
4
+ 555 N. Michigan Ave.
5
+ Chicago, IL 55555
6
+ 555-555-5555 ext. 5132
7
+ ========================================
8
+ USER LIST
9
+ ----------------------------------------
10
+
11
+ ID Number, First Name, Last Name
12
+ 1, Matt, Smith
13
+ 2, Katie, Rizzo
14
+ 3, Nathan, Nathanson
15
+
16
+ USER DETAILS
17
+ ----------------------------------------
18
+
19
+ ID Number: 1
20
+ First Name: Matt
21
+ Last Name: Smith
22
+ Type, Number
23
+ Mobile, 444-333-2222
24
+ Home, 444-333-2222
25
+
26
+ USER DETAILS
27
+ ----------------------------------------
28
+
29
+ ID Number: 2
30
+ First Name: Katie
31
+ Last Name: Rizzo
32
+ Type, Number
33
+ Fax, 888-777-6666
34
+
35
+ USER DETAILS
36
+ ----------------------------------------
37
+
38
+ ID Number: 3
39
+ First Name: Nathan
40
+ Last Name: Nathanson
41
+ Type, Number
42
+
@@ -34,14 +34,14 @@ template:
34
34
  rows:
35
35
  - cells:
36
36
  - text: ID Number
37
- - text: $:id
37
+ - text: $id
38
38
  - text: Username
39
- - text: $:username
39
+ - text: $username
40
40
  - cells:
41
41
  - text: First Name
42
- - text: $:first
42
+ - text: $first
43
43
  - text: Last Name
44
- - text: $:last
44
+ - text: $last
45
45
 
46
46
  documents:
47
47
  - title: Custom Table
@@ -38,11 +38,11 @@ template:
38
38
  - label_width: 25.0
39
39
  lines:
40
40
  - label: ID Number
41
- value: $:id
41
+ value: $id
42
42
  - label: First Name
43
- value: $:first
43
+ value: $first
44
44
  - label: Last Name
45
- value: $:last
45
+ value: $last
46
46
  - type: Spacer
47
47
  - type: Header
48
48
  value: Phone Numbers
@@ -51,9 +51,9 @@ template:
51
51
  empty_message: No phone numbers.
52
52
  columns:
53
53
  - header: Type
54
- body: $:type
54
+ body: $type
55
55
  - header: Number
56
- body: $:number
56
+ body: $number
57
57
  - type: Spacer
58
58
 
59
59
  documents:
@@ -47,19 +47,19 @@ template:
47
47
  name: login_count_ave
48
48
  columns:
49
49
  - header: ID Number
50
- body: $:id
50
+ body: $id
51
51
  footer: Login Count Ave.
52
52
  - header: First Name
53
- body: $:first
54
- footer: $:login_count_ave
53
+ body: $first
54
+ footer: $login_count_ave
55
55
  - header: Last Name
56
- body: $:last
56
+ body: $last
57
57
  - header: Username
58
- body: $:username
58
+ body: $username
59
59
  footer: Login Count Sum
60
60
  - header: Login Count
61
- footer: $:login_count_sum
62
- body: $:login_count
61
+ footer: $login_count_sum
62
+ body: $login_count
63
63
  - type: Spacer
64
64
  - type: Grouping
65
65
  children:
@@ -71,11 +71,11 @@ template:
71
71
  - label_width: 25.0
72
72
  lines:
73
73
  - label: ID Number
74
- value: $:id
74
+ value: $id
75
75
  - label: First Name
76
- value: $:first
76
+ value: $first
77
77
  - label: Last Name
78
- value: $:last
78
+ value: $last
79
79
  - type: Spacer
80
80
  - type: Header
81
81
  value: Phone Numbers
@@ -84,9 +84,9 @@ template:
84
84
  empty_message: No phone numbers.
85
85
  columns:
86
86
  - header: Type
87
- body: $:type
87
+ body: $type
88
88
  - header: Number
89
- body: $:number
89
+ body: $number
90
90
  - type: Spacer
91
91
 
92
92
  documents:
@@ -0,0 +1,16 @@
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 'spec_helper'
11
+
12
+ describe ::Proforma::Compiling::Counter do
13
+ specify '#ave returns 0 if count is 0' do
14
+ expect(subject.ave).to eq(0)
15
+ end
16
+ end
@@ -45,9 +45,9 @@ describe ::Proforma do
45
45
  {
46
46
  type: 'DataTable',
47
47
  columns: [
48
- { header: 'ID Number', body: '$:id' },
49
- { header: 'First Name', body: '$:first' },
50
- { header: 'Last Name', body: '$:last' }
48
+ { header: 'ID Number', body: '$id' },
49
+ { header: 'First Name', body: '$first' },
50
+ { header: 'Last Name', body: '$last' }
51
51
  ]
52
52
  }
53
53
  ]
@@ -83,13 +83,13 @@ describe ::Proforma do
83
83
  columns: [
84
84
  {
85
85
  lines: [
86
- { label: 'ID Number', value: '$:id' },
87
- { label: 'First Name', value: '$:first' }
86
+ { label: 'ID Number', value: '$id' },
87
+ { label: 'First Name', value: '$first' }
88
88
  ]
89
89
  },
90
90
  {
91
91
  lines: [
92
- { label: 'Last Name', value: '$:last' }
92
+ { label: 'Last Name', value: '$last' }
93
93
  ]
94
94
  }
95
95
  ]
@@ -161,9 +161,9 @@ describe ::Proforma do
161
161
  {
162
162
  type: 'DataTable',
163
163
  columns: [
164
- { header: 'ID Number', body: '$:id' },
165
- { header: 'First Name', body: '$:first' },
166
- { header: 'Last Name', body: '$:last' }
164
+ { header: 'ID Number', body: '$id' },
165
+ { header: 'First Name', body: '$first' },
166
+ { header: 'Last Name', body: '$last' }
167
167
  ]
168
168
  },
169
169
  { type: 'Spacer' },
@@ -178,13 +178,13 @@ describe ::Proforma do
178
178
  columns: [
179
179
  {
180
180
  lines: [
181
- { label: 'ID Number', value: '$:id' },
182
- { label: 'First Name', value: '$:first' }
181
+ { label: 'ID Number', value: '$id' },
182
+ { label: 'First Name', value: '$first' }
183
183
  ]
184
184
  },
185
185
  {
186
186
  lines: [
187
- { label: 'Last Name', value: '$:last' }
187
+ { label: 'Last Name', value: '$last' }
188
188
  ]
189
189
  }
190
190
  ]
@@ -193,8 +193,8 @@ describe ::Proforma do
193
193
  type: 'DataTable',
194
194
  property: 'phone_numbers',
195
195
  columns: [
196
- { header: 'Type', body: '$:type' },
197
- { header: 'Number', body: '$:number' }
196
+ { header: 'Type', body: '$type' },
197
+ { header: 'Number', body: '$number' }
198
198
  ]
199
199
  },
200
200
  { type: 'Spacer' }
@@ -207,18 +207,7 @@ describe ::Proforma do
207
207
 
208
208
  expected_documents = [
209
209
  Proforma::Document.new(
210
- contents: "========================================\nSystem A\n=================="\
211
- "======================\n555 N. Michigan Ave.\nChicago, IL 55555\n"\
212
- "555-555-5555 ext. 5132\n========================================\nUSER"\
213
- " LIST\n----------------------------------------\n\nID Number, First Name,"\
214
- " Last Name\n1, Matt, Smith\n2, Katie, Rizzo\n3, Nathan, Nathanson\n\nUSER"\
215
- " DETAILS\n----------------------------------------\n\nID Number: "\
216
- "1\nFirst Name: Matt\nLast Name: Smith\nType, Number\nMobile, 444-333-2222"\
217
- "\nHome, 444-333-2222\n\nUSER DETAILS\n-----------------------------------"\
218
- "-----\n\nID Number: 2\nFirst Name: Katie\nLast Name: Rizzo\nType, Number\n"\
219
- "Fax, 888-777-6666\n\nUSER DETAILS\n----------------------------------"\
220
- "------\n\nID Number: 3\nFirst Name: Nathan\nLast Name: "\
221
- "Nathanson\nType, Number\n\n",
210
+ contents: fixture('bringing_it_all_together.txt'),
222
211
  extension: '.txt',
223
212
  title: 'User Report'
224
213
  )
data/spec/spec_helper.rb CHANGED
@@ -19,7 +19,9 @@ SimpleCov.start
19
19
  require './lib/proforma'
20
20
 
21
21
  def yaml_read(file)
22
- # rubocop:disable Security/YAMLLoad
23
- YAML.load(File.open(file))
24
- # rubocop:enable Security/YAMLLoad
22
+ YAML.safe_load(File.open(file))
23
+ end
24
+
25
+ def fixture(file)
26
+ File.open(File.join('spec', 'fixtures', file)).read
25
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proforma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-19 00:00:00.000000000 Z
11
+ date: 2019-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_hashable
@@ -138,9 +138,9 @@ files:
138
138
  - lib/proforma/compiling/aggregation.rb
139
139
  - lib/proforma/compiling/compilable.rb
140
140
  - lib/proforma/compiling/counter.rb
141
- - lib/proforma/core_ext/hash.rb
142
141
  - lib/proforma/document.rb
143
142
  - lib/proforma/hash_evaluator.rb
143
+ - lib/proforma/hash_refinements.rb
144
144
  - lib/proforma/model_factory.rb
145
145
  - lib/proforma/modeling.rb
146
146
  - lib/proforma/modeling/banner.rb
@@ -169,9 +169,11 @@ files:
169
169
  - lib/proforma/type_factory.rb
170
170
  - lib/proforma/version.rb
171
171
  - proforma.gemspec
172
+ - spec/fixtures/bringing_it_all_together.txt
172
173
  - spec/fixtures/snapshots/custom_table.yml
173
174
  - spec/fixtures/snapshots/user_details.yml
174
175
  - spec/fixtures/snapshots/user_list.yml
176
+ - spec/proforma/compiling/counter_spec.rb
175
177
  - spec/proforma/hash_evaluator_spec.rb
176
178
  - spec/proforma/modeling/table/cell_spec.rb
177
179
  - spec/proforma/modeling/table/row_spec.rb
@@ -192,18 +194,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
194
  version: 2.3.8
193
195
  required_rubygems_version: !ruby/object:Gem::Requirement
194
196
  requirements:
195
- - - ">"
197
+ - - ">="
196
198
  - !ruby/object:Gem::Version
197
- version: 1.3.1
199
+ version: '0'
198
200
  requirements: []
199
201
  rubygems_version: 3.0.1
200
202
  signing_key:
201
203
  specification_version: 4
202
204
  summary: Configurable and extendable document rendering engine for datasets
203
205
  test_files:
206
+ - spec/fixtures/bringing_it_all_together.txt
204
207
  - spec/fixtures/snapshots/custom_table.yml
205
208
  - spec/fixtures/snapshots/user_details.yml
206
209
  - spec/fixtures/snapshots/user_list.yml
210
+ - spec/proforma/compiling/counter_spec.rb
207
211
  - spec/proforma/hash_evaluator_spec.rb
208
212
  - spec/proforma/modeling/table/cell_spec.rb
209
213
  - spec/proforma/modeling/table/row_spec.rb
@@ -1,21 +0,0 @@
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
- module Proforma
11
- module CoreExt
12
- # Monkey-patches for the core Hash class. These will be manually mixed in separately.
13
- module Hash
14
- unless method_defined?(:symbolize_keys)
15
- def symbolize_keys
16
- map { |k, v| [k.to_sym, v] }.to_h
17
- end
18
- end
19
- end
20
- end
21
- end