beardley 0.6.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c861d9002367ff411c0848fe36a4a0a06b7524a3
4
+ data.tar.gz: 3a3962f180ea244c2a8308b19a0e1c33fee82567
5
+ SHA512:
6
+ metadata.gz: 4077886b73835d418eb85db28e2532f6ff14800da52b06a1be65a61cd78cf840708b37979b3da2a3dcf8ac5dad94e89770ff4ca6bf82f9a6311b853ed25edcd3
7
+ data.tar.gz: fb32156fe108d8ab99681115b81ec82a7a6d9043d93bbad29b548d680c74842a7a6c9143c4b53d5e8eef0d4386daed8352d4692b491c45bf75c41f515a3fa8fc
@@ -42,14 +42,18 @@ module Beardley
42
42
  end
43
43
  end
44
44
  @object_file ||= @source_file.dirname.join(@source_file.basename.to_s + ".jasper")
45
- raise ArgumentError.new("An object must be given at least") unless @object_file.is_a?(Pathname)
45
+ unless @object_file.is_a?(Pathname)
46
+ raise ArgumentError, "An object must be given at least"
47
+ end
46
48
  end
47
49
 
48
50
  # Export report to PDF with given datasource
49
51
  def to_pdf(*args)
50
52
  options = extract_options!(args)
51
53
  datasource = args[0]
52
- return JasperExportManager._invoke('exportReportToPdf', 'Lnet.sf.jasperreports.engine.JasperPrint;', prepare(datasource))
54
+ _JasperPrint = Rjb::import('net.sf.jasperreports.engine.JasperPrint')
55
+ _JasperExportManager = Rjb::import('net.sf.jasperreports.engine.JasperExportManager')
56
+ return _JasperExportManager._invoke('exportReportToPdf', 'Lnet.sf.jasperreports.engine.JasperPrint;', prepare(datasource))
53
57
  end
54
58
 
55
59
  # Export report to ODT with given datasource
@@ -87,9 +91,10 @@ module Beardley
87
91
  options = extract_options!(args)
88
92
  datasource = args[0]
89
93
  file = Tempfile.new("to_#{format}")
90
- exporter = Beardley.const_get("JR#{format.to_s.capitalize}Exporter").new
91
- exporter.setParameter(JRExporterParameter.JASPER_PRINT, prepare(datasource))
92
- exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, file.path.to_s)
94
+ exporter = Beardley.with_warnings { Rjb::import(Beardley.exporters[format]) }.new
95
+ _JRExporterParameter = Rjb::import('net.sf.jasperreports.engine.JRExporterParameter')
96
+ exporter.setParameter(_JRExporterParameter.JASPER_PRINT, prepare(datasource))
97
+ exporter.setParameter(_JRExporterParameter.OUTPUT_FILE_NAME, file.path.to_s)
93
98
  exporter.exportReport
94
99
  file.rewind
95
100
  report = file.read
@@ -106,7 +111,8 @@ module Beardley
106
111
  def prepare(datasource = nil)
107
112
  # Compile it, if needed
108
113
  if @source_file && ((!@object_file.exist? && @source_file.exist?) || (@source_file.exist? && @source_file.mtime > @object_file.mtime))
109
- JasperCompileManager.compileReportToFile(@source_file.to_s, @object_file.to_s)
114
+ _JasperCompileManager = Rjb::import('net.sf.jasperreports.engine.JasperCompileManager')
115
+ _JasperCompileManager.compileReportToFile(@source_file.to_s, @object_file.to_s)
110
116
  end
111
117
  load_datasource(datasource)
112
118
  end
@@ -114,8 +120,11 @@ module Beardley
114
120
 
115
121
  # Build the default parameters Hash for printing
116
122
  def prepare_params
123
+ _HashMap = Rjb::import('java.util.HashMap')
124
+ _JavaString = Rjb::import('java.lang.String')
125
+
117
126
  # Converting default report params to java HashMap
118
- params = HashMap.new
127
+ params = _HashMap.new
119
128
  Beardley.config[:report_params].each do |k,v|
120
129
  params.put(k, v)
