lumberg 2.0.0.pre6 → 2.0.0.pre7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1cf92a64e4a2cc0dee8ca2e62d439d1e17113b5
4
- data.tar.gz: d923ec15677b82c71e354ee92ef593906928acfd
3
+ metadata.gz: 84218d59c5118e06c347f5444e91d1f877e7dd57
4
+ data.tar.gz: 64a73ca857c350cbd276647e87843651f498215c
5
5
  SHA512:
6
- metadata.gz: 743c1c15acafe8f19910fb63054fa46891503727ba0015f910abedafc349bc275ab17c7e4918168b34b0730cd95a2426c6285c581ffe8028cfb7d6e5c425fdbb
7
- data.tar.gz: c5d03b3653f88b89ff4564c9d454c0e7096f5264d92b12c16e8871bf645b61e54a154daa6bcbcd961f0d62a37203f3abe1fbd4e64ec64159ac4d00ad3ba4aefa
6
+ metadata.gz: 0e11504864abdf3e8bc63a7370beb36231ff6c95f1e8890b6ead3a61436a1d4aad8893df3bee33656b108d32f88112062c393a148de8ead317ce90dd9781a52d
7
+ data.tar.gz: 7300104732cdcc90c43c4dbbf6813aa358908c2287bf2833d06fbfdebd6eac36f7599cf808b6242353755be5c71ba22b07dca1caff022d7f1b9175c4fabf6d22
@@ -16,6 +16,7 @@ require 'lumberg/exceptions'
16
16
  require 'lumberg/config'
17
17
  require 'lumberg/whm'
18
18
  require 'lumberg/cpanel'
19
+ require 'lumberg/whostmgr'
19
20
 
20
21
  module Lumberg
21
22
 
@@ -28,6 +28,8 @@ module Lumberg
28
28
  success, message, params = format_query_response(response)
29
29
  when :ssl
30
30
  success, message, params = format_ssl_response(response)
31
+ when :whostmgr
32
+ success, message, params = format_whostmgr_response(response)
31
33
  when :error
32
34
  message = response['error']
33
35
  when :unknown
@@ -121,5 +123,12 @@ module Lumberg
121
123
  end
122
124
  return success, message, res
123
125
  end
