solusvm-status 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fe6b406b493f6533a91c9ea8b1d6257fa45d2c04
4
+ data.tar.gz: 0716fb82dcf3f47871ae7f988abe0e2bb9e9fba2
5
+ SHA512:
6
+ metadata.gz: e5fe12b98312555e2ba06162853b508bcb3d251a453be4a8c09293bd96d722d72ed29be1cc1866e2094ae2401175c7cc50c31d2609254bfb2e5fc65f7869d861
7
+ data.tar.gz: 44e214ea6f0ebe4f501449ac26f0ee55389c05296b1050f5ca522e449384827cfecedda32f3a7dca34b1e090d86f404e422c5f7eb4a095591814abd09364ce7f
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ solusvm-status-*.gem
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Alexander Popov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ solusvm-status
2
+ ==============
3
+
4
+ Getting information about the server
@@ -0,0 +1,13 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ class SolusvmStatus
5
+ def initialize(url, key, hash)
6
+ @api_url, @api_key, @api_hash = url, key, hash
7
+ end
8
+
9
+ def get_bw
10
+ response = Nokogiri::XML(open("https://#{@api_url}/api/client/command.php?key=#{@api_key}&hash=#{@api_hash}&action=info&bw=true"))
11
+ return response.css("bw").text.split(',')
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'solusvm-status'
3
+ s.version = '0.0.1'
4
+ s.date = '2012-12-06'
5
+ s.summary = 'Getting information about the server'
6
+ s.description = '...'
7
+ s.authors = ['Alexander Popov']
8
+ s.email = ['iiiypuk@iiiypuk.me']
9
+ s.homepage = ''
10
+ s.license = 'MIT'
11
+
12
+ s.files = `git ls-files`.split("\n")
13
+ s.require_paths = ["lib"]
14
+
15
+ s.add_runtime_dependency 'nokogiri', '~> 1.6.0'
16
+ end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: solusvm-status
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Popov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2012-12-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 1.6.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 1.6.0
27
+ description: '...'
28
+ email:
29
+ - iiiypuk@iiiypuk.me
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - LICENSE
36
+ - README.md
37
+ - lib/solusvm-status.rb
38
+ - solusvm-status.gemspec
39
+ homepage: ''
40
+ licenses:
41
+ - MIT
42
+ metadata: {}
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubyforge_project:
59
+ rubygems_version: 2.1.11
60
+ signing_key:
61
+ specification_version: 4
62
+ summary: Getting information about the server
63
+ test_files: []