arunthampi-injour 0.2.1 → 0.2.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.
Files changed (3) hide show
  1. data/lib/injour.rb +4 -4
  2. data/lib/injour/version.rb +1 -1
  3. metadata +1 -1
@@ -112,6 +112,8 @@ help
112
112
 
113
113
  def self.get_status(limit = 5)
114
114
  File.read(INJOUR_STATUS).split("\n").reverse.slice(0, limit).join("\n")
115
+ rescue # If file is not present, show an empty string
116
+ ""
115
117
  end
116
118
 
117
119
  def self.get_limit(query_string)
@@ -131,13 +133,11 @@ help
131
133
  end
132
134
 
133
135
  # Don't log anything, everything goes in an abyss
134
- log = WEBrick::Log.new(true)
135
- def log.log(*anything); end
136
- server = WEBrick::HTTPServer.new(:Port => port.to_i, :Logger => log)
136
+ log = WEBrick::Log.new('/dev/null', WEBrick::Log::DEBUG)
137
+ server = WEBrick::HTTPServer.new(:Port => port.to_i, :Logger => log, :AccessLog => log)
137
138
 
138
139
  # Open up a servlet, so that status can be viewed in a browser
139
140
  server.mount_proc("/") do |req, res|
140
- @logger = log
141
141
  limit = get_limit(req.query_string)
142
142
  res.body = get_status(limit)
143
143
  res['Content-Type'] = "text/plain"
@@ -1,3 +1,3 @@
1
1
  module Injour
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arunthampi-injour
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arun Thampi