jasperserver-rails 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/jasperserver-rails/jasperserver-dsl.rb +2 -2
- data/lib/jasperserver-rails/version.rb +1 -1
- data/test/jasperserver-rails_test.rb +9 -9
- metadata +7 -21
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +0 -18
- data/test/dummy/tmp/reports/test.pdf +0 -0
- data/test/dummy/tmp/reports/test2.pdf +0 -0
- data/test/dummy/tmp/reports/test3.pdf +0 -0
- data/test/dummy/tmp/reports/test4.pdf +0 -0
- data/test/dummy/tmp/reports/test5.pdf +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aad0c1bf33c185d3d34535adec40a98806d49d74
|
4
|
+
data.tar.gz: b9d066dde67c6813dc7f594861030bcd6290e744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d9fee51e503fdab548b1decb04f555db9201a3091252b6f05a4494b67cd20cd663c700c5fdcb0f2a9249ba4cbd9289858bf7a5c63cb32f6659608a25dc6114b
|
7
|
+
data.tar.gz: fc660935b833a7dc1d7427ada4e7dbcc1b22509011f28850a7044cf6a0222e1afec7ae4151e4144060617f730e575bf692261744532c10f842cee563a38377ca
|
data/README.md
CHANGED
@@ -14,6 +14,8 @@ Formats supported:
|
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
17
|
+
### Install the gem
|
18
|
+
|
17
19
|
Add this line to your application's Gemfile:
|
18
20
|
|
19
21
|
gem 'jasperserver-rails'
|
@@ -26,6 +28,14 @@ Or install it yourself as:
|
|
26
28
|
|
27
29
|
$ gem install jasperserver-rails
|
28
30
|
|
31
|
+
### Install the generator
|
32
|
+
|
33
|
+
* Install the initializer and config file
|
34
|
+
|
35
|
+
$ rails g jasperserver_rails:install
|
36
|
+
|
37
|
+
* Edit `config/jasperserver.yml`
|
38
|
+
|
29
39
|
## Usage
|
30
40
|
|
31
41
|
1. Add jasperserver configuration to config/jasperserver.yml
|
@@ -27,8 +27,8 @@ module JasperserverRails
|
|
27
27
|
login
|
28
28
|
# Run report
|
29
29
|
response2 = RestClient.get(
|
30
|
-
URI.join(Rails.configuration.jasperserver[Rails.env.to_sym][:url]+'/', "rest_v2/reports/reports/#{self.get_report}.#{self.get_format}?#{URI.encode_www_form(self.get_params)}").to_s,
|
31
|
-
{ :
|
30
|
+
URI.join(Rails.configuration.jasperserver[Rails.env.to_sym][:url] + '/', "rest_v2/reports/reports/#{self.get_report}.#{self.get_format}?#{URI.encode_www_form(self.get_params)}").to_s,
|
31
|
+
{ cookies: @cookie }
|
32
32
|
)
|
33
33
|
|
34
34
|
# Write file
|
@@ -5,18 +5,18 @@ require 'vcr'
|
|
5
5
|
VCR.configure do |c|
|
6
6
|
c.cassette_library_dir = 'test/fixtures/vcr_cassettes'
|
7
7
|
c.hook_into :webmock
|
8
|
-
c.default_cassette_options = { :
|
8
|
+
c.default_cassette_options = { record: :new_episodes, erb: true }
|
9
9
|
c.filter_sensitive_data('<USERNAME>') { Rails.configuration.jasperserver[Rails.env.to_sym][:username] }
|
10
10
|
c.filter_sensitive_data('<PASSWORD>') { Rails.configuration.jasperserver[Rails.env.to_sym][:password] }
|
11
11
|
c.filter_sensitive_data('<URL>') { Rails.configuration.jasperserver[Rails.env.to_sym][:url] }
|
12
12
|
c.filter_sensitive_data('<SET-COOKIE>') do |interaction|
|
13
|
-
interaction.response.headers[
|
13
|
+
interaction.response.headers['Set-Cookie'].first if interaction.response.headers['Set-Cookie']
|
14
14
|
end
|
15
15
|
c.filter_sensitive_data('<COOKIE>') do |interaction|
|
16
|
-
interaction.request.headers[
|
16
|
+
interaction.request.headers['Cookie'].first if interaction.request.headers['Cookie']
|
17
17
|
end
|
18
18
|
c.filter_sensitive_data('<SERVER>') do |interaction|
|
19
|
-
interaction.response.headers[
|
19
|
+
interaction.response.headers['Server'].first if interaction.response.headers['Server']
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -26,7 +26,7 @@ class JasperserverRailsTest < ActiveSupport::TestCase
|
|
26
26
|
JasperserverRails::Jasperserver.new do
|
27
27
|
format 'pdf'
|
28
28
|
report 'samples/Department'
|
29
|
-
params({ :
|
29
|
+
params({ Value1: 'Value1', Value2: 'Value2' })
|
30
30
|
run_report('test/dummy/tmp/reports/test.pdf')
|
31
31
|
end
|
32
32
|
end
|
@@ -38,7 +38,7 @@ class JasperserverRailsTest < ActiveSupport::TestCase
|
|
38
38
|
JasperserverRails::Jasperserver.new do
|
39
39
|
format 'pdf'
|
40
40
|
report 'samples/Department'
|
41
|
-
params({ :
|
41
|
+
params({ Value1: 'Value1' })
|
42
42
|
run_report('test/dummy/tmp/reports/test2.pdf')
|
43
43
|
end
|
44
44
|
end
|
@@ -50,7 +50,7 @@ class JasperserverRailsTest < ActiveSupport::TestCase
|
|
50
50
|
JasperserverRails::Jasperserver.new.run_report 'test/dummy/tmp/reports/test3.pdf' do
|
51
51
|
format 'pdf'
|
52
52
|
report 'samples/Department'
|
53
|
-
params({ :
|
53
|
+
params({ Value1: 'Value1' })
|
54
54
|
end
|
55
55
|
end
|
56
56
|
File.exists?('test/dummy/tmp/reports/test3.pdf')
|
@@ -61,7 +61,7 @@ class JasperserverRailsTest < ActiveSupport::TestCase
|
|
61
61
|
JasperserverRails::Jasperserver.new.run_report 'test/dummy/tmp/reports/test4.pdf' do
|
62
62
|
format 'pdf'
|
63
63
|
report 'samples/Department'
|
64
|
-
params({ :
|
64
|
+
params({ Value1: 'Value1' })
|
65
65
|
end
|
66
66
|
end
|
67
67
|
File.exists?('test/dummy/tmp/reports/test4.pdf')
|
@@ -70,7 +70,7 @@ class JasperserverRailsTest < ActiveSupport::TestCase
|
|
70
70
|
JasperserverRails::Jasperserver.new.run_report 'test/dummy/tmp/reports/test5.pdf' do
|
71
71
|
format 'pdf'
|
72
72
|
report 'samples/Department'
|
73
|
-
params({ :
|
73
|
+
params({ Value1: 'Value1' })
|
74
74
|
end
|
75
75
|
end
|
76
76
|
File.exists?('test/dummy/tmp/reports/test5.pdf')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jasperserver-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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: 2015-
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rest-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.7'
|
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: '
|
40
|
+
version: '1.7'
|
41
41
|
description: ''
|
42
42
|
email:
|
43
43
|
- cmckni3@gmail.com
|
@@ -82,18 +82,11 @@ 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
|
87
85
|
- test/dummy/public/404.html
|
88
86
|
- test/dummy/public/422.html
|
89
87
|
- test/dummy/public/500.html
|
90
88
|
- test/dummy/public/favicon.ico
|
91
89
|
- 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
|
97
90
|
- test/fixtures/vcr_cassettes/test1.yml
|
98
91
|
- test/fixtures/vcr_cassettes/test2.yml
|
99
92
|
- test/fixtures/vcr_cassettes/test3.yml
|
@@ -120,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
113
|
version: '0'
|
121
114
|
requirements: []
|
122
115
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.4.5
|
124
117
|
signing_key:
|
125
118
|
specification_version: 4
|
126
119
|
summary: Download reports in various formats from jasperserver
|
@@ -147,8 +140,6 @@ test_files:
|
|
147
140
|
- test/dummy/config/locales/en.yml
|
148
141
|
- test/dummy/config/routes.rb
|
149
142
|
- test/dummy/config.ru
|
150
|
-
- test/dummy/db/test.sqlite3
|
151
|
-
- test/dummy/log/test.log
|
152
143
|
- test/dummy/public/404.html
|
153
144
|
- test/dummy/public/422.html
|
154
145
|
- test/dummy/public/500.html
|
@@ -156,11 +147,6 @@ test_files:
|
|
156
147
|
- test/dummy/Rakefile
|
157
148
|
- test/dummy/README.rdoc
|
158
149
|
- test/dummy/script/rails
|
159
|
-
- test/dummy/tmp/reports/test.pdf
|
160
|
-
- test/dummy/tmp/reports/test2.pdf
|
161
|
-
- test/dummy/tmp/reports/test3.pdf
|
162
|
-
- test/dummy/tmp/reports/test4.pdf
|
163
|
-
- test/dummy/tmp/reports/test5.pdf
|
164
150
|
- test/fixtures/vcr_cassettes/test1.yml
|
165
151
|
- test/fixtures/vcr_cassettes/test2.yml
|
166
152
|
- test/fixtures/vcr_cassettes/test3.yml
|
data/test/dummy/db/test.sqlite3
DELETED
File without changes
|
data/test/dummy/log/test.log
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Connecting to database specified by database.yml
|
2
|
-
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
3
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
4
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
6
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
8
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
9
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
10
|
-
Connecting to database specified by database.yml
|
11
|
-
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
12
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
13
|
-
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
14
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
15
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
17
|
-
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
18
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|