oc 0.1.4 → 0.1.5

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: caf80ee1e449fbe352efeaf06c0fde1f4f9e3585
4
- data.tar.gz: 85a5fe089756ccfe5d8e1f96324c1f6a58464f46
3
+ metadata.gz: 51f01a47a1aec8fefa10fdd2c53ed9c8acc0639b
4
+ data.tar.gz: 49d3816fa505867d6c5a3d38ba208458fb2159fb
5
5
  SHA512:
6
- metadata.gz: b9b077ce6e430d1301ff4e7d2e3bb1da8c4fb8d73ab332f7f3f592da7f44ed3d35f212c63478b7ec4f1c461877678e33b860cd4c2d716f9252f2140b6fdf685c
7
- data.tar.gz: 474295c837e641d12d05edb455eaf5f47b9d73f9ecb6be4f9d4925e686ad3f715d9e861251e3cac83a272a12e0039e8aa8912ba79a7c55ebc9de5f43c6046226
6
+ metadata.gz: d599053086ba7ff46139ecf30910e1ecb20655c1577f9c928cbd14ca1acab8850f74b85aeeca48323567e440a4bb82f52a18850a1bfd537925a2c17f63e2ad2b
7
+ data.tar.gz: a21e5c88df4d6ec1226d120be5fda80a744b7944c49100b4aab2694eea96131b6319270e43dd3e6d9ec5c4ff5a04fd23447a5ab1b8410851454a1604958148bf
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Sedat ÇİFTÇİ
1
+ Copyright (c) 2014 Sedat CIFTCI
2
2
 
3
3
  MIT License
4
4
 
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 show [TRUE]
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 ( http://github.com/<my-github-username>/oc/fork )
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
@@ -1,5 +1,4 @@
1
1
  require "oc/version"
2
2
  require "system/config"
3
- require "system/get"
4
3
  require "system/run/client"
5
4
  require "system/run/run"
@@ -1,3 +1,3 @@
1
1
  module Oc
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -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
@@ -1,7 +1,6 @@
1
1
  class Oc::Run::Base
2
2
  attr_writer :options, :config
3
3
 
4
-
5
4
  def self.method_added(method)
6
5
  return if self == Oc::Run::Base
7
6
  return if private_method_defined? method
@@ -2,7 +2,7 @@ module Oc::Run
2
2
  class Domain < Base
3
3
 
4
4
  description "Show all domains"
5
- syntax "co domain"
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::Get.get_barge
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::Get.get_barge
455
+ Oc::Config.get_barge
460
456
  end
461
457
 
462
458
  end
@@ -135,7 +135,7 @@ module Oc::Run
135
135
  private
136
136
  def barge
137
137
  puts "I'm thinking, please wait..".blue
138
- Oc::Get.get_barge
138
+ Oc::Config.get_barge
139
139
  end
140
140
  end
141
141
  end
@@ -27,7 +27,7 @@ module Oc::Run
27
27
  private
28
28
  def barge
29
29
  puts "I'm thinking, please wait..".blue
30
- Oc::Get.get_barge
30
+ Oc::Config.get_barge
31
31
  end
32
32
  end
33
33
  end
@@ -36,7 +36,7 @@ module Oc::Run
36
36
  private
37
37
  def barge
38
38
  puts "I'm thinking, please wait..".blue
39
- Oc::Get.get_barge
39
+ Oc::Config.get_barge
40
40
  end
41
41
  end
42
42
  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::Get.get_barge
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
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-02 00:00:00.000000000 Z
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
@@ -1,10 +0,0 @@
1
- require "net/http"
2
- require "json"
3
- require "barge"
4
- module Oc
5
- class Get
6
- def self.get_barge
7
- barge = ::Barge::Client.new(access_token: Oc::Config.get(:api_key))
8
- end
9
- end
10
- end