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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c4a061b770009df2e91f93ac5b5dad228187bde
4
- data.tar.gz: 46d65f82419ac331348bdcb5025e6d0c0bd8de55
3
+ metadata.gz: 5086e04096d6783d4d6e698c4ea6064375aeefb2
4
+ data.tar.gz: e3cb3d11863bd2c16002150a68af3e2267358a84
5
5
  SHA512:
6
- metadata.gz: 257905134ec95342d84b7521980e84cd9d428f520dd50ac932f09371c3359d90257f83a6a3b912c1217b1459effcec519120f8563c543bbdee9bc5909daacd63
7
- data.tar.gz: cd734694966ded697fa5c4a3cd1492f448ec7b6ace86d7048c2dfd2bab1476f798afb7d3706482e27e2375c73d7514f1c966d35c7b554e5d7c9f83e64a68af72
6
+ metadata.gz: 15eacba2e59ea82f80033e3d903faebe12d5e11de271527b777b2bd45668c33d39fbc8e5fbd0bfd5d09464a6bd656297b694ebb3bf38cbcd021764dc3d678091
7
+ data.tar.gz: d875edb4f60cf0efd6a98f3a8248a2fc2f45f20e63342eaa7275bd2c6b87015925f2ed1a84b815039d41f2470e1ca2deced3f58a0f25fc233fafd7fea4810204
@@ -1,3 +1,3 @@
1
1
  module Tailog
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
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] == "bash" ? Tailog.server_hostname : Tailog.process_uuid
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bbtfr