126
+
127
+ def format_whostmgr_response(response)
128
+ message = "You have successfully deleted the SSL host"
129
+ if res = response.match(/(?<message>#{message})/)
130
+ return true, res[:message], []
131
+ end
132
+ end
124
133
  end
125
134
  end
@@ -1,3 +1,3 @@
1
1
  module Lumberg
2
- VERSION = '2.0.0.pre6'
2
+ VERSION = '2.0.0.pre7'
3
3
  end
@@ -42,6 +42,9 @@ module Lumberg
42
42
  # HTTP read/open timeout
43
43
  attr_accessor :timeout
44
44
 
45
+ # Whostmgr
46
+ attr_accessor :whostmgr
47
+
45
48
  #
46
49
  # ==== Required
47
50
  # * <tt>:host</tt> - PENDING
@@ -59,6 +62,7 @@ module Lumberg
59
62
  @user = (options.has_key?(:user) ? options.delete(:user) : 'root')
60
63
  @basic_auth = options.delete(:basic_auth)
61
64
  @timeout = options.delete(:timeout)
65
+ @whostmgr = options.delete(:whostmgr)
62
66
 
63
67
  validate_server_host
64
68
 
@@ -193,7 +197,7 @@ module Lumberg
193
197
  c.request :url_encoded
194
198
  c.response :format_whm, @force_response_type, @response_key, @boolean_params
195
199
  c.response :logger, create_logger_instance
196
- c.response :json
200
+ c.response :json unless @force_response_type == :whostmgr
197
201
  c.adapter :net_http
198
202
  c.options[:timeout] = timeout if timeout
199
203
  end.get(function).body
@@ -232,7 +236,9 @@ module Lumberg
232
236
  port = (@ssl ? 2087 : 2086)
233
237
  proto = (@ssl ? 'https' : 'http')
234
238
 
235
- "#{proto}://#{@host}:#{port}/json-api/"
239
+ api = @whostmgr ? "scripts2" : "json-api"
240
+
241
+ "#{proto}://#{@host}:#{port}/#{api}/"
236
242
  end
237
243
 
238
244
  def format_hash(hash)
@@ -0,0 +1,6 @@
1
+ module Lumberg
2
+ module Whostmgr
3
+ require "lumberg/whostmgr/base"
4
+ require "lumberg/whostmgr/ssl"
5
+ end
6
+ end
@@ -0,0 +1,14 @@
1
+ module Lumberg
2
+ module Whostmgr
3
+ class Base < Whm::Base
4
+ def perform_request(options = {})
5
+ function = options.delete(:function)
6
+
7
+ server.force_response_type = :whostmgr
8
+
9
+ server.perform_request(
10
+ function, { whostmgr: true }.merge(options))
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ module Lumberg
2
+ module Whostmgr
3
+ class Ssl < Base
4
+ # Public: Removes a SSL certificate
5
+ #
6
+ # options - Hash options for API call params (default: {}):
7
+ # :domain - Domain name for the cert removal
8
+ #
9
+ # Returns Hash API response
10
+ def remove(options = {})
11
+ host = options.delete(:domain)
12
+ perform_request({ function: "realdelsslhost", host: host })
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,172 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/scripts2/realdelsslhost?host=lumberg-test.com&whostmgr=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.40.0.26
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Date:
34
+ - Fri, 06 Dec 2013 21:10:07 GMT
35
+ Content-Type:
36
+ - text/html; charset=utf-8
37
+ body:
38
+ encoding: ASCII-8BIT
39
+ string: !binary |-
40
+ CjwhRE9DVFlQRSBodG1sIFBVQkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4w
41
+ IFRyYW5zaXRpb25hbC8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9UUi94aHRt
42
+ bDEvRFREL3hodG1sMS10cmFuc2l0aW9uYWwuZHRkIj4KPGh0bWwgeG1sbnM9
43
+ Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiIGRpcj0ibHRyIj4KPGhl
44
+ YWQ+CiAg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AgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAg
78
+ cmV0dXJuIGZhbHNlOwogICAgICAgIH07CiAgICAgICAgLy8gSW52ZXN0aWdh
79
+ dGUgaWYgdGhpcyBpcyBuZWVkZWQuCiAgICAgICAgWUFIT08udXRpbC5FdmVu
80
+ dC5vbkRPTVJlYWR5KCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgLy8gUHJl
81
+ dmlvdXMgY29kZSB0byBoaWRlIGJyZWFkY3J1bWJzLgogICAgICAgICAgICAv
82
+ KmlmIChwYXJlbnQgJiYgcGFyZW50LmZyYW1lcyAmJiBwYXJlbnQuZnJhbWVz
83
+ WzJdICYmIHBhcmVudC5mcmFtZXNbMl0ubmFtZSE9J21haW5GcmFtZScpIHsK
84
+ ICAgICAgICAgICAgICAgIGRvY3VtZW50LndyaXRlbG4oIjxzdHlsZSB0eXBl
85
+ PSd0ZXh0L2Nzcyc+LmhpZGVCcmVhZGNydW1icyB7ZGlzcGxheTpub25lfTwv
86
+ c3R5bGU+Iik7CiAgICAgICAgICAgIH0qLwogICAgICAgICAgICBpZiAocGFy
87
+ ZW50LmZyYW1lcy5jb21tYW5kZXIgJiYgcGFyZW50LmZyYW1lcy5jb21tYW5k
88
+ ZXIuY29tbWFuZGVyKSB7CiAgICAgICAgICAgICAgICBZQUhPTy51dGlsLkV2
89
+ ZW50Lm9uKHdpbmRvdywgJ2xvYWQnLAogICAgICAgICAgICAgICAgICAgIGZ1
90
+ bmN0aW9uKG8pIHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50LmZy
91
+ YW1lcy5jb21tYW5kZXIuY29tbWFuZGVyLnV0aWwuc2VsZWN0QWN0aXZlUGFn
92
+ ZUZyb21CcmVhZGNydW1iKCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAg
93
+ ICAgICAgfQogICAgICAgIH0gKTsKCiAgICAgICAgLy8gb25Db250ZW50UmVh
94
+ ZHkgc2hvdWxkIGJlIHVzZWQgZm9yIGxvYWRpbmcgYnJlYWRjcnVtYnMgaW5z
95
+ dGVhZCBvZiBvbkRvbVJlYWR5CiAgICAgICAgLy8gYmVjYXVzZSB0aGUgbmF2
96
+ aWdhdGlvbiBwYXJ0IGxvYWRzIGZpcnN0IGFuZCB3ZSBkbyBub3QgbmVlZCB0
97
+ byB3YWl0IGZvciB0aGUKICAgICAgICAvLyBlbnRpcmUgcGFnZSB0byBiZSBs
98
+ b2FkZWQuCiAgICAgICAgWUFIT08udXRpbC5FdmVudC5vbkNvbnRlbnRSZWFk
99
+ eSgibmF2aWdhdGlvbiIsIGJyZWFkY3J1bWJDb250ZW50SGFuZGxlcik7Cgog
100
+ ICAgICAgIC8qKgogICAgICAgICogSGFuZGxlcyBicmVhZGNydW1iIHJlbmRl
101
+ cmluZyBvbiBwYWdlIGxvYWQuCiAgICAgICAgKgogICAgICAgICogQG1ldGhv
102
+ ZCBicmVhZGNydW1iQ29udGVudEhhbmRsZXIKICAgICAgICAqIEBwYXJhbSB7
103
+ ZX0gZXZlbnQgb2JqZWN0CiAgICAgICAgKi8KICAgICAgICBmdW5jdGlvbiBi
104
+ cmVhZGNydW1iQ29udGVudEhhbmRsZXIoZSkgewogICAgICAgICAgICAvLyBj
105
+ b2RlIHRvIHNob3cgaGlkZSBicmVhZGNydW1icy4KICAgICAgICAgICAgLy8g
106
+ RGlzcGxheSBicmVhZGNydW1icyB3aGVuIHRoZSBwYWdlIGhhcyBmcmFtZXMg
107
+ YW5kICdtYWluRnJhbWUnIGlzIG9uZSBvZiB0aGUgZnJhbWVzIG9yCiAgICAg
108
+ ICAgICAgIC8vIHdoZW4gaW5kaXZpZHVhbCBwYWdlcyBhcmUgb3BlbmVkIGlu
109
+ IHNlcGFyYXRlIHRhYi4KICAgICAgICAgICAgaWYgKHBhcmVudCAmJiBwYXJl
110
+ bnQuZnJhbWVzICYmIHBhcmVudC5mcmFtZXMubGVuZ3RoICYmICFtYWluRnJh
111
+ bWVFeGlzdHMoKSkgewogICAgIC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bGVhZk5vZGUiPjxzcGFuPk1hbmFnZSBTU0wgSG9zdHM8L3NwYW4+PC9hPjwv
129
+ bGk+CiAgICAgICAgPC91bD4KICAgIDwvZGl2Pgo8L2Rpdj4gICAgICAgIAoK
130
+ ICAgICAgICAKICAgICAgICA8ZGl2IGlkPSJwYWdlaGVhZGVyIj4KCiAgICAg
131
+ ICAgICAgIDxkaXYgY2xhc3M9InRvcGJveG1hcmdpbiI+PC9kaXY+CiAgICAg
132
+ ICAgICAgIDxkaXYgaWQ9ImRvY3RpdGxlIj4KICAgICAgICAgICAgICAgICAg
133
+ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9InN1
134
+ cHBvcnRDb250YWluZXIiIGNsYXNzPSJzbGlkZUNvbnRhaW5lciI+CiAgICAg
135
+ ICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9InN1cHBvcnRJY29uIiBjbGFz
136
+ cz0ic2xpZGVUYWIiIHRpdGxlPSJTdXBwb3J0Ij4KICAgICAgICAgICAgICAg
137
+ ICAgICAgICAgICAgIDxhIGhyZWY9ImphdmFzY3JpcHQ6dm9pZCgwKTsiPgog
138
+ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbWcgYWx0PSJTdXBw
139
+ b3J0IFRhYiIgc3JjPSIvY1BhbmVsX21hZ2ljX3JldmlzaW9uXzEzNzA1ODc2
140
+ MzkvaW1hZ2VzL3N1cHBvcnRfdGFiLnBuZyIgLz4KICAgICAgICAgICAgICAg
141
+ ICAgICAgICAgICAgIDwvYT4KICAgICAgICAgICAgICAgICAgICAgICAgPC9k
142
+ aXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9InN1cHBvcnRQ
143
+ YW5lbCIgY2xhc3M9InNsaWRlUGFuZWwgc2hvdyI+CiAgICAgICAgICAgICAg
144
+ ICAgICAgICAgICAgICA8YSBocmVmPSJodHRwOi8vZ28uY3BhbmVsLm5ldC93
145
+ aG1mYXEiIHRhYmluZGV4PSItMSIgdGFyZ2V0PSJzdXBwb3J0X2ZhcSI+Y1Bh
146
+ bmVsICZhbXA7IFdITSBGQVE8L2E+CiAgICAgICAgICAgICAgICAgICAgICAg
147
+ ICAgICA8YSBocmVmPSJodHRwOi8vZ28uY3BhbmVsLm5ldC9jcGZvcnVtIiB0
148
+ YWJpbmRleD0iLTEiIHRhcmdldD0ic3VwcG9ydF9mb3J1bXMiPlN1cHBvcnQg
149
+ Rm9ydW1zPC9hPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJl
150
+ Zj0iaHR0cDovL2dvLmNwYW5lbC5uZXQvaG93dG8iIHRhYmluZGV4PSItMSIg
151
+ dGFyZ2V0PSJzdXBwb3J0X3dobWRvY3MiPldITSBEb2N1bWVudGF0aW9uPC9h
152
+ PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj0iaHR0cDov
153
+ L2dvLmNwYW5lbC5uZXQvZ2V0c3RhcnRlZCIgdGFiaW5kZXg9Ii0xIiB0YXJn
154
+ ZXQ9InN1cHBvcnRfY3BhbmVsZG9jcyI+Y1BhbmVsIERvY3VtZW50YXRpb248
155
+ L2E+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPSIvc2Ny
156
+ aXB0czIvcmVhbHN1Ym1pdHN1cHBvcnQiIHRhYmluZGV4PSItMSIgdGFyZ2V0
157
+ PSJzdXBwb3J0X2NvbnRhY3QiPkNvbnRhY3QgY1BhbmVsPC9hPgogICAgICAg
158
+ ICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8
159
+ L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
160
+ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGgxPjxzcGFuPjxp
161
+ bWcgc3JjPSIvY1BhbmVsX21hZ2ljX3JldmlzaW9uXzEzNzA1ODc1NTgvdGhl
162
+ bWVzL3gvaWNvbnMvbWFuYWdlX3NzbC5naWYiIGFsdD0iIiAvPjwvc3Bhbj4g
163
+ TWFuYWdlIFNTTCBIb3N0czwvaDE+CiAgICAgICAgICAgICAgICAgICAgICAg
164
+ ICAgICA8L2Rpdj4KICAgICAgICA8L2Rpdj4KICAgIDxoMz5TU0wgSG9zdCBS
165
+ ZW1vdmFsPC9oMz5Zb3UgaGF2ZSBzdWNjZXNzZnVsbHkgZGVsZXRlZCB0aGUg
166
+ U1NMIGhvc3QgZm9yIOKAnGx1bWJlcmctdGVzdC5jb23igJ0uPCEtLSBXZWIg
167
+ SG9zdCBNYW5hZ2VyIDExLjQwLjAuMjYgWzJdIChjKSBjUGFuZWwsIEluYy4g
168
+ MjAxMwogICAgICAgICAgICBodHRwOi8vY3BhbmVsLm5ldC8gIFVuYXV0aG9y
169
+ aXplZCBjb3B5aW5nIGlzIHByb2hpYml0ZWQgLS0+Cg==
170
+ http_version:
171
+ recorded_at: Fri, 06 Dec 2013 21:10:08 GMT
172
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,24 @@
1
+ require "spec_helper"
2
+
3
+ module Lumberg
4
+ module Whostmgr
5
+ describe Ssl do
6
+ let(:ssl) { described_class.new(server: server) }
7
+ let(:domain) { "lumberg-test.com" }
8
+
9
+ let(:server) do
10
+ Whm::Server.new(host: @whm_host, hash: @whm_hash, whostmgr: true)
11
+ end
12
+
13
+ describe "#remove" do
14
+ use_vcr_cassette "whostmgr/ssl/remove"
15
+
16
+ it "removes the cert" do
17
+ ssl.remove(
18
+ domain: domain
19
+ )[:message].should eq "You have successfully deleted the SSL host"
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lumberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre6
4
+ version: 2.0.0.pre7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Mazzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-08 00:00:00.000000000 Z
11
+ date: 2013-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -164,6 +164,9 @@ files:
164
164
  - lib/lumberg/whm/dns.rb
165
165
  - lib/lumberg/whm/reseller.rb
166
166
  - lib/lumberg/whm/server.rb
167
+ - lib/lumberg/whostmgr.rb
168
+ - lib/lumberg/whostmgr/base.rb
169
+ - lib/lumberg/whostmgr/ssl.rb
167
170
  - lumberg.gemspec
168
171
  - spec/config_spec.rb
169
172
  - spec/cpanel/addon_domain_spec.rb
@@ -372,6 +375,7 @@ files:
372
375
  - spec/vcr_cassettes/whm/server/systemloadavg.yml
373
376
  - spec/vcr_cassettes/whm/server/themes.yml
374
377
  - spec/vcr_cassettes/whm/server/version.yml
378
+ - spec/vcr_cassettes/whostmgr/ssl/remove.yml
375
379
  - spec/whm/account_spec.rb
376
380
  - spec/whm/base_spec.rb
377
381
  - spec/whm/cert_spec.rb
@@ -379,6 +383,7 @@ files:
379
383
  - spec/whm/reseller_spec.rb
380
384
  - spec/whm/server_spec.rb
381
385
  - spec/whm/whm_spec.rb
386
+ - spec/whostmgr/ssl_spec.rb
382
387
  homepage: ''
383
388
  licenses:
384
389
  - MIT
@@ -611,6 +616,7 @@ test_files:
611
616
  - spec/vcr_cassettes/whm/server/systemloadavg.yml
612
617
  - spec/vcr_cassettes/whm/server/themes.yml
613
618
  - spec/vcr_cassettes/whm/server/version.yml
619
+ - spec/vcr_cassettes/whostmgr/ssl/remove.yml
614
620
  - spec/whm/account_spec.rb
615
621
  - spec/whm/base_spec.rb
616
622
  - spec/whm/cert_spec.rb
@@ -618,4 +624,5 @@ test_files:
618
624
  - spec/whm/reseller_spec.rb
619
625
  - spec/whm/server_spec.rb
620
626
  - spec/whm/whm_spec.rb
627
+ - spec/whostmgr/ssl_spec.rb
621
628
  has_rdoc: