akamai_ccu 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/akamai_ccu/cli.rb +2 -2
- data/lib/akamai_ccu/secret.rb +2 -2
- data/lib/akamai_ccu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59bb2a82f3a775533b7efd02a019444caddefb90
|
4
|
+
data.tar.gz: 9f1bd419f021dae8f3112d8a088aaeac6554a395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b44d3a5cdbba02da05b2f942d0e66b14066428af90e82089af540656455cad09932ea8c1714c79ab90cee34296936696166459f0dab5d136f2d9bd62a7eb325
|
7
|
+
data.tar.gz: e59750ba6ab033ed37c1b7521de7d44b8d1ffd6383830799a676c40e3183c1f10b95f6330122f47c0192472ab508019c8b243ce18cd0f100f839b9f84e471b45
|
data/lib/akamai_ccu/cli.rb
CHANGED
@@ -24,8 +24,8 @@ module AkamaiCCU
|
|
24
24
|
end
|
25
25
|
|
26
26
|
private def secret
|
27
|
-
return @secret_klass.by_txt(
|
28
|
-
@secret_klass.by_edgerc(
|
27
|
+
return @secret_klass.by_txt(@secret) if File.extname(@secret) == ".txt"
|
28
|
+
@secret_klass.by_edgerc(@secret)
|
29
29
|
end
|
30
30
|
|
31
31
|
private def endpoint
|
data/lib/akamai_ccu/secret.rb
CHANGED
@@ -11,7 +11,7 @@ module AkamaiCCU
|
|
11
11
|
new(client_secret: opts.fetch("client_secret"), host: opts.fetch("host"), access_token: opts.fetch("access_token"), client_token: opts.fetch("client_token"), max_body: opts.fetch("max-body", 2048), time: time)
|
12
12
|
end
|
13
13
|
|
14
|
-
def by_txt(name
|
14
|
+
def by_txt(name, time = Time.now)
|
15
15
|
return unless File.exist?(name)
|
16
16
|
data = File.readlines(name).map(&:strip).reject(&:empty?).map do |entry|
|
17
17
|
entry.split(EQUALITY)
|
@@ -19,7 +19,7 @@ module AkamaiCCU
|
|
19
19
|
factory(Hash[data], time)
|
20
20
|
end
|
21
21
|
|
22
|
-
def by_edgerc(name
|
22
|
+
def by_edgerc(name = ".edgerc", time = Time.now)
|
23
23
|
return unless File.exist?(name)
|
24
24
|
data = File.readlines(name).map(&:strip)
|
25
25
|
data.shift
|
data/lib/akamai_ccu/version.rb
CHANGED