Project

peephole

0.0
No commit activity in last 3 years
No release in over 3 years
Peephole is a Rails engine that provides interface to view logs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.10
~> 1.3

Runtime

~> 4.2
 Project Readme

Peephole

Gem Version Circle CI Code Climate Test Coverage

A log viewer engine for Rails.

Requirement

  • Ruby 2.2
  • Rails 4.2
  • Rails.application.config.log_tags = [:uuid]

Installation

# Gemfile
gem 'peephole'

$ bundle

$ rails g peephole:install
       route  mount Peephole::Engine => "/peephole"
      create  config/initializers/log_tags.rb
      create  config/initializers/peephole.rb

Configuration

# config/initializers/peephole.rb
Peephole.configure do |config|
  config.lines_per = 200
  config.bytes_per = 5000
  config.peeper? do
    # !Rails.env.production?

    # current_user.role.admin?

    # admin_user_signed_in?

    # authenticate_or_request_with_http_basic do |user, pass|
    #   user == ENV['PEEPHOLE_USER'] && pass == ENV['PEEPHOLE_PASS']
    # end
  end
end

Example

$ git clone git@github.com:tnantoka/peephole.git
$ cd peephole/spec/dummy
$ rails s
$ open http://localhost:3000/peephole

License

MIT

Author

@tnantoka