thinreports-rails 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +23 -5
- data/README.md +10 -11
- data/gemfiles/Gemfile-rails.5.0.x +4 -0
- data/gemfiles/Gemfile-rails.5.1.x +3 -0
- data/lib/thinreports-rails/template_handler.rb +3 -4
- data/lib/thinreports-rails/version.rb +1 -1
- data/test/thinreports-rails_test.rb +1 -2
- data/thinreports-rails.gemspec +4 -4
- metadata +10 -9
- data/CHANGELOG +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97d28ba1835e73d94428582f572717934b311a17
|
4
|
+
data.tar.gz: c4cbc38997e90b1ed60ac0bec5758fa9ff5756d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10a19339cc4a8eedb79161c33c4415bcf13f82f0201a1d519f3a96868d2212039509256753b8c2b4461434c4a58879dc306a0c4ab4fb9d7238dce1356b3974ae
|
7
|
+
data.tar.gz: e10e97c23897dd27bafaf35ecae29e598c7e4cdfb36fcfe55d0340ce173358d296a292b9f0904604feebc764653d4892294751e1775b15cdafcef5d09b5e0d10
|
data/.travis.yml
CHANGED
@@ -5,11 +5,11 @@ script: ruby test/thinreports-rails_test.rb
|
|
5
5
|
sudo: false
|
6
6
|
|
7
7
|
rvm:
|
8
|
+
- 2.4.1
|
8
9
|
- 2.3.1
|
10
|
+
- 2.2.4
|
9
11
|
- 2.2
|
10
12
|
- 2.1
|
11
|
-
- 2.0
|
12
|
-
- 1.9.3
|
13
13
|
|
14
14
|
gemfile:
|
15
15
|
- gemfiles/Gemfile-rails.3.0.x
|
@@ -18,8 +18,26 @@ gemfile:
|
|
18
18
|
- gemfiles/Gemfile-rails.4.0.x
|
19
19
|
- gemfiles/Gemfile-rails.4.1.x
|
20
20
|
- gemfiles/Gemfile-rails.4.2.x
|
21
|
+
- gemfiles/Gemfile-rails.5.0.x
|
22
|
+
- gemfiles/Gemfile-rails.5.1.x
|
21
23
|
|
22
24
|
matrix:
|
23
|
-
|
24
|
-
- rvm: 1
|
25
|
-
|
25
|
+
exclude:
|
26
|
+
- rvm: 2.1
|
27
|
+
gemfile: gemfiles/Gemfile-rails.5.0.x
|
28
|
+
- rvm: 2.1
|
29
|
+
gemfile: gemfiles/Gemfile-rails.5.1.x
|
30
|
+
- rvm: 2.2
|
31
|
+
gemfile: gemfiles/Gemfile-rails.5.0.x
|
32
|
+
- rvm: 2.2
|
33
|
+
gemfile: gemfiles/Gemfile-rails.5.1.x
|
34
|
+
- rvm: 2.4.1
|
35
|
+
gemfile: gemfiles/Gemfile-rails.3.0.x
|
36
|
+
- rvm: 2.4.1
|
37
|
+
gemfile: gemfiles/Gemfile-rails.3.1.x
|
38
|
+
- rvm: 2.4.1
|
39
|
+
gemfile: gemfiles/Gemfile-rails.3.2.x
|
40
|
+
- rvm: 2.4.1
|
41
|
+
gemfile: gemfiles/Gemfile-rails.4.0.x
|
42
|
+
- rvm: 2.4.1
|
43
|
+
gemfile: gemfiles/Gemfile-rails.4.1.x
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ThinreportsRails
|
2
|
-
|
2
|
+
ThinreportsRails is constructed by Rails Template Handler [ThinReports](http://www.thinreports.org/ "ThinReposts") the PDF.
|
3
3
|
|
4
4
|
[![Build Status](https://travis-ci.org/takeshinoda/thinreports-rails.svg?branch=master)](https://travis-ci.org/takeshinoda/thinreports-rails)
|
5
5
|
|
@@ -8,9 +8,9 @@ Oldname: thinreports-handler
|
|
8
8
|
|
9
9
|
## Supported versions
|
10
10
|
|
11
|
-
* Ruby
|
12
|
-
* Rails 3.X, 4.X
|
13
|
-
* ThinReports 0.
|
11
|
+
* Ruby 2.1.X, 2.2.X, 2.3.X
|
12
|
+
* Rails 3.X, 4.X, 5.X
|
13
|
+
* ThinReports 0.10.0 or later
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
@@ -41,7 +41,7 @@ end
|
|
41
41
|
|
42
42
|
#### Views
|
43
43
|
|
44
|
-
app/views/orders/index.pdf.thinreports
|
44
|
+
app/views/orders/index.pdf.thinreports
|
45
45
|
|
46
46
|
``` ruby
|
47
47
|
report.start_new_page
|
@@ -61,7 +61,7 @@ class OrdersController < ApplicationController
|
|
61
61
|
def index
|
62
62
|
@orders = Order.all
|
63
63
|
respond_to do |format|
|
64
|
-
format.pdf {
|
64
|
+
format.pdf {
|
65
65
|
send_data render_to_string, filename: 'foo.pdf', type: 'application/pdf', disposition: 'attachment'
|
66
66
|
}
|
67
67
|
end
|
@@ -69,7 +69,7 @@ class OrdersController < ApplicationController
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
-
### Configuration
|
72
|
+
### Configuration
|
73
73
|
|
74
74
|
### Layout file(.tlf) and options.
|
75
75
|
|
@@ -84,13 +84,13 @@ report.set_layout tlf: 'reports/index', layout_options: { default: true }
|
|
84
84
|
|
85
85
|
### generate options.
|
86
86
|
``` ruby
|
87
|
-
report.generate_options(security: {
|
87
|
+
report.generate_options(security: {
|
88
88
|
user_password: 'foo',
|
89
89
|
owner_password: 'bar',
|
90
|
-
permissions: {
|
90
|
+
permissions: {
|
91
91
|
print_document: false,
|
92
92
|
modify_contents: false,
|
93
|
-
copy_contents: false
|
93
|
+
copy_contents: false
|
94
94
|
}
|
95
95
|
})
|
96
96
|
```
|
@@ -116,4 +116,3 @@ m(__)m, send me pull request.
|
|
116
116
|
## Copyright
|
117
117
|
|
118
118
|
Copyright (c) 2012 Takeshi Shinoda.
|
119
|
-
|
@@ -4,7 +4,7 @@ require 'active_support/core_ext'
|
|
4
4
|
require 'thinreports'
|
5
5
|
|
6
6
|
module ThinreportsRails
|
7
|
-
class ThinreportsTemplate < SimpleDelegator
|
7
|
+
class ThinreportsTemplate < SimpleDelegator
|
8
8
|
attr_accessor :_generate_options
|
9
9
|
|
10
10
|
def initialize(thinreports_report_base_obj, template_context, template_virtual_path)
|
@@ -56,8 +56,8 @@ module ThinreportsRails
|
|
56
56
|
#{template.source}
|
57
57
|
else
|
58
58
|
generate_options = nil
|
59
|
-
|
60
|
-
report = ThinreportsRails::ThinreportsTemplate.new(__report__, self, '#{template.virtual_path}')
|
59
|
+
Thinreports::Report.create do |__report__|
|
60
|
+
report = ThinreportsRails::ThinreportsTemplate.new(__report__, self, '#{template.virtual_path}')
|
61
61
|
report.set_layout :allow_no_layout => true
|
62
62
|
|
63
63
|
#{template.source}
|
@@ -71,4 +71,3 @@ module ThinreportsRails
|
|
71
71
|
end
|
72
72
|
|
73
73
|
ActionView::Template.register_template_handler :thinreports, ThinreportsRails::TemplateHandler
|
74
|
-
|
@@ -18,7 +18,7 @@ require 'rails/test_help'
|
|
18
18
|
require 'thinreports-rails'
|
19
19
|
require 'test_app/test_app'
|
20
20
|
|
21
|
-
class
|
21
|
+
class ThinreportsRailsTest < ActionController::TestCase
|
22
22
|
tests OrdersController
|
23
23
|
|
24
24
|
test 'index.tlf is selected.' do
|
@@ -40,4 +40,3 @@ class ThinReportsRailsTest < ActionController::TestCase
|
|
40
40
|
assert_raise(ActionView::Template::Error) { get :no_tlf, :format => :pdf }
|
41
41
|
end
|
42
42
|
end
|
43
|
-
|
data/thinreports-rails.gemspec
CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/thinreports-rails/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Takeshi Shinoda"]
|
6
6
|
gem.email = ["takeshinoda@gmail.com"]
|
7
|
-
gem.description = %q{Rails plugin for
|
8
|
-
gem.summary = %q{Rails plugin for
|
7
|
+
gem.description = %q{Rails plugin for ThinReports DSL. This plugin can write DSL to View.}
|
8
|
+
gem.summary = %q{Rails plugin for ThinReports DSL.}
|
9
9
|
gem.homepage = "https://github.com/takeshinoda/thinreports-rails"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
@@ -14,8 +14,8 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.name = "thinreports-rails"
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = ThinreportsRails::VERSION
|
17
|
-
gem.add_dependency "thinreports", '>= 0.9.1'
|
18
17
|
|
19
|
-
gem.
|
18
|
+
gem.add_runtime_dependency "thinreports", '>= 0.10'
|
19
|
+
gem.add_development_dependency 'bundler', '>= 1.7'
|
20
20
|
end
|
21
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thinreports-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi Shinoda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thinreports
|
@@ -16,29 +16,29 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.10'
|
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: 0.
|
26
|
+
version: '0.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.7'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
41
|
-
description: Rails plugin for
|
40
|
+
version: '1.7'
|
41
|
+
description: Rails plugin for ThinReports DSL. This plugin can write DSL to View.
|
42
42
|
email:
|
43
43
|
- takeshinoda@gmail.com
|
44
44
|
executables: []
|
@@ -47,7 +47,6 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
49
|
- ".travis.yml"
|
50
|
-
- CHANGELOG
|
51
50
|
- Gemfile
|
52
51
|
- LICENSE
|
53
52
|
- README.md
|
@@ -57,6 +56,8 @@ files:
|
|
57
56
|
- gemfiles/Gemfile-rails.4.0.x
|
58
57
|
- gemfiles/Gemfile-rails.4.1.x
|
59
58
|
- gemfiles/Gemfile-rails.4.2.x
|
59
|
+
- gemfiles/Gemfile-rails.5.0.x
|
60
|
+
- gemfiles/Gemfile-rails.5.1.x
|
60
61
|
- lib/thinreports-rails.rb
|
61
62
|
- lib/thinreports-rails/railtie.rb
|
62
63
|
- lib/thinreports-rails/template_handler.rb
|
@@ -95,7 +96,7 @@ rubyforge_project:
|
|
95
96
|
rubygems_version: 2.5.1
|
96
97
|
signing_key:
|
97
98
|
specification_version: 4
|
98
|
-
summary: Rails plugin for
|
99
|
+
summary: Rails plugin for ThinReports DSL.
|
99
100
|
test_files:
|
100
101
|
- test/test_app/app/views/orders/_header.pdf.thinreports
|
101
102
|
- test/test_app/app/views/orders/_other_header.pdf.thinreports
|
data/CHANGELOG
DELETED