thinreports 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +41 -0
- data/.travis.yml +4 -6
- data/CHANGELOG.md +21 -2
- data/Gemfile +2 -4
- data/README.md +4 -5
- data/Rakefile +7 -8
- data/examples/character_spacing/character_spacing.rb +1 -1
- data/examples/dynamic_image/dynamic_image.rb +3 -3
- data/examples/dynamic_style/dynamic_style.rb +1 -1
- data/examples/eudc/eudc.rb +1 -1
- data/examples/helper.rb +2 -2
- data/examples/hidden_shapes/hidden_shapes.rb +1 -1
- data/examples/list_events/list_events.rb +1 -1
- data/examples/list_manual_generation/list_manual_generation.rb +1 -1
- data/examples/list_page_number/list_page_number.rb +1 -1
- data/examples/page_number/page_number.rb +1 -1
- data/examples/palleted_png/palleted_png.rb +1 -3
- data/examples/password_setting/password_setting.rb +1 -1
- data/examples/report_callbacks/report_callbacks.rb +1 -1
- data/examples/single_line_tblock/single_line_tblock.rb +1 -1
- data/examples/tblock_overflow/tblock_overflow.rb +1 -1
- data/examples/tblock_styles/tblock_styles.rb +1 -1
- data/examples/text_align/text_align.rb +1 -1
- data/examples/typeB_page_size/typeB_page_size.rb +1 -1
- data/examples/word_wrap/word_wrap.rb +1 -1
- data/lib/thinreports.rb +16 -15
- data/lib/thinreports/config.rb +2 -24
- data/lib/thinreports/core/errors.rb +6 -17
- data/lib/thinreports/core/format/base.rb +62 -61
- data/lib/thinreports/core/shape.rb +13 -14
- data/lib/thinreports/core/shape/base.rb +3 -12
- data/lib/thinreports/core/shape/base/interface.rb +35 -32
- data/lib/thinreports/core/shape/base/internal.rb +45 -43
- data/lib/thinreports/core/shape/basic.rb +12 -12
- data/lib/thinreports/core/shape/basic/block_format.rb +8 -6
- data/lib/thinreports/core/shape/basic/block_interface.rb +24 -22
- data/lib/thinreports/core/shape/basic/block_internal.rb +28 -26
- data/lib/thinreports/core/shape/basic/format.rb +11 -9
- data/lib/thinreports/core/shape/basic/interface.rb +79 -77
- data/lib/thinreports/core/shape/basic/internal.rb +17 -14
- data/lib/thinreports/core/shape/image_block.rb +9 -9
- data/lib/thinreports/core/shape/image_block/format.rb +7 -5
- data/lib/thinreports/core/shape/image_block/interface.rb +15 -13
- data/lib/thinreports/core/shape/image_block/internal.rb +10 -8
- data/lib/thinreports/core/shape/list.rb +13 -13
- data/lib/thinreports/core/shape/list/format.rb +83 -77
- data/lib/thinreports/core/shape/list/manager.rb +182 -176
- data/lib/thinreports/core/shape/list/page.rb +94 -93
- data/lib/thinreports/core/shape/list/page_state.rb +42 -40
- data/lib/thinreports/core/shape/list/section_format.rb +28 -26
- data/lib/thinreports/core/shape/list/section_interface.rb +42 -40
- data/lib/thinreports/core/shape/list/section_internal.rb +21 -19
- data/lib/thinreports/core/shape/manager.rb +4 -13
- data/lib/thinreports/core/shape/manager/format.rb +21 -19
- data/lib/thinreports/core/shape/manager/internal.rb +88 -84
- data/lib/thinreports/core/shape/manager/target.rb +93 -95
- data/lib/thinreports/core/shape/page_number.rb +9 -9
- data/lib/thinreports/core/shape/page_number/format.rb +20 -18
- data/lib/thinreports/core/shape/page_number/interface.rb +20 -18
- data/lib/thinreports/core/shape/page_number/internal.rb +47 -44
- data/lib/thinreports/core/shape/style.rb +5 -14
- data/lib/thinreports/core/shape/style/base.rb +121 -120
- data/lib/thinreports/core/shape/style/basic.rb +12 -10
- data/lib/thinreports/core/shape/style/graphic.rb +35 -33
- data/lib/thinreports/core/shape/style/text.rb +113 -107
- data/lib/thinreports/core/shape/text.rb +9 -9
- data/lib/thinreports/core/shape/text/format.rb +10 -9
- data/lib/thinreports/core/shape/text/interface.rb +13 -11
- data/lib/thinreports/core/shape/text/internal.rb +14 -12
- data/lib/thinreports/core/shape/text_block.rb +10 -10
- data/lib/thinreports/core/shape/text_block/format.rb +35 -33
- data/lib/thinreports/core/shape/text_block/formatter.rb +26 -24
- data/lib/thinreports/core/shape/text_block/formatter/basic.rb +25 -25
- data/lib/thinreports/core/shape/text_block/formatter/datetime.rb +15 -12
- data/lib/thinreports/core/shape/text_block/formatter/number.rb +45 -39
- data/lib/thinreports/core/shape/text_block/formatter/padding.rb +17 -14
- data/lib/thinreports/core/shape/text_block/interface.rb +25 -23
- data/lib/thinreports/core/shape/text_block/internal.rb +68 -68
- data/lib/thinreports/core/utils.rb +4 -3
- data/lib/thinreports/generator/pdf.rb +24 -25
- data/lib/thinreports/generator/pdf/document.rb +109 -110
- data/lib/thinreports/generator/pdf/document/draw_shape.rb +58 -51
- data/lib/thinreports/generator/pdf/document/draw_template_items.rb +51 -47
- data/lib/thinreports/generator/pdf/document/font.rb +62 -59
- data/lib/thinreports/generator/pdf/document/graphics.rb +32 -33
- data/lib/thinreports/generator/pdf/document/graphics/attributes.rb +122 -121
- data/lib/thinreports/generator/pdf/document/graphics/basic.rb +113 -114
- data/lib/thinreports/generator/pdf/document/graphics/image.rb +58 -150
- data/lib/thinreports/generator/pdf/document/graphics/text.rb +152 -137
- data/lib/thinreports/generator/pdf/document/page.rb +63 -64
- data/lib/thinreports/generator/pdf/document/parse_color.rb +37 -37
- data/lib/thinreports/generator/pdf/drawer/base.rb +41 -41
- data/lib/thinreports/generator/pdf/drawer/list.rb +48 -45
- data/lib/thinreports/generator/pdf/drawer/list_section.rb +42 -40
- data/lib/thinreports/generator/pdf/drawer/page.rb +101 -96
- data/lib/thinreports/generator/pdf/prawn_ext.rb +4 -30
- data/lib/thinreports/generator/pdf/prawn_ext/calc_image_dimensions.rb +34 -0
- data/lib/thinreports/generator/pdf/prawn_ext/width_of.rb +29 -0
- data/lib/thinreports/layout.rb +5 -7
- data/lib/thinreports/layout/base.rb +5 -7
- data/lib/thinreports/layout/format.rb +18 -13
- data/lib/thinreports/layout/legacy_schema.rb +18 -10
- data/lib/thinreports/layout/version.rb +22 -25
- data/lib/thinreports/report.rb +4 -6
- data/lib/thinreports/report/base.rb +24 -51
- data/lib/thinreports/report/internal.rb +9 -11
- data/lib/thinreports/report/page.rb +5 -6
- data/lib/thinreports/version.rb +2 -2
- data/test/schema_helper.rb +4 -3
- data/test/test_helper.rb +9 -3
- data/test/unit/core/format/test_base.rb +1 -1
- data/test/unit/core/shape/base/test_internal.rb +1 -1
- data/test/unit/core/shape/basic/test_block_format.rb +1 -1
- data/test/unit/core/shape/basic/test_block_interface.rb +1 -1
- data/test/unit/core/shape/basic/test_block_internal.rb +1 -1
- data/test/unit/core/shape/basic/test_format.rb +1 -1
- data/test/unit/core/shape/basic/test_interface.rb +1 -1
- data/test/unit/core/shape/basic/test_internal.rb +1 -1
- data/test/unit/core/shape/image_block/test_interface.rb +1 -1
- data/test/unit/core/shape/image_block/test_internal.rb +1 -1
- data/test/unit/core/shape/list/test_format.rb +1 -1
- data/test/unit/core/shape/list/test_manager.rb +4 -4
- data/test/unit/core/shape/list/test_page.rb +1 -1
- data/test/unit/core/shape/list/test_page_state.rb +1 -1
- data/test/unit/core/shape/list/test_section_format.rb +1 -1
- data/test/unit/core/shape/list/test_section_interface.rb +2 -2
- data/test/unit/core/shape/list/test_section_internal.rb +1 -1
- data/test/unit/core/shape/manager/test_format.rb +2 -2
- data/test/unit/core/shape/manager/test_internal.rb +3 -3
- data/test/unit/core/shape/manager/test_target.rb +1 -1
- data/test/unit/core/shape/page_number/test_format.rb +1 -1
- data/test/unit/core/shape/page_number/test_interface.rb +1 -1
- data/test/unit/core/shape/page_number/test_internal.rb +1 -1
- data/test/unit/core/shape/styles/test_base.rb +1 -1
- data/test/unit/core/shape/styles/test_basic.rb +1 -1
- data/test/unit/core/shape/styles/test_graphic.rb +1 -1
- data/test/unit/core/shape/styles/test_text.rb +1 -1
- data/test/unit/core/shape/text/test_format.rb +1 -1
- data/test/unit/core/shape/text/test_internal.rb +1 -1
- data/test/unit/core/shape/text_block/formatter/test_basic.rb +1 -1
- data/test/unit/core/shape/text_block/formatter/test_datetime.rb +1 -1
- data/test/unit/core/shape/text_block/formatter/test_number.rb +1 -1
- data/test/unit/core/shape/text_block/formatter/test_padding.rb +2 -2
- data/test/unit/core/shape/text_block/test_format.rb +1 -1
- data/test/unit/core/shape/text_block/test_formatter.rb +1 -1
- data/test/unit/core/shape/text_block/test_interface.rb +1 -1
- data/test/unit/core/shape/text_block/test_internal.rb +3 -3
- data/test/unit/core/test_shape.rb +1 -1
- data/test/unit/core/test_utils.rb +2 -2
- data/test/unit/generator/pdf/document/graphics/test_attributes.rb +1 -1
- data/test/unit/generator/pdf/document/graphics/test_basic.rb +2 -1
- data/test/unit/generator/pdf/document/graphics/test_image.rb +27 -131
- data/test/unit/generator/pdf/document/graphics/test_text.rb +1 -1
- data/test/unit/generator/pdf/document/test_font.rb +2 -2
- data/test/unit/generator/pdf/document/test_graphics.rb +1 -1
- data/test/unit/generator/pdf/document/test_page.rb +7 -7
- data/test/unit/generator/pdf/document/test_parse_color.rb +1 -1
- data/test/unit/generator/pdf/prawn_ext/test_calc_image_dimensions.rb +41 -0
- data/test/unit/generator/pdf/prawn_ext/test_width_of.rb +22 -0
- data/test/unit/generator/pdf/test_document.rb +8 -6
- data/test/unit/generator/test_pdf.rb +12 -10
- data/test/unit/layout/test_base.rb +1 -1
- data/test/unit/layout/test_format.rb +2 -2
- data/test/unit/layout/test_legacy_schema.rb +4 -4
- data/test/unit/layout/test_version.rb +11 -80
- data/test/unit/report/test_base.rb +45 -59
- data/test/unit/report/test_internal.rb +1 -1
- data/test/unit/test_config.rb +1 -16
- data/test/unit/test_layout.rb +1 -1
- data/test/unit/test_report.rb +1 -1
- data/thinreports.gemspec +11 -14
- metadata +42 -103
- data/lib/thinreports/generator.rb +0 -29
- data/lib/thinreports/generator/base.rb +0 -40
- data/lib/thinreports/generator/configuration.rb +0 -31
- data/lib/thinreports/report/events.rb +0 -32
- data/test/unit/generator/test_base.rb +0 -40
- data/test/unit/generator/test_configuration.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40890b67b0013db37dcab5672e1b3166919adc9c
|
4
|
+
data.tar.gz: 00d5a8a495b282c6f6c83864a2550774b09a9995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c84274da336894155c19db3ae9b6ce66f3c69bde20605c74efd841dd318c51d7317553a261cac391b8e5eb9d197d15fd05cfb18d0e87ffdafbf8b0a2ffbe315
|
7
|
+
data.tar.gz: f2f4b9e4aa7edeca96bb40f7ceb187fa04dd9bdfcaf6d750af6602077f0d5c25cb19466ae50780cf87d1a433f82ea11f5837263d4f16b35922b0f525b475fd91
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'examples/**/*'
|
4
|
+
- 'test/**/*'
|
5
|
+
- 'thinreports.gemspec'
|
6
|
+
|
7
|
+
Metrics/LineLength:
|
8
|
+
Max: 120
|
9
|
+
|
10
|
+
Metrics/MethodLength:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Metrics/ParameterLists:
|
14
|
+
Max: 6
|
15
|
+
|
16
|
+
Performance/RedundantBlockCall:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Performance/RegexpMatch:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/Documentation:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/FormatString:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/FrozenStringLiteralComment:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/NumericPredicate:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/PerlBackrefs:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Style/PredicateName:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
Style/SafeNavigation:
|
41
|
+
Enabled: false
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## 0.10.0
|
2
|
+
|
3
|
+
* Thinreports requires Prawn 2.2
|
4
|
+
* Dropped Ruby 1.9.3 and 2.0.0 support
|
5
|
+
* Fixed a bug line-height of a text line-wrapped is broken #36 [@tkobayashi0330]
|
6
|
+
* Remove deprecated top-module `ThinReports`
|
7
|
+
* Remove `config.convert_palleted_transparency_png` option
|
8
|
+
* Remove `config.generator.default` option
|
9
|
+
* Deprecate `:report` and `:generator` argument of `Thinreports::Report.generate`
|
10
|
+
|
11
|
+
### Remove config.convert_palleted_transparency_png option
|
12
|
+
|
13
|
+
PNG image with indexed transparency has been supported since Prawn version 2.0. And now, thinreports requires Prawn 2.2+, so the unique support in thinreports is no longer needed.
|
14
|
+
|
15
|
+
### Remove deprecated top-module ThinReports
|
16
|
+
|
17
|
+
Please use `Thinreports` instead.
|
18
|
+
|
1
19
|
## 0.9.1
|
2
20
|
|
3
21
|
* Fixed bug that line-height of text-block is always set to 0 #68
|
@@ -46,8 +64,9 @@ png_image = StringIO.new(png_data)
|
|
46
64
|
page.item(:image_block).src(png_image)
|
47
65
|
|
48
66
|
require 'open-uri'
|
49
|
-
|
50
|
-
page.item(:image_block).src(image_data)
|
67
|
+
open('http://example.com/image.png') do |image_data|
|
68
|
+
page.item(:image_block).src(image_data)
|
69
|
+
end
|
51
70
|
```
|
52
71
|
|
53
72
|
### Remove old way to define callback of list
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Thinreports Generator
|
1
|
+
# Thinreports Generator
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/thinreports.svg)](http://badge.fury.io/rb/thinreports)
|
4
4
|
[![](http://img.shields.io/travis/thinreports/thinreports-generator.svg?style=flat)](http://travis-ci.org/thinreports/thinreports-generator)
|
@@ -15,15 +15,14 @@
|
|
15
15
|
* [Installation Guide](http://www.thinreports.org/documentation/getting-started/installation.html)
|
16
16
|
* [Quick Start Guide](http://www.thinreports.org/documentation/getting-started/quickstart.html)
|
17
17
|
* [Examples](https://github.com/thinreports/thinreports-examples)
|
18
|
-
* [
|
18
|
+
* [Rails5 Example](https://github.com/thinreports/thinreports-rails5-example)
|
19
19
|
* [Changelog](https://github.com/thinreports/thinreports-generator/blob/master/CHANGELOG.md)
|
20
20
|
* [Discussion Group](https://groups.google.com/forum/#!forum/thinreports)
|
21
|
-
* [![Join the chat at https://gitter.im/thinreports/thinreports-generator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/thinreports/thinreports-generator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
22
21
|
|
23
22
|
## Supported versions
|
24
23
|
|
25
|
-
* Ruby 1
|
26
|
-
* JRuby 1.
|
24
|
+
* Ruby 2.1, 2.2, 2.3, 2.4
|
25
|
+
* JRuby 9.1.8.0
|
27
26
|
|
28
27
|
## Quick Reference
|
29
28
|
|
data/Rakefile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
1
|
require 'rake/testtask'
|
2
|
+
require 'rubocop/rake_task'
|
4
3
|
require 'yard'
|
5
4
|
|
5
|
+
task default: %i[test rubocop]
|
6
|
+
|
6
7
|
Rake::TestTask.new do |t|
|
7
8
|
t.libs << 'test'
|
8
9
|
t.test_files = Dir['test/unit/**/test_*.rb']
|
@@ -10,9 +11,9 @@ end
|
|
10
11
|
|
11
12
|
namespace :examples do
|
12
13
|
desc 'Run all examples'
|
13
|
-
task all
|
14
|
+
task :all do
|
14
15
|
require_relative 'examples/helper'
|
15
|
-
Dir['examples/*/*.rb'].each {|f| require_relative f }
|
16
|
+
Dir['examples/*/*.rb'].each { |f| require_relative f }
|
16
17
|
end
|
17
18
|
|
18
19
|
Dir['examples/*/*.rb'].each do |f|
|
@@ -24,10 +25,6 @@ namespace :examples do
|
|
24
25
|
require_relative "examples/#{casename}/#{casename}"
|
25
26
|
end
|
26
27
|
end
|
27
|
-
|
28
|
-
task :_init do
|
29
|
-
$:.push File.expand_path('../lib', __FILE__)
|
30
|
-
end
|
31
28
|
end
|
32
29
|
|
33
30
|
desc 'Run all examples'
|
@@ -37,3 +34,5 @@ YARD::Rake::YardocTask.new :doc do |yard|
|
|
37
34
|
yard.files = Dir['lib/**/*.rb']
|
38
35
|
yard.options = ['--readme', 'README.md']
|
39
36
|
end
|
37
|
+
|
38
|
+
RuboCop::RakeTask.new
|
@@ -1,10 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'open-uri'
|
4
4
|
|
5
5
|
example :dynamic_image, 'Show images dynamically' do
|
6
|
-
image50x50
|
7
|
-
image200x100
|
6
|
+
image50x50 = resource('img50x50.png')
|
7
|
+
image200x100 = resource('img200x100.png')
|
8
8
|
|
9
9
|
Thinreports::Report.generate filename: output_filename do |r|
|
10
10
|
r.use_layout(layout_filename)
|
data/examples/eudc/eudc.rb
CHANGED
data/examples/helper.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
example :palleted_png, 'Rendering a palleted PNG with transparency' do |t|
|
4
|
-
Thinreports.config.convert_palleted_transparency_png = true
|
5
|
-
|
6
4
|
report = Thinreports::Report.new layout: t.layout_filename
|
7
5
|
report.start_new_page do |page|
|
8
6
|
page.item(:image).src = t.resource('palleted_png.png')
|
data/lib/thinreports.rb
CHANGED
@@ -1,19 +1,20 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pathname'
|
2
4
|
|
3
5
|
module Thinreports
|
4
|
-
|
6
|
+
def self.root
|
7
|
+
@root ||= Pathname.new(__FILE__).join('..', '..')
|
8
|
+
end
|
5
9
|
end
|
6
10
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# Alias for Thinreports
|
19
|
-
ThinReports = Thinreports
|
11
|
+
require_relative 'thinreports/version'
|
12
|
+
require_relative 'thinreports/config'
|
13
|
+
require_relative 'thinreports/core/utils'
|
14
|
+
require_relative 'thinreports/core/errors'
|
15
|
+
require_relative 'thinreports/core/format/base'
|
16
|
+
require_relative 'thinreports/core/shape'
|
17
|
+
require_relative 'thinreports/core/utils'
|
18
|
+
require_relative 'thinreports/report'
|
19
|
+
require_relative 'thinreports/layout'
|
20
|
+
require_relative 'thinreports/generator/pdf'
|
data/lib/thinreports/config.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Thinreports
|
4
4
|
# @yield [config]
|
5
5
|
# @yieldparam [Thinreports::Configuration] config
|
6
6
|
def self.configure(&block)
|
7
|
-
Thinreports.call_block_in(
|
7
|
+
Thinreports.call_block_in(config, &block)
|
8
8
|
end
|
9
9
|
|
10
10
|
# @return [Thinreports::Configuration]
|
@@ -15,7 +15,6 @@ module Thinreports
|
|
15
15
|
class Configuration
|
16
16
|
def initialize
|
17
17
|
@fallback_fonts = []
|
18
|
-
@convert_palleted_transparency_png = false
|
19
18
|
end
|
20
19
|
|
21
20
|
# @return [Array<String>]
|
@@ -33,26 +32,5 @@ module Thinreports
|
|
33
32
|
def fallback_fonts=(font_names)
|
34
33
|
@fallback_fonts = font_names.is_a?(Array) ? font_names : [font_names]
|
35
34
|
end
|
36
|
-
|
37
|
-
# @return [Boolean]
|
38
|
-
# @see https://github.com/thinreports/thinreports-generator/pull/32
|
39
|
-
attr_reader :convert_palleted_transparency_png
|
40
|
-
|
41
|
-
# @param [Boolean]
|
42
|
-
# @example
|
43
|
-
# config.convert_palleted_transparency_png = true
|
44
|
-
# config.convert_palleted_transparency_png = false # default
|
45
|
-
# @see https://github.com/thinreports/thinreports-generator/pull/32
|
46
|
-
# @deprecated convert_palleted_transparency_png is deprecated and will be removed in thinreports-generator 1.0 with no replacement
|
47
|
-
def convert_palleted_transparency_png=(enable)
|
48
|
-
warn '[DEPRECATION] convert_palleted_transparency_png is deprecated' \
|
49
|
-
' and will be removed in thinreports-generator 1.0 with no replacement.' if enable
|
50
|
-
@convert_palleted_transparency_png = enable
|
51
|
-
end
|
52
|
-
|
53
|
-
# @return [Thinreports::Generator::Configuration]
|
54
|
-
def generator
|
55
|
-
@generator ||= Thinreports::Generator::Configuration.new
|
56
|
-
end
|
57
35
|
end
|
58
36
|
end
|
@@ -1,15 +1,14 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Thinreports
|
4
|
-
|
5
4
|
module Errors
|
6
5
|
class Basic < ::StandardError
|
7
6
|
end
|
8
7
|
|
9
8
|
class UnknownShapeStyleName < Basic
|
10
9
|
def initialize(style, availables)
|
11
|
-
super("The specified style name, '#{style}', cannot be used. "
|
12
|
-
"The available styles are #{availables.map{|s| ":#{s}"}.join(', ')}.")
|
10
|
+
super("The specified style name, '#{style}', cannot be used. " \
|
11
|
+
"The available styles are #{availables.map { |s| ":#{s}" }.join(', ')}.")
|
13
12
|
end
|
14
13
|
end
|
15
14
|
|
@@ -40,18 +39,9 @@ module Thinreports
|
|
40
39
|
end
|
41
40
|
end
|
42
41
|
|
43
|
-
class UnknownEventType < Basic
|
44
|
-
end
|
45
|
-
|
46
42
|
class UnknownLayoutId < Basic
|
47
43
|
end
|
48
44
|
|
49
|
-
class UnknownGeneratorType < Basic
|
50
|
-
def initialize(type)
|
51
|
-
super("The specified generator type, '#{type}', was not found.")
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
45
|
class UnsupportedColorName < Basic
|
56
46
|
end
|
57
47
|
|
@@ -60,12 +50,11 @@ module Thinreports
|
|
60
50
|
|
61
51
|
class IncompatibleLayoutFormat < Basic
|
62
52
|
def initialize(filename, fileversion, required_rules)
|
63
|
-
super("Generator #{Thinreports::VERSION} can not be built this file, "
|
64
|
-
"'#{File.basename(filename)}'. "
|
65
|
-
"This file is updated in the Editor of version '#{fileversion}', "
|
53
|
+
super("Generator #{Thinreports::VERSION} can not be built this file, " \
|
54
|
+
"'#{File.basename(filename)}'. " \
|
55
|
+
"This file is updated in the Editor of version '#{fileversion}', " \
|
66
56
|
"but Generator requires version #{required_rules}.")
|
67
57
|
end
|
68
58
|
end
|
69
59
|
end
|
70
|
-
|
71
60
|
end
|