tailog 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +13 -5
  2. data/lib/tailog/version.rb +1 -1
  3. data/lib/tailog.rb +7 -0
  4. metadata +11 -10
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5e8266a49931997038e621a0eeaa66f5a5cc076c
4
- data.tar.gz: 42785658973a4711691b530fa9975802c024bbda
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjRlZTI0N2I0OWRjNjJmNWQyMmQ3Yjk3YmI3YzczNTgxMTcwMzYyYg==
5
+ data.tar.gz: !binary |-
6
+ ZmE1NjdhZmZmYjMwYzE5YTRiMTE4ZTIzYjY3NDI1N2RhZDZjMjE1Mw==
5
7
  SHA512:
6
- metadata.gz: 0e8ee9397b06785966a2bf7e95e75c710924ff4e1abb44d46548fefefdd8568e9f14646d0593c74a82620a15e034946aaff4e2ed2c480a2f5c703607a2c415a8
7
- data.tar.gz: 007d85c867c23903d005b032051647b4e219668a4000fe86edfa98070999df8d35ed842c26d3e8c986c6adb6687a98f304961d8a162f68e076e470a44119d0e4
8
+ metadata.gz: !binary |-
9
+ ZWQwMTFkM2Q1OTFkZjg3MDcwY2NmZDU4MGQwNDBlYTRhOGMzZWY0ZDExNzZh
10
+ M2Q0OWIzMDVhN2NkNWI3NzI5YjcyZjA3NGMwOGRiY2IxZWRiNDI4ZjZlMDA2
11
+ OWE4ZDQzMmE3ZDIxYWJhYzFlMDc2NjhiMzY2NzI3NWU1YjMxZGE=
12
+ data.tar.gz: !binary |-
13
+ NDk5MzI2YmFmYTQxYjM5NzdmOTA4Y2M1YjdkMzQwZDE2NzljZjIzMTJjNzU4
14
+ M2FkMzY4MDUwYzg1YTI0ZjE1MDYzMGE0YzY0Y2M3ZDA5YzI1NmFjYzdjZDE5
15
+ YzRiNTRhN2E1YWVjYmIwMzhkZmNhYTU2YWFhNmJlYTMxNDIzNGI=
@@ -1,3 +1,3 @@
1
1
  module Tailog
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/tailog.rb CHANGED
@@ -26,15 +26,22 @@ module Tailog
26
26
 
27
27
  class << self
28
28
  attr_accessor :log_path
29
+ attr_accessor :basic_auth
29
30
  end
30
31
 
31
32
  self.log_path = File.expand_path("log", Dir.pwd)
33
+ self.basic_auth = proc do |username, password|
34
+ username == (ENV['TAILOG_USERNAME'] || 'tailog') and
35
+ password == (ENV['TAILOG_USERNAME'] || 'password')
36
+ end
32
37
 
33
38
  class App < Sinatra::Base
34
39
  set :root, File.expand_path("../../app", __FILE__)
35
40
  set :public_folder do "#{root}/assets" end
36
41
  set :views do "#{root}/views" end
37
42
 
43
+ use Rack::Auth::Basic, "Restricted Area", &Tailog.basic_auth
44
+
38
45
  helpers do
39
46
  def h(text)
40
47
  Rack::Utils.escape_html(text)
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bbtfr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.11'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: Sinatra App to serve log in browser
@@ -45,7 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".gitignore"
48
+ - .gitignore
49
49
  - CODE_OF_CONDUCT.md
50
50
  - Gemfile
51
51
  - README.md
@@ -67,18 +67,19 @@ require_paths:
67
67
  - lib
68
68
  required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ">="
70
+ - - ! '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ">="
75
+ - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.4.6
80
+ rubygems_version: 2.4.8
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: tail -f to the web-browser
84
84
  test_files: []
85
+ has_rdoc: