pushyd 0.5.0 → 0.5.1
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/Gemfile.lock +1 -1
- data/bin/pushyd +4 -4
- data/defaults.yml +2 -2
- data/lib/pushyd/conf.rb +2 -7
- data/lib/pushyd/endpoint.rb +5 -1
- data/pushyd.gemspec +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: f4d99244c44f7f99042eb496abe4831847dff1dc
|
4
|
+
data.tar.gz: 24c424c9b17278722785b0cabc84c3876df550ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4600f69fc437189494e35dc3d762d0f3875cee5b50531864d67db2faefb54fe9087f934e2c8b757866fad562dd03be041c31d979705b81168fb115cf8e07bf68
|
7
|
+
data.tar.gz: eb7f68cbb2fc3ab2ecec2fbcd3cc6663d0879f60b8c421cc769e328d2ffc059e8b6e3a2f25aa5b14d6d5794dcc9999dec636f70566eb3fd7d8dde9af172bef0a
|
data/Gemfile.lock
CHANGED
data/bin/pushyd
CHANGED
@@ -48,10 +48,10 @@ end
|
|
48
48
|
|
49
49
|
# Display final configuration, quit if config dump requested
|
50
50
|
puts "--- #{Conf.app_name} #{Conf.app_ver}"
|
51
|
-
puts "Environment
|
52
|
-
puts "Config files
|
53
|
-
puts "Started at
|
54
|
-
puts "Loging to file
|
51
|
+
puts "Environment #{Conf.app_env}"
|
52
|
+
puts "Config files #{Conf.files}"
|
53
|
+
puts "Started at #{Conf.app_started}"
|
54
|
+
puts "Loging to file #{Conf[:log][:file]}" if Conf[:log].is_a? Enumerable
|
55
55
|
puts
|
56
56
|
puts Conf.dump
|
57
57
|
|
data/defaults.yml
CHANGED
data/lib/pushyd/conf.rb
CHANGED
@@ -25,8 +25,6 @@ class Conf
|
|
25
25
|
attr_reader :spec
|
26
26
|
attr_reader :files
|
27
27
|
attr_reader :host
|
28
|
-
attr_reader :pidfile
|
29
|
-
|
30
28
|
end
|
31
29
|
|
32
30
|
def self.init app_root = nil
|
@@ -67,9 +65,6 @@ class Conf
|
|
67
65
|
# Init New Relic
|
68
66
|
prepare_newrelic self[:newrelic], self.at(:logs, :newrelic)
|
69
67
|
|
70
|
-
# Prepare PID file is not present
|
71
|
-
prepare_pidfile
|
72
|
-
|
73
68
|
# Try to access any key to force parsing of the files
|
74
69
|
self[:dummy]
|
75
70
|
|
@@ -114,8 +109,8 @@ protected
|
|
114
109
|
@files << File.expand_path(path) if path
|
115
110
|
end
|
116
111
|
|
117
|
-
def self.
|
118
|
-
self[:pidfile]
|
112
|
+
def self.get_pidfile
|
113
|
+
self[:pidfile] || "/tmp/#{@app_name}-#{@host}-#{self[:port]}.pid"
|
119
114
|
end
|
120
115
|
|
121
116
|
def self.prepare_newrelic section, logfile
|
data/lib/pushyd/endpoint.rb
CHANGED
@@ -11,7 +11,7 @@ module PushyDaemon
|
|
11
11
|
|
12
12
|
def initialize
|
13
13
|
# Prepare logger
|
14
|
-
init_logger Conf[:
|
14
|
+
init_logger Conf[:logs]
|
15
15
|
|
16
16
|
# Done
|
17
17
|
info "endpoint initialized"
|
@@ -27,7 +27,11 @@ module PushyDaemon
|
|
27
27
|
protected
|
28
28
|
|
29
29
|
def init_logger logconf
|
30
|
+
# Check structure conformity or set it to an empty hash
|
31
|
+
logconf = {} unless logconf.is_a? Hash
|
32
|
+
|
30
33
|
# Extract context
|
34
|
+
logconf ||= {}
|
31
35
|
logfile = logconf[:file]
|
32
36
|
loglevel = logconf[:level]
|
33
37
|
me = self.class.name
|
data/pushyd.gemspec
CHANGED