121
130
  end
@@ -124,7 +133,7 @@ module Beardley
124
133
  # default when they already represent a JRB entity.
125
134
  # Pay attention that, for now, all other parameters are converted to string!
126
135
  @parameters.each do |key, value|
127
- params.put(JavaString.new(key.to_s), parameter_value_of(value))
136
+ params.put(_JavaString.new(key.to_s), parameter_value_of(value))
128
137
  end
129
138
 
130
139
  return params
@@ -136,12 +145,16 @@ module Beardley
136
145
 
137
146
  # Parse and load XML as datasource
138
147
  if datasource
139
- input_source = InputSource.new
140
- input_source.setCharacterStream(StringReader.new(datasource.to_s))
148
+ _InputSource = Rjb::import('org.xml.sax.InputSource')
149
+ _StringReader = Rjb::import('java.io.StringReader')
150
+ _JRXmlUtils = Rjb::import('net.sf.jasperreports.engine.util.JRXmlUtils')
151
+ _JRXPathQueryExecuterFactory = Beardley.with_warnings { Rjb::import('net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory') }
152
+ input_source = _InputSource.new
153
+ input_source.setCharacterStream(_StringReader.new(datasource.to_s))
141
154
  data_document = Beardley.with_warnings do
142
- JRXmlUtils._invoke('parse', 'Lorg.xml.sax.InputSource;', input_source)
155
+ _JRXmlUtils._invoke('parse', 'Lorg.xml.sax.InputSource;', input_source)
143
156
  end
144
- jasper_params.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, data_document)
157
+ jasper_params.put(_JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, data_document)
145
158
  end
146
159
 
147
160
  # Build JasperPrint
@@ -151,10 +164,12 @@ module Beardley
151
164
 
152
165
  # Fill the report with valid method depending on datasource
153
166
  def fill_report(params, datasource = nil)
167
+ _JasperFillManager = Rjb::import('net.sf.jasperreports.engine.JasperFillManager')
154
168
  if datasource
155
- return JasperFillManager.fillReport(@object_file.to_s, params)
169
+ return _JasperFillManager.fillReport(@object_file.to_s, params)
156
170
  else
157
- return JasperFillManager.fillReport(@object_file.to_s, params, JREmptyDataSource.new)
171
+ _JREmptyDataSource = Rjb::import('net.sf.jasperreports.engine.JREmptyDataSource')
172
+ return _JasperFillManager.fillReport(@object_file.to_s, params, _JREmptyDataSource.new)
158
173
  end
159
174
  end
160
175
 
@@ -167,7 +182,7 @@ module Beardley
167
182
  if param.class.parent == Rjb
168
183
  param
169
184
  else
170
- JavaString.new(param.to_s)
185
+ Rjb::import('java.lang.String').new(param.to_s)
171
186
  end
172
187
  end
173
188
 
@@ -1,9 +1,9 @@
1
1
  # encoding: utf-8
2
2
  module Beardley
3
3
  module VERSION
4
- MAJOR = 0
5
- MINOR = 6
6
- PATCH = 3
4
+ MAJOR = 1
5
+ MINOR = 0
6
+ PATCH = 0
7
7
  PRE = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
data/lib/beardley.rb CHANGED
@@ -22,20 +22,21 @@
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
24
  require "beardley/version"
25
- require "beardley/core"
26
- require "beardley/groovy"
27
- require "beardley/barcode"
28
- require "beardley/batik"
29
- require "beardley/xml"
25
+ # require "beardley/core"
26
+ # require "beardley/groovy"
27
+ # require "beardley/barcode"
28
+ # require "beardley/batik"
29
+ # require "beardley/xml"
30
30
  require "pathname"
31
31
  require "digest"
32
32
  require "rjb"
33
+ require "rjb-loader"
33
34
 
34
35
 
35
36
  module Beardley
36
37
 
37
38
  class << self
38
- attr_accessor :config
39
+ attr_accessor :config, :exporters
39
40
 
40
41
  # Changes the level of verbosity
41
42
  def with_warnings(flag = nil)
@@ -47,48 +48,65 @@ module Beardley
47
48
 
48
49
  end
49
50
 
50
- Rjb::load((["."] +
51
- Beardley::Core.classpath +
52
- Beardley::Groovy.classpath +
53
- Beardley::Barcode.classpath +
54
- Beardley::XML.classpath +
55
- Beardley::Batik.classpath).join(File::PATH_SEPARATOR),
56
- ['-Djava.awt.headless=true', '-Xms128M', '-Xmx256M'])
51
+ # Default report params
52
+ self.config = {
53
+ report_params: {}
54
+ }
55
+ self.exporters = {
56
+ odt: 'net.sf.jasperreports.engine.export.oasis.JROdtExporter',
57
+ ods: 'net.sf.jasperreports.engine.export.oasis.JROdsExporter',
58
+ csv: 'net.sf.jasperreports.engine.export.JRCsvExporter',
59
+ docx: 'net.sf.jasperreports.engine.export.ooxml.JRDocxExporter',
60
+ xlsx: 'net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter'
61
+ }
62
+
63
+ RjbLoader.before_load do |config|
64
+ Dir[Pathname.new(__FILE__).dirname.join("..", "vendor", "java", "*.jar")].each do |path|
65
+ config.classpath << File::PATH_SEPARATOR + File.expand_path(path)
66
+ end
67
+ end
68
+
69
+ RjbLoader.after_load do |config|
70
+ _Locale = Rjb::import('java.util.Locale')
71
+ Beardley.config[:report_params]["REPORT_LOCALE"] = _Locale.new('en', 'US')
72
+ Beardley.config[:report_params]["XML_LOCALE"] = _Locale.new('en', 'US')
73
+ Beardley.config[:report_params]["XML_DATE_PATTERN"] = 'yyyy-MM-dd'
74
+ end
57
75
 
58
- Locale = Rjb::import('java.util.Locale')
76
+ autoload :Report, 'beardley/report'
59
77
 
60
- JRException = Rjb::import('net.sf.jasperreports.engine.JRException')
61
- JRExporterParameter = Rjb::import('net.sf.jasperreports.engine.JRExporterParameter')
62
- JRXmlUtils = Rjb::import('net.sf.jasperreports.engine.util.JRXmlUtils')
63
- JRXPathQueryExecuterFactory = with_warnings { Rjb::import('net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory') }
64
- JREmptyDataSource = Rjb::import('net.sf.jasperreports.engine.JREmptyDataSource')
65
- JROdtExporter = Rjb::import('net.sf.jasperreports.engine.export.oasis.JROdtExporter')
66
- JROdsExporter = Rjb::import('net.sf.jasperreports.engine.export.oasis.JROdsExporter')
67
- JRCsvExporter = Rjb::import('net.sf.jasperreports.engine.export.JRCsvExporter')
68
- JRDocxExporter = Rjb::import('net.sf.jasperreports.engine.export.ooxml.JRDocxExporter')
69
- JRXlsxExporter = Rjb::import('net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter')
78
+ # Rjb::load((["."] +
79
+ # Beardley::Core.classpath +
80
+ # Beardley::Groovy.classpath +
81
+ # Beardley::Barcode.classpath +
82
+ # Beardley::XML.classpath +
83
+ # Beardley::Batik.classpath).join(File::PATH_SEPARATOR),
84
+ # ['-Djava.awt.headless=true', '-Xms128M', '-Xmx256M'])
70
85
 
71
- JasperCompileManager = Rjb::import('net.sf.jasperreports.engine.JasperCompileManager')
72
- JasperExportManager = Rjb::import('net.sf.jasperreports.engine.JasperExportManager')
73
- JasperFillManager = Rjb::import('net.sf.jasperreports.engine.JasperFillManager')
74
- JasperPrint = Rjb::import('net.sf.jasperreports.engine.JasperPrint')
86
+ # Locale = Rjb::import('java.util.Locale')
75
87
 
76
- InputSource = Rjb::import('org.xml.sax.InputSource')
77
- StringReader = Rjb::import('java.io.StringReader')
78
- HashMap = Rjb::import('java.util.HashMap')
79
- ByteArrayInputStream = Rjb::import('java.io.ByteArrayInputStream')
80
- JavaString = Rjb::import('java.lang.String')
81
- JFreeChart = Rjb::import('org.jfree.chart.JFreeChart')
82
- JavaStringBuffer = Rjb::import('java.lang.StringBuffer')
88
+ # JRException = Rjb::import('net.sf.jasperreports.engine.JRException')
89
+ # JRExporterParameter = Rjb::import('net.sf.jasperreports.engine.JRExporterParameter')
90
+ # JRXmlUtils = Rjb::import('net.sf.jasperreports.engine.util.JRXmlUtils')
91
+ # JRXPathQueryExecuterFactory = with_warnings { Rjb::import('net.sf.jasperreports.engine.query.JRXPathQueryExecuterFactory') }
92
+ # JREmptyDataSource = Rjb::import('net.sf.jasperreports.engine.JREmptyDataSource')
93
+ # JROdtExporter = Rjb::import('net.sf.jasperreports.engine.export.oasis.JROdtExporter')
94
+ # JROdsExporter = Rjb::import('net.sf.jasperreports.engine.export.oasis.JROdsExporter')
95
+ # JRCsvExporter = Rjb::import('net.sf.jasperreports.engine.export.JRCsvExporter')
96
+ # JRDocxExporter = Rjb::import('net.sf.jasperreports.engine.export.ooxml.JRDocxExporter')
97
+ # JRXlsxExporter = Rjb::import('net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter')
83
98
 
84
- # Default report params
85
- self.config = {
86
- :report_params => {
87
- "REPORT_LOCALE" => Locale.new('en', 'US'),
88
- "XML_LOCALE" => Locale.new('en', 'US'),
89
- "XML_DATE_PATTERN" => 'yyyy-MM-dd'
90
- }
91
- }
99
+ # JasperCompileManager = Rjb::import('net.sf.jasperreports.engine.JasperCompileManager')
100
+ # JasperExportManager = Rjb::import('net.sf.jasperreports.engine.JasperExportManager')
101
+ # JasperFillManager = Rjb::import('net.sf.jasperreports.engine.JasperFillManager')
102
+ # JasperPrint = Rjb::import('net.sf.jasperreports.engine.JasperPrint')
103
+
104
+ # InputSource = Rjb::import('org.xml.sax.InputSource')
105
+ # StringReader = Rjb::import('java.io.StringReader')
106
+ # HashMap = Rjb::import('java.util.HashMap')
107
+ # ByteArrayInputStream = Rjb::import('java.io.ByteArrayInputStream')
108
+ # JavaString = Rjb::import('java.lang.String')
109
+ # JFreeChart = Rjb::import('org.jfree.chart.JFreeChart')
110
+ # JavaStringBuffer = Rjb::import('java.lang.StringBuffer')
92
111
 
93
- autoload :Report, 'beardley/report'
94
112
  end
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,158 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beardley
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
5
- prerelease:
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brice Texier
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-27 00:00:00.000000000 Z
11
+ date: 2013-12-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rjb
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.4.8
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.4.8
30
27
  - !ruby/object:Gem::Dependency
31
- name: beardley-core
28
+ name: rjb-loader
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
- version: 5.0.0
33
+ version: 0.0.2
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
- version: 5.0.0
46
- - !ruby/object:Gem::Dependency
47
- name: beardley-groovy
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: 1.7.5
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: 1.7.5
62
- - !ruby/object:Gem::Dependency
63
- name: beardley-barcode
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: 0.0.1
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: 0.0.1
78
- - !ruby/object:Gem::Dependency
79
- name: beardley-batik
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: 0.0.0
86
- type: :runtime
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: 0.0.0
94
- - !ruby/object:Gem::Dependency
95
- name: beardley-xml
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: 0.0.0
102
- type: :runtime
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: 0.0.0
40
+ version: 0.0.2
110
41
  - !ruby/object:Gem::Dependency
111
42
  name: rake
112
43
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
44
  requirements:
