vpsfree-client 0.2.0 → 0.3.0

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: df59bad35b5c60caa96296cabcfa96e71b7214b4
4
- data.tar.gz: 4fe45d83e7e99236c32be28833c79f1018494564
3
+ metadata.gz: 1580492e600b32de5e1454ae15760ceccf446400
4
+ data.tar.gz: 7dff685b7a8d5f2f2e4ec292e8b30e2f61462925
5
5
  SHA512:
6
- metadata.gz: f02691e2cfc00a679eaafbd8f303cd4f7a63a72079cc4cdb670659f9ab0f6374627e38a7a9501c6a9949e6234e05638b2663d081825c88c4c1ad38dad054117b
7
- data.tar.gz: 682fcba2c810258bd665dcf90fc7ffb77907c9dfb67eaa15a8b704219eb84d8aac516540f1a4a27b2ec4485036c39284318433acfa125bf3439fff8e02b99096
6
+ metadata.gz: 4cd519f262b61822aff9503d154b56edb9a18ee57e93fb1a15d4e7c4d43192f1be13647986f185a51b2aeb27e386cb7121b56c8d440dbc4015ab07c15b6267d7
7
+ data.tar.gz: 891e41fcbcd1634886e4c12287017c5d819bdb81c1eff7d91aad541a022f67e2fe398a42bdcc21742afc7ac7687c9c0654f52f5819b9944c30c555bcc4c53db2
data/CHANGELOG ADDED
@@ -0,0 +1,2 @@
1
+ * Sat Jan 23 2016 - version 0.3.0
2
+ - Depend on vpsadmin-client v2.1.0
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  vpsFree-Client
2
2
  ==============
3
- vpsFree-Client is a Ruby CLI and client library for vpsFree.cz API.
3
+ vpsFree-Client is a Ruby CLI and client library for vpsFree.cz API. It is based
4
+ on vpsadmin-client, which is in turn based on haveapi-client. Check haveapi-client
5
+ for more extensive documentation.
4
6
 
5
7
  ## Installation
6
8
 
@@ -19,23 +21,43 @@ Or install it yourself as:
19
21
  ## Usage
20
22
  ### CLI
21
23
  $ vpsfreectl -h
22
- Usage: haveapi-cli [options] <resource> <action> [objects ids] [-- [parameters]]
24
+ Usage: vpsfreectl [options] <resource> <action> [objects ids] [-- [parameters]]
23
25
  -u, --api URL API URL
24
26
  -a, --auth METHOD Authentication method
25
- --list-versions List all available API versions
27
+ --list-versions List all available API versions
26
28
  --list-auth-methods [VERSION]
27
29
  List available authentication methods
28
30
  --list-resources [VERSION] List all resource in API version
29
31
  --list-actions [VERSION] List all resources and actions in API version
30
- -r, --raw Print raw response as is
31
- -s, --save Save credentials to config file for later use
32
+ --version VERSION Use specified API version
33
+ -c, --columns Print output in columns
34
+ -H, --no-header Hide header row
35
+ -L, --list-parameters List output parameters
36
+ -o, --output PARAMETERS Parameters to display, separated by a comma
37
+ -r, --rows Print output in rows
38
+ -s, --sort PARAMETER Sort output by parameter
39
+ --save Save credentials to config file for later use
40
+ --raw Print raw response as is
41
+ --timestamp Display Datetime parameters as timestamp
42
+ --utc Display Datetime parameters in UTC
43
+ --localtime Display Datetime parameters in local timezone
44
+ --date-format FORMAT Display Datetime in custom format
32
45
  -v, --[no-]verbose Run verbosely
46
+ --client-version Show client version
47
+ --protocol-version Show protocol version
48
+ --check-compatibility Check compatibility with API server
33
49
  -h, --help Show this message
34
50
 
51
+ Commands:
52
+ vps remote_console VPS_ID Open VPS remote console
53
+
35
54
  #### Examples
36
55
  Authenticate using token and save it to config for later use:
37
56
 
38
- vpsfreectl --auth token --save vps list
57
+ vpsfreectl --auth token --save user current
58
+
59
+ Note that the token will be stored in your home directory in plain text and
60
+ anyone having access to it will be able to login as yourself into vpsAdmin.
39
61
 
40
62
  Show action parameters:
41
63
 
@@ -60,12 +82,16 @@ Delete VPS #1000:
60
82
  List IP addresses:
61
83
 
62
84
  vpsfreectl vps.ip_address list
85
+
86
+ Open remote VPS console:
87
+
88
+ vpsfreectl vps remote_console $vps_id
63
89
 
64
90
  ### Client library
65
91
  ```ruby
66
92
  require 'vpsfree/client'
67
93
 
68
- api = Vpsfree::Client.new
94
+ api = VpsFree::Client::Client.new
69
95
  api.login(:basic, user: 'yourname', password: 'yourpassword')
70
96
 
71
97
  response = api.vps.index
data/bin/vpsfreectl CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
+ require 'vpsfree/cli'
2
3
 
3
- require 'vpsfree/client/cli'
4
-
5
- Vpsfree::Client::Cli.run
4
+ VpsFree::CLI::Cli.run
@@ -0,0 +1,14 @@
1
+ require 'vpsadmin/cli'
2
+
3
+ module VpsFree
4
+ module CLI
5
+ module Commands ; end
6
+
7
+ class Cli < VpsAdmin::CLI::Cli
8
+ protected
9
+ def default_url
10
+ 'https://api.vpsfree.cz'
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,6 +1,6 @@
1
1
  require 'haveapi/client'
2
2
 
3
- module Vpsfree
3
+ module VpsFree
4
4
  module Client
5
5
  class Client < HaveAPI::Client::Client
6
6
  def initialize(v=nil)
@@ -1,5 +1,5 @@
1
- module Vpsfree
1
+ module VpsFree
2
2
  module Client
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ require 'vpsfree/client/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'vpsfree-client'
8
- spec.version = Vpsfree::Client::VERSION
8
+ spec.version = VpsFree::Client::VERSION
9
9
  spec.authors = ['Jakub Skokan']
10
10
  spec.email = ['jakub.skokan@vpsfree.cz']
11
11
  spec.summary =
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency 'bundler', '~> 1.6'
22
22
  spec.add_development_dependency 'rake'
23
23
 
24
- spec.add_runtime_dependency 'haveapi-client', '~> 0.3.0'
24
+ spec.add_runtime_dependency 'vpsadmin-client', '~> 2.1.0'
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vpsfree-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-01 00:00:00.000000000 Z
11
+ date: 2016-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: haveapi-client
42
+ name: vpsadmin-client
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.0
47
+ version: 2.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.0
54
+ version: 2.1.0
55
55
  description: Ruby API and CLI for vpsFree.cz API
56
56
  email:
57
57
  - jakub.skokan@vpsfree.cz
@@ -61,13 +61,14 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - .gitignore
64
+ - CHANGELOG
64
65
  - Gemfile
65
66
  - LICENSE.txt
66
67
  - README.md
67
68
  - Rakefile
68
69
  - bin/vpsfreectl
70
+ - lib/vpsfree/cli.rb
69
71
  - lib/vpsfree/client.rb
70
- - lib/vpsfree/client/cli.rb
71
72
  - lib/vpsfree/client/version.rb
72
73
  - vpsfree-client.gemspec
73
74
  homepage: ''
@@ -95,3 +96,4 @@ signing_key:
95
96
  specification_version: 4
96
97
  summary: Ruby API and CLI for vpsFree.cz API
97
98
  test_files: []
99
+ has_rdoc:
@@ -1,12 +0,0 @@
1
- require 'haveapi/cli'
2
-
3
- module Vpsfree
4
- module Client
5
- class Cli < HaveAPI::CLI::Cli
6
- protected
7
- def default_url
8
- 'https://api.vpsfree.cz'
9
- end
10
- end
11
- end
12
- end