enom 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -48,6 +48,11 @@ Enom::Domain.available?("example.com")
48
48
  # Register a domain
49
49
  d = Enom::Domain.register!("example.com")
50
50
  # => #<Enom::Domain:0x1019f3b78...
51
+
52
+ # Delete a registration (domain must be less than 5 days old and your account
53
+ # must be on Enom's DeleteRegistration whitelist - your Enom account rep can
54
+ # enable it for you)
55
+ Enom::Domain.delete!("example.com")
51
56
  ```
52
57
 
53
58
  ## Domain Operations
@@ -112,6 +112,17 @@ module Enom
112
112
  Domain.find(name)
113
113
  end
114
114
 
115
+ # Delete a domain name registration from your account. The domain must be
116
+ # less than 5 days old and you must be on Enom's "DeleteRegistration
117
+ # whitelist" for resellers (your account rep can enable it for you).
118
+ #
119
+ # Returns true if successful, false if failed.
120
+ def self.delete!(name, options = {})
121
+ sld, tld = parse_sld_and_tld(name)
122
+
123
+ response = Client.request({'Command' => 'DeleteRegistration', 'SLD' => sld, 'TLD' => tld}.merge(options))['interface_response']
124
+ response['RRPCode'].to_i == 200
125
+ end
115
126
 
116
127
  # Transfer domain from another registrar to Enom, charges the account when successful
117
128
  # Returns true if successful, false if failed
@@ -126,6 +126,16 @@ class DomainTest < Test::Unit::TestCase
126
126
  end
127
127
  end
128
128
 
129
+ context "deleting a domain" do
130
+ setup do
131
+ @result = Enom::Domain.delete!("resellerdocs3.com")
132
+ end
133
+
134
+ should "delete the domain and return true" do
135
+ assert @result
136
+ end
137
+ end
138
+
129
139
  context "transfer a domain" do
130
140
  setup do
131
141
  @result = Enom::Domain.transfer!("resellerdocs2.net", "ros8enQi")
@@ -562,6 +562,39 @@ class Test::Unit::TestCase
562
562
  </debug>
563
563
  </interface-response>
564
564
  EOF
565
+ },
566
+ {
567
+ :command => "DeleteRegistration",
568
+ :request => "https://reseller.enom.com/interface.asp?Command=DeleteRegistration&SLD=resellerdocs3&TLD=com&UID=resellid&PW=resellpw&ResponseType=xml",
569
+ :response => <<-EOF
570
+ <?xml version="1.0"?>
571
+ <interface-response>
572
+ <deletedomain>
573
+ <domaindeleted>True</domaindeleted>
574
+ </deletedomain>
575
+ <ErrString/>
576
+ <ErrSource/>
577
+ <ErrSection>DELETEREGISTRATION</ErrSection>
578
+ <RRPCode>200</RRPCode>
579
+ <RRPText>Command completed successfully</RRPText>
580
+ <Command>DELETEREGISTRATION</Command>
581
+ <Language>eng</Language>
582
+ <ErrCount>0</ErrCount>
583
+ <ResponseCount>0</ResponseCount>
584
+ <MinPeriod>1</MinPeriod>
585
+ <MaxPeriod>10</MaxPeriod>
586
+ <Server>RESELLERTEST</Server>
587
+ <Site>enom</Site>
588
+ <IsLockable>True</IsLockable>
589
+ <IsRealTimeTLD>True</IsRealTimeTLD>
590
+ <TimeDifference>+03.00</TimeDifference>
591
+ <ExecTime>2.75</ExecTime>
592
+ <Done>true</Done>
593
+ <debug>
594
+ [CDATA ]
595
+ </debug>
596
+ </interface-response>
597
+ EOF
565
598
  }
566
599
  ]
567
600
 
metadata CHANGED
@@ -1,106 +1,104 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: enom
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 1
10
- version: 1.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - James Miller
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-02-02 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-04-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: httparty
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 19
29
- segments:
30
- - 0
31
- - 7
32
- - 8
20
+ - !ruby/object:Gem::Version
33
21
  version: 0.7.8
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: public_suffix
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.7.8
30
+ - !ruby/object:Gem::Dependency
31
+ name: public_suffix
32
+ requirement: !ruby/object:Gem::Requirement
40
33
  none: false
41
- requirements:
34
+ requirements:
42
35
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 23
45
- segments:
46
- - 1
47
- - 0
48
- - 0
49
- version: 1.0.0
36
+ - !ruby/object:Gem::Version
37
+ version: 1.1.0
50
38
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: shoulda
54
39
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.1.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: shoulda
48
+ requirement: !ruby/object:Gem::Requirement
56
49
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 0
63
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
64
54
  type: :development
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: fakeweb
68
55
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: fakeweb
64
+ requirement: !ruby/object:Gem::Requirement
70
65
  none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- hash: 3
75
- segments:
76
- - 0
77
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
78
70
  type: :development
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: rake
82
71
  prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
84
73
  none: false
85
- requirements:
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rake
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
86
83
  - - ~>
87
- - !ruby/object:Gem::Version
88
- hash: 25
89
- segments:
90
- - 0
91
- - 9
92
- version: "0.9"
84
+ - !ruby/object:Gem::Version
85
+ version: '0.9'
93
86
  type: :development
94
- version_requirements: *id005
95
- description: Enom is a Ruby wrapper and command line interface for portions of the Enom domain reseller API.
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '0.9'
94
+ description: Enom is a Ruby wrapper and command line interface for portions of the
95
+ Enom domain reseller API.
96
96
  email: bensie@gmail.com
97
- executables:
97
+ executables:
98
98
  - enom
99
99
  extensions: []
100
-
101
100
  extra_rdoc_files: []
102
-
103
- files:
101
+ files:
104
102
  - README.md
105
103
  - Rakefile
106
104
  - LICENSE
@@ -127,36 +125,26 @@ files:
127
125
  - bin/enom.rb
128
126
  homepage: http://github.com/bensie/enom
129
127
  licenses: []
130
-
131
128
  post_install_message:
132
129
  rdoc_options: []
133
-
134
- require_paths:
130
+ require_paths:
135
131
  - lib
136
- required_ruby_version: !ruby/object:Gem::Requirement
132
+ required_ruby_version: !ruby/object:Gem::Requirement
137
133
  none: false
138
- requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- hash: 3
142
- segments:
143
- - 0
144
- version: "0"
145
- required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ! '>='
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
139
  none: false
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- hash: 3
151
- segments:
152
- - 0
153
- version: "0"
140
+ requirements:
141
+ - - ! '>='
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
154
144
  requirements: []
155
-
156
145
  rubyforge_project:
157
- rubygems_version: 1.8.10
146
+ rubygems_version: 1.8.21
158
147
  signing_key:
159
148
  specification_version: 3
160
149
  summary: Ruby wrapper for the Enom API
161
150
  test_files: []
162
-