tailog 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tailog/version.rb +1 -1
- data/lib/tailog.rb +6 -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: 5086e04096d6783d4d6e698c4ea6064375aeefb2
|
4
|
+
data.tar.gz: e3cb3d11863bd2c16002150a68af3e2267358a84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15eacba2e59ea82f80033e3d903faebe12d5e11de271527b777b2bd45668c33d39fbc8e5fbd0bfd5d09464a6bd656297b694ebb3bf38cbcd021764dc3d678091
|
7
|
+
data.tar.gz: d875edb4f60cf0efd6a98f3a8248a2fc2f45f20e63342eaa7275bd2c6b87015925f2ed1a84b815039d41f2470e1ca2deced3f58a0f25fc233fafd7fea4810204
|
data/lib/tailog/version.rb
CHANGED
data/lib/tailog.rb
CHANGED
@@ -80,6 +80,11 @@ module Tailog
|
|
80
80
|
erb :'script/index'
|
81
81
|
end
|
82
82
|
|
83
|
+
ModeMap = {
|
84
|
+
"bash" => :server_hostname,
|
85
|
+
"ruby" => :process_uuid
|
86
|
+
}
|
87
|
+
|
83
88
|
post '/script' do
|
84
89
|
result = {
|
85
90
|
server_hostname: Tailog.server_hostname,
|
@@ -88,7 +93,7 @@ module Tailog
|
|
88
93
|
|
89
94
|
ignore_content = false
|
90
95
|
if params[:broadcast]
|
91
|
-
instance_id = result[:instance_id] = params[:type]
|
96
|
+
instance_id = result[:instance_id] = result[ModeMap[params[:type]]]
|
92
97
|
discovered_instances = params[:discovered_instances] || []
|
93
98
|
ignore_content = true if discovered_instances.include? instance_id
|
94
99
|
end
|