moo_moo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/.rspec +2 -0
- data/.rvmrc +59 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +63 -0
- data/Rakefile +55 -0
- data/lib/cacert.pem +3910 -0
- data/lib/moo_moo/config.rb +13 -0
- data/lib/moo_moo/opensrs/args.rb +109 -0
- data/lib/moo_moo/opensrs/base.rb +75 -0
- data/lib/moo_moo/opensrs/command.rb +190 -0
- data/lib/moo_moo/opensrs/cookie_commands.rb +52 -0
- data/lib/moo_moo/opensrs/lookup_commands.rb +195 -0
- data/lib/moo_moo/opensrs/nameserver_commands.rb +70 -0
- data/lib/moo_moo/opensrs/opensrsexception.rb +6 -0
- data/lib/moo_moo/opensrs/provisioning_commands.rb +167 -0
- data/lib/moo_moo/opensrs/response.rb +41 -0
- data/lib/moo_moo/opensrs/transfer_commands.rb +83 -0
- data/lib/moo_moo/opensrs/utils.rb +13 -0
- data/lib/moo_moo/opensrs.rb +8 -0
- data/lib/moo_moo/version.rb +3 -0
- data/lib/moo_moo.rb +16 -0
- data/moo_moo.gemspec +33 -0
- data/spec/moo_moo_spec.rb +17 -0
- data/spec/opensrs/args_spec.rb +179 -0
- data/spec/opensrs/cookie_spec.rb +78 -0
- data/spec/opensrs/lookup_spec.rb +212 -0
- data/spec/opensrs/nameserver_spec.rb +124 -0
- data/spec/opensrs/opensrs_spec.rb +35 -0
- data/spec/opensrs/provisioning_spec.rb +271 -0
- data/spec/opensrs/transfer_spec.rb +197 -0
- data/spec/opensrs/utils_spec.rb +12 -0
- data/spec/spec_helper.rb +57 -0
- data/spec/vcr_cassettes/cookie/delete_cookie.yml +219 -0
- data/spec/vcr_cassettes/cookie/quit_session.yml +97 -0
- data/spec/vcr_cassettes/cookie/set_cookie.yml +123 -0
- data/spec/vcr_cassettes/cookie/set_cookie_fail.yml +54 -0
- data/spec/vcr_cassettes/cookie/update_cookie.yml +239 -0
- data/spec/vcr_cassettes/lookup/belongs_to_rsp.yml +54 -0
- data/spec/vcr_cassettes/lookup/belongs_to_rsp_negative.yml +55 -0
- data/spec/vcr_cassettes/lookup/get_balance.yml +55 -0
- data/spec/vcr_cassettes/lookup/get_deleted_domains.yml +80 -0
- data/spec/vcr_cassettes/lookup/get_domain.yml +211 -0
- data/spec/vcr_cassettes/lookup/get_domain_fail.yml +269 -0
- data/spec/vcr_cassettes/lookup/get_domains_by_expiredate.yml +76 -0
- data/spec/vcr_cassettes/lookup/get_domains_contacts.yml +129 -0
- data/spec/vcr_cassettes/lookup/get_domains_contacts_fail.yml +58 -0
- data/spec/vcr_cassettes/lookup/get_notes_for_domain.yml +85 -0
- data/spec/vcr_cassettes/lookup/get_notes_for_order.yml +61 -0
- data/spec/vcr_cassettes/lookup/get_notes_for_transfer.yml +61 -0
- data/spec/vcr_cassettes/lookup/get_order_info.yml +139 -0
- data/spec/vcr_cassettes/lookup/get_orders_by_domain.yml +76 -0
- data/spec/vcr_cassettes/lookup/get_price.yml +54 -0
- data/spec/vcr_cassettes/lookup/get_product_info.yml +49 -0
- data/spec/vcr_cassettes/lookup/lookup_domain_available.yml +55 -0
- data/spec/vcr_cassettes/lookup/lookup_domain_registered.yml +55 -0
- data/spec/vcr_cassettes/lookup/name_suggest.yml +396 -0
- data/spec/vcr_cassettes/nameserver/create.yml +49 -0
- data/spec/vcr_cassettes/nameserver/delete.yml +49 -0
- data/spec/vcr_cassettes/nameserver/get.yml +71 -0
- data/spec/vcr_cassettes/nameserver/modify.yml +49 -0
- data/spec/vcr_cassettes/provisioning/cancel_order.yml +56 -0
- data/spec/vcr_cassettes/provisioning/cancel_order_invalid.yml +49 -0
- data/spec/vcr_cassettes/provisioning/cancel_pending_orders.yml +58 -0
- data/spec/vcr_cassettes/provisioning/modify_all_domains.yml +49 -0
- data/spec/vcr_cassettes/provisioning/modify_domain.yml +49 -0
- data/spec/vcr_cassettes/provisioning/process_pending.yml +57 -0
- data/spec/vcr_cassettes/provisioning/register_domain.yml +57 -0
- data/spec/vcr_cassettes/provisioning/register_pending_domain.yml +55 -0
- data/spec/vcr_cassettes/provisioning/register_taken_domain.yml +55 -0
- data/spec/vcr_cassettes/provisioning/renew_domain.yml +58 -0
- data/spec/vcr_cassettes/provisioning/revoke_domain.yml +55 -0
- data/spec/vcr_cassettes/provisioning/trust_service.yml +60 -0
- data/spec/vcr_cassettes/provisioning/update_contacts.yml +66 -0
- data/spec/vcr_cassettes/transfer/cancel_transfer.yml +49 -0
- data/spec/vcr_cassettes/transfer/cancel_trasnfer_order.yml +49 -0
- data/spec/vcr_cassettes/transfer/check_transfer.yml +56 -0
- data/spec/vcr_cassettes/transfer/check_transfer_exists.yml +57 -0
- data/spec/vcr_cassettes/transfer/get_transfers_away.yml +60 -0
- data/spec/vcr_cassettes/transfer/get_transfers_in.yml +80 -0
- data/spec/vcr_cassettes/transfer/process_transfer.yml +49 -0
- data/spec/vcr_cassettes/transfer/process_transfer_unsuccessful.yml +49 -0
- data/spec/vcr_cassettes/transfer/rsp2rsp_push_transfer.yml +49 -0
- data/spec/vcr_cassettes/transfer/send_password.yml +49 -0
- data/spec/vcr_cassettes/transfer/transfer.yml +58 -0
- metadata +280 -0
@@ -0,0 +1,197 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'moo_moo/opensrs'
|
3
|
+
|
4
|
+
module MooMoo
|
5
|
+
|
6
|
+
describe OpenSRS do
|
7
|
+
before(:each) do
|
8
|
+
def random_domain
|
9
|
+
"domainthatsnottaken#{Time.now.to_i}.com"
|
10
|
+
end
|
11
|
+
|
12
|
+
@opensrs = OpenSRS::Base.new
|
13
|
+
@registered_domain = "domainthatsnottaken1302209138.com"
|
14
|
+
@contacts = {
|
15
|
+
:title => "blahblah",
|
16
|
+
:owner => {
|
17
|
+
:first_name => "Owen",
|
18
|
+
:last_name => "Ottway",
|
19
|
+
:phone => "+1.4165550123x1902",
|
20
|
+
:fax => "+1.4165550124",
|
21
|
+
:email => "ottway@example.com",
|
22
|
+
:org_name => "Example Inc.",
|
23
|
+
:address1 => "32 Oak Street",
|
24
|
+
:address2 => "Suite 500",
|
25
|
+
:address3 => "Owner",
|
26
|
+
:city => "SomeCity",
|
27
|
+
:state => "CA",
|
28
|
+
:country => "US",
|
29
|
+
:postal_code => "90210",
|
30
|
+
:url => "http://www.example.com"
|
31
|
+
},
|
32
|
+
:admin => {
|
33
|
+
:first_name => "Owen",
|
34
|
+
:last_name => "Ottway",
|
35
|
+
:phone => "+1.4165550123x1902",
|
36
|
+
:fax => "+1.4165550124",
|
37
|
+
:email => "ottway@example.com",
|
38
|
+
:org_name => "Example Inc.",
|
39
|
+
:address1 => "32 Oak Street",
|
40
|
+
:address2 => "Suite 500",
|
41
|
+
:address3 => "Owner",
|
42
|
+
:city => "SomeCity",
|
43
|
+
:state => "CA",
|
44
|
+
:country => "US",
|
45
|
+
:postal_code => "90210",
|
46
|
+
:url => "http://www.example.com"
|
47
|
+
},
|
48
|
+
:billing => {
|
49
|
+
:first_name => "Owen",
|
50
|
+
:last_name => "Ottway",
|
51
|
+
:phone => "+1.4165550123x1902",
|
52
|
+
:fax => "+1.4165550124",
|
53
|
+
:email => "ottway@example.com",
|
54
|
+
:org_name => "Example Inc.",
|
55
|
+
:address1 => "32 Oak Street",
|
56
|
+
:address2 => "Suite 500",
|
57
|
+
:address3 => "Owner",
|
58
|
+
:city => "SomeCity",
|
59
|
+
:state => "CA",
|
60
|
+
:country => "US",
|
61
|
+
:postal_code => "90210",
|
62
|
+
:url => "http://www.example.com"
|
63
|
+
},
|
64
|
+
:tech => {
|
65
|
+
:first_name => "Owen",
|
66
|
+
:last_name => "Ottway",
|
67
|
+
:phone => "+1.4165550123x1902",
|
68
|
+
:fax => "+1.4165550124",
|
69
|
+
:email => "ottway@example.com",
|
70
|
+
:org_name => "Example Inc.",
|
71
|
+
:address1 => "32 Oak Street",
|
72
|
+
:address2 => "Suite 500",
|
73
|
+
:address3 => "Owner",
|
74
|
+
:city => "SomeCity",
|
75
|
+
:state => "CA",
|
76
|
+
:country => "US",
|
77
|
+
:postal_code => "90210",
|
78
|
+
:url => "http://www.example.com"
|
79
|
+
}
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
describe "TransferCommands" do
|
84
|
+
describe "#cancel_transfer" do
|
85
|
+
it "cancels the transfer for a domain" do
|
86
|
+
VCR.use_cassette("transfer/cancel_transfer") do
|
87
|
+
res = @opensrs.cancel_transfer(:domain => 'exampledomain.com', :reseller => MooMoo.config.user)
|
88
|
+
res.success?.should be_false
|
89
|
+
res.error_code.should == 400
|
90
|
+
res.error_msg.should match(/transfer state prohibits cancellation/i)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
it "cancels the transfer for an order" do
|
95
|
+
VCR.use_cassette("transfer/cancel_trasnfer_order") do
|
96
|
+
res = @opensrs.cancel_transfer_for_order(:order_id => 1884820, :reseller => MooMoo.config.user)
|
97
|
+
res.success?.should be_false
|
98
|
+
res.error_code.should == 400
|
99
|
+
res.error_msg.should match(/transfer state prohibits cancellation/i)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
describe "#check_transfer" do
|
105
|
+
it "shows in progress if the transfer is in progress" do
|
106
|
+
VCR.use_cassette("transfer/check_transfer") do
|
107
|
+
res = @opensrs.check_transfer('exampledomain.com')
|
108
|
+
res.result['transferrable'].to_i.should == 0
|
109
|
+
res.result['reason'].should match(/Transfer in progress/i)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
it "says the domain already exists if it does" do
|
114
|
+
VCR.use_cassette("transfer/check_transfer_exists") do
|
115
|
+
res = @opensrs.check_transfer(@registered_domain)
|
116
|
+
res.result['transferrable'].to_i.should == 0
|
117
|
+
res.result['reason'].should match(/Domain already exists in.*account/i)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe "#get_transfers_away" do
|
123
|
+
use_vcr_cassette "transfer/get_transfers_away"
|
124
|
+
|
125
|
+
it "lists domains that have been transferred away" do
|
126
|
+
res = @opensrs.get_transfers_away
|
127
|
+
res.result['total'].to_i.should == 0
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
describe "#get_tranfers_in" do
|
132
|
+
use_vcr_cassette "transfer/get_transfers_in"
|
133
|
+
|
134
|
+
it "lists domains that have been transferred in" do
|
135
|
+
res = @opensrs.get_transfers_in
|
136
|
+
res.result['total'].to_i.should == 1
|
137
|
+
res.result['transfers']['0']['domain'].should == "testingdomain.com"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "#process_transfer" do
|
142
|
+
it "performs a new order with cancelled order's data" do
|
143
|
+
VCR.use_cassette("transfer/process_transfer") do
|
144
|
+
result = @opensrs.process_transfer(:order_id => 123, :reseller => MooMoo.config.user)
|
145
|
+
result.success?.should be_true
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
it "does not transfer if the status does not allow it" do
|
150
|
+
VCR.use_cassette("transfer/process_transfer_unsuccessful") do
|
151
|
+
result = @opensrs.process_transfer(:order_id => 123, :reseller => MooMoo.config.user)
|
152
|
+
result.success?.should be_false
|
153
|
+
result.error_code.should == 400
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
describe "#send_password (transfer)" do
|
159
|
+
use_vcr_cassette "transfer/send_password"
|
160
|
+
|
161
|
+
it "resends email message to admin contact" do
|
162
|
+
result = @opensrs.send_password('fdsafsfsafafsaexample.com')
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
describe "#push_transfer" do
|
167
|
+
use_vcr_cassette "transfer/rsp2rsp_push_transfer"
|
168
|
+
|
169
|
+
it "transfers the domain" do
|
170
|
+
res = @opensrs.push_transfer(:domain => @registered_domain,
|
171
|
+
:username => MooMoo.config.user,
|
172
|
+
:password => MooMoo.config.pass,
|
173
|
+
:reseller => 'opensrs')
|
174
|
+
res.success?.should be_false
|
175
|
+
res.error_code.should == 465
|
176
|
+
res.error_msg.should match(/transfer permission denied/i)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
describe "#transfer" do
|
181
|
+
use_vcr_cassette "transfer/transfer"
|
182
|
+
|
183
|
+
it "initiates the transfer" do
|
184
|
+
res = @opensrs.register_domain(
|
185
|
+
:domain => 'testingdomain.com',
|
186
|
+
:contacts => @contacts,
|
187
|
+
:nameservers => ["ns1.systemdns.com", "ns2.systemdns.com"],
|
188
|
+
:term => 1,
|
189
|
+
:options => {:reg_type => :transfer})
|
190
|
+
res.success?.should be_true
|
191
|
+
res.result['id'].to_i.should == 1885789
|
192
|
+
res.result['registration_text'].should match(/transfer request initiated/i)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'moo_moo'
|
3
|
+
require 'vcr'
|
4
|
+
require 'extlib'
|
5
|
+
|
6
|
+
MooMoo.configure do |config|
|
7
|
+
config.host = ENV['OPENSRS_TEST_URL']
|
8
|
+
config.key = ENV['OPENSRS_TEST_KEY']
|
9
|
+
config.user = ENV['OPENSRS_TEST_USER']
|
10
|
+
config.pass = ENV['OPENSRS_TEST_PASS']
|
11
|
+
end
|
12
|
+
|
13
|
+
def requires_attr(attr, &block)
|
14
|
+
expect { block.call }.to raise_error(MooMoo::MooMooArgumentError, /Missing required parameter: #{attr}/i)
|
15
|
+
end
|
16
|
+
|
17
|
+
VCR.config do |c|
|
18
|
+
c.cassette_library_dir = 'spec/vcr_cassettes'
|
19
|
+
c.stub_with :fakeweb
|
20
|
+
|
21
|
+
c.default_cassette_options = {:record => :new_episodes, :match_requests_on => [:uri]}
|
22
|
+
end
|
23
|
+
|
24
|
+
def live_test?
|
25
|
+
!ENV['OPENSRS_REAL'].nil?
|
26
|
+
end
|
27
|
+
|
28
|
+
RSpec.configure do |c|
|
29
|
+
c.extend VCR::RSpec::Macros
|
30
|
+
c.before(:each) do
|
31
|
+
if live_test?
|
32
|
+
MooMoo.configure do |config|
|
33
|
+
config.host = ENV['OPENSRS_TEST_URL']
|
34
|
+
config.key = ENV['OPENSRS_TEST_KEY']
|
35
|
+
config.user = ENV['OPENSRS_TEST_USER']
|
36
|
+
config.pass = ENV['OPENSRS_TEST_PASS']
|
37
|
+
end
|
38
|
+
else
|
39
|
+
MooMoo.configure do |config|
|
40
|
+
config.host = 'server.com'
|
41
|
+
config.key = '123key'
|
42
|
+
config.user = 'opensrs_user'
|
43
|
+
config.pass = 'password'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
RSpec::Matchers.define :have_attr_accessor do |attribute|
|
50
|
+
match do |object|
|
51
|
+
object.respond_to?(attribute) && object.respond_to?("#{attribute}=")
|
52
|
+
end
|
53
|
+
|
54
|
+
description do
|
55
|
+
"have attr_writer :#{attribute}"
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,219 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://server.com:55443/
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- text/xml
|
10
|
+
x-username:
|
11
|
+
- opensrs_user
|
12
|
+
x-signature:
|
13
|
+
- 0
|
14
|
+
content-length:
|
15
|
+
- "713"
|
16
|
+
response: !ruby/struct:VCR::Response
|
17
|
+
status: !ruby/struct:VCR::ResponseStatus
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
date:
|
22
|
+
- Fri, 06 May 2011 18:41:24 GMT
|
23
|
+
server:
|
24
|
+
- OpenSRS/XML-RSA Server
|
25
|
+
content-length:
|
26
|
+
- "975"
|
27
|
+
content-type:
|
28
|
+
- text/xml
|
29
|
+
body: |-
|
30
|
+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
|
31
|
+
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
|
32
|
+
<OPS_envelope>
|
33
|
+
<header>
|
34
|
+
<version>0.9</version>
|
35
|
+
</header>
|
36
|
+
<body>
|
37
|
+
<data_block>
|
38
|
+
<dt_assoc>
|
39
|
+
<item key="protocol">XCP</item>
|
40
|
+
<item key="object">COOKIE</item>
|
41
|
+
<item key="response_text">Command Successful</item>
|
42
|
+
<item key="action">REPLY</item>
|
43
|
+
<item key="attributes">
|
44
|
+
<dt_assoc>
|
45
|
+
<item key="permission"></item>
|
46
|
+
<item key="cookie">0000000000000000:000000:00000</item>
|
47
|
+
<item key="expiredate">2012-04-07 20:45:46</item>
|
48
|
+
<item key="domain_count">1</item>
|
49
|
+
<item key="last_access_time">1304707283</item>
|
50
|
+
<item key="f_owner">1</item>
|
51
|
+
<item key="waiting_requests_no">0</item>
|
52
|
+
<item key="waiting_request">None</item>
|
53
|
+
<item key="last_ip"></item>
|
54
|
+
</dt_assoc>
|
55
|
+
</item>
|
56
|
+
<item key="response_code">200</item>
|
57
|
+
<item key="is_success">1</item>
|
58
|
+
</dt_assoc>
|
59
|
+
</data_block>
|
60
|
+
</body>
|
61
|
+
</OPS_envelope>
|
62
|
+
http_version: "1.1"
|
63
|
+
- !ruby/struct:VCR::HTTPInteraction
|
64
|
+
request: !ruby/struct:VCR::Request
|
65
|
+
method: :post
|
66
|
+
uri: https://server.com:55443/
|
67
|
+
body:
|
68
|
+
headers:
|
69
|
+
content-type:
|
70
|
+
- text/xml
|
71
|
+
x-username:
|
72
|
+
- opensrs_user
|
73
|
+
x-signature:
|
74
|
+
- 0
|
75
|
+
content-length:
|
76
|
+
- "688"
|
77
|
+
response: !ruby/struct:VCR::Response
|
78
|
+
status: !ruby/struct:VCR::ResponseStatus
|
79
|
+
code: 200
|
80
|
+
message: OK
|
81
|
+
headers:
|
82
|
+
date:
|
83
|
+
- Fri, 06 May 2011 18:41:25 GMT
|
84
|
+
server:
|
85
|
+
- OpenSRS/XML-RSA Server
|
86
|
+
content-length:
|
87
|
+
- "493"
|
88
|
+
content-type:
|
89
|
+
- text/xml
|
90
|
+
body: |-
|
91
|
+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
|
92
|
+
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
|
93
|
+
<OPS_envelope>
|
94
|
+
<header>
|
95
|
+
<version>0.9</version>
|
96
|
+
</header>
|
97
|
+
<body>
|
98
|
+
<data_block>
|
99
|
+
<dt_assoc>
|
100
|
+
<item key="protocol">XCP</item>
|
101
|
+
<item key="object">COOKIE</item>
|
102
|
+
<item key="response_text">Command Successful</item>
|
103
|
+
<item key="action">REPLY</item>
|
104
|
+
<item key="response_code">200</item>
|
105
|
+
<item key="is_success">1</item>
|
106
|
+
</dt_assoc>
|
107
|
+
</data_block>
|
108
|
+
</body>
|
109
|
+
</OPS_envelope>
|
110
|
+
http_version: "1.1"
|
111
|
+
- !ruby/struct:VCR::HTTPInteraction
|
112
|
+
request: !ruby/struct:VCR::Request
|
113
|
+
method: :post
|
114
|
+
uri: https://server.com:55443/
|
115
|
+
body:
|
116
|
+
headers:
|
117
|
+
content-type:
|
118
|
+
- text/xml
|
119
|
+
x-username:
|
120
|
+
- opensrs_user
|
121
|
+
x-signature:
|
122
|
+
- 00000000000000000000000000000000
|
123
|
+
content-length:
|
124
|
+
- "713"
|
125
|
+
response: !ruby/struct:VCR::Response
|
126
|
+
status: !ruby/struct:VCR::ResponseStatus
|
127
|
+
code: 200
|
128
|
+
message: OK
|
129
|
+
headers:
|
130
|
+
date:
|
131
|
+
- Fri, 06 May 2011 18:42:36 GMT
|
132
|
+
server:
|
133
|
+
- OpenSRS/XML-RSA Server
|
134
|
+
content-length:
|
135
|
+
- "975"
|
136
|
+
content-type:
|
137
|
+
- text/xml
|
138
|
+
body: |-
|
139
|
+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
|
140
|
+
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
|
141
|
+
<OPS_envelope>
|
142
|
+
<header>
|
143
|
+
<version>0.9</version>
|
144
|
+
</header>
|
145
|
+
<body>
|
146
|
+
<data_block>
|
147
|
+
<dt_assoc>
|
148
|
+
<item key="protocol">XCP</item>
|
149
|
+
<item key="object">COOKIE</item>
|
150
|
+
<item key="response_text">Command Successful</item>
|
151
|
+
<item key="action">REPLY</item>
|
152
|
+
<item key="attributes">
|
153
|
+
<dt_assoc>
|
154
|
+
<item key="permission"></item>
|
155
|
+
<item key="cookie">0000000000000000:000000:00000</item>
|
156
|
+
<item key="expiredate">2012-04-07 20:45:46</item>
|
157
|
+
<item key="domain_count">1</item>
|
158
|
+
<item key="last_access_time">1304707356</item>
|
159
|
+
<item key="f_owner">1</item>
|
160
|
+
<item key="waiting_requests_no">0</item>
|
161
|
+
<item key="waiting_request">None</item>
|
162
|
+
<item key="last_ip"></item>
|
163
|
+
</dt_assoc>
|
164
|
+
</item>
|
165
|
+
<item key="response_code">200</item>
|
166
|
+
<item key="is_success">1</item>
|
167
|
+
</dt_assoc>
|
168
|
+
</data_block>
|
169
|
+
</body>
|
170
|
+
</OPS_envelope>
|
171
|
+
http_version: "1.1"
|
172
|
+
- !ruby/struct:VCR::HTTPInteraction
|
173
|
+
request: !ruby/struct:VCR::Request
|
174
|
+
method: :post
|
175
|
+
uri: https://server.com:55443/
|
176
|
+
body:
|
177
|
+
headers:
|
178
|
+
content-type:
|
179
|
+
- text/xml
|
180
|
+
x-username:
|
181
|
+
- opensrs_user
|
182
|
+
x-signature:
|
183
|
+
- 00000000000000000000000000000000
|
184
|
+
content-length:
|
185
|
+
- "688"
|
186
|
+
response: !ruby/struct:VCR::Response
|
187
|
+
status: !ruby/struct:VCR::ResponseStatus
|
188
|
+
code: 200
|
189
|
+
message: OK
|
190
|
+
headers:
|
191
|
+
date:
|
192
|
+
- Fri, 06 May 2011 18:42:37 GMT
|
193
|
+
server:
|
194
|
+
- OpenSRS/XML-RSA Server
|
195
|
+
content-length:
|
196
|
+
- "493"
|
197
|
+
content-type:
|
198
|
+
- text/xml
|
199
|
+
body: |-
|
200
|
+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
|
201
|
+
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
|
202
|
+
<OPS_envelope>
|
203
|
+
<header>
|
204
|
+
<version>0.9</version>
|
205
|
+
</header>
|
206
|
+
<body>
|
207
|
+
<data_block>
|
208
|
+
<dt_assoc>
|
209
|
+
<item key="protocol">XCP</item>
|
210
|
+
<item key="object">COOKIE</item>
|
211
|
+
<item key="response_text">Command Successful</item>
|
212
|
+
<item key="action">REPLY</item>
|
213
|
+
<item key="response_code">200</item>
|
214
|
+
<item key="is_success">1</item>
|
215
|
+
</dt_assoc>
|
216
|
+
</data_block>
|
217
|
+
</body>
|
218
|
+
</OPS_envelope>
|
219
|
+
http_version: "1.1"
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :post
|
5
|
+
uri: https://server.com:55443/
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- text/xml
|
10
|
+
x-username:
|
11
|
+
- opensrs_user
|
12
|
+
x-signature:
|
13
|
+
- 0
|
14
|
+
content-length:
|
15
|
+
- "569"
|
16
|
+
response: !ruby/struct:VCR::Response
|
17
|
+
status: !ruby/struct:VCR::ResponseStatus
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
date:
|
22
|
+
- Fri, 06 May 2011 18:41:26 GMT
|
23
|
+
server:
|
24
|
+
- OpenSRS/XML-RSA Server
|
25
|
+
content-length:
|
26
|
+
- "494"
|
27
|
+
content-type:
|
28
|
+
- text/xml
|
29
|
+
body: |-
|
30
|
+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
|
31
|
+
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
|
32
|
+
<OPS_envelope>
|
33
|
+
<header>
|
34
|
+
<version>0.9</version>
|
35
|
+
</header>
|
36
|
+
<body>
|
37
|
+
<data_block>
|
38
|
+
<dt_assoc>
|
39
|
+
<item key="protocol">XCP</item>
|
40
|
+
<item key="object">SESSION</item>
|
41
|
+
<item key="response_text">Closing connection</item>
|
42
|
+
<item key="action">REPLY</item>
|
43
|
+
<item key="response_code">200</item>
|
44
|
+
<item key="is_success">1</item>
|
45
|
+
</dt_assoc>
|
46
|
+
</data_block>
|
47
|
+
</body>
|
48
|
+
</OPS_envelope>
|
49
|
+
http_version: "1.1"
|
50
|
+
- !ruby/struct:VCR::HTTPInteraction
|
51
|
+
request: !ruby/struct:VCR::Request
|
52
|
+
method: :post
|
53
|
+
uri: https://server.com:55443/
|
54
|
+
body:
|
55
|
+
headers:
|
56
|
+
content-type:
|
57
|
+
- text/xml
|
58
|
+
x-username:
|
59
|
+
- opensrs_user
|
60
|
+
x-signature:
|
61
|
+
- 00000000000000000000000000000000
|
62
|
+
content-length:
|
63
|
+
- "569"
|
64
|
+
response: !ruby/struct:VCR::Response
|
65
|
+
status: !ruby/struct:VCR::ResponseStatus
|
66
|
+
code: 200
|
67
|
+
message: OK
|
68
|
+
headers:
|
69
|
+
date:
|
70
|
+
- Fri, 06 May 2011 18:42:39 GMT
|
71
|
+
server:
|
72
|
+
- OpenSRS/XML-RSA Server
|
73
|
+
content-length:
|
74
|
+
- "494"
|
75
|
+
content-type:
|
76
|
+
- text/xml
|
77
|
+
body: |-
|
78
|
+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
|
79
|
+
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
|
80
|
+
<OPS_envelope>
|
81
|
+
<header>
|
82
|
+
<version>0.9</version>
|
83
|
+
</header>
|
84
|
+
<body>
|
85
|
+
<data_block>
|
86
|
+
<dt_assoc>
|
87
|
+
<item key="protocol">XCP</item>
|
88
|
+
<item key="object">SESSION</item>
|
89
|
+
<item key="response_text">Closing connection</item>
|
90
|
+
<item key="action">REPLY</item>
|
91
|
+
<item key="response_code">200</item>
|
92
|
+
<item key="is_success">1</item>
|
93
|
+
</dt_assoc>
|
94
|
+
</data_block>
|
95
|
+
</body>
|
96
|
+
</OPS_envelope>
|
97
|
+
http_version: "1.1"
|