jasperserver-rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +15 -0
- data/README.md +1 -3
- data/lib/jasperserver-rails/jasperserver-dsl.rb +4 -4
- data/lib/jasperserver-rails/version.rb +1 -1
- data/test/dummy/config/initializers/jasperserver.rb +3 -0
- metadata +22 -54
- data/README.rdoc +0 -77
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +0 -80
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bf68841bd1e2e6d8acf1a812da015cc165c5bcd7
|
4
|
+
data.tar.gz: e791f2c3f6ef3a2070b3a676de9517cde8706cba
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b200d1815d1e8677efe5ad98aef0c6d37d2b4b7d7f10bf316fc43badfba67d280cc85d01d3557ceb3aeb21595318b09d8693bb2229175195dbdaf67e0dfe210f
|
7
|
+
data.tar.gz: 164967eca70ed1ebaea6ac2084e3b88afa1007263ca0e1a1caed828c30e8a27abdf8f38bfc7215c85b0dcafa21102091037ab005ead62d054b1a059da81fba7f
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## Version 0.1.0
|
4
|
+
|
5
|
+
* Updated gem to use URI and encode parameters sent to the server
|
6
|
+
* Updated tests for convenience
|
7
|
+
|
8
|
+
## Version 0.0.2
|
9
|
+
|
10
|
+
* Allow running in multiple environments
|
11
|
+
* Added some basic tests
|
12
|
+
|
13
|
+
## Version 0.0.1
|
14
|
+
|
15
|
+
* Initial release
|
data/README.md
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
[![Gem Version](https://badge.fury.io/rb/jasperserver-rails.png)](http://badge.fury.io/rb/jasperserver-rails)
|
2
|
-
|
3
|
-
# JasperserverRails
|
1
|
+
# JasperserverRails [![Gem Version](https://badge.fury.io/rb/jasperserver-rails.png)](http://badge.fury.io/rb/jasperserver-rails) [![Build Status](https://secure.travis-ci.org/cmckni3/jasperserver-rails.png)](http://travis-ci.org/cmckni3/jasperserver-rails) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/cmckni3/jasperserver-rails)
|
4
2
|
|
5
3
|
Download reports in various formats from jasperserver
|
6
4
|
|
@@ -28,7 +28,7 @@ module JasperserverRails
|
|
28
28
|
# Run report
|
29
29
|
response2 = RestClient.get(
|
30
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 }
|
31
|
+
{ :cookies => @cookie }
|
32
32
|
)
|
33
33
|
|
34
34
|
# Write file
|
@@ -37,14 +37,14 @@ module JasperserverRails
|
|
37
37
|
f.write(response2.body)
|
38
38
|
f.close
|
39
39
|
end
|
40
|
-
|
40
|
+
|
41
41
|
private
|
42
42
|
|
43
43
|
def login
|
44
44
|
# login
|
45
|
-
|
45
|
+
unless @cookie
|
46
46
|
response = RestClient.post(
|
47
|
-
URI.join(Rails.configuration.jasperserver[Rails.env.to_sym][:url]+'/', 'rest/login').to_s,
|
47
|
+
URI.join(Rails.configuration.jasperserver[Rails.env.to_sym][:url] + '/', 'rest/login').to_s,
|
48
48
|
{
|
49
49
|
j_username: Rails.configuration.jasperserver[Rails.env.to_sym][:username],
|
50
50
|
j_password: Rails.configuration.jasperserver[Rails.env.to_sym][:password]
|
metadata
CHANGED
@@ -1,62 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jasperserver-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Chris McKnight
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 3.2.0
|
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: 3.2.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rest-client
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: sqlite3
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
38
|
+
- - ">="
|
60
39
|
- !ruby/object:Gem::Version
|
61
40
|
version: '0'
|
62
41
|
description: ''
|
@@ -66,24 +45,27 @@ executables: []
|
|
66
45
|
extensions: []
|
67
46
|
extra_rdoc_files: []
|
68
47
|
files:
|
48
|
+
- CHANGELOG.md
|
49
|
+
- MIT-LICENSE
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- lib/generators/jasperserver_rails/install/USAGE
|
69
53
|
- lib/generators/jasperserver_rails/install/install_generator.rb
|
70
54
|
- lib/generators/jasperserver_rails/install/templates/initializer.rb
|
71
55
|
- lib/generators/jasperserver_rails/install/templates/jasperserver.yml
|
72
|
-
- lib/
|
56
|
+
- lib/jasperserver-rails.rb
|
73
57
|
- lib/jasperserver-rails/engine.rb
|
74
58
|
- lib/jasperserver-rails/jasperserver-dsl.rb
|
75
59
|
- lib/jasperserver-rails/version.rb
|
76
|
-
- lib/jasperserver-rails.rb
|
77
60
|
- lib/tasks/jasperserver-rails_tasks.rake
|
78
|
-
-
|
79
|
-
- Rakefile
|
80
|
-
- README.md
|
81
|
-
- README.rdoc
|
61
|
+
- test/dummy/README.rdoc
|
62
|
+
- test/dummy/Rakefile
|
82
63
|
- test/dummy/app/assets/javascripts/application.js
|
83
64
|
- test/dummy/app/assets/stylesheets/application.css
|
84
65
|
- test/dummy/app/controllers/application_controller.rb
|
85
66
|
- test/dummy/app/helpers/application_helper.rb
|
86
67
|
- test/dummy/app/views/layouts/application.html.erb
|
68
|
+
- test/dummy/config.ru
|
87
69
|
- test/dummy/config/application.rb
|
88
70
|
- test/dummy/config/boot.rb
|
89
71
|
- test/dummy/config/database.yml
|
@@ -93,22 +75,17 @@ files:
|
|
93
75
|
- test/dummy/config/environments/test.rb
|
94
76
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
95
77
|
- test/dummy/config/initializers/inflections.rb
|
78
|
+
- test/dummy/config/initializers/jasperserver.rb
|
96
79
|
- test/dummy/config/initializers/mime_types.rb
|
97
80
|
- test/dummy/config/initializers/secret_token.rb
|
98
81
|
- test/dummy/config/initializers/session_store.rb
|
99
82
|
- test/dummy/config/initializers/wrap_parameters.rb
|
100
83
|
- test/dummy/config/locales/en.yml
|
101
84
|
- test/dummy/config/routes.rb
|
102
|
-
- test/dummy/config.ru
|
103
|
-
- test/dummy/db/test.sqlite3
|
104
|
-
- test/dummy/log/development.log
|
105
|
-
- test/dummy/log/test.log
|
106
85
|
- test/dummy/public/404.html
|
107
86
|
- test/dummy/public/422.html
|
108
87
|
- test/dummy/public/500.html
|
109
88
|
- test/dummy/public/favicon.ico
|
110
|
-
- test/dummy/Rakefile
|
111
|
-
- test/dummy/README.rdoc
|
112
89
|
- test/dummy/script/rails
|
113
90
|
- test/fixtures/vcr_cassettes/test1.yml
|
114
91
|
- test/fixtures/vcr_cassettes/test2.yml
|
@@ -119,33 +96,26 @@ files:
|
|
119
96
|
- test/test_helper.rb
|
120
97
|
homepage: http://github.com/cmckni3/jasperserver-rails
|
121
98
|
licenses: []
|
99
|
+
metadata: {}
|
122
100
|
post_install_message:
|
123
101
|
rdoc_options: []
|
124
102
|
require_paths:
|
125
103
|
- lib
|
126
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
105
|
requirements:
|
129
|
-
- -
|
106
|
+
- - ">="
|
130
107
|
- !ruby/object:Gem::Version
|
131
108
|
version: '0'
|
132
|
-
segments:
|
133
|
-
- 0
|
134
|
-
hash: -1261846646196108971
|
135
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
110
|
requirements:
|
138
|
-
- -
|
111
|
+
- - ">="
|
139
112
|
- !ruby/object:Gem::Version
|
140
113
|
version: '0'
|
141
|
-
segments:
|
142
|
-
- 0
|
143
|
-
hash: -1261846646196108971
|
144
114
|
requirements: []
|
145
115
|
rubyforge_project:
|
146
|
-
rubygems_version:
|
116
|
+
rubygems_version: 2.2.2
|
147
117
|
signing_key:
|
148
|
-
specification_version:
|
118
|
+
specification_version: 4
|
149
119
|
summary: Download reports in various formats from jasperserver
|
150
120
|
test_files:
|
151
121
|
- test/dummy/app/assets/javascripts/application.js
|
@@ -162,6 +132,7 @@ test_files:
|
|
162
132
|
- test/dummy/config/environments/test.rb
|
163
133
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
164
134
|
- test/dummy/config/initializers/inflections.rb
|
135
|
+
- test/dummy/config/initializers/jasperserver.rb
|
165
136
|
- test/dummy/config/initializers/mime_types.rb
|
166
137
|
- test/dummy/config/initializers/secret_token.rb
|
167
138
|
- test/dummy/config/initializers/session_store.rb
|
@@ -169,9 +140,6 @@ test_files:
|
|
169
140
|
- test/dummy/config/locales/en.yml
|
170
141
|
- test/dummy/config/routes.rb
|
171
142
|
- test/dummy/config.ru
|
172
|
-
- test/dummy/db/test.sqlite3
|
173
|
-
- test/dummy/log/development.log
|
174
|
-
- test/dummy/log/test.log
|
175
143
|
- test/dummy/public/404.html
|
176
144
|
- test/dummy/public/422.html
|
177
145
|
- test/dummy/public/500.html
|
data/README.rdoc
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
{<img src="https://badge.fury.io/rb/jasperserver-rails.png" alt="Gem Version" />}[http://badge.fury.io/rb/jasperserver-rails]
|
2
|
-
|
3
|
-
= JasperserverRails
|
4
|
-
|
5
|
-
Download reports in various formats from jasperserver
|
6
|
-
|
7
|
-
Formats supported:
|
8
|
-
|
9
|
-
* HTML
|
10
|
-
* PDF
|
11
|
-
* XLS
|
12
|
-
* RTF
|
13
|
-
* CSV
|
14
|
-
* XML
|
15
|
-
* jrprint
|
16
|
-
|
17
|
-
== Installation
|
18
|
-
|
19
|
-
Add this line to your application's Gemfile:
|
20
|
-
|
21
|
-
gem 'jasperserver-rails'
|
22
|
-
|
23
|
-
And then execute:
|
24
|
-
|
25
|
-
$ bundle
|
26
|
-
|
27
|
-
Or install it yourself as:
|
28
|
-
|
29
|
-
$ gem install jasperserver-rails
|
30
|
-
|
31
|
-
== Usage
|
32
|
-
|
33
|
-
1. Add jasperserver configuration to config/jasperserver.yml
|
34
|
-
|
35
|
-
development:
|
36
|
-
url: 'http://server:port/jasperserver/'
|
37
|
-
username: 'username'
|
38
|
-
password: 'password'
|
39
|
-
|
40
|
-
test:
|
41
|
-
url: 'http://server:port/jasperserver/'
|
42
|
-
username: 'username'
|
43
|
-
password: 'password'
|
44
|
-
|
45
|
-
production:
|
46
|
-
url: 'http://server:port/jasperserver/'
|
47
|
-
username: 'username'
|
48
|
-
password: 'password'
|
49
|
-
|
50
|
-
2. Run a report using the DSL
|
51
|
-
|
52
|
-
|
53
|
-
JasperserverRails::Jasperserver.new.run_report 'test.pdf' do
|
54
|
-
format 'pdf'
|
55
|
-
report 'test_report'
|
56
|
-
params({ :Value1 => 'Value1' })
|
57
|
-
end
|
58
|
-
|
59
|
-
== TODO
|
60
|
-
|
61
|
-
1. Documentation
|
62
|
-
2. Background processing
|
63
|
-
3. Add more tests
|
64
|
-
|
65
|
-
== Copyright and License
|
66
|
-
|
67
|
-
JasperserverRails © 2013 by {Chris McKnight}[http://github.com/cmckni3].
|
68
|
-
|
69
|
-
JasperserverRails is licensed under the MIT license. Please see the MIT-LICENSE document for more information.
|
70
|
-
|
71
|
-
== Contributing
|
72
|
-
|
73
|
-
1. Fork it
|
74
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
75
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
76
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
77
|
-
5. Create new Pull Request
|
data/test/dummy/db/test.sqlite3
DELETED
File without changes
|
File without changes
|
data/test/dummy/log/test.log
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2
|
-
-------------------------------------------------------------------------
|
3
|
-
JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
|
4
|
-
-------------------------------------------------------------------------
|
5
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
6
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
-------------------------------------------------
|
8
|
-
JasperserverRailsTest: test_test.pdf_is_generated
|
9
|
-
-------------------------------------------------
|
10
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
11
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
12
|
-
--------------------------------------------------
|
13
|
-
JasperserverRailsTest: test_test2.pdf_is_generated
|
14
|
-
--------------------------------------------------
|
15
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
16
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17
|
-
--------------------------------------------------
|
18
|
-
JasperserverRailsTest: test_test3.pdf_is_generated
|
19
|
-
--------------------------------------------------
|
20
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
21
|
-
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
22
|
-
-------------------------------------------------------------------------
|
23
|
-
JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
|
24
|
-
-------------------------------------------------------------------------
|
25
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
26
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27
|
-
-------------------------------------------------
|
28
|
-
JasperserverRailsTest: test_test.pdf_is_generated
|
29
|
-
-------------------------------------------------
|
30
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
31
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
32
|
-
--------------------------------------------------
|
33
|
-
JasperserverRailsTest: test_test2.pdf_is_generated
|
34
|
-
--------------------------------------------------
|
35
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
36
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
37
|
-
--------------------------------------------------
|
38
|
-
JasperserverRailsTest: test_test3.pdf_is_generated
|
39
|
-
--------------------------------------------------
|
40
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
41
|
-
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
42
|
-
-------------------------------------------------------------------------
|
43
|
-
JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
|
44
|
-
-------------------------------------------------------------------------
|
45
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
46
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
47
|
-
-------------------------------------------------
|
48
|
-
JasperserverRailsTest: test_test.pdf_is_generated
|
49
|
-
-------------------------------------------------
|
50
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
51
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52
|
-
--------------------------------------------------
|
53
|
-
JasperserverRailsTest: test_test2.pdf_is_generated
|
54
|
-
--------------------------------------------------
|
55
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
56
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
57
|
-
--------------------------------------------------
|
58
|
-
JasperserverRailsTest: test_test3.pdf_is_generated
|
59
|
-
--------------------------------------------------
|
60
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
61
|
-
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
62
|
-
-------------------------------------------------------------------------
|
63
|
-
JasperserverRailsTest: test_stays_logged_in_when_running_multiple_reports
|
64
|
-
-------------------------------------------------------------------------
|
65
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
66
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
67
|
-
-------------------------------------------------
|
68
|
-
JasperserverRailsTest: test_test.pdf_is_generated
|
69
|
-
-------------------------------------------------
|
70
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
71
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
72
|
-
--------------------------------------------------
|
73
|
-
JasperserverRailsTest: test_test2.pdf_is_generated
|
74
|
-
--------------------------------------------------
|
75
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
76
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
77
|
-
--------------------------------------------------
|
78
|
-
JasperserverRailsTest: test_test3.pdf_is_generated
|
79
|
-
--------------------------------------------------
|
80
|
-
[1m[35m (0.1ms)[0m rollback transaction
|