reportinator 0.1.1 → 0.3.2
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 +4 -4
- data/CHANGELOG.md +62 -7
- data/Gemfile.lock +11 -1
- data/README.md +201 -291
- data/app/reports/example.report.json +7 -3
- data/app/reports/multiplication.report.json +1 -1
- data/app/reports/multiplication_v2.report.json +15 -0
- data/data/schema/report_schema.json +76 -0
- data/docs/0_first_report.md +267 -0
- data/lib/reportinator/base.rb +2 -1
- data/lib/reportinator/config.rb +30 -0
- data/lib/reportinator/function.rb +33 -0
- data/lib/reportinator/functions/array/flatten.rb +12 -0
- data/lib/reportinator/functions/array/helper.rb +77 -0
- data/lib/reportinator/functions/array/join.rb +11 -0
- data/lib/reportinator/functions/array/method.rb +9 -0
- data/lib/reportinator/functions/array/range.rb +11 -0
- data/lib/reportinator/functions/array/snippet.rb +30 -0
- data/lib/reportinator/functions/array/string.rb +10 -0
- data/lib/reportinator/functions/array.rb +43 -0
- data/lib/reportinator/functions/string/addition.rb +11 -0
- data/lib/reportinator/functions/string/constant.rb +9 -0
- data/lib/reportinator/functions/string/date.rb +9 -0
- data/lib/reportinator/functions/string/join.rb +10 -0
- data/lib/reportinator/functions/string/logical.rb +14 -0
- data/lib/reportinator/functions/string/number.rb +33 -0
- data/lib/reportinator/functions/string/range.rb +14 -0
- data/lib/reportinator/functions/string/symbol.rb +9 -0
- data/lib/reportinator/functions/string/variable.rb +12 -0
- data/lib/reportinator/functions/string.rb +29 -0
- data/lib/reportinator/helpers.rb +29 -0
- data/lib/reportinator/parser.rb +25 -0
- data/lib/reportinator/parsers/method.rb +8 -3
- data/lib/reportinator/parsers/report.rb +47 -0
- data/lib/reportinator/parsers/value.rb +15 -112
- data/lib/reportinator/report/column.rb +25 -0
- data/lib/reportinator/report/loader.rb +71 -0
- data/lib/reportinator/report/report.rb +33 -0
- data/lib/reportinator/report/row.rb +42 -0
- data/lib/reportinator/report/template.rb +108 -0
- data/lib/reportinator/{report.rb → report_type.rb} +4 -1
- data/lib/reportinator/types/model.rb +15 -7
- data/lib/reportinator/types/preset.rb +23 -2
- data/lib/reportinator/version.rb +1 -1
- data/lib/reportinator.rb +23 -9
- metadata +48 -5
- data/lib/reportinator/loader.rb +0 -112
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1640b58d6109a19bdbf48ce1065c18cee4e026a0eb4e4fc0b983664258d3794d
|
4
|
+
data.tar.gz: '097529bb768d21517db8d511fa9b7b17c029c8a513bbdd95ee52e8d8e2747450'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8fc97d8d0d8ad6a780d25cd07ee87ef52960b9175be94f8b9cc6f8714921b5a489cfedd77a3546ad73b8dd68e61d918ef515d221b744427490c6c949a980bbb
|
7
|
+
data.tar.gz: 8b94e32337cf10a45ac0a699e729e1361d649a0122bf4e09696cee054fc45c3318a58d72b4394816f62313ae4ecef2f2e3e70c54dff7dd9654de463430c13210
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,64 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [0.3.2] 2022-11-24
|
9
|
+
### Fixed
|
10
|
+
- Reference to schema file
|
11
|
+
|
12
|
+
## [0.3.1] 2022-11-24
|
13
|
+
### Fixed
|
14
|
+
- Add "json_schemer" to gem dependencies
|
15
|
+
|
16
|
+
## [0.3.0] 2022-11-24
|
17
|
+
### Added
|
18
|
+
- Add template object
|
19
|
+
- Report types can opt in to parsing the data themselves
|
20
|
+
- Added "to_csv" method to report
|
21
|
+
- Added ">string" array function
|
22
|
+
- Added ">range" array function
|
23
|
+
- Added ">sum" array function
|
24
|
+
- Added "!nf" and "!ni" to convert a number to a float or integer
|
25
|
+
- Added "snippets"
|
26
|
+
- Added JSON Schema for report validation
|
27
|
+
|
28
|
+
### Changed
|
29
|
+
- Preset report now takes in a "values" array, rather than a "data" array
|
30
|
+
- Refactor loader to be report loader
|
31
|
+
- "variables" have now been moved to be underneath the "metadata" tag.
|
32
|
+
- "metadata" is now passed to the Value parser instead of "variables"
|
33
|
+
- Re-ordered changelog to be latest change first
|
34
|
+
- Changelog now has KeepAChangelog info header
|
35
|
+
|
36
|
+
### Fixed
|
37
|
+
- The Method function now works with non-string targets
|
38
|
+
|
39
|
+
## [0.2.0] - 2022-10-14
|
40
|
+
### Added
|
41
|
+
- Added parser for true, false and nil ("@true", "@false", "@nil")
|
42
|
+
- Escape parsed methods and values starting with a special character
|
43
|
+
- Added Report parser
|
44
|
+
- Added "!j" join function.
|
45
|
+
- Added [">"] array helper functions.
|
46
|
+
|
47
|
+
### Changed
|
48
|
+
- Load from template method now parses the report through the Report parser.
|
49
|
+
- Plain strings in the model report method list return as a string rather than nil
|
50
|
+
- Arrays starting with a string containing only a hash attempt to use the second value as target
|
51
|
+
- Improved Loader's row splitting.
|
52
|
+
- Refactored Value parser, allowing for custom functions
|
53
|
+
|
54
|
+
### Fixed
|
55
|
+
- Method Parser no longer ignores empty and nil results.
|
56
|
+
- Model report no longer double-parses values.
|
57
|
+
|
58
|
+
## [0.1.1] - 2022-10-06
|
59
|
+
### Fixed
|
60
|
+
- Move Base class to it's own file
|
61
|
+
- Now uses require_rel rather than require_all
|
2
62
|
|
3
63
|
## [0.1.0] - 2022-10-06
|
4
64
|
- Initial release
|
@@ -8,9 +68,4 @@
|
|
8
68
|
- Method parser
|
9
69
|
- Preset report type
|
10
70
|
- Model report type
|
11
|
-
- Readme with report tutorial
|
12
|
-
|
13
|
-
## [0.1.1] - 2022-10-06
|
14
|
-
### Fixed
|
15
|
-
- Move Base class to it's own file
|
16
|
-
- Now uses require_rel rather than require_all
|
71
|
+
- Readme with report tutorial
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
reportinator (0.
|
4
|
+
reportinator (0.2.0)
|
5
5
|
activemodel (~> 7.0)
|
6
6
|
require_all (~> 3.0)
|
7
7
|
|
@@ -18,9 +18,17 @@ GEM
|
|
18
18
|
ast (2.4.2)
|
19
19
|
concurrent-ruby (1.1.10)
|
20
20
|
diff-lcs (1.5.0)
|
21
|
+
ecma-re-validator (0.4.0)
|
22
|
+
regexp_parser (~> 2.2)
|
23
|
+
hana (1.3.7)
|
21
24
|
i18n (1.12.0)
|
22
25
|
concurrent-ruby (~> 1.0)
|
23
26
|
json (2.6.2)
|
27
|
+
json_schemer (0.2.23)
|
28
|
+
ecma-re-validator (~> 0.3)
|
29
|
+
hana (~> 1.3)
|
30
|
+
regexp_parser (~> 2.0)
|
31
|
+
uri_template (~> 0.7)
|
24
32
|
minitest (5.16.3)
|
25
33
|
parallel (1.22.1)
|
26
34
|
parser (3.1.2.1)
|
@@ -65,11 +73,13 @@ GEM
|
|
65
73
|
tzinfo (2.0.5)
|
66
74
|
concurrent-ruby (~> 1.0)
|
67
75
|
unicode-display_width (2.3.0)
|
76
|
+
uri_template (0.7.0)
|
68
77
|
|
69
78
|
PLATFORMS
|
70
79
|
x86_64-linux
|
71
80
|
|
72
81
|
DEPENDENCIES
|
82
|
+
json_schemer (~> 0.2)
|
73
83
|
rake (~> 13.0)
|
74
84
|
reportinator!
|
75
85
|
rspec (~> 3.0)
|