pitcher 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pitcher/version.rb +1 -1
- data/lib/pitcher.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de16086590c8f4982525e29bb1ad1ca57617c4ee
|
4
|
+
data.tar.gz: 632ad63343048087fd1aa7005f30a97c087aba68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f21dd1ccf742a9350a1938e6640cbf11241752f4e81e6d40afe77af2453d6ea2e38600c45059cb98ba2a0cc1746952742ef016255c8ac182687da0f606b7ae1
|
7
|
+
data.tar.gz: 8c37551be89af6aaf23f810d63100cb830f9b097075a1a7f4057345d5cdb976c54a9036c443cd5984db9b162a7a3fb755f4d8cf999b11c5888a1529d16630df0
|
data/lib/pitcher/version.rb
CHANGED
data/lib/pitcher.rb
CHANGED
@@ -55,11 +55,11 @@ module Pitcher
|
|
55
55
|
)
|
56
56
|
# Create the hash that will be sent as a message to the service with the creds and data above
|
57
57
|
response = client.call(:process_conten_tdm, message: message)
|
58
|
-
#
|
58
|
+
# build request without sending
|
59
59
|
request = client.build_request(:process_conten_tdm, message: message)
|
60
|
-
|
61
|
-
# parse request body xml, extract username
|
62
|
-
doc = Nokogiri::XML(
|
60
|
+
|
61
|
+
# parse request body xml, extract username
|
62
|
+
doc = Nokogiri::XML(request.body)
|
63
63
|
user = doc.at('username').text
|
64
64
|
# Write response to a file
|
65
65
|
File.open('response-' + user + '.txt', 'a') { |file| file.write("\r" + request.body + "\r" + response.body.to_hash[:process_conten_tdm_response][:return] ) }
|