ispmanager 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
15
15
  Jeweler::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "ispmanager"
18
- gem.homepage = "http://github.com/axy/ispmanager"
18
+ gem.homepage = "http://github.com/alexkv/ispmanager"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{API client for ISPManager panel}
21
21
  gem.description = %Q{API client for ISPManager panel}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ispmanager"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aleksei Kvitinskii"]
12
- s.date = "2012-05-25"
12
+ s.date = "2012-05-28"
13
13
  s.description = "API client for ISPManager panel"
14
14
  s.email = "aleksei.wm@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  "spec/ispmanager_spec.rb",
34
34
  "spec/spec_helper.rb"
35
35
  ]
36
- s.homepage = "http://github.com/axy/ispmanager"
36
+ s.homepage = "http://github.com/alexkv/ispmanager"
37
37
  s.licenses = ["MIT"]
38
38
  s.require_paths = ["lib"]
39
39
  s.rubygems_version = "1.8.24"
@@ -19,7 +19,6 @@ class ISPManager
19
19
 
20
20
  class Request
21
21
  def self.create function, params, connection
22
- p connection
23
22
  http = Net::HTTP.new connection[:host], connection[:port]
24
23
  http.use_ssl = true
25
24
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
@@ -33,40 +32,5 @@ class ISPManager
33
32
  request = Net::HTTP::Get.new(path)
34
33
  result = http.start {|http| http.request(request) }.body
35
34
  end
36
-
37
-
38
- class ::Hash
39
- def recursive_symbolize_keys!
40
- recursive_modify_keys! { |key| key.to_sym }
41
- end
42
-
43
- def recursive_stringify_keys!
44
- recursive_modify_keys! { |key| key.to_s }
45
- end
46
-
47
- #def symbolize_keys!
48
- #modify_keys! { |key| key.to_sym }
49
- #end
50
-
51
- #def stringify_keys!
52
- #modify_keys! {|key| key.to_s }
53
- #end
54
-
55
- protected
56
- def modify_keys!
57
- keys.each do |key|
58
- self[(yield(key) rescue key) || key] = delete(key)
59
- end
60
- self
61
- end
62
-
63
- def recursive_modify_keys! &block
64
- modify_keys!(&block)
65
- values.each { |h| h.recursive_modify_keys!(&block) if h.is_a?(Hash) }
66
- values.select { |v| v.is_a?(Array) }.flatten.each { |h| h.recursive_modify_keys!(&block) if h.is_a?(Hash) }
67
- self
68
- end
69
- end
70
-
71
35
  end
72
36
  end
@@ -7,6 +7,8 @@ class ISPManager::Base
7
7
  @params = params
8
8
  end
9
9
 
10
+ protected
11
+
10
12
  def request method, params = {}
11
13
  result = ISPManager::Request.create method, params, @params
12
14
  result = JSON.parse(result)
@@ -21,18 +23,6 @@ class ISPManager::Base
21
23
  recursive_modify_keys! { |key| key.to_sym }
22
24
  end
23
25
 
24
- def recursive_stringify_keys!
25
- recursive_modify_keys! { |key| key.to_s }
26
- end
27
-
28
- #def symbolize_keys!
29
- #modify_keys! { |key| key.to_sym }
30
- #end
31
-
32
- #def stringify_keys!
33
- #modify_keys! {|key| key.to_s }
34
- #end
35
-
36
26
  protected
37
27
  def modify_keys!
38
28
  keys.each do |key|
@@ -1,8 +1,5 @@
1
1
  class ISPManager::Domain < ISPManager::Base
2
-
3
- def list
2
+ def all
4
3
  request 'wwwdomain'
5
4
  end
6
-
7
-
8
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ispmanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-25 00:00:00.000000000 Z
12
+ date: 2012-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -146,7 +146,7 @@ files:
146
146
  - spec/ispmanager/domain_spec.rb
147
147
  - spec/ispmanager_spec.rb
148
148
  - spec/spec_helper.rb
149
- homepage: http://github.com/axy/ispmanager
149
+ homepage: http://github.com/alexkv/ispmanager
150
150
  licenses:
151
151
  - MIT
152
152
  post_install_message:
@@ -161,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  segments:
163
163
  - 0
164
- hash: 3890904994089321579
164
+ hash: 824617611789640730
165
165
  required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements: