jasper-rails 1.0.3 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTI0NjE3MDkwY2NhYjg2ZjY2NjQ1YjdlMjFlZTA0YjM2YmViZGNhYQ==
5
+ data.tar.gz: !binary |-
6
+ NjhlZjYzMTBiZTMwNGI4ZjcyN2Q3MzdjNTg3NzRiZWM0Y2VmYzczZQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NzUzYzBiYmU0NWYzYzhiYmI0MGRkZDI0NzQ2NGNjOGYxYjMwNmJjMjFmMzA1
10
+ ZjYxN2U2OTI3ZDQ3YTg4OTNkMDI4NDVlMTMzYjFjYjc3OTE5ODQ2ZTNhMTY5
11
+ MGY1MTY0NTVjYjBjOTE4MzQ0ZDhiNjgxMzFiMzI3Y2QwZDQ5NDA=
12
+ data.tar.gz: !binary |-
13
+ MTY3NDM5MTRkOWI4NWM2NWIwODhiNTU2YjY1OWMzNzI2ODhmNTIyMjhlMjZl
14
+ NWRmYzBmNDc3MjEyNjQzMWE2Mjg0ZDg2ZWU1Y2ExMDU4NDRjYTM5ZGMzZTEz
15
+ OGI3MzIxY2RlNzAzYTRhYWI3ODAxMDI0NGVmOTkzYzZkOTY0YjQ=
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'rjb', '>= 1.4.0'
4
-
5
3
  gemspec
data/README.md CHANGED
@@ -107,6 +107,9 @@ Check out: [jasper-rails-rspec](http://github.com/fortesinformatica/jasper-rails
107
107
  ## DEMO
108
108
  For a running example, just clone: [jasper-rails-demo](http://github.com/fortesinformatica/jasper-rails-demo).
109
109
 
110
+ ## Mailing List
111
+ For any discussion related to this gem, feel free to join the [mailing list](https://groups.google.com/forum/#!forum/jasper-rails).
112
+
110
113
  ## History
111
114
  This project was first developed at Grupo Fortes in 2011 and we have been using it in several projects since then.
112
115
  Pay attention that all the features it supports right now were based in those project's especific needs. Therefore you might find a lot of
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.authors = ["Marlus Saraiva", "Rodrigo Maia"]
9
9
  s.summary = %q{Rails and JasperReports integration}
10
10
  s.description = %q{Generate pdf reports on Rails using Jasper Reports reporting tool}
11
- s.email = "rodrigomaia@grupofortes.com.br"
11
+ s.email = "marlussaraiva@grupofortes.com.br"
12
12
  s.homepage = "https://github.com/fortesinformatica/jasper-rails"
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
@@ -16,7 +16,8 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ["lib"]
18
18
 
19
- s.add_dependency('rjb', '1.4.3')
19
+ s.add_dependency 'rjb-loader'
20
+ s.add_dependency 'nokogiri'
20
21
  s.add_development_dependency 'combustion', '~> 0.3.2'
21
22
  s.add_development_dependency "rspec-rails"
22
23
  s.add_development_dependency "jasper-rails-rspec"
@@ -22,135 +22,40 @@
22
22
 
23
23
  require "jasper-rails/version"
24
24
  require "rails"
25
+ require "nokogiri"
25
26
  require "rjb"
27
+ require "rjb-loader"
26
28
  require "action_controller/metal/responder"
27
29
 
28
- if Mime::Type.lookup_by_extension("pdf").nil?
29
- Mime::Type.register "application/pdf", :pdf
30
- end
30
+ require "jasper-rails/abstract_renderer"
31
+ require "jasper-rails/jasper_reports_renderer"
32
+ require "jasper-rails/default_renderer"
31
33
 
32
34
  module JasperRails
33
35
 
34
36
  class << self
35
37
  attr_accessor :config
36
38
  end
37
-
38
- classpath = '.'
39
- Dir["#{File.dirname(__FILE__)}/java/*.jar"].each do |jar|
40
- classpath << File::PATH_SEPARATOR + File.expand_path(jar)
41
- end
42
-
43
- Dir["lib/*.jar"].each do |jar|
44
- classpath << File::PATH_SEPARATOR + File.expand_path(jar)
45
- end
46
-
47
- Rjb::load( classpath, ['-Djava.awt.headless=true','-Xms128M', '-Xmx256M'] )
48
-
49
- Locale = Rjb::import 'java.util.Locale'
50
- JRException = Rjb::import 'net.sf.jasperreports.engine.JRException'
51
- JasperCompileManager = Rjb::import 'net.sf.jasperreports.engine.JasperCompileManager'
52
- JasperExportManager = Rjb::import 'net.sf.jasperreports.engine.JasperExportManager'
53
- JasperFillManager = Rjb::import 'net.sf.jasperreports.engine.JasperFillManager'
54
- JasperPrint = Rjb::import 'net.sf.jasperreports.engine.JasperPrint'
55
- JRXmlUtils = Rjb::import 'net.sf.jasperreports.engine.util.JRXmlUtils'
56
- JREmptyDataSource = Rjb::import 'net.sf.jasperreports.engine.JREmptyDataSource'
57
- # This is here to avoid the "already initialized constant QUERY_EXECUTER_FACTORY_PREFIX" warnings.
58
- JRXPathQueryExecuterFactory = silence_warnings{Rjb::import 'net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory'}
59
- InputSource = Rjb::import 'org.xml.sax.InputSource'
60
- StringReader = Rjb::import 'java.io.StringReader'
61
- HashMap = Rjb::import 'java.util.HashMap'
62
- ByteArrayInputStream = Rjb::import 'java.io.ByteArrayInputStream'
63
- JavaString = Rjb::import 'java.lang.String'
64
- JFreeChart = Rjb::import 'org.jfree.chart.JFreeChart'
65
-
66
- # Default report params
39
+
67
40
  self.config = {
68
- :report_params=>{
69
- "REPORT_LOCALE" => Locale.new('en', 'US'),
70
- "XML_LOCALE" => Locale.new('en', 'US'),
71
- "XML_DATE_PATTERN" => 'yyyy-MM-dd'
72
- }
41
+ :report_params => {},
42
+ :response_options => {}
73
43
  }
74
-
75
- module Jasper
76
- module Rails
77
- def self.render_pdf(jasper_file, datasource, parameters, options)
78
- options ||= {}
79
- parameters ||= {}
80
- jrxml_file = jasper_file.sub(/\.jasper$/, ".jrxml")
81
-
82
- begin
83
- # Converting default report params to java HashMap
84
- jasper_params = HashMap.new
85
- JasperRails.config[:report_params].each do |k,v|
86
- jasper_params.put(k, v)
87
- end
88
-
89
- # Convert the ruby parameters' hash to a java HashMap, but keeps it as
90
- # default when they already represent a JRB entity.
91
- # Pay attention that, for now, all other parameters are converted to string!
92
- parameters.each do |key, value|
93
- jasper_params.put(JavaString.new(key.to_s), parameter_value_of(value))
94
- end
95
-
96
- # Compile it, if needed
97
- if !File.exist?(jasper_file) || (File.exist?(jrxml_file) && File.mtime(jrxml_file) > File.mtime(jasper_file))
98
- JasperCompileManager.compileReportToFile(jrxml_file, jasper_file)
99
- end
100
-
101
- # Fill the report
102
- if datasource
103
- input_source = InputSource.new
104
- input_source.setCharacterStream(StringReader.new(datasource.to_xml(options).to_s))
105
- data_document = silence_warnings do
106
- # This is here to avoid the "already initialized constant DOCUMENT_POSITION_*" warnings.
107
- JRXmlUtils._invoke('parse', 'Lorg.xml.sax.InputSource;', input_source)
108
- end
109
-
110
- jasper_params.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, data_document)
111
- jasper_print = JasperFillManager.fillReport(jasper_file, jasper_params)
112
- else
113
- jasper_print = JasperFillManager.fillReport(jasper_file, jasper_params, JREmptyDataSource.new)
114
- end
115
-
116
- # Export it!
117
- JasperExportManager._invoke('exportReportToPdf', 'Lnet.sf.jasperreports.engine.JasperPrint;', jasper_print)
118
- rescue Exception=>e
119
- if e.respond_to? 'printStackTrace'
120
- ::Rails.logger.error e.message
121
- e.printStackTrace
122
- else
123
- ::Rails.logger.error e.message + "\n " + e.backtrace.join("\n ")
124
- end
125
- raise e
126
- end
127
- end
128
-
129
- # Returns the value without conversion when it's converted to Java Types.
130
- # When isn't a Rjb class, returns a Java String of it.
131
- def self.parameter_value_of(param)
132
- # Using Rjb::import('java.util.HashMap').new, it returns an instance of
133
- # Rjb::Rjb_JavaProxy, so the Rjb_JavaProxy parent is the Rjb module itself.
134
- if param.class.parent == Rjb
135
- param
136
- else
137
- JavaString.new(param.to_s)
138
- end
139
- end
44
+
45
+ RjbLoader.before_load do |config|
46
+ # This code changes the JVM classpath, so it has to run BEFORE loading Rjb.
47
+ Dir["#{File.dirname(__FILE__)}/java/*.jar"].each do |path|
48
+ config.classpath << File::PATH_SEPARATOR + File.expand_path(path)
140
49
  end
141
50
  end
142
-
143
- class ActionController::Responder
144
- def to_pdf
145
- jasper_file = "#{Rails.root.to_s}/app/views/#{controller.controller_path}/#{controller.action_name}.jasper"
146
-
147
- params = {}
148
- controller.instance_variables.each do |v|
149
- params[v.to_s[1..-1]] = controller.instance_variable_get(v)
150
- end
151
-
152
- controller.send_data Jasper::Rails::render_pdf(jasper_file, resource, params, options), :type => Mime::PDF
153
- end
51
+
52
+ RjbLoader.after_load do |config|
53
+ # This code needs java classes, so it has to run AFTER loading Rjb.
54
+ _Locale = Rjb::import 'java.util.Locale'
55
+ JasperRails.config[:report_params]["XML_LOCALE"] = _Locale.new('en', 'US')
56
+ JasperRails.config[:report_params]["REPORT_LOCALE"] = _Locale.new('en', 'US')
57
+ JasperRails.config[:report_params]["XML_DATE_PATTERN"] = 'yyyy-MM-dd'
58
+ JasperRails.config[:response_options][:disposition] = 'inline'
154
59
  end
155
-
60
+
156
61
  end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ module JasperRails
3
+
4
+ class AbstractRenderer
5
+ def self.register(file_extension, options = {}, &block)
6
+ renderer = self.new(file_extension, options, &block)
7
+
8
+ if Mime::Type.lookup_by_extension(file_extension).nil?
9
+ Mime::Type.register options[:mime_type], file_extension.to_sym
10
+ end
11
+
12
+ ActionController::Responder.send(:define_method, "to_#{file_extension}") do
13
+ jasper_file = "#{Rails.root.to_s}/app/views/#{controller.controller_path}/#{controller.action_name}.jasper"
14
+
15
+ params = {}
16
+ controller.instance_variables.each do |v|
17
+ params[v.to_s[1..-1]] = controller.instance_variable_get(v)
18
+ end
19
+
20
+ response_options = JasperRails.config[:response_options].merge(:type => options[:mime_type])
21
+ controller.send_data renderer.render(jasper_file, resource, params, self.options), response_options
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,48 @@
1
+ # -*- encoding: utf-8 -*
2
+ module JasperRails
3
+
4
+ class DefaultRenderer < JasperReportsRenderer
5
+
6
+ register :pdf, :mime_type => Mime::PDF do |jasper_print|
7
+ _JasperExportManager = Rjb::import 'net.sf.jasperreports.engine.JasperExportManager'
8
+ _JasperExportManager._invoke('exportReportToPdf', 'Lnet.sf.jasperreports.engine.JasperPrint;', jasper_print)
9
+ end
10
+
11
+ register :xls, :mime_type => 'application/vnd.ms-excel' do |jasper_print|
12
+ export jasper_print, 'net.sf.jasperreports.engine.export.JRXlsExporter'
13
+ end
14
+
15
+ register :odt, :mime_type => 'application/vnd.oasis.opendocument.text, application/x-vnd.oasis.opendocument.text' do |jasper_print|
16
+ export jasper_print, 'net.sf.jasperreports.engine.export.oasis.JROdtExporter'
17
+ end
18
+
19
+ # It looks like xhtml is already registered, but there's no Mime::XHTML. So we need this until we find another solution.
20
+ Mime::Type.register('text/html', :xhtml)
21
+ register :xhtml, :mime_type => 'text/html' do |jasper_print|
22
+ export jasper_print, 'net.sf.jasperreports.engine.export.JRXhtmlExporter'
23
+ end
24
+
25
+ register :swf, :mime_type => 'application/swf' do |jasper_print|
26
+ _JasperExportManager = Rjb::import 'net.sf.jasperreports.engine.JasperExportManager'
27
+ _JavaString = Rjb::import 'java.lang.String'
28
+
29
+ # Save it
30
+ temp_dir = Dir::mktmpdir
31
+ pdf_file = temp_dir + '/report.pdf'
32
+ swf_file = temp_dir + '/report.swf'
33
+ _JasperExportManager._invoke('exportReportToPdfFile', 'Lnet.sf.jasperreports.engine.JasperPrint;Ljava.lang.String;', jasper_print, _JavaString.new(pdf_file))
34
+
35
+ # Convert to swf
36
+ `pdf2swf -t -T9 -f -s storeallcharacters #{pdf_file} -o #{swf_file}`
37
+
38
+ # Get the stream
39
+ swf_stream = open(swf_file) { |f| f.read }
40
+
41
+ # Clean the mess
42
+ FileUtils.rm_rf temp_dir
43
+
44
+ swf_stream
45
+ end
46
+
47
+ end
48
+ end
@@ -0,0 +1,128 @@
1
+ # -*- encoding: utf-8 -*-
2
+ module JasperRails
3
+
4
+ class JasperReportsRenderer < AbstractRenderer
5
+ attr_accessor :file_extension
6
+ attr_accessor :options
7
+ attr_accessor :block
8
+
9
+ def initialize file_extension, options, &block
10
+ self.file_extension = file_extension
11
+ self.options = options
12
+ self.block = block
13
+ end
14
+
15
+ def compile jasper_file
16
+ _JasperCompileManager = Rjb::import 'net.sf.jasperreports.engine.JasperCompileManager'
17
+
18
+ jrxml_file = jasper_file.sub(/\.jasper$/, ".jrxml")
19
+
20
+ # Recursively compile subreports
21
+ Nokogiri::XML(open(jrxml_file)).css('subreport/subreportExpression').each do |subreport_expression_node|
22
+ subreport_file = subreport_expression_node.text[1..-2]
23
+
24
+ if Pathname.new(subreport_file).relative?
25
+ subreport_file = File.expand_path(File.join(File.dirname(jrxml_file), subreport_file))
26
+ end
27
+ compile(subreport_file)
28
+ end
29
+
30
+ # Compile it, if needed
31
+ if !File.exist?(jasper_file) || (File.exist?(jrxml_file) && File.mtime(jrxml_file) > File.mtime(jasper_file))
32
+ _JasperCompileManager.compileReportToFile(jrxml_file, jasper_file)
33
+ end
34
+ end
35
+
36
+ def fill(jasper_file, datasource, parameters, controller_options={})
37
+ _JRException = Rjb::import 'net.sf.jasperreports.engine.JRException'
38
+ _JasperFillManager = Rjb::import 'net.sf.jasperreports.engine.JasperFillManager'
39
+ _JasperPrint = Rjb::import 'net.sf.jasperreports.engine.JasperPrint'
40
+ _JRXmlUtils = Rjb::import 'net.sf.jasperreports.engine.util.JRXmlUtils'
41
+ _JREmptyDataSource = Rjb::import 'net.sf.jasperreports.engine.JREmptyDataSource'
42
+ # This is here to avoid the "already initialized constant QUERY_EXECUTER_FACTORY_PREFIX" warnings.
43
+ _JRXPathQueryExecuterFactory = silence_warnings{Rjb::import 'net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory'}
44
+ _InputSource = Rjb::import 'org.xml.sax.InputSource'
45
+ _StringReader = Rjb::import 'java.io.StringReader'
46
+ _HashMap = Rjb::import 'java.util.HashMap'
47
+ _ByteArrayInputStream = Rjb::import 'java.io.ByteArrayInputStream'
48
+ _String = Rjb::import 'java.lang.String'
49
+
50
+ parameters ||= {}
51
+
52
+ # Converting default report params to java HashMap
53
+ jasper_params = _HashMap.new
54
+ JasperRails.config[:report_params].each do |k,v|
55
+ jasper_params.put(k, v)
56
+ end
57
+
58
+ # Convert the ruby parameters' hash to a java HashMap, but keeps it as
59
+ # default when they already represent a JRB entity.
60
+ # Pay attention that, for now, all other parameters are converted to string!
61
+ parameters.each do |key, value|
62
+ jasper_params.put(_String.new(key.to_s), parameter_value_of(value))
63
+ end
64
+
65
+ # Fill the report
66
+ if datasource
67
+ input_source = _InputSource.new
68
+ input_source.setCharacterStream(_StringReader.new(datasource.to_xml(controller_options).to_s))
69
+ data_document = silence_warnings do
70
+ # This is here to avoid the "already initialized constant DOCUMENT_POSITION_*" warnings.
71
+ _JRXmlUtils._invoke('parse', 'Lorg.xml.sax.InputSource;', input_source)
72
+ end
73
+
74
+ jasper_params.put(_JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, data_document)
75
+ jasper_print = _JasperFillManager.fillReport(jasper_file, jasper_params)
76
+ else
77
+ jasper_print = _JasperFillManager.fillReport(jasper_file, jasper_params, _JREmptyDataSource.new)
78
+ end
79
+
80
+ end
81
+
82
+ def export jasper_print, jr_exporter
83
+ _ByteArrayOutputStream = Rjb::import 'java.io.ByteArrayOutputStream'
84
+ _JRExporter = Rjb::import jr_exporter
85
+ _JRExporterParameter = Rjb::import 'net.sf.jasperreports.engine.JRExporterParameter'
86
+
87
+ exporter = _JRExporter.new
88
+ baos = _ByteArrayOutputStream.new
89
+
90
+ exporter.setParameter(_JRExporterParameter.JASPER_PRINT, jasper_print);
91
+ exporter.setParameter(_JRExporterParameter.OUTPUT_STREAM, baos)
92
+ exporter.exportReport
93
+ baos.toByteArray
94
+ end
95
+
96
+ def render jasper_file, datasource, parameters, controller_options
97
+ begin
98
+ compile(jasper_file)
99
+ jasper_print = fill(jasper_file, datasource, parameters, controller_options)
100
+ instance_exec(jasper_print, &block)
101
+ rescue Exception=>e
102
+ if e.respond_to? 'printStackTrace'
103
+ ::Rails.logger.error e.message
104
+ e.printStackTrace
105
+ else
106
+ ::Rails.logger.error e.message + "\n " + e.backtrace.join("\n ")
107
+ end
108
+ raise e
109
+ end
110
+ end
111
+
112
+ private
113
+
114
+ # Returns the value without conversion when it's converted to Java Types.
115
+ # When isn't a Rjb class, returns a Java String of it.
116
+ def parameter_value_of(param)
117
+ _String = Rjb::import 'java.lang.String'
118
+ # Using Rjb::import('java.util.HashMap').new, it returns an instance of
119
+ # Rjb::Rjb_JavaProxy, so the Rjb_JavaProxy parent is the Rjb module itself.
120
+ if param.class.parent == Rjb
121
+ param
122
+ else
123
+ _String.new(param.to_s)
124
+ end
125
+ end
126
+
127
+ end
128
+ end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module JasperRails
3
- VERSION = "1.0.3"
3
+ VERSION = "2.0.0.beta1"
4
4
  end
metadata CHANGED
@@ -1,84 +1,92 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: jasper-rails
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 3
9
- version: 1.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0.beta1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Marlus Saraiva
13
8
  - Rodrigo Maia
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-01-28 00:00:00 -03:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: rjb
12
+ date: 2013-07-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rjb-loader
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
23
22
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- requirements:
26
- - - "="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 1
30
- - 4
31
- - 3
32
- version: 1.4.3
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: nokogiri
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
33
35
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: combustion
37
36
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- requirements:
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: combustion
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
40
46
  - - ~>
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- - 3
45
- - 2
47
+ - !ruby/object:Gem::Version
46
48
  version: 0.3.2
47
49
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rspec-rails
51
50
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- segments:
57
- - 0
58
- version: "0"
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: 0.3.2
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec-rails
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
59
63
  type: :development
60
- version_requirements: *id003
61
- - !ruby/object:Gem::Dependency
62
- name: jasper-rails-rspec
63
64
  prerelease: false
64
- requirement: &id004 !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- segments:
69
- - 0
70
- version: "0"
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: jasper-rails-rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
71
77
  type: :development
72
- version_requirements: *id004
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
73
84
  description: Generate pdf reports on Rails using Jasper Reports reporting tool
74
- email: rodrigomaia@grupofortes.com.br
85
+ email: marlussaraiva@grupofortes.com.br
75
86
  executables: []
76
-
77
87
  extensions: []
78
-
79
88
  extra_rdoc_files: []
80
-
81
- files:
89
+ files:
82
90
  - .gitignore
83
91
  - Gemfile
84
92
  - LICENSE.txt
@@ -87,6 +95,9 @@ files:
87
95
  - config.ru
88
96
  - jasper-rails.gemspec
89
97
  - lib/jasper-rails.rb
98
+ - lib/jasper-rails/abstract_renderer.rb
99
+ - lib/jasper-rails/default_renderer.rb
100
+ - lib/jasper-rails/jasper_reports_renderer.rb
90
101
  - lib/jasper-rails/version.rb
91
102
  - lib/java/commons-beanutils-1.8.2.jar
92
103
  - lib/java/commons-collections-3.2.1.jar
@@ -96,7 +107,7 @@ files:
96
107
  - lib/java/iText-2.1.7.jar
97
108
  - lib/java/jasperreports-5.0.0.jar
98
109
  - lib/java/jcommon-1.0.15.jar
99
- - lib/java/jfreechart-1.0.12.jar
110
+ - lib/java/poi-3.7-20101029.jar
100
111
  - lib/java/xalan.jar
101
112
  - spec/controllers/people_controller_spec.rb
102
113
  - spec/internal/app/controllers/people_controller.rb
@@ -111,37 +122,30 @@ files:
111
122
  - spec/internal/config/routes.rb
112
123
  - spec/internal/log/.gitignore
113
124
  - spec/spec_helper.rb
114
- has_rdoc: true
115
125
  homepage: https://github.com/fortesinformatica/jasper-rails
116
126
  licenses: []
117
-
127
+ metadata: {}
118
128
  post_install_message:
119
129
  rdoc_options: []
120
-
121
- require_paths:
130
+ require_paths:
122
131
  - lib
123
- required_ruby_version: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- segments:
128
- - 0
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- segments:
135
- - 0
136
- version: "0"
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ! '>'
140
+ - !ruby/object:Gem::Version
141
+ version: 1.3.1
137
142
  requirements: []
138
-
139
143
  rubyforge_project:
140
- rubygems_version: 1.3.6
144
+ rubygems_version: 2.0.3
141
145
  signing_key:
142
- specification_version: 3
146
+ specification_version: 4
143
147
  summary: Rails and JasperReports integration
144
- test_files:
148
+ test_files:
145
149
  - spec/controllers/people_controller_spec.rb
146
150
  - spec/internal/app/controllers/people_controller.rb
147
151
  - spec/internal/app/models/person.rb