Permalink
2a5ee71 Mar 10, 2018
3 contributors

Users who have contributed to this file

@hidakatsuya @znz @maeda-m
368 lines (256 sloc) 11.5 KB

0.10.2

Bug Fixes:

  • Fixed: Prawn::Errors::UnknownFont error occured: "is not a known font" #89

0.10.1

Bug Fixes:

  • Fixed a bug that an error occurred on page break in other list when there is a list with page-break disabled #87 [@meganemura]

0.10.0

  • Thinreports requires Prawn 2.2
  • Dropped Ruby 1.9.3 and 2.0.0 support
  • Fixed a bug line-height of a text line-wrapped is broken #36 [@tkobayashi0330]
  • Remove deprecated top-module ThinReports
  • Remove config.convert_palleted_transparency_png option
  • Remove config.generator.default option
  • Deprecate :report and :generator argument of Thinreports::Report.generate

Remove config.convert_palleted_transparency_png option

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.

Remove deprecated top-module ThinReports

Please use Thinreports instead.

0.9.1

  • Fixed bug that line-height of text-block is always set to 0 #68
  • Fixed a referenced text-block not rendered #68
  • Fixed #66 an error occurred when render list #68

0.9.0

  • Drop support for layout file saved with Editor v0.7 or lower #62
  • New format for layout file and deprecate old format #35
  • Fixed fail in rendering a static image #61
  • Make possible to set an image-data to image-block item #65
  • Remove old way to define callback of list #54
  • Remove config.eudc_fonts= option #53
  • Deprecate config.convert_palleted_transparency_png option #49

Drop support for layout file saved with Editor v0.7 or lower

Generator v0.9 or higher can't load the layout file saved with Editor v0.7 or lower.

New format for layout file and deprecate old format

This is a BIG internal change.

Thinreports has two format types for layout file now:

  1. Old format generated by Thinreports Editor 0.8.x or lower
  2. New format generated by Thinreports Editor 0.9.x or higher

thinreports-generator will supports as below:

Generator Format type(1) Format type(2)
=< 0.8 o x
0.9, 1.0 o o
>= 1.1 x o

See https://github.com/thinreports/thinreports/issues/4 for further details.

Make possible to set an image-data to image-block item

The following code works fine now.

png_image = StringIO.new(png_data)
page.item(:image_block).src(png_image)

require 'open-uri'
open('http://example.com/image.png') do |image_data|
  page.item(:image_block).src(image_data)
end

Remove old way to define callback of list

The block of Report::Base#use_layout never performed:

report.use_layout 'foo.tlf' do |config|
  config.events.on(:page_create) { ... }
  config.list.events.on(:footer_insert) { ... }
end

List#store and List#events has been removed:

report.list.store.foo += 1 # => NoMethodError
report.list.events.on(:footer_insert) { ... } # => NoMethodError

Layout::Base#config has been removed:

report.default_layout.config { ... } # => NoMethodError

You can use the following method instead:

  • Report::Base#on_page_create
  • List#on_page_finalize
  • List#on_footer_insert
  • List#on_page_footer_insert

See https://github.com/thinreports/thinreports-generator/tree/master/examples/list_events.

Remove config.eudc_fonts= option

Thinreports.config.eudc_fonts = true # => NoMethodError

You can use config.fallback_fonts instead.

Deprecate config.convert_palleted_transparency_png option

Thinreports.config.convert_palleted_transparency_png = true # => warn "[DEPRECATION]"

This is option to enable palette-based transparency PNG support. The option will be removed in version 1.0, but thinreports will support the feature by default. Please see PR#32 for detailed the feature.

0.8.2

  • Fixed: some Ruby warnings (#40, #41, #43) [Akira Matsuda, Katsuya Hidaka]
  • Some code improvements

0.8.1

Add OPTIONAL feature for converting a palette-based PNG w. transparency

This feature is DISABLED by default. Please see PR#32 for further details.

0.8.0

This release is a stepping stone to next major version 1.0.0 release.

  • Upgrade to Prawn 1.3 and drop support for Ruby 1.8.7 (#11)
  • Change name of root module to Thinreports from ThinReports (#15)
  • Implement Item#value= method (#20)
  • Implement new list callbacks (#17)
  • Implement page[:item_id]= as alias for page.item(:item_id).value= (#22)
  • Support font-size style for Text and TextBlock (#23)
  • Support for setting the default fallback font (#7)
  • Remove Report#generate_file method (#13)
  • Deprecate Report#events, and implement new callbacks (#18)
  • Deprecate List#events, recommend to use List#on_page_finalize callback or create manually (#9)

Upgrade to Prawn 1.3 and drop support for Ruby 1.8.7

We have dropped support for MRI 1.8.7 and 1.8 mode JRuby by upgrading to Prawn 1.3. Currently supported versions are MRI 1.9.3 and 2.0.0 or higher, JRuby(1.9 mode) 1.7 or higher.

Change name of root module to Thinreports from ThinReports

We have changed name of root module to Thinreports from ThinReports. Old name ThinReports has been enabling as alias, but it will be removed in the next major release.

Deprecate List#events and List#store

List#events and List#store have been deprecated.

report.layout.config.list do |list|
  list.events.on :page_footer_insert do |e|
    # ...
  end
  # => warn: "[DEPRECATION] ..."

  list.events.on :footer_insert do |e|
    # ...
  end
  # => warn: "[DEPRECATION] ..."

  list.events.on :page_finalize do |e|
    # ...
  end
  # => warn: "[DEPRECATION] ..."
end

list.store.price += 0 # => warn: "[DEPRECATION] ..."

Please use new callbacks instead:

report.list do |list|
  price = 0

  list.on_page_footer_insert do |footer|
    footer.item(:price).value = price
  end

  list.on_footer_insert do |footer|
    # ...
  end

  list.on_page_finalize do
    # ...
  end
end

See Issue #17, Issue #9 and examples/list_events for further details.

Deprecate Report#events, and implement new callbacks

Report#events has been deprecated:

report.events.on :page_create do |e|
  e.page.item(:text1).value('Text1')
end
# => warn: "[DEPRECATION] ..."

report.events.on :generate do |e|
  e.pages.each do |page|
    page.item(:text2).value('Text2')
  end
end
# => warn: "[DEPRECATION] ..."

Please use Report#on_page_create callback instead. However Report#on_generate callback has not been implemented, but you can do the same things using Report#pages method.

report.on_page_create do |page|
  page.item(:text1).value('Text1')
end

report.pages.each do |page|
  page.item(:text2).value('Text2')
end

report.generate filename: 'foo.pdf'

See Issue #18 for further details.

Implement page[:item_id]= as alias for page.item(:item_id).value= (#22)

# New setter, same as `page.item(:text_block).value = 'tblock value'`
page[:text_block] = 'tblock value'
# New getter, same as `page.item(:text_block).value`
page[:text_block] # => <Tblock>
page[:text_block].value # => "tblock value"
page.item(:text_block).value # => "tblock value"

page[:image_block] = '/path/to/image.png'
page[:image_block].src # => "/path/to/image.png"
page.item(:image_block).src # => "/path/to/image.png"

See Issue #22 for further details.

Implement Item#value= method

page.item(:text_block).value('value')
page.item(:text_block).value = 'value'
page.item(:image_block).src('/path/to/image.tlf')
page.item(:image_block).src = '/path/to/image.tlf'

See Issue #20 for further details.

Support font-size style for Text and TextBlock

page.item(:text).style(:font_size, 20)
page.item(:text_block).style(:font_size, 20)
page.item(:text_block).style(:font_size) # => 20

See Issue #23 for further details.

Support for setting the default fallback font

Please see Issue #7 for further details.

0.7.7.1

  • No release for generator

0.7.7

Features

  • ページ番号ツール [Katsuya Hidaka]
  • New "Word-wrap" property of TextBlock [Katsuya Hidaka]
  • B4/B5 の ISO サイズを追加 [Takumi FUJISE / Minoru Maeda / Katsuya Hidaka]
  • generate filename: 'foo.pdf' を実装、#generate_file を非推奨へ [Katsuya Hidaka]
  • start_new_page layout: 'file.tlf' でもデフォルトレイアウトが設定されるよう改善 [Eito Katagiri / Katsuya Hidaka]

Bug fixes

  • Report#use_layout で list の設定を行うとエラーが発生する [Katsuya Hidaka]
  • Layout::Format#page_margin_right が不正な値を返す [Katsuya Hidaka]
  • セキュリティを設定した PDF を印刷すると "このページにはエラーがあります..." メッセージが表示される [Katsuya Hidaka]
  • B4 サイズで出力した PDF の用紙サイズが正しくない [Takumi FUJISE / Katsuya Hidaka]

0.7.6

Features

  • デフォルトレイアウトを書き換え可能へ変更 [Katsuya Hidaka]

Bug fixes

  • Fix raise NoMethodError when has no default layout [Katsuya Hidaka]

0.7.5

Features

  • テキストブロックのオーバフロープロパティ [Katsuya Hidaka]
  • list メソッドのデフォルト id と Report#list の追加 [Katsuya Hidaka]

Bug fixes

  • gem install 時にRDoc生成時のエラーが表示される場合がある [Katsuya Hidaka]
  • エディターにて一覧表ツールのヘッダーを使わない場合の動作について [吉田 和弘 / Katsuya Hidaka]

0.7.0

Features

  • Listに :page_finalize イベントを追加
  • ダイナミックスタイルの拡充
  • イメージブロックの実装
  • Tblockで行間、横位置、縦位置、文字間隔の指定を可能に
  • Prawn 0.12.0 を採用
  • メタ情報のタイトルに反映
  • Example Test環境の構築
  • 外字の埋め込みサポート
  • clean taskの削除
  • YARD Docのテンプレート追加
  • ロードするprawnのバージョンを固定
  • .generate, .generate_fileメソッドのオプション指定をフラット化
  • 単行モードテキストブロックがレイアウトで定義した「高さ」の影響を受けないように
  • PXD形式の出力フォーマット廃止とデフォルトタイプの導入
  • $KCODEによる文字カウント処理の改善
  • List#headerの挙動を改善
  • Errors::UnknownItemId 時のエラーメッセージを分かりやすく
  • テスト漏れに対するテストコード作成とテスト

Bug fixes

  • フッターが挿入時、リスト領域をオーバフローしない場合でも改ページされる場合がある
  • Tblockで基本書式のみ設定されている場合、その書式が反映されない
  • Tblockがフォントサイズに対して小さすぎる場合にエラー