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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94a513a97b28baca3bad3b2eb2f14f4f3eb78448
4
- data.tar.gz: d03e27fce3ca7dc61259815f67c8fa2ef7a2f371
3
+ metadata.gz: 0be330f864bb75225c0068788b114c7fd8d2eeb9
4
+ data.tar.gz: c615a251d598303b92dc9126eaff4b278dc7de7b
5
5
  SHA512:
6
- metadata.gz: 37b08b93b60961693685ab3306d3db80f3f4abe7e661ee86145adc82f3f297a8e726f44ee4c4e2451d0323e21804646122cd9d514ce30f3bb10075ce65b2d8f8
7
- data.tar.gz: ee29fa536dfe90e254821171b180b5c63a4b368316e9f52471beed2e15eb44c672154d9762aa29e68d852dc5fe326d78d66f4087a1cedc50d3fa4ce106b6cf54
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("oc.netrc")
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]
@@ -1,3 +1,3 @@
1
1
  module Oc
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module Oc
2
2
  class Config
3
3
  def self.get(key)
4
- config = Netrc.read("oc.netrc")
4
+ config = Netrc.read("#{File.dirname(__FILE__)}/../../bin/digitalocean.netrc")
5
5
  config = config["api.digitalocean.com"]
6
6
  options = {
7
7
  :client_id => config[0],
@@ -5,9 +5,9 @@ module Oc
5
5
  class Runner
6
6
  def self.start
7
7
 
8
- program :name, 'Digital Ocean Cliean'
8
+ program :name, 'Digital Ocean Client'
9
9
  program :version, Oc::VERSION
10
- program :description, 'TCP-IP File Manager'
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("oc.netrc")
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
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
@@ -1,3 +0,0 @@
1
- machine api.digitalocean.com
2
- login mEhY7wLggVeSAM32rWZNt
3
- password 1a9c2eb68568f92efc0b7c9e134a1928