smartkiosk-client 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ class Application
14
14
  get '/terminal/logs' do
15
15
  files = {
16
16
  :smartguard => '/var/log/smartguard.log',
17
- :front => Application.root.join('log/production.log'),
17
+ :front => Application.root.join('log/web.log'),
18
18
  :sidekiq => Application.root.join('log/sidekiq.log'),
19
19
  :smartware => Application.root.join('log/smartware.log')
20
20
  }
@@ -22,12 +22,12 @@ class Application
22
22
  files.keys.each do |entry|
23
23
  path = files[entry]
24
24
  files[entry] = []
25
-
26
- File.open(path) do |f|
27
- f.extend(File::Tail)
28
- f.backward(1000)
29
- 1000.times{ files[entry] << f.readline } rescue nil
30
- end if File.exist?(path)
25
+
26
+ next unless File.exist? path
27
+
28
+ File::Tail::Logfile.tail(path, :backward => 1000, :return_if_eof => true) do |line|
29
+ files[entry] << line
30
+ end
31
31
  end
32
32
 
33
33
  json files
@@ -2,6 +2,6 @@ require 'sinatra/base'
2
2
 
3
3
  module Smartkiosk
4
4
  class Client < Sinatra::Base
5
- VERSION = '0.0.16'
5
+ VERSION = '0.0.17'
6
6
  end
7
7
  end
@@ -50,7 +50,7 @@ Gem::Specification.new do |gem|
50
50
  gem.add_dependency 'pry', '0.9.10'
51
51
 
52
52
  gem.add_dependency 'smartware', '0.4.3'
53
- gem.add_dependency 'smartguard', '0.4.1'
53
+ gem.add_dependency 'smartguard', '0.4.2'
54
54
 
55
55
  gem.add_dependency 'sidekiq', '2.6.5'
56
56
  gem.add_dependency 'slim', '1.3.4'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartkiosk-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -451,7 +451,7 @@ dependencies:
451
451
  requirements:
452
452
  - - '='
453
453
  - !ruby/object:Gem::Version
454
- version: 0.4.1
454
+ version: 0.4.2
455
455
  type: :runtime
456
456
  prerelease: false
457
457
  version_requirements: !ruby/object:Gem::Requirement
@@ -459,7 +459,7 @@ dependencies:
459
459
  requirements:
460
460
  - - '='
461
461
  - !ruby/object:Gem::Version
462
- version: 0.4.1
462
+ version: 0.4.2
463
463
  - !ruby/object:Gem::Dependency
464
464
  name: sidekiq
465
465
  requirement: !ruby/object:Gem::Requirement
@@ -606,7 +606,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
606
606
  version: '0'
607
607
  segments:
608
608
  - 0
609
- hash: -882352380601684724
609
+ hash: -1513265429066480138
610
610
  required_rubygems_version: !ruby/object:Gem::Requirement
611
611
  none: false
612
612
  requirements:
@@ -615,7 +615,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
615
615
  version: '0'
616
616
  segments:
617
617
  - 0
618
- hash: -882352380601684724
618
+ hash: -1513265429066480138
619
619
  requirements: []
620
620
  rubyforge_project:
621
621
  rubygems_version: 1.8.24