casper-client 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/casper-client.gemspec +1 -1
- data/lib/{casper_client.rb → casper-client.rb} +0 -0
- data/readme.md +32 -0
- data/spec/casper_client_spec.rb +2 -2
- metadata +3 -3
- data/README +0 -0
data/casper-client.gemspec
CHANGED
File without changes
|
data/readme.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Casper Client
|
2
|
+
|
3
|
+
It's a simple api to the Casper Server (https://github.com/twilson63/casper_server/) a sinatra web service to the Casper Reports (a jasperreports wrapper in jruby).
|
4
|
+
With this client you can send a jrxml template, a xml document and a xpath string and get the report.
|
5
|
+
|
6
|
+
# Install
|
7
|
+
|
8
|
+
```
|
9
|
+
gem install casper-client
|
10
|
+
```
|
11
|
+
|
12
|
+
# Usage Examples
|
13
|
+
|
14
|
+
Using the default service:
|
15
|
+
|
16
|
+
```
|
17
|
+
pdf = Casper::Client.build do |report|
|
18
|
+
report.xml = # xml dataset
|
19
|
+
report.template = # jrxml template
|
20
|
+
report.xpath = # xpath query string
|
21
|
+
end
|
22
|
+
```
|
23
|
+
|
24
|
+
Using another host:
|
25
|
+
|
26
|
+
```
|
27
|
+
pdf = Casper::Client.build :host => 'http://mycasperserver.com' do |report|
|
28
|
+
report.xml = # xml dataset
|
29
|
+
report.template = # jrxml template
|
30
|
+
report.xpath = # xpath query string
|
31
|
+
end
|
32
|
+
```
|
data/spec/casper_client_spec.rb
CHANGED
@@ -19,7 +19,7 @@ describe Casper::Client do
|
|
19
19
|
'casper[xpath]'=>'//root'
|
20
20
|
}
|
21
21
|
)
|
22
|
-
|
22
|
+
report = Casper::Client.build do |report|
|
23
23
|
report.xml = DATASET
|
24
24
|
report.template = TEMPLATE
|
25
25
|
report.xpath = '//root'
|
@@ -34,7 +34,7 @@ describe Casper::Client do
|
|
34
34
|
'casper[xpath]'=> '//root'
|
35
35
|
}
|
36
36
|
)
|
37
|
-
|
37
|
+
report = Casper::Client.build :host => 'http://mycasperserver.com' do |report|
|
38
38
|
report.xml = DATASET
|
39
39
|
report.template = TEMPLATE
|
40
40
|
report.xpath = '//root'
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: casper-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Daniel Tamiosso
|
@@ -59,10 +59,10 @@ files:
|
|
59
59
|
- .gitignore
|
60
60
|
- .rvmrc
|
61
61
|
- Gemfile
|
62
|
-
- README
|
63
62
|
- Rakefile
|
64
63
|
- casper-client.gemspec
|
65
|
-
- lib/
|
64
|
+
- lib/casper-client.rb
|
65
|
+
- readme.md
|
66
66
|
- spec/casper_client_spec.rb
|
67
67
|
- spec/data/dataset.xml
|
68
68
|
- spec/data/report.jrxml
|
data/README
DELETED
File without changes
|