vesta 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5598e95f1b0f55bd361e9c5f8ddf5b898205bffd
4
- data.tar.gz: 7936b3211b6781e759b3a7a7de6e1ff39a63d364
3
+ metadata.gz: 61b7517c45ee486c20b3703a84105726a8409d36
4
+ data.tar.gz: 28f1e0fefb300354c71f3c50a268169a8fdf63f7
5
5
  SHA512:
6
- metadata.gz: a2cc074ca5a77bf52402647b20735fa26a3be6289408d2cb240c7214b06e0846d5e2a3d288ddb70d8b54b8caa02c3d1522f23eb726d60ef9aefb789510052ae4
7
- data.tar.gz: 21ca2af12256d1b929b685c5e6ecf45bbb1f4326f24d35238b0faa5cb0675b1b0efb6aa06807401264c6e42f16a07ab85ac986f6b3262db162e39bc49e2cf753
6
+ metadata.gz: f4fc77f7652886c4108d7c38ea4cbc671806c10b5a117d928813291042600514d6e3c4a514cf14fbe2f7813aeeaef37da847c67648333bd29900666ab5af2051
7
+ data.tar.gz: b7addfc2f67f75017a33cb59df1affee4ba48e8be75a536001bfc6346fcfd7a10835cdae4ce2cf5d6d712b3c5380c37399c5f75114a6bc49144ebdd9d2e48a3d
data/.gitignore CHANGED
@@ -7,3 +7,10 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ vesta-0.1.0.gem
11
+ vesta-0.1.1.gem
12
+ vesta-0.1.2.gem
13
+ vesta-0.1.3.gem
14
+ vesta-0.1.4.gem
15
+ vesta-0.1.5.gem
16
+ vesta-0.1.6.gem
data/README.md CHANGED
@@ -1,12 +1,10 @@
1
1
  # Vesta
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/vesta`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ ###Welcome to Vesta Gem!
6
4
 
5
+
7
6
  ## Installation
8
-
9
- Add this line to your application's Gemfile:
7
+ First you need to install [Vesta Control Panel](https://github.com/serghey-rodin/vesta) . After that add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
12
10
  gem 'vesta'
@@ -22,7 +20,94 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ #### For example, lets add new web-domain
24
+
25
+ ```
26
+ require 'vesta'
27
+
28
+ user = 'demo'
29
+ domain = 'example.com'
30
+ ip = '192.168.0.1'
31
+
32
+ Vesta.add_web_domain(user, domain, ip)
33
+
34
+ ```
35
+ #### You can have any names for arguments, the main thing that they were in the same order.
36
+ ```
37
+ require 'vesta'
38
+
39
+ a = 'demo'
40
+ b = 'example.com'
41
+ c = '192.168.0.1'
42
+
43
+ Vesta.add_web_domain(a, b, c)
44
+
45
+ ```
46
+
47
+ ***
48
+
49
+ ## Methods list
50
+ ```
51
+ Vesta.add_db(user, database, dbuser, dbpass)
52
+ Vesta.add_dns_domain(user, domain, ip)
53
+ Vesta.add_dns_on_web_alias(user, domain, alia)
54
+ Vesta.add_mail_account(user, domain, account, password)
55
+ Vesta.add_mail_account_alias(user, domain, account, alia)
56
+ Vesta.add_mail_account_reply(user, domain, account, message)
57
+ Vesta.add_mail_account_autoreplay (user, domain, account, message)
58
+ Vesta.add_mail_account_forward (user, domain, account, forward)
59
+ Vesta.add_mail_account_fwd_only (user, domain, account)
60
+ Vesta.add_mail_domain(user, domain)
61
+ Vesta.add_user (user, password, email)
62
+ Vesta.add_web_domain (user, domain, ip)
63
+ Vesta.add_web_domain_ftp (user, domain, ftp_user, ftp_pass)
64
+ Vesta.change_database_owner (detabase, user)
65
+ Vesta.change_database_password (user, database, dbpass)
66
+ Vesta.change_database_user (user, database, dbuser)
67
+ Vesta.change_domain_owner (domain, user)
68
+ Vesta.change_user_contact (user, email)
69
+ Vesta.change_user_name (user, first_name, last_name)
70
+ Vesta.change_user_password (user, password)
71
+ Vesta.change_web_domain_ip (user, domain, ip)****
72
+ Vesta.delete_database (user, database)
73
+ Vesta.delete_databases (user)
74
+ Vesta.delete_dns_domain (user, domain)
75
+ Vesta.delete_dns_domains (user)
76
+ Vesta.delete_domain (user, domain)
77
+ Vesta.delete_mail_account (user, domain, account)
78
+ Vesta.delete_mail_domain (user, domain)
79
+ Vesta.delete_mail_domains (user)
80
+ Vesta.delete_user (user)
81
+ Vesta.delete_web_domain (user, domain)
82
+ Vesta.delete_web_domains (user)
83
+ Vesta.list_cron_jobs (user)
84
+ Vesta.list_databases (user)
85
+ Vesta.list_dns_domains (user)
86
+ Vesta.list_mail_accounts (user, domain)
87
+ Vesta.list_user_domains (user)
88
+ Vesta.list_user_ips (user)
89
+ Vesta.list_users
90
+ Vesta.list_web_domains (user)
91
+ Vesta.search_domain_owner (domain)
92
+ Vesta.suspend_cron_jobs (user)
93
+ Vesta.suspend_mail_account (user, domain, account)
94
+ Vesta.suspend_mail_accounts (user, domain)
95
+ Vesta.suspend_mail_domain (user, domain)
96
+ Vesta.suspend_mail_domains (user)
97
+ Vesta.suspend_user (user)
98
+ Vesta.suspend_web_domain (user, domain)
99
+ Vesta.unsuspend_cron_jobs (user)
100
+ Vesta.unsuspend_mail_account (user, domain, account)
101
+ Vesta.unsuspend_mail_accounts (user, domain)
102
+ Vesta.unsuspend_mail_domain (user, domain)
103
+ Vesta.unsuspend_mail_domains (user)
104
+ Vesta.unsuspend_user (user)
105
+ Vesta.unsuspend_web_domain (user, domain)
106
+
107
+
108
+
109
+
110
+ ```
26
111
 
27
112
  ## Development
28
113
 
@@ -2,131 +2,217 @@ require "vesta/version"
2
2
 
3
3
  module Vesta
4
4
 
5
- # Add actions
6
- def self.add_db(u, db, du, dp)
7
- user = u
8
- dbase = db
9
- duser = du
10
- dpass = dp
11
- exec("v-add-database #{user} #{dbase} #{duser} #{dpass}")
5
+ def self.add_database(user, database, dbuser, dbpass)
6
+ exec("v-add-database #{user} #{database} #{dbuser} #{dbpass}")
7
+ end
8
+
9
+ def self.add_dns_domain(user, domain, ip)
10
+ exec("v-add-dns-domain #{user} #{domain} #{ip}")
12
11
  end
13
12
 
14
- def self.add_dns_domain(u, d, i)
15
- user = u
16
- domain = d
17
- ip = i
18
- exec("v-add-dns-domain USER DOMAIN IP #{user} #{domain} #{ip}")
19
- end
20
-
21
- def self.add_mail_acc(u, d, a, p)
22
- user = u
23
- domain = d
24
- account = a
25
- password = p
13
+ def self.add_mail_account(user, domain, account, password)
26
14
  exec("v-add-mail-account #{user} #{domain} #{account} #{password}")
27
15
  end
28
16
 
29
- def self.add_mail_acc_alias(u, d, a, al)
30
- user = u
31
- domain = d
32
- account = a
33
- alia = al
17
+ def self.add_mail_account_alias(user, domain, account, alia)
34
18
  exec("v-add-mail-account-alias #{user} #{domain} #{account} #{alia}")
35
19
  end
36
20
 
37
- def self.add_mail_acc_replay(u, d, a, m)
38
- user = u
39
- domain = d
40
- account = a
41
- message = m
42
- exec("v-add-mail-account-autoreply #{user} #{domain} #{account} #{message}")
21
+ def self.add_mail_account_reply(user, domain, account, message)
22
+ exec("v-add-mail-account-autoreply #{user} #{domain} #{account} #{message}")
43
23
  end
44
24
 
45
- def self.add_mail_acc_forward(u, d, a, f)
46
- user = u
47
- domain = d
48
- account = a
49
- forward = f
50
- exec("v-add-mail-account-forward #{user} #{domain} #{account} #{forward}")
25
+ def self.add_mail_account_autoreplay (user, domain, account, message)
26
+ exec("v-add-mail-account-autoreply #{user} #{domain} #{account} #{message}")
27
+ end
28
+ def self.add_mail_account_forward (user, domain, account, forward)
29
+ exec("v-add-mail-account-forward #{user} #{domain} #{account} #{forward}")
51
30
  end
52
- def self.add_mail_acc_forward_onl(u, d, a)
53
- user = u
54
- domain = d
55
- account = a
56
- exec("v-add-mail-account-fwd-only #{user} #{domain} #{account}")
31
+ def self.add_mail_account_fwd_only (user, domain, account)
32
+ exec("v-add-mail-account-fwd-only #{user} #{domain} #{account} ")
57
33
  end
58
- def self.add_mail_domain(u, d)
59
- user = u
60
- domain = d
61
- exec("v-add-mail-domain #{user} #{domain}")
34
+ def self.add_mail_domain(user, domain)
35
+ exec("v-add-mail-domain #{user} #{domain}")
62
36
  end
63
- def self.add_mail_antispam(u, d)
64
- user = u
65
- domain = d
66
- exec("v-add-mail-domain-antispam #{user} #{domain}")
37
+ def self.add_user (user, password, email)
38
+ exec("v-add-user #{user} #{password} #{email} ")
67
39
  end
68
- def self.add_mail_antivirus(u, d)
69
- user = u
70
- domain = d
71
- exec("v-add-mail-domain-antivirus #{user} #{domain}")
40
+ def self.add_web_domain (user, domain, ip)
41
+ exec("v-add-web-domain #{user} #{domain} #{ip} [RESTART]")
72
42
  end
73
- def self.add_user(u, p, e)
74
- user = u
75
- pass = p
76
- email = e
77
- exec("v-add-user #{user} #{pass} #{email}")
43
+ def self.add_web_domain_ftp (user, domain, ftp_user, ftp_pass)
44
+ exec("v-add-web-domain-ftp #{user} #{domain} #{ftp_user} #{ftp_pass} ")
78
45
  end
79
- def self.add_web_domain(u, d, i)
80
- user = u
81
- domain = d
82
- ip = i
83
- exec("v-add-web-domain #{user} #{domain} #{ip} [RESTART]")
46
+ # CHANGE
47
+ def self.change_database_owner (detabase, user)
48
+ exec("v-change-database-owner #{database} #{user} ")
84
49
  end
85
50
 
51
+ def self.change_database_password (user, database, dbpass)
52
+ exec("v-change-database-password #{user} #{database} #{dbpass} ")
53
+ end
86
54
 
87
- # list_actions
88
- def self.cron_jobs(u)
89
- user = u
90
- p exec("v-list-cron-jobs #{user}")
55
+ def self.change_database_user (user, database, dbuser)
56
+ exec("v-change-database-user #{user} #{database} #{dbuser}")
91
57
  end
92
58
 
93
- def self.databases(u)
94
- user = u
95
- p exec("v-list-databases #{user}")
59
+ def self.change_domain_owner (domain, user)
60
+ exec("v-change-domain-owner #{domain} #{user} ")
96
61
  end
97
62
 
98
- def self.sys_ip
99
- p exec("v-list-sys-ips")
63
+ def self.change_mail_account_password (user, domain, account, password)
64
+ exec("v-change-mail-account-password #{user} #{domain} #{account} #{password}")
100
65
  end
101
-
102
- def self.mail_accounts(u, d)
103
- user = u
104
- domain = d
105
- p exec("v-list-mail-accounts #{user} #{domain}")
66
+
67
+ def self.change_user_contact (user, email)
68
+ exec("v-change-user-contact #{user} #{email} ")
69
+ end
70
+
71
+ def self.change_user_name (user, first_name, last_name)
72
+ exec("v-change-user-name #{user} #{first_name} #{last_name}")
73
+ end
74
+
75
+ def self.change_user_password (user, password)
76
+ exec("v-change-user-password #{user} #{password} ")
77
+ end
78
+
79
+ def self.change_web_domain_ip (user, domain, ip)
80
+ exec("v-change-web-domain-ip #{user} #{domain} #{ip} [RESTART] ")
81
+ end
82
+
83
+
84
+ #DELETE
85
+ def self.delete_database (user, database)
86
+ exec("v-delete-database #{user} #{database}")
87
+ end
88
+
89
+ def self.delete_databases (user)
90
+ exec("v-delete-databases #{user}")
91
+ end
92
+
93
+ def self.delete_dns_domain (user, domain)
94
+ exec ("v-delete-dns-domain #{user} #{domain} ")
95
+ end
96
+
97
+ def self.delete_dns_domains (user)
98
+ exec ("v-delete-dns-domains #{user} ")
99
+ end
100
+
101
+ def self.delete_domain (user, domain)
102
+ exec ("v-delete-domain #{user} #{domain} ")
103
+ end
104
+
105
+ def self.delete_mail_account (user, domain, account)
106
+ exec ("v-delete-mail-account #{user} #{domain} #{account} ")
107
+ end
108
+
109
+ def self.delete_mail_domain (user, domain)
110
+ exec ("v-delete-mail-domain #{user} #{domain} ")
111
+ end
112
+
113
+ def self.delete_mail_domains (user)
114
+ exec ("v-delete-mail-domains #{user}")
115
+ end
116
+
117
+ def self.delete_user (user)
118
+ exec ("v-delete-user #{user}")
119
+ end
120
+
121
+ def self.delete_web_domain (user, domain)
122
+ exec ("v-delete-web-domain #{user} #{domain}")
106
123
  end
107
- def self.web_domains(u)
108
- user = u
109
- p exec("v-list-web-domains #{user}")
124
+
125
+ def self.delete_web_domains (user)
126
+ exec ("v-delete-web-domains #{user}")
127
+ end
128
+
129
+ # LISTS
130
+ def self.list_cron_jobs (user)
131
+ exec ("v-list-cron-jobs #{user}")
132
+ end
133
+
134
+ def self.list_databases (user)
135
+ exec ("v-list-databases #{user}")
136
+ end
137
+
138
+ def self.list_dns_domains (user)
139
+ exec ("v-list-dns-domains #{user}")
140
+ end
141
+
142
+ def self.list_mail_accounts (user, domain)
143
+ exec ("v-list-mail-accounts #{user} #{domain}")
144
+ end
145
+
146
+ def self.list_user_domains (user)
147
+ exec ("v-list-mail-domains #{user}")
148
+ end
149
+
150
+ def self.list_user_ips (user)
151
+ exec ("v-list-user-ips #{user}")
152
+ end
153
+
154
+ def self.list_users
155
+ exec ("v-list-users")
156
+ end
157
+
158
+ def self.list_web_domains (user)
159
+ exec ("v-list-web-domains #{user}")
110
160
  end
111
- def self.domains_alias(u)
112
- user = u
113
- p exec("v-list-domains-alias #{user}")
161
+
162
+ # SEARCH
163
+ def self.search_domain_owner (domain)
164
+ exec ("v-search-domain-owner #{domain} ")
165
+ end
166
+
167
+ # SUSPEND
168
+ def self.suspend_cron_jobs (user)
169
+ exec ("v-suspend-cron-jobs #{user}")
170
+ end
171
+ def self.suspend_mail_account (user, domain, account)
172
+ exec ("v-suspend-mail-account #{user} #{domain} #{account}")
173
+ end
174
+ def self.suspend_mail_accounts (user, domain)
175
+ exec (" v-suspend-mail-accounts #{user} #{domain} ")
176
+ end
177
+ def self.suspend_mail_domain (user, domain)
178
+ exec ("v-suspend-mail-domain #{user} #{domain} ")
179
+ end
180
+ def self.suspend_mail_domains (user)
181
+ exec ("v-suspend-mail-domains #{user} ")
182
+ end
183
+ def self.suspend_user (user)
184
+ exec ("v-suspend-user #{user} [RESTART] ")
185
+ end
186
+ def self.suspend_web_domain (user, domain)
187
+ exec ("v-suspend-web-domain #{user} #{domain} [RESTART]")
188
+ end
189
+ # UNSUSPEND
190
+ def self.unsuspend_cron_jobs (user)
191
+ exec ("v-unsuspend-cron-jobs #{user}")
192
+ end
193
+
194
+ def self.unsuspend_mail_account (user, domain, account)
195
+ exec ("v-unsuspend-mail-account #{user} #{domain} #{account}")
196
+ end
197
+
198
+ def self.unsuspend_mail_accounts (user, domain)
199
+ exec (" v-unsuspend-mail-accounts #{user} #{domain} ")
200
+ end
201
+
202
+ def self.unsuspend_mail_domain (user, domain)
203
+ exec ("v-unsuspend-mail-domain #{user} #{domain} ")
114
204
  end
115
205
 
116
- def self.domains_proxy(u)
117
- user = u
118
- p exec("v-list-web-domains-proxy #{user}")
206
+ def self.unsuspend_mail_domains (user)
207
+ exec ("v-unsuspend-mail-domains #{user} ")
119
208
  end
120
209
 
121
- def self.domain_ssl(u, d)
122
- user = u
123
- domain = d
124
- p exec("v-list-web-domain-ssl #{user} #{domain}")
210
+ def self.unsuspend_user (user)
211
+ exec ("v-unsuspend-user #{user} [RESTART] ")
125
212
  end
126
213
 
127
- def self.domains_ssl(u)
128
- user = u
129
- p exec("v-list-web-domains-ssl #{user}")
214
+ def self.unsuspend_web_domain (user, domain)
215
+ exec ("v-unsuspend-web-domain #{user} #{domain} [RESTART]")
130
216
  end
131
217
 
132
- end
218
+ end
@@ -1,3 +1,3 @@
1
1
  module Vesta
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vesta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boriskin
@@ -61,6 +61,8 @@ files:
61
61
  - vesta-0.1.2.gem
62
62
  - vesta-0.1.3.gem
63
63
  - vesta-0.1.4.gem
64
+ - vesta-0.1.5.gem
65
+ - vesta-0.1.6.gem
64
66
  - vesta.gemspec
65
67
  homepage: https://github.com/sanata-/vesta
66
68
  licenses: