oc 0.0.5 → 0.0.6

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: 0be330f864bb75225c0068788b114c7fd8d2eeb9
4
- data.tar.gz: c615a251d598303b92dc9126eaff4b278dc7de7b
3
+ metadata.gz: 9badf9012471184ed6f8f3b77ef69d96d4ed3504
4
+ data.tar.gz: 734a922a00da097618706707eebdd7dd9c4c9912
5
5
  SHA512:
6
- metadata.gz: 77e2c7219a607e4cfcd9b1c3cc2ed2c3d7ea8e63e3c0b82218dc717c422b6777ffe51084a6ca492283905be8eb1b3977f7d73298539abf96bf89819561eae8d1
7
- data.tar.gz: 71d97a10950e3844efa0d664dfefa228dfc79cea7e84d18b6b73e659a0c57536e73e02e29e3ea00585e6de1ae3bc29aab2b2b4d999bf28eed1cb8dbe5f678678
6
+ metadata.gz: c3e12fd37797745a52616b17ac5b6ef5411539e1b367505badf59af8d8c302cddddff57c7cb6d9e1c390ac43eaa44efb2d51ed482678cf7e2b792c69fb77ae75
7
+ data.tar.gz: 5a92543aad17b2ed29376ff76e2fd3aa09c967f8e422f0afad7e23d22df33a5374ff415890f739a3fb40ee10c6ced6b6b7b86df6be41124cd89c567092072aa7
data/bin/oc CHANGED
@@ -10,7 +10,7 @@ bin_file = Pathname.new(__FILE__).realpath
10
10
 
11
11
  $:.unshift File.expand_path("../../lib", bin_file)
12
12
 
13
- config = Netrc.read("#{File.dirname(__FILE__)}/digitalocean.netrc")
13
+ config = Netrc.read("#{(ENV["HOME"] || "./")}/digitalocean.netrc")
14
14
 
15
15
  if config["api.digitalocean.com"].nil?
16
16
  client_id = [(print 'Digital Ocean Client ID: '), STDIN.gets.rstrip][1]
data/lib/oc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oc
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/system/config.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Oc
2
2
  class Config
3
3
  def self.get(key)
4
- config = Netrc.read("#{File.dirname(__FILE__)}/../../bin/digitalocean.netrc")
4
+ config = Netrc.read("#{(ENV["HOME"] || "./")}/digitalocean.netrc")
5
5
  config = config["api.digitalocean.com"]
6
6
  options = {
7
7
  :client_id => config[0],
@@ -9,7 +9,7 @@ module Oc::Run
9
9
 
10
10
  description "Change your API information"
11
11
  def change(*args)
12
- config = Netrc.read("#{File.dirname(__FILE__)}/../../../../bin/digitalocean.netrc")
12
+ config = Netrc.read("#{(ENV["HOME"] || "./")}/digitalocean.netrc")
13
13
  client_id = [(print 'Digital Ocean Client ID: '), STDIN.gets.rstrip][1]
14
14
  api_key = [(print 'Digital Ocean API Key: '), STDIN.gets.rstrip][1]
15
15
  if client_id.empty? and api_key.empty?
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sedat ÇİFTÇİ