conoha 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/exe/conoha +20 -0
  4. data/lib/conoha/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27a7dfee5ab7c1192962f460a2abbfcc063771d8
4
- data.tar.gz: c0b5093ec4e7c988ed284abc84f95b9ee4b9316f
3
+ metadata.gz: 3c3bff62b16038c252d30ce45c736c1061c1719d
4
+ data.tar.gz: 727b5598db464f6df0087808eeaf68b19fe0914b
5
5
  SHA512:
6
- metadata.gz: 66889247f91d6c20baed89bf93c1c07f724042ae44fb1ad91515766de87a361772bfe77b65b8e049831272e77b933e258f5dfad6b9d2692e125e49278837079c
7
- data.tar.gz: b5ca13d69a99fa954a2252e08e2bc3b62064bf84366ab98112e2eb3a2353721cf40b2930cd290135bec152c08c7718b630038c99165b923d1789ceddc40ffe0a
6
+ metadata.gz: 4f5a6784681c0674acea5195059ef3fa4efee3baca61df7919c145f701b19d2e63b4efea9fd702521cbcc0fa09352ffaca7c8cefc98749dc3f0f48f5924a273e
7
+ data.tar.gz: 639d502c22ee9d090f66a0dfb68f252752ec06cd3dedcf9c12ec2c3491d089ae2daa8e58739ec43b317273b434e0a9c6043c96401a6635f569f4a4dcee2d10d3
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # ConoHa VPS CLI Tool
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/conoha.svg)](http://badge.fury.io/rb/conoha)
4
+ [![Dependency Status](https://gemnasium.com/kaosf/conoha.svg)](https://gemnasium.com/kaosf/conoha)
5
+ [![Build Status](https://travis-ci.org/kaosf/conoha.svg)](https://travis-ci.org/kaosf/conoha)
6
+ [![Code Climate](https://codeclimate.com/github/kaosf/conoha/badges/gpa.svg)](https://codeclimate.com/github/kaosf/conoha)
7
+
3
8
  CLI tool for management ConoHa VPS.
4
9
 
5
10
  [ConoHa VPS](https://www.conoha.jp/en)
data/exe/conoha CHANGED
@@ -51,6 +51,26 @@ when 'createfromimage'
51
51
  image_ref = ARGV[0]
52
52
  ram = ARGV[1]
53
53
  puts Conoha.create_from_image image_ref, ram
54
+ when 'ssh'
55
+ exit 1 if ARGV.size < 1 || 2 < ARGV.size
56
+ ipaddress = Conoha.ip_address_of(server_id(ARGV.first))[1]
57
+ user = ARGV[1].nil? ? '' : "#{ARGV[1]}@"
58
+ command = "ssh -oStrictHostKeyChecking=no #{user}#{ipaddress}"
59
+ puts command
60
+ system command
61
+ when 'mosh'
62
+ exit 1 if ARGV.size != 1
63
+ ipaddress = Conoha.ip_address_of(server_id(ARGV.first))[1]
64
+ command = "mosh #{ipaddress}"
65
+ puts command
66
+ system command
67
+ when 'browse'
68
+ exit 1 if ARGV.size < 1 || 2 < ARGV.size
69
+ ipaddress = Conoha.ip_address_of(server_id(ARGV.first))[1]
70
+ port = ARGV[1].nil? ? '' : ":#{ARGV[1]}"
71
+ command = "xdg-open http://#{ipaddress}#{port}"
72
+ puts command
73
+ system command
54
74
  else
55
75
  STDERR.puts 'Error'
56
76
  end
@@ -1,3 +1,3 @@
1
1
  module ConohaVersion
2
- ITSELF = "0.0.2"
2
+ ITSELF = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conoha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-05 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler