jasperserver-rails 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac7821da9cf526c83c1059eb32f82a1fd1631cb9
4
- data.tar.gz: 100acdb5effeaf0b8178290e8d4d30cb90a14029
3
+ metadata.gz: b3be96ca57ac55d3f59b88d09b7579ec01bb7bdf
4
+ data.tar.gz: aea04c6ad799c8ec5ea31b2cd6f69d7d06d24bd3
5
5
  SHA512:
6
- metadata.gz: 36a26814753702c77606e57cd882d9e0a74f32c58a12e12f4b685e3e9379a27c804acf7126ec3e1cde5d8cf506294bc245b2dc72a5c0c469e795c6b2a77156e9
7
- data.tar.gz: f9a76adfca6251191d495d475bea91a93c8d0cfb0aca8d5f0637feab64a38c1f0d27b076b90cc79606ebec69abc67b8eaadde7bb15039af4f4c3b4f0f0a8a9bb
6
+ metadata.gz: 8e2c079da37b27f4144fffc73fa2373538bb4b0db9c24b880e7f6fa545e96a014104e075408cc566b82564ac9516145c2f357c6cea688527cbeb69add5da6754
7
+ data.tar.gz: a7da3c867d389039c56b279524c199f883291a30a05cc37d2739871c1ea02437865f12fefbd6a861684ce368d474831098b9d59e43cc159f8951b94c43b016e3
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # JasperserverRails
2
- [![Gem Version](https://badge.fury.io/rb/jasperserver-rails.png)](http://badge.fury.io/rb/jasperserver-rails)
3
- [![Build Status](https://travis-ci.org/cmckni3/rails-jasperserver.svg?branch=master)](https://travis-ci.org/cmckni3/rails-jasperserver)
4
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/cmckni3/jasperserver-rails)
2
+ [![Gem Version](https://img.shields.io/gem/v/jasperserver-rails.svg)](https://rubygems.org/gems/jasperserver-rails)
3
+ [![Travis](https://img.shields.io/travis/cmckni3/rails-jasperserver.svg)](https://travis-ci.org/cmckni3/rails-jasperserver)
4
+ [![Code Climate](https://img.shields.io/codeclimate/github/kabisaict/flow.svg)](https://codeclimate.com/github/cmckni3/jasperserver-rails)
5
+ [![License](https://img.shields.io/github/license/cmckni3/rails-jasperserver.svg)]()
6
+ [![Dependency Status](https://img.shields.io/versioneye/d/ruby/jasperserver-rails.svg)](https://www.versioneye.com/user/projects/57028f6bfcd19a004543f84b)
5
7
 
6
8
  Download reports in various formats from jasperserver
7
9
 
@@ -43,7 +45,7 @@ Or install it yourself as:
43
45
 
44
46
  1. Add jasperserver configuration to config/jasperserver.yml
45
47
 
46
- ````
48
+ ```yaml
47
49
  development:
48
50
  url: 'http://server:port/jasperserver/'
49
51
  username: 'username'
@@ -58,17 +60,29 @@ production:
58
60
  url: 'http://server:port/jasperserver/'
59
61
  username: 'username'
60
62
  password: 'password'
61
- ````
63
+ ```
62
64
 
63
- 2. Run a report using the DSL
65
+ 2. Run a report
64
66
 
65
- ````ruby
66
- JasperserverRails::Jasperserver.new.run_report 'test.pdf' do
67
+ ```ruby
68
+ pdf = JasperserverRails::Jasperserver.new.generate_report do
69
+ format 'pdf'
70
+ report '/reports/TestReport'
71
+ params(Value1: 'Value1')
72
+ end
73
+ send_data pdf, filename: 'Test.pdf', type: :pdf
74
+ ```
75
+
76
+ 3. Download a report using the DSL
77
+
78
+ ```ruby
79
+ file_path = Rails.root.join('tmp', 'reports', 'test.pdf')
80
+ JasperserverRails::Jasperserver.new.run_report file_path do
67
81
  format 'pdf'
68
- report 'test_report'
69
- params({ :Value1 => 'Value1' })
82
+ report '/reports/TestReport'
83
+ params(Value1: 'Value1')
70
84
  end
71
- ````
85
+ ```
72
86
 
73
87
  ## TODO
74
88
 
@@ -1,3 +1,3 @@
1
1
  Rails.configuration.after_initialize do
2
- Rails.configuration.jasperserver = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'jasperserver.yml'))).result).deep_symbolize_keys
2
+ Rails.configuration.jasperserver = YAML.load(ERB.new(IO.read(File.join(Rails.root, 'config', 'jasperserver.yml'))).result).deep_symbolize_keys
3
3
  end
@@ -25,12 +25,13 @@ module JasperserverRails
25
25
  instance_eval(&block) if block_given?
26
26
  login
27
27
  # Run report
28
+ params = URI.encode_www_form(self.get_params) if self.get_params.present?
28
29
  report_path = [
29
30
  'rest_v2',
30
31
  'reports',
31
- "#{self.get_report}.#{self.get_format}?#{URI.encode_www_form(self.get_params)}"
32
+ "#{self.get_report}.#{self.get_format}?#{params}"
32
33
  ].join '/'
33
- report_data = RestClient.get(
34
+ RestClient.get(
34
35
  URI.join(
35
36
  config[:url],
36
37
  report_path
@@ -1,3 +1,3 @@
1
1
  module JasperserverRails
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
File without changes
@@ -0,0 +1,100 @@
1
+  (0.1ms) begin transaction
2
+ -------------------------------------------------------------------------------------
3
+ JasperserverRailsTest: test_report_data_is_returned_when_simply_generating_the_report
4
+ -------------------------------------------------------------------------------------
5
+  (0.1ms) rollback transaction
6
+  (1.0ms) begin transaction
7
+ -------------------------------------------------------------------------
8
+ JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
9
+ -------------------------------------------------------------------------
10
+  (0.1ms) rollback transaction
11
+  (0.0ms) begin transaction
12
+ -------------------------------------------------
13
+ JasperserverRailsTest: test_test.pdf_is_generated
14
+ -------------------------------------------------
15
+  (0.1ms) rollback transaction
16
+  (0.0ms) begin transaction
17
+ --------------------------------------------------
18
+ JasperserverRailsTest: test_test2.pdf_is_generated
19
+ --------------------------------------------------
20
+  (0.1ms) rollback transaction
21
+  (0.0ms) begin transaction
22
+ --------------------------------------------------
23
+ JasperserverRailsTest: test_test3.pdf_is_generated
24
+ --------------------------------------------------
25
+  (0.1ms) rollback transaction
26
+  (0.1ms) begin transaction
27
+ -------------------------------------------------------------------------------------
28
+ JasperserverRailsTest: test_report_data_is_returned_when_simply_generating_the_report
29
+ -------------------------------------------------------------------------------------
30
+  (0.1ms) rollback transaction
31
+  (0.0ms) begin transaction
32
+ -------------------------------------------------------------------------
33
+ JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
34
+ -------------------------------------------------------------------------
35
+  (0.1ms) rollback transaction
36
+  (0.0ms) begin transaction
37
+ -------------------------------------------------
38
+ JasperserverRailsTest: test_test.pdf_is_generated
39
+ -------------------------------------------------
40
+  (0.1ms) rollback transaction
41
+  (0.0ms) begin transaction
42
+ --------------------------------------------------
43
+ JasperserverRailsTest: test_test2.pdf_is_generated
44
+ --------------------------------------------------
45
+  (0.1ms) rollback transaction
46
+  (0.0ms) begin transaction
47
+ --------------------------------------------------
48
+ JasperserverRailsTest: test_test3.pdf_is_generated
49
+ --------------------------------------------------
50
+  (0.1ms) rollback transaction
51
+  (0.1ms) begin transaction
52
+ -------------------------------------------------------------------------------------
53
+ JasperserverRailsTest: test_report_data_is_returned_when_simply_generating_the_report
54
+ -------------------------------------------------------------------------------------
55
+  (0.1ms) rollback transaction
56
+  (0.0ms) begin transaction
57
+ -------------------------------------------------------------------------
58
+ JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
59
+ -------------------------------------------------------------------------
60
+  (0.1ms) rollback transaction
61
+  (0.0ms) begin transaction
62
+ -------------------------------------------------
63
+ JasperserverRailsTest: test_test.pdf_is_generated
64
+ -------------------------------------------------
65
+  (0.1ms) rollback transaction
66
+  (0.1ms) begin transaction
67
+ --------------------------------------------------
68
+ JasperserverRailsTest: test_test2.pdf_is_generated
69
+ --------------------------------------------------
70
+  (0.1ms) rollback transaction
71
+  (0.1ms) begin transaction
72
+ --------------------------------------------------
73
+ JasperserverRailsTest: test_test3.pdf_is_generated
74
+ --------------------------------------------------
75
+  (0.1ms) rollback transaction
76
+  (0.1ms) begin transaction
77
+ -------------------------------------------------------------------------------------
78
+ JasperserverRailsTest: test_report_data_is_returned_when_simply_generating_the_report
79
+ -------------------------------------------------------------------------------------
80
+  (0.1ms) rollback transaction
81
+  (0.0ms) begin transaction
82
+ -------------------------------------------------------------------------
83
+ JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
84
+ -------------------------------------------------------------------------
85
+  (0.1ms) rollback transaction
86
+  (0.0ms) begin transaction
87
+ -------------------------------------------------
88
+ JasperserverRailsTest: test_test.pdf_is_generated
89
+ -------------------------------------------------
90
+  (0.1ms) rollback transaction
91
+  (0.0ms) begin transaction
92
+ --------------------------------------------------
93
+ JasperserverRailsTest: test_test2.pdf_is_generated
94
+ --------------------------------------------------
95
+  (0.1ms) rollback transaction
96
+  (0.0ms) begin transaction
97
+ --------------------------------------------------
98
+ JasperserverRailsTest: test_test3.pdf_is_generated
99
+ --------------------------------------------------
100
+  (0.1ms) rollback transaction
@@ -67,7 +67,6 @@ class JasperserverRailsTest < ActiveSupport::TestCase
67
67
  end
68
68
 
69
69
  test 'report data is returned when simply generating the report' do
70
- report_file = 'test/dummy/tmp/reports/test3.pdf'
71
70
  VCR.use_cassette 'test3' do
72
71
  report = JasperserverRails::Jasperserver.new.generate_report do
73
72
  format 'pdf'
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasperserver-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris McKnight
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2018-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.0
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
26
  version: 3.2.0
27
27
  - !ruby/object:Gem::Dependency
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.7'
33
+ version: 2.0.2
34
34
  type: :runtime
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.7'
40
+ version: 2.0.2
41
41
  description: ''
42
42
  email:
43
43
  - cmckni3@gmail.com
@@ -82,11 +82,18 @@ files:
82
82
  - test/dummy/config/initializers/wrap_parameters.rb
83
83
  - test/dummy/config/locales/en.yml
84
84
  - test/dummy/config/routes.rb
85
+ - test/dummy/db/test.sqlite3
86
+ - test/dummy/log/test.log
85
87
  - test/dummy/public/404.html
86
88
  - test/dummy/public/422.html
87
89
  - test/dummy/public/500.html
88
90
  - test/dummy/public/favicon.ico
89
91
  - test/dummy/script/rails
92
+ - test/dummy/tmp/reports/test.pdf
93
+ - test/dummy/tmp/reports/test2.pdf
94
+ - test/dummy/tmp/reports/test3.pdf
95
+ - test/dummy/tmp/reports/test4.pdf
96
+ - test/dummy/tmp/reports/test5.pdf
90
97
  - test/fixtures/vcr_cassettes/test1.yml
91
98
  - test/fixtures/vcr_cassettes/test2.yml
92
99
  - test/fixtures/vcr_cassettes/test3.yml
@@ -113,44 +120,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
120
  version: '0'
114
121
  requirements: []
115
122
  rubyforge_project:
116
- rubygems_version: 2.4.5.1
123
+ rubygems_version: 2.6.14.1
117
124
  signing_key:
118
125
  specification_version: 4
119
126
  summary: Download reports in various formats from jasperserver
120
127
  test_files:
128
+ - test/dummy/app/controllers/application_controller.rb
129
+ - test/dummy/app/views/layouts/application.html.erb
121
130
  - test/dummy/app/assets/javascripts/application.js
122
131
  - test/dummy/app/assets/stylesheets/application.css
123
- - test/dummy/app/controllers/application_controller.rb
124
132
  - test/dummy/app/helpers/application_helper.rb
125
- - test/dummy/app/views/layouts/application.html.erb
126
- - test/dummy/config/application.rb
127
- - test/dummy/config/boot.rb
128
- - test/dummy/config/database.yml
129
- - test/dummy/config/environment.rb
130
- - test/dummy/config/environments/development.rb
133
+ - test/dummy/config/routes.rb
134
+ - test/dummy/config/locales/en.yml
131
135
  - test/dummy/config/environments/production.rb
136
+ - test/dummy/config/environments/development.rb
132
137
  - test/dummy/config/environments/test.rb
138
+ - test/dummy/config/environment.rb
139
+ - test/dummy/config/application.rb
140
+ - test/dummy/config/database.yml
141
+ - test/dummy/config/boot.rb
133
142
  - test/dummy/config/initializers/backtrace_silencers.rb
134
- - test/dummy/config/initializers/inflections.rb
135
- - test/dummy/config/initializers/jasperserver.rb
136
143
  - test/dummy/config/initializers/mime_types.rb
137
- - test/dummy/config/initializers/secret_token.rb
138
144
  - test/dummy/config/initializers/session_store.rb
139
145
  - test/dummy/config/initializers/wrap_parameters.rb
140
- - test/dummy/config/locales/en.yml
141
- - test/dummy/config/routes.rb
146
+ - test/dummy/config/initializers/jasperserver.rb
147
+ - test/dummy/config/initializers/secret_token.rb
148
+ - test/dummy/config/initializers/inflections.rb
142
149
  - test/dummy/config.ru
143
- - test/dummy/public/404.html
150
+ - test/dummy/script/rails
151
+ - test/dummy/Rakefile
152
+ - test/dummy/public/favicon.ico
144
153
  - test/dummy/public/422.html
145
154
  - test/dummy/public/500.html
146
- - test/dummy/public/favicon.ico
147
- - test/dummy/Rakefile
155
+ - test/dummy/public/404.html
156
+ - test/dummy/db/test.sqlite3
157
+ - test/dummy/log/test.log
158
+ - test/dummy/tmp/reports/test4.pdf
159
+ - test/dummy/tmp/reports/test5.pdf
160
+ - test/dummy/tmp/reports/test2.pdf
161
+ - test/dummy/tmp/reports/test3.pdf
162
+ - test/dummy/tmp/reports/test.pdf
148
163
  - test/dummy/README.rdoc
149
- - test/dummy/script/rails
164
+ - test/jasperserver-rails_test.rb
165
+ - test/fixtures/vcr_cassettes/test5.yml
166
+ - test/fixtures/vcr_cassettes/test4.yml
150
167
  - test/fixtures/vcr_cassettes/test1.yml
151
- - test/fixtures/vcr_cassettes/test2.yml
152
168
  - test/fixtures/vcr_cassettes/test3.yml
153
- - test/fixtures/vcr_cassettes/test4.yml
154
- - test/fixtures/vcr_cassettes/test5.yml
155
- - test/jasperserver-rails_test.rb
169
+ - test/fixtures/vcr_cassettes/test2.yml
156
170
  - test/test_helper.rb