cpanel 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +42 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/cpanel.gemspec +3 -3
- metadata +4 -10
data/README.rdoc
CHANGED
@@ -2,6 +2,48 @@
|
|
2
2
|
|
3
3
|
cPanel connection wrapper for Ruby.
|
4
4
|
|
5
|
+
== Example Usage
|
6
|
+
|
7
|
+
You will first need to build the basic class for the remote server calls you wish to implement. I wrote the plugin to be extremely barebones,
|
8
|
+
so you could implement what you deemed necessary to stay lean:
|
9
|
+
|
10
|
+
require 'cpanel'
|
11
|
+
|
12
|
+
class CpanelServer
|
13
|
+
attr_reader :server
|
14
|
+
|
15
|
+
def initialize(url, key)
|
16
|
+
@server = Cpanel::Server.new({
|
17
|
+
:url => url,
|
18
|
+
:key => key
|
19
|
+
})
|
20
|
+
end
|
21
|
+
|
22
|
+
def change_password(user, new_password)
|
23
|
+
server.request("passwd", {
|
24
|
+
:user => user,
|
25
|
+
:pass => new_password
|
26
|
+
})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
server = CpanelServer.new("https://server.com:2086", "API_KEY_HERE")
|
31
|
+
server.change_password("myuser12", "s3cur3p@55")
|
32
|
+
|
33
|
+
All API calls can be performed using JSON or XML. You can set this in the initialization, if you'd like:
|
34
|
+
|
35
|
+
def initialize(url, key, connection_type = "json")
|
36
|
+
@server = Cpanel::Server.new({
|
37
|
+
:url => url,
|
38
|
+
:key => key,
|
39
|
+
:api => connection_type
|
40
|
+
})
|
41
|
+
end
|
42
|
+
|
43
|
+
For a list of current API commands, go here:
|
44
|
+
|
45
|
+
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi
|
46
|
+
|
5
47
|
== Bug/feature requests
|
6
48
|
|
7
49
|
Please insert all bug and feature requests into the GitHub Issues tracker:
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ begin
|
|
8
8
|
gem.summary = %Q{cPanel connection wrapper for Ruby}
|
9
9
|
gem.description = %Q{cPanel connection wrapper for Ruby}
|
10
10
|
gem.email = "jdelsman@voxxit.com"
|
11
|
-
gem.homepage = "http://
|
11
|
+
gem.homepage = "http://tastyrails.com/"
|
12
12
|
gem.authors = ["Josh Delsman"]
|
13
13
|
|
14
14
|
gem.add_development_dependency "thoughtbot-shoulda"
|
@@ -56,4 +56,4 @@ Rake::RDocTask.new do |rdoc|
|
|
56
56
|
rdoc.title = "cpanel #{version}"
|
57
57
|
rdoc.rdoc_files.include('README*')
|
58
58
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
59
|
-
end
|
59
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/cpanel.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{cpanel}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Josh Delsman"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-27}
|
13
13
|
s.description = %q{cPanel connection wrapper for Ruby}
|
14
14
|
s.email = %q{jdelsman@voxxit.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"test/cpanel_test.rb",
|
31
31
|
"test/test_helper.rb"
|
32
32
|
]
|
33
|
-
s.homepage = %q{http://
|
33
|
+
s.homepage = %q{http://tastyrails.com/}
|
34
34
|
s.rdoc_options = ["--charset=UTF-8"]
|
35
35
|
s.require_paths = ["lib"]
|
36
36
|
s.rubygems_version = %q{1.3.7}
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpanel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 25
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Josh Delsman
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-
|
17
|
+
date: 2010-08-27 00:00:00 -04:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -26,7 +25,6 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
28
|
segments:
|
31
29
|
- 0
|
32
30
|
version: "0"
|
@@ -40,7 +38,6 @@ dependencies:
|
|
40
38
|
requirements:
|
41
39
|
- - ">="
|
42
40
|
- !ruby/object:Gem::Version
|
43
|
-
hash: 3
|
44
41
|
segments:
|
45
42
|
- 0
|
46
43
|
version: "0"
|
@@ -54,7 +51,6 @@ dependencies:
|
|
54
51
|
requirements:
|
55
52
|
- - ">="
|
56
53
|
- !ruby/object:Gem::Version
|
57
|
-
hash: 3
|
58
54
|
segments:
|
59
55
|
- 0
|
60
56
|
version: "0"
|
@@ -83,7 +79,7 @@ files:
|
|
83
79
|
- test/cpanel_test.rb
|
84
80
|
- test/test_helper.rb
|
85
81
|
has_rdoc: true
|
86
|
-
homepage: http://
|
82
|
+
homepage: http://tastyrails.com/
|
87
83
|
licenses: []
|
88
84
|
|
89
85
|
post_install_message:
|
@@ -96,7 +92,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
92
|
requirements:
|
97
93
|
- - ">="
|
98
94
|
- !ruby/object:Gem::Version
|
99
|
-
hash: 3
|
100
95
|
segments:
|
101
96
|
- 0
|
102
97
|
version: "0"
|
@@ -105,7 +100,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
100
|
requirements:
|
106
101
|
- - ">="
|
107
102
|
- !ruby/object:Gem::Version
|
108
|
-
hash: 3
|
109
103
|
segments:
|
110
104
|
- 0
|
111
105
|
version: "0"
|