115
- - - ! '>='
45
+ - - '>='
116
46
  - !ruby/object:Gem::Version
117
47
  version: '10'
118
48
  type: :development
119
49
  prerelease: false
120
50
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
51
  requirements:
123
- - - ! '>='
52
+ - - '>='
124
53
  - !ruby/object:Gem::Version
125
54
  version: '10'
126
55
  - !ruby/object:Gem::Dependency
127
56
  name: coveralls
128
57
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
58
  requirements:
131
- - - ! '>='
59
+ - - '>='
132
60
  - !ruby/object:Gem::Version
133
61
  version: '0.6'
134
62
  type: :development
135
63
  prerelease: false
136
64
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
65
  requirements:
139
- - - ! '>='
66
+ - - '>='
140
67
  - !ruby/object:Gem::Version
141
68
  version: '0.6'
142
69
  - !ruby/object:Gem::Dependency
143
70
  name: bundler
144
71
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
72
  requirements:
147
- - - ! '>'
73
+ - - '>'
148
74
  - !ruby/object:Gem::Version
149
75
  version: '1'
150
76
  type: :development
151
77
  prerelease: false
152
78
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
79
  requirements:
155
- - - ! '>'
80
+ - - '>'
156
81
  - !ruby/object:Gem::Version
157
82
  version: '1'
158
83
  description: Generate reports using JasperReports reporting tool
@@ -161,43 +86,40 @@ executables: []
161
86
  extensions: []
162
87
  extra_rdoc_files: []
163
88
  files:
164
- - .gitignore
165
- - .travis.yml
166
- - Gemfile
167
- - Gemfile.lock
168
89
  - LICENSE
169
90
  - README.rdoc
170
- - Rakefile
171
- - beardley.gemspec
172
91
  - lib/beardley.rb
173
92
  - lib/beardley/report.rb
174
93
  - lib/beardley/version.rb
175
- - test/fixtures/barcode.jrxml
176
- - test/fixtures/empty.jrxml
177
- - test/helper.rb
178
- - test/test_print.rb
94
+ - vendor/java/commons-beanutils-1.8.2.jar
95
+ - vendor/java/commons-collections-3.2.1.jar
96
+ - vendor/java/commons-digester-2.1.jar
97
+ - vendor/java/commons-logging-1.1.1.jar
98
+ - vendor/java/iText-2.1.7.jar
99
+ - vendor/java/jasperreports-5.5.0.jar
100
+ - vendor/java/jcommon-1.0.15.jar
101
+ - vendor/java/servlet-api-2.4.jar
179
102
  homepage: https://github.com/burisu/beardley
180
103
  licenses: []
104
+ metadata: {}
181
105
  post_install_message:
182
106
  rdoc_options: []
183
107
  require_paths:
184
108
  - lib
185
109
  required_ruby_version: !ruby/object:Gem::Requirement
186
- none: false
187
110
  requirements:
188
- - - ! '>='
111
+ - - '>='
189
112
  - !ruby/object:Gem::Version
190
113
  version: '0'
191
114
  required_rubygems_version: !ruby/object:Gem::Requirement
192
- none: false
193
115
  requirements:
194
- - - ! '>='
116
+ - - '>='
195
117
  - !ruby/object:Gem::Version
196
118
  version: '0'
197
119
  requirements: []
198
120
  rubyforge_project:
199
- rubygems_version: 1.8.23
121
+ rubygems_version: 2.0.14
200
122
  signing_key:
201
- specification_version: 3
123
+ specification_version: 4
202
124
  summary: JasperReports integration
203
125
  test_files: []
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *~
2
- coverage
3
- pkg
4
- test/fixtures/*.jasper
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- before_install: bundle install
6
- script: bundle exec rake test
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/Gemfile.lock DELETED
@@ -1,46 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- beardley (0.6.2)
5
- beardley-barcode (>= 0.0.1)
6
- beardley-batik (>= 0.0.0)
7
- beardley-core (>= 5.0.0)
8
- beardley-groovy (>= 1.7.5)
9
- beardley-xml (>= 0.0.0)
10
- rjb (>= 1.4.8)
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- beardley-barcode (0.0.1)
16
- beardley-batik (0.0.0)
17
- beardley-core (5.2.0.1)
18
- beardley-groovy (1.7.5.1)
19
- beardley-xml (0.0.0)
20
- colorize (0.5.8)
21
- coveralls (0.6.7)
22
- colorize
23
- multi_json (~> 1.3)
24
- rest-client
25
- simplecov (>= 0.7)
26
- thor
27
- mime-types (1.24)
28
- multi_json (1.7.9)
29
- rake (10.1.0)
30
- rest-client (1.6.7)
31
- mime-types (>= 1.16)
32
- rjb (1.4.8)
33
- simplecov (0.7.1)
34
- multi_json (~> 1.0)
35
- simplecov-html (~> 0.7.1)
36
- simplecov-html (0.7.1)
37
- thor (0.18.1)
38
-
39
- PLATFORMS
40
- ruby
41
-
42
- DEPENDENCIES
43
- beardley!
44
- bundler (> 1)
45
- coveralls (>= 0.6)
46
- rake (>= 10)
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- # encoding: utf-8
2
- require 'bundler'
3
- Bundler::GemHelper.install_tasks
4
-
5
- require 'rake/testtask'
6
- Rake::TestTask.new(:test) do |test|
7
- test.libs << 'lib' << 'test'
8
- test.pattern = 'test/**/test_*.rb'
9
- test.verbose = true
10
- end
11
-
12
- task :default => :test
data/beardley.gemspec DELETED
@@ -1,29 +0,0 @@
1
- # encoding: utf-8
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "beardley/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "beardley"
7
- spec.version = Beardley::VERSION::STRING
8
- spec.authors = ["Brice Texier"]
9
- spec.summary = %q{JasperReports integration}
10
- spec.description = %q{Generate reports using JasperReports reporting tool}
11
- spec.email = "burisu@oneiros.fr"
12
- spec.homepage = "https://github.com/burisu/beardley"
13
-
14
- spec.files = `git ls-files`.split("\n")
15
- spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
- spec.require_paths = ["lib"]
18
-
19
- spec.add_dependency('rjb', '>= 1.4.8')
20
- # spec.add_dependency('rjb-loader', '>= 0.0.2')
21
- spec.add_dependency('beardley-core', '>= 5.0.0')
22
- spec.add_dependency('beardley-groovy', '>= 1.7.5')
23
- spec.add_dependency('beardley-barcode', '>= 0.0.1')
24
- spec.add_dependency('beardley-batik', '>= 0.0.0')
25
- spec.add_dependency('beardley-xml', '>= 0.0.0')
26
- spec.add_development_dependency('rake', '>= 10')
27
- spec.add_development_dependency('coveralls', '>= 0.6')
28
- spec.add_development_dependency('bundler', '> 1')
29
- end
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="barcode_v2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="541d2746-f9ec-4e09-a5f3-c1d8820d80ab">
3
- <property name="ireport.zoom" value="1.0"/>
4
- <property name="ireport.x" value="0"/>
5
- <property name="ireport.y" value="0"/>
6
- <background>
7
- <band splitType="Stretch"/>
8
- </background>
9
- <title>
10
- <band height="79" splitType="Stretch">
11
- <componentElement>
12
- <reportElement uuid="7484d411-2749-4a11-aa2a-19384e63122f" x="165" y="29" width="200" height="50"/>
13
- <jr:barbecue xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" type="PDF417" drawText="false" checksumRequired="false">
14
- <jr:codeExpression><![CDATA["1234"]]></jr:codeExpression>
15
- </jr:barbecue>
16
- </componentElement>
17
- </band>
18
- </title>
19
- </jasperReport>
@@ -1,27 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="empty" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e240522d-9475-4430-b448-16f6a8e3a3cd">
3
- <background>
4
- <band splitType="Stretch"/>
5
- </background>
6
- <title>
7
- <band height="79" splitType="Stretch"/>
8
- </title>
9
- <pageHeader>
10
- <band height="35" splitType="Stretch"/>
11
- </pageHeader>
12
- <columnHeader>
13
- <band height="61" splitType="Stretch"/>
14
- </columnHeader>
15
- <detail>
16
- <band height="125" splitType="Stretch"/>
17
- </detail>
18
- <columnFooter>
19
- <band height="45" splitType="Stretch"/>
20
- </columnFooter>
21
- <pageFooter>
22
- <band height="54" splitType="Stretch"/>
23
- </pageFooter>
24
- <summary>
25
- <band height="42" splitType="Stretch"/>
26
- </summary>
27
- </jasperReport>
data/test/helper.rb DELETED
@@ -1,19 +0,0 @@
1
- require 'coveralls'
2
- Coveralls.wear!
3
-
4
- require 'bundler/setup'
5
- require 'test/unit'
6
-
7
- # Load JAVA env variables
8
- begin
9
- ENV['JAVA_HOME'] ||= `readlink -f /usr/bin/java | sed "s:/jre/bin/java::"`.strip
10
- architecture = `dpkg --print-architecture`.strip
11
- ENV['LD_LIBRARY_PATH'] = "#{ENV['LD_LIBRARY_PATH']}:#{ENV['JAVA_HOME']}/jre/lib/#{architecture}:#{ENV['JAVA_HOME']}/jre/lib/#{architecture}/client"
12
- rescue
13
- puts "JAVA_HOME has not been set automatically because it's not Debian here."
14
- end
15
-
16
- $LOAD_PATH.unshift(File.dirname(__FILE__))
17
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
-
19
- require 'beardley'
data/test/test_print.rb DELETED
@@ -1,65 +0,0 @@
1
- # encoding: utf-8
2
- require 'helper'
3
-
4
- class TestPrint < Test::Unit::TestCase
5
-
6
- def test_print_of_a_xml_string
7
- report = Beardley::Report.new('<?xml version="1.0" encoding="UTF-8"?>
8
- <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="show" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9c1f11b7-03dd-4803-9e1b-41b87b9d23c0"/>')
9
- assert_equal Pathname, report.source_file.class
10
- assert_equal Pathname, report.object_file.class
11
- report.to_pdf
12
- report.to_odt
13
- report.to_ods
14
- report.to_csv
15
- report.to_docx
16
- report.to_xlsx
17
- end
18
-
19
- def test_print_of_empty_report
20
- empty = Pathname.new(__FILE__).dirname.join("fixtures", "empty.jrxml")
21
- assert empty.exist?
22
- report = Beardley::Report.new(empty)
23
- assert_equal Pathname, report.source_file.class
24
- assert_equal Pathname, report.object_file.class
25
- report.to_pdf
26
- report.to_odt
27
- report.to_ods
28
- report.to_csv
29
- report.to_docx
30
- report.to_xlsx
31
- end
32
-
33
- def test_print_of_empty_report_with_datasource
34
- empty = Pathname.new(__FILE__).dirname.join("fixtures", "empty.jrxml")
35
- assert empty.exist?
36
- report = Beardley::Report.new(empty)
37
- assert_equal Pathname, report.source_file.class
38
- assert_equal Pathname, report.object_file.class
39
- datasource = '<?xml version="1.0" encoding="UTF-8"?>
40
- <things><thing name="First">1</thing><thing name="Second">2</thing></things>'
41
- report.to_pdf(datasource)
42
- report.to_odt(datasource)
43
- report.to_ods(datasource)
44
- report.to_csv(datasource)
45
- report.to_docx(datasource)
46
- report.to_xlsx(datasource)
47
- end
48
-
49
- def test_print_of_barcode_report
50
- barcode = Pathname.new(__FILE__).dirname.join("fixtures", "barcode.jrxml")
51
- assert barcode.exist?
52
- report = Beardley::Report.new(barcode)
53
- assert_equal Pathname, report.source_file.class
54
- assert_equal Pathname, report.object_file.class
55
- report.to_pdf
56
- report.to_odt
57
- report.to_ods
58
- report.to_csv
59
- report.to_docx
60
- report.to_xlsx
61
- end
62
-
63
- # TODO Test parameters
64
-
65
- end