cloudcover 0.0.3 → 0.0.4
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/cloudcover/config.rb +4 -6
- data/lib/cloudcover/okta/client.rb +1 -1
- data/lib/cloudcover/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: e6d58874345561dcb51a9647e0bfe1044a608cc9
|
4
|
+
data.tar.gz: 5daf2ddf93dd72c1ba8e9ad0462f445b1b00d062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9bef2e0baeec7441b387f3b3f645a73e047f2b446caad655da4c51a29e8a27f9a40523117044425bc58a9fd3afcd3ca067f342772b6cea5c98b9ae26dbc84c6
|
7
|
+
data.tar.gz: 781147cc958b6b74910ef376108cd695670b7e539fd87d6102e1c0d323513f1b1b99764802716b19aed0a76196d35a078325e3ee8ee912f6bf83b39963990766
|
data/lib/cloudcover/config.rb
CHANGED
@@ -11,10 +11,7 @@ module Cloudcover
|
|
11
11
|
|
12
12
|
class Config
|
13
13
|
|
14
|
-
CONFIG_DEFAULTS = {
|
15
|
-
location: File.join(ENV['HOME'],'.cloudcover'),
|
16
|
-
cookie_location: File.join(ENV['HOME'],'.cloudcover_cookie'),
|
17
|
-
}
|
14
|
+
CONFIG_DEFAULTS = {}
|
18
15
|
|
19
16
|
class << self
|
20
17
|
extend PrivateAttrAccessor
|
@@ -35,7 +32,7 @@ module Cloudcover
|
|
35
32
|
end
|
36
33
|
|
37
34
|
def data
|
38
|
-
self.config_data ||=
|
35
|
+
self.config_data ||= {}
|
39
36
|
end
|
40
37
|
private :data
|
41
38
|
|
@@ -54,7 +51,7 @@ module Cloudcover
|
|
54
51
|
def load_config(file)
|
55
52
|
Output.say_debug("Loading the config file from #{file}")
|
56
53
|
raise MissingConfig, "Missing configuration file: #{file} Run 'cloudcover help'" unless File.exist?(file)
|
57
|
-
config_data = symbolize_keys(YAML.load_file(file)) rescue {}
|
54
|
+
self.config_data = symbolize_keys(YAML.load_file(file)) rescue {}
|
58
55
|
end
|
59
56
|
private :load_config
|
60
57
|
|
@@ -75,6 +72,7 @@ module Cloudcover
|
|
75
72
|
}
|
76
73
|
end
|
77
74
|
private :symbolize_keys
|
75
|
+
|
78
76
|
end
|
79
77
|
|
80
78
|
MissingConfig = Class.new(StandardError)
|
@@ -5,11 +5,11 @@ module Cloudcover
|
|
5
5
|
module Okta
|
6
6
|
class Client
|
7
7
|
include HTTParty
|
8
|
-
debug_output if Cloudcover::Config.debug
|
9
8
|
|
10
9
|
attr_reader :headers
|
11
10
|
|
12
11
|
def initialize
|
12
|
+
self.class.debug_output if Cloudcover::Config.debug
|
13
13
|
self.class.base_uri "https://#{Cloudcover::Config.okta_domain}.okta.com"
|
14
14
|
@headers = {
|
15
15
|
'Content-Type' => "application/json",
|
data/lib/cloudcover/version.rb
CHANGED