akamai_api 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/akamai_api/cli/command.rb +8 -4
- data/lib/akamai_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6db87fa3be02df005df62f70c5b518244defda40
|
|
4
|
+
data.tar.gz: 718930e9c32466a64ca039667aff84024537ded4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
|
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
|
data/lib/akamai_api/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2013-09-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|