coalmine 0.5.1 → 0.5.2
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.
- data/lib/coalmine/configuration.rb +29 -27
- data/lib/coalmine/version.rb +1 -1
- metadata +2 -2
@@ -1,37 +1,39 @@
|
|
1
|
-
|
1
|
+
module Coalmine
|
2
|
+
class Configuration
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
4
|
+
attr_accessor :url, :environment, :signature, :logger, :host, :port, :proxy_host,
|
5
|
+
:proxy_port, :proxy_user, :proxy_password, :protocol, :secure, :http_open_timeout,
|
6
|
+
:http_read_timeout, :project_root, :framework, :filters,
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
# For HTTP basic auth
|
9
|
+
:http_user, :http_password,
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
# The application version
|
12
|
+
:version,
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
# The environments for which notifications can be posted
|
15
|
+
:enabled_environments
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
def initialize
|
18
|
+
self.protocol = "https"
|
19
|
+
self.host = "coalmineapp.com"
|
20
|
+
self.port = 443
|
21
|
+
self.secure = true
|
22
|
+
self.enabled_environments = ["production", "staging"]
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
self.http_open_timeout = 3
|
25
|
+
self.http_read_timeout = 6
|
26
|
+
self.logger = Coalmine::Logger.new
|
27
|
+
self.filters = []
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
def protocol=(proto)
|
31
|
+
proto = "http" unless ["http", "https"].include?(proto)
|
32
|
+
@protocol = proto
|
33
|
+
end
|
33
34
|
|
34
|
-
|
35
|
-
|
35
|
+
def secure?
|
36
|
+
self.secure
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
data/lib/coalmine/version.rb
CHANGED