Sha256: 1b016482ac17a7f4bccaf4c4cddf6f02c9bd8f7e5f136971112cc085ef2a6fd6
Contents?: true
Size: 587 Bytes
Versions: 1
Compression:
Stored size: 587 Bytes
Contents
module Cloudkick::Command class Base attr_accessor :args def initialize(args) @args = args end def client if !@client key, secret = credentials @client = Cloudkick::Base.new(key, secret) end return @client end def credentials key = '' File.open('/etc/cloudkick.conf') do |f| f.grep(/oauth_key (\w+)/) { key = $1 } end secret = '' File.open('/etc/cloudkick.conf') do |f| f.grep(/oauth_secret (\w+)/) { secret = $1 } end return key, secret end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cloudkick-0.2.0 | lib/cloudkick/commands/base.rb |