Andrew Kane ac2e528c15 Updated readme | 10 år sedan | |
---|---|---|
app | 10 år sedan | |
config | 10 år sedan | |
lib | 10 år sedan | |
.gitignore | 10 år sedan | |
Gemfile | 10 år sedan | |
LICENSE.txt | 10 år sedan | |
README.md | 10 år sedan | |
Rakefile | 10 år sedan | |
blazer.gemspec | 10 år sedan |
Share data effortlessly with your team
Play around with the demo - data from MovieLens
Works with PostgreSQL and MySQL
:tangerine: Battle-tested at Instacart
Add this line to your application’s Gemfile:
gem 'blazer'
Run:
rails g blazer:install
rake db:migrate
And mount the dashboard in your config/routes.rb
:
mount Blazer::Engine, at: "blazer"
For production, specify your database:
ENV["BLAZER_DATABASE_URL"]
It is highly, highly recommended to use a read only user. Keep reading to see how to create one.
Create a user with read only permissions:
BEGIN;
CREATE ROLE blazer LOGIN PASSWORD 'secret123';
GRANT CONNECT ON DATABASE database_name TO blazer;
GRANT USAGE ON SCHEMA public TO blazer;
COMMIT;
It is highly, highly recommended to protect sensitive information with views. Documentation coming soon.
Create a user with read only permissions:
GRANT SELECT, SHOW VIEW ON database_name.* TO blazer@’127.0.0.1′ IDENTIFIED BY ‘secret123‘;
FLUSH PRIVILEGES;
It is highly, highly recommended to protect sensitive information with views. Documentation coming soon.
Don’t forget to protect the dashboard in production.
Set the following variables in your environment or an initializer.
ENV["BLAZER_USERNAME"] = "andrew"
ENV["BLAZER_PASSWORD"] = "secret"
authenticate :user, lambda{|user| user.admin? } do
mount Blazer::Engine, at: "blazer"
end
Change time zone
Blazer.time_zone = "Pacific Time (US & Canada)"
Turn off audits
Blazer.audit = false
Customize user name
Blazer.user_name = :first_name
Blazer uses a number of awesome, open source projects.
Everyone is encouraged to help improve this project. Here are a few ways you can help: