thinreports 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CONTRIBUTING.md +2 -2
  3. data/.github/workflows/test.yml +17 -5
  4. data/CHANGELOG.md +12 -1
  5. data/Dockerfile +1 -1
  6. data/Gemfile +0 -4
  7. data/README.md +4 -2
  8. data/gemfiles/prawn-2.2.gemfile +5 -0
  9. data/gemfiles/prawn-2.3.gemfile +5 -0
  10. data/gemfiles/prawn-2.4.gemfile +5 -0
  11. data/lib/thinreports.rb +5 -0
  12. data/lib/thinreports/core/shape.rb +2 -0
  13. data/lib/thinreports/core/shape/basic/format.rb +5 -0
  14. data/lib/thinreports/core/shape/stack_view.rb +17 -0
  15. data/lib/thinreports/core/shape/stack_view/format.rb +27 -0
  16. data/lib/thinreports/core/shape/stack_view/interface.rb +17 -0
  17. data/lib/thinreports/core/shape/stack_view/internal.rb +22 -0
  18. data/lib/thinreports/core/shape/stack_view/row_format.rb +39 -0
  19. data/lib/thinreports/core/shape/style/basic.rb +4 -1
  20. data/lib/thinreports/generate.rb +11 -0
  21. data/lib/thinreports/generator/pdf/document/draw_shape.rb +30 -9
  22. data/lib/thinreports/generator/pdf/document/graphics/image.rb +19 -1
  23. data/lib/thinreports/generator/pdf/document/graphics/text.rb +10 -5
  24. data/lib/thinreports/generator/pdf/document/page.rb +12 -0
  25. data/lib/thinreports/generator/pdf/prawn_ext/width_of.rb +7 -13
  26. data/lib/thinreports/section_report/build.rb +32 -0
  27. data/lib/thinreports/section_report/builder/item_builder.rb +49 -0
  28. data/lib/thinreports/section_report/builder/report_builder.rb +82 -0
  29. data/lib/thinreports/section_report/builder/report_data.rb +13 -0
  30. data/lib/thinreports/section_report/builder/stack_view_builder.rb +55 -0
  31. data/lib/thinreports/section_report/builder/stack_view_data.rb +11 -0
  32. data/lib/thinreports/section_report/generate.rb +26 -0
  33. data/lib/thinreports/section_report/pdf/render.rb +23 -0
  34. data/lib/thinreports/section_report/pdf/renderer/draw_item.rb +68 -0
  35. data/lib/thinreports/section_report/pdf/renderer/group_renderer.rb +57 -0
  36. data/lib/thinreports/section_report/pdf/renderer/headers_renderer.rb +24 -0
  37. data/lib/thinreports/section_report/pdf/renderer/section_height.rb +100 -0
  38. data/lib/thinreports/section_report/pdf/renderer/section_renderer.rb +39 -0
  39. data/lib/thinreports/section_report/pdf/renderer/stack_view_renderer.rb +55 -0
  40. data/lib/thinreports/section_report/pdf/renderer/stack_view_row_renderer.rb +38 -0
  41. data/lib/thinreports/section_report/schema/loader.rb +28 -0
  42. data/lib/thinreports/section_report/schema/parser.rb +52 -0
  43. data/lib/thinreports/section_report/schema/report.rb +30 -0
  44. data/lib/thinreports/section_report/schema/section.rb +47 -0
  45. data/lib/thinreports/version.rb +1 -1
  46. data/thinreports.gemspec +8 -2
  47. metadata +103 -5
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Thinreports
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
@@ -14,12 +14,18 @@ Gem::Specification.new do |s|
14
14
  s.homepage = 'http://www.thinreports.org'
15
15
  s.license = 'MIT'
16
16
 
17
- s.required_ruby_version = '>= 2.4.0'
17
+ s.required_ruby_version = '>= 2.5.0'
18
18
 
19
19
  s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^test/}) }
21
21
  end
22
22
  s.require_paths = ['lib']
23
23
 
24
- s.add_dependency 'prawn', '~> 2.2.0'
24
+ s.add_dependency 'prawn', '~> 2.2'
25
+ s.add_dependency 'rexml'
26
+
27
+ s.add_development_dependency 'minitest', '>= 5.14.1'
28
+ s.add_development_dependency 'mocha', '>= 1.11.2'
29
+ s.add_development_dependency 'pdf-inspector', '>= 1.3.0'
30
+ s.add_development_dependency 'rake', '>= 13.0.1'
25
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thinreports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matsukei Co.,Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-20 00:00:00.000000000 Z
11
+ date: 2021-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prawn
@@ -16,14 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.0
19
+ version: '2.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.0
26
+ version: '2.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 5.14.1
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 5.14.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: mocha
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 1.11.2
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 1.11.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: pdf-inspector
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 1.3.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.3.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 13.0.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 13.0.1
27
97
  description: Thinreports is an open source report generation tool for Ruby.
28
98
  email: thinreports@gmail.com
29
99
  executables: []
@@ -44,6 +114,9 @@ files:
44
114
  - fonts/ipagp.ttf
45
115
  - fonts/ipam.ttf
46
116
  - fonts/ipamp.ttf
117
+ - gemfiles/prawn-2.2.gemfile
118
+ - gemfiles/prawn-2.3.gemfile
119
+ - gemfiles/prawn-2.4.gemfile
47
120
  - lib/thinreports.rb
48
121
  - lib/thinreports/config.rb
49
122
  - lib/thinreports/core/errors.rb
@@ -79,6 +152,11 @@ files:
79
152
  - lib/thinreports/core/shape/page_number/format.rb
80
153
  - lib/thinreports/core/shape/page_number/interface.rb
81
154
  - lib/thinreports/core/shape/page_number/internal.rb
155
+ - lib/thinreports/core/shape/stack_view.rb
156
+ - lib/thinreports/core/shape/stack_view/format.rb
157
+ - lib/thinreports/core/shape/stack_view/interface.rb
158
+ - lib/thinreports/core/shape/stack_view/internal.rb
159
+ - lib/thinreports/core/shape/stack_view/row_format.rb
82
160
  - lib/thinreports/core/shape/style.rb
83
161
  - lib/thinreports/core/shape/style/base.rb
84
162
  - lib/thinreports/core/shape/style/basic.rb
@@ -98,6 +176,7 @@ files:
98
176
  - lib/thinreports/core/shape/text_block/interface.rb
99
177
  - lib/thinreports/core/shape/text_block/internal.rb
100
178
  - lib/thinreports/core/utils.rb
179
+ - lib/thinreports/generate.rb
101
180
  - lib/thinreports/generator/pdf.rb
102
181
  - lib/thinreports/generator/pdf/document.rb
103
182
  - lib/thinreports/generator/pdf/document/draw_shape.rb
@@ -126,6 +205,25 @@ files:
126
205
  - lib/thinreports/report/base.rb
127
206
  - lib/thinreports/report/internal.rb
128
207
  - lib/thinreports/report/page.rb
208
+ - lib/thinreports/section_report/build.rb
209
+ - lib/thinreports/section_report/builder/item_builder.rb
210
+ - lib/thinreports/section_report/builder/report_builder.rb
211
+ - lib/thinreports/section_report/builder/report_data.rb
212
+ - lib/thinreports/section_report/builder/stack_view_builder.rb
213
+ - lib/thinreports/section_report/builder/stack_view_data.rb
214
+ - lib/thinreports/section_report/generate.rb
215
+ - lib/thinreports/section_report/pdf/render.rb
216
+ - lib/thinreports/section_report/pdf/renderer/draw_item.rb
217
+ - lib/thinreports/section_report/pdf/renderer/group_renderer.rb
218
+ - lib/thinreports/section_report/pdf/renderer/headers_renderer.rb
219
+ - lib/thinreports/section_report/pdf/renderer/section_height.rb
220
+ - lib/thinreports/section_report/pdf/renderer/section_renderer.rb
221
+ - lib/thinreports/section_report/pdf/renderer/stack_view_renderer.rb
222
+ - lib/thinreports/section_report/pdf/renderer/stack_view_row_renderer.rb
223
+ - lib/thinreports/section_report/schema/loader.rb
224
+ - lib/thinreports/section_report/schema/parser.rb
225
+ - lib/thinreports/section_report/schema/report.rb
226
+ - lib/thinreports/section_report/schema/section.rb
129
227
  - lib/thinreports/version.rb
130
228
  - thinreports.gemspec
131
229
  homepage: http://www.thinreports.org
@@ -140,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
238
  requirements:
141
239
  - - ">="
142
240
  - !ruby/object:Gem::Version
143
- version: 2.4.0
241
+ version: 2.5.0
144
242
  required_rubygems_version: !ruby/object:Gem::Requirement
145
243
  requirements:
146
244
  - - ">="