oc 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +30 -2
- data/lib/oc.rb +0 -1
- data/lib/oc/version.rb +1 -1
- data/lib/system/config.rb +6 -0
- data/lib/system/run/base.rb +0 -1
- data/lib/system/run/commands/domain.rb +2 -2
- data/lib/system/run/commands/droplets.rb +1 -5
- data/lib/system/run/commands/images.rb +1 -1
- data/lib/system/run/commands/regions.rb +1 -1
- data/lib/system/run/commands/sizes.rb +1 -1
- data/lib/system/run/commands/ssh.rb +1 -4
- metadata +2 -3
- data/lib/system/get.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51f01a47a1aec8fefa10fdd2c53ed9c8acc0639b
|
4
|
+
data.tar.gz: 49d3816fa505867d6c5a3d38ba208458fb2159fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d599053086ba7ff46139ecf30910e1ecb20655c1577f9c928cbd14ca1acab8850f74b85aeeca48323567e440a4bb82f52a18850a1bfd537925a2c17f63e2ad2b
|
7
|
+
data.tar.gz: a21e5c88df4d6ec1226d120be5fda80a744b7944c49100b4aab2694eea96131b6319270e43dd3e6d9ec5c4ff5a04fd23447a5ab1b8410851454a1604958148bf
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Or install it yourself as:
|
|
19
19
|
## Droplets
|
20
20
|
<pre>
|
21
21
|
Droplet List
|
22
|
-
$ oc
|
22
|
+
$ oc droplets
|
23
23
|
|
24
24
|
Create New Droplet
|
25
25
|
$ oc droplets new [DROPLET_NAME] [SIZE_ID] [IMAGE_ID] [REGION_ID]
|
@@ -63,6 +63,18 @@ Or install it yourself as:
|
|
63
63
|
Enable IPv6 for a droplet
|
64
64
|
$ oc droplets enable-ipv6 [DROPLET_ID]
|
65
65
|
|
66
|
+
Droplet Kernels
|
67
|
+
$ oc droplets kernels [DROPLET_ID]
|
68
|
+
|
69
|
+
Change Kernels
|
70
|
+
$ oc droplets change-kernel [DROPLET_ID] [KERNEL_ID]
|
71
|
+
|
72
|
+
Disable Droplet Backup
|
73
|
+
$ oc droplets disable-backup [DROPLET_ID]
|
74
|
+
|
75
|
+
Enable Private Network
|
76
|
+
$ oc droplets enable-private-network [DROPLET_ID]
|
77
|
+
|
66
78
|
</pre>
|
67
79
|
## SSH
|
68
80
|
<pre>
|
@@ -86,6 +98,22 @@ Or install it yourself as:
|
|
86
98
|
Region List
|
87
99
|
$ oc regions
|
88
100
|
</pre>
|
101
|
+
|
102
|
+
## Domains
|
103
|
+
<pre>
|
104
|
+
Show all domains
|
105
|
+
$ oc domain
|
106
|
+
|
107
|
+
Show domain
|
108
|
+
$ oc domain show [DOMAIN_NAME]
|
109
|
+
|
110
|
+
Destroy domain
|
111
|
+
$ oc domain destroy [DOMAIN_NAME]
|
112
|
+
|
113
|
+
Create Domain
|
114
|
+
$ oc domain create [DOMAIN_NAME] [TYPE] [IP]
|
115
|
+
</pre>
|
116
|
+
|
89
117
|
## Sizes
|
90
118
|
<pre>
|
91
119
|
Size List
|
@@ -118,7 +146,7 @@ Or install it yourself as:
|
|
118
146
|
|
119
147
|
## Contributing
|
120
148
|
|
121
|
-
1. Fork it (
|
149
|
+
1. Fork it (http://github.com/0x73/oc/fork)
|
122
150
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
123
151
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
124
152
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/oc.rb
CHANGED
data/lib/oc/version.rb
CHANGED
data/lib/system/config.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require "net/http"
|
2
|
+
require "json"
|
3
|
+
require "barge"
|
1
4
|
module Oc
|
2
5
|
class Config
|
3
6
|
def self.get(key)
|
@@ -8,5 +11,8 @@ module Oc
|
|
8
11
|
}
|
9
12
|
return options[:"#{key}"]
|
10
13
|
end
|
14
|
+
def self.get_barge
|
15
|
+
barge = ::Barge::Client.new(access_token: self.get(:api_key))
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
data/lib/system/run/base.rb
CHANGED
@@ -2,7 +2,7 @@ module Oc::Run
|
|
2
2
|
class Domain < Base
|
3
3
|
|
4
4
|
description "Show all domains"
|
5
|
-
syntax "
|
5
|
+
syntax "oc domain"
|
6
6
|
def run
|
7
7
|
result = barge.domain.all
|
8
8
|
if !result.success?
|
@@ -95,7 +95,7 @@ module Oc::Run
|
|
95
95
|
private
|
96
96
|
def barge
|
97
97
|
puts "I'm thinking, please wait..".blue
|
98
|
-
Oc::
|
98
|
+
Oc::Config.get_barge
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
@@ -1,10 +1,6 @@
|
|
1
1
|
module Oc::Run
|
2
2
|
class Droplets < Base
|
3
3
|
|
4
|
-
def initialize
|
5
|
-
config(Netrc.read)
|
6
|
-
end
|
7
|
-
|
8
4
|
description "Show Droplets"
|
9
5
|
syntax "oc droplets"
|
10
6
|
def run
|
@@ -456,7 +452,7 @@ module Oc::Run
|
|
456
452
|
|
457
453
|
def barge
|
458
454
|
puts "I'm thinking, please wait..".blue
|
459
|
-
Oc::
|
455
|
+
Oc::Config.get_barge
|
460
456
|
end
|
461
457
|
|
462
458
|
end
|
@@ -1,8 +1,5 @@
|
|
1
1
|
module Oc::Run
|
2
2
|
class Ssh < Base
|
3
|
-
def initialize
|
4
|
-
config(Netrc.read)
|
5
|
-
end
|
6
3
|
|
7
4
|
description "This method lists all the available public SSH keys in your account that can be added to a droplet."
|
8
5
|
syntax "oc ssh keys"
|
@@ -132,7 +129,7 @@ module Oc::Run
|
|
132
129
|
|
133
130
|
def barge
|
134
131
|
puts "I'm thinking, please wait..".blue
|
135
|
-
Oc::
|
132
|
+
Oc::Config.get_barge
|
136
133
|
end
|
137
134
|
end
|
138
135
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sedat Ciftci
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -125,7 +125,6 @@ files:
|
|
125
125
|
- lib/oc.rb
|
126
126
|
- lib/oc/version.rb
|
127
127
|
- lib/system/config.rb
|
128
|
-
- lib/system/get.rb
|
129
128
|
- lib/system/run/base.rb
|
130
129
|
- lib/system/run/client.rb
|
131
130
|
- lib/system/run/commands/domain.rb
|