savon_cc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -3
- data/lib/savon_cc/version.rb +1 -1
- data/lib/savon_cc.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# SavonCC
|
2
2
|
|
3
|
-
|
3
|
+
CarbonCopy Savon responses to disk for mocking use later
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,11 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Just require gem and it will write response down to disk in the format '#{operation_name}_#{timestamp}.xml'
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'savon_cc'
|
25
|
+
```
|
22
26
|
|
23
27
|
## Contributing
|
24
28
|
|
data/lib/savon_cc/version.rb
CHANGED
data/lib/savon_cc.rb
CHANGED
@@ -6,7 +6,7 @@ class Savon::Operation
|
|
6
6
|
|
7
7
|
def create_response response
|
8
8
|
stmp = Time.now.to_i.to_s
|
9
|
-
file_name = "#{instance_variable_get :@name}_#{stmp}.
|
9
|
+
file_name = "#{instance_variable_get :@name}_#{stmp}.xml"
|
10
10
|
buffer = StringIO.new
|
11
11
|
xmldoc = REXML::Document.new response.body
|
12
12
|
xmldoc.write buffer, 1
|