oc 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/oc +2 -1
- data/lib/oc/version.rb +1 -1
- data/lib/system/config.rb +1 -1
- data/lib/system/run/client.rb +2 -2
- data/lib/system/run/commands/info.rb +2 -2
- metadata +1 -3
- data/bin/oc.netrc +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0be330f864bb75225c0068788b114c7fd8d2eeb9
|
4
|
+
data.tar.gz: c615a251d598303b92dc9126eaff4b278dc7de7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77e2c7219a607e4cfcd9b1c3cc2ed2c3d7ea8e63e3c0b82218dc717c422b6777ffe51084a6ca492283905be8eb1b3977f7d73298539abf96bf89819561eae8d1
|
7
|
+
data.tar.gz: 71d97a10950e3844efa0d664dfefa228dfc79cea7e84d18b6b73e659a0c57536e73e02e29e3ea00585e6de1ae3bc29aab2b2b4d999bf28eed1cb8dbe5f678678
|
data/bin/oc
CHANGED
@@ -7,9 +7,10 @@ require "colorize"
|
|
7
7
|
require "terminal-table"
|
8
8
|
|
9
9
|
bin_file = Pathname.new(__FILE__).realpath
|
10
|
+
|
10
11
|
$:.unshift File.expand_path("../../lib", bin_file)
|
11
12
|
|
12
|
-
config = Netrc.read("
|
13
|
+
config = Netrc.read("#{File.dirname(__FILE__)}/digitalocean.netrc")
|
13
14
|
|
14
15
|
if config["api.digitalocean.com"].nil?
|
15
16
|
client_id = [(print 'Digital Ocean Client ID: '), STDIN.gets.rstrip][1]
|
data/lib/oc/version.rb
CHANGED
data/lib/system/config.rb
CHANGED
data/lib/system/run/client.rb
CHANGED
@@ -5,9 +5,9 @@ module Oc
|
|
5
5
|
class Runner
|
6
6
|
def self.start
|
7
7
|
|
8
|
-
program :name, 'Digital Ocean
|
8
|
+
program :name, 'Digital Ocean Client'
|
9
9
|
program :version, Oc::VERSION
|
10
|
-
program :description, '
|
10
|
+
program :description, 'Digital Ocean Command Line Tools'
|
11
11
|
|
12
12
|
Oc::Run.load_commands.parse_command
|
13
13
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Oc::Run
|
2
2
|
class Info < Base
|
3
3
|
|
4
|
+
description "Show your API information"
|
4
5
|
def show
|
5
6
|
puts "Client ID: #{Oc::Config.get("client_id")}".yellow
|
6
7
|
puts "API Key: #{Oc::Config.get("api_key")}".yellow
|
@@ -8,13 +9,12 @@ module Oc::Run
|
|
8
9
|
|
9
10
|
description "Change your API information"
|
10
11
|
def change(*args)
|
11
|
-
config = Netrc.read("
|
12
|
+
config = Netrc.read("#{File.dirname(__FILE__)}/../../../../bin/digitalocean.netrc")
|
12
13
|
client_id = [(print 'Digital Ocean Client ID: '), STDIN.gets.rstrip][1]
|
13
14
|
api_key = [(print 'Digital Ocean API Key: '), STDIN.gets.rstrip][1]
|
14
15
|
if client_id.empty? and api_key.empty?
|
15
16
|
puts "Please fill all fields".red
|
16
17
|
else
|
17
|
-
puts "#{client_id} - #{api_key}"
|
18
18
|
config["api.digitalocean.com"] = client_id, api_key
|
19
19
|
config.save
|
20
20
|
puts "Informations is changed".red
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sedat ÇİFTÇİ
|
@@ -99,7 +99,6 @@ email:
|
|
99
99
|
- iamcodegrab@gmail.com
|
100
100
|
executables:
|
101
101
|
- oc
|
102
|
-
- oc.netrc
|
103
102
|
extensions: []
|
104
103
|
extra_rdoc_files: []
|
105
104
|
files:
|
@@ -109,7 +108,6 @@ files:
|
|
109
108
|
- README.md
|
110
109
|
- Rakefile
|
111
110
|
- bin/oc
|
112
|
-
- bin/oc.netrc
|
113
111
|
- lib/oc.rb
|
114
112
|
- lib/oc/version.rb
|
115
113
|
- lib/system/config.rb
|
data/bin/oc.netrc
DELETED