akamai_api 0.0.6 → 0.0.7

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: b5471cead7136c03a256bfa36ee7e0ff4deebe75
4
- data.tar.gz: ca5fc17984627473a1ef8ca0bba3d71323c50dc9
3
+ metadata.gz: 6db87fa3be02df005df62f70c5b518244defda40
4
+ data.tar.gz: 718930e9c32466a64ca039667aff84024537ded4
5
5
  SHA512:
6
- metadata.gz: 71bfc3d69a49793659cb20aa4beefc2c52078fc1f9c546c7145e463f26a0748edfb1cc7ba27dbf1af48e4f455bdbd22c2f4421fa523ffd7c2acafadbfceef8e7
7
- data.tar.gz: 5d7b81ba09fbe655bc59386173f9628cc445551dd7027c5b876d68c414d19c3794034607ca3f016264d71de63a73f9ad65162104bfaed93f66eeba1fd884451f
6
+ metadata.gz: 912099d1f5670f672d2d70303a80992a44079d4a942d2bcaacb87c028ae68adf26e9061f4f22cf1e3f2f652c42eca557fb0013aebc7bb775450daff6e8fa322c
7
+ data.tar.gz: 40c41f89eb6d8d90f6fe692da75e870cab47fa8b63b92fad1b620113310fe09b3dd9cc21ac8e972bca18681121f80dcdc45b2da6a1f4d6d2061a97de59912149
@@ -8,15 +8,19 @@ module AkamaiApi
8
8
 
9
9
  no_tasks do
10
10
  def load_config
11
+ config = {}
11
12
  config_file = File.expand_path '~/.akamai_api.yml'
12
- config = YAML::load_file(config_file).symbolize_keys
13
+ if File::exists?( config_file )
14
+ config = YAML::load_file(config_file).symbolize_keys
15
+ end
16
+ if ENV['AKAMAI_USERNAME'] && ENV['AKAMAI_PASSWORD']
17
+ config.merge! :auth => [ENV['AKAMAI_USERNAME'], ENV['AKAMAI_PASSWORD']]
18
+ end
13
19
  if options[:username] && options[:password]
14
20
  config.merge! :auth => [options[:username], options[:password]]
15
- elsif ENV['AKAMAI_USERNAME'] && ENV['AKAMAI_PASSWORD']
16
- config.merge! :auth => [ENV['AKAMAI_USERNAME'], ENV['AKAMAI_PASSWORD']]
17
21
  end
18
22
  if config[:auth].nil? || config[:auth].compact.blank?
19
- raise "#{config_file} does not exist or doesn't contain auth info and you didn't specify username and password options"
23
+ raise "#{config_file} does not exist OR doesn't contain auth info OR you didn't export environment variables OR you didn't specify username and password on the command line"
20
24
  end
21
25
  AkamaiApi.config.merge! config
22
26
  end
@@ -1,3 +1,3 @@
1
1
  module AkamaiApi
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akamai_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicola Racco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-19 00:00:00.000000000 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport