-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TR#400] Add blazer generator #97
base: master
Are you sure you want to change the base?
Conversation
require_relative '../../../bundler_helpers' | ||
|
||
module Rolemodel | ||
module Saas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I see that's nesting approach. Could see it simply being rolemodel:blazer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will change
def add_styles | ||
copy_file 'app/assets/stylesheets/blazer.css' | ||
copy_file 'app/assets/stylesheets/selectize.css' | ||
append_to_file 'app/assets/config/manifest.js', "\n//= link blazer.css" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be different base on the CSS approach being used right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I defer to @reedrolemodel on that one. I forget why we needed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this assumes sprockets
is being used which is also an assumption of blazer
. This issue is for adding support for jsbundling
and cssbundling
to blazer
. Until more gems support newer approaches, it seems likely that sprockets
will be needed.
if File.readlines('Gemfile').grep(/capybara|webdrivers/).none? | ||
gem_group :test do | ||
gem 'capybara' unless File.readlines('Gemfile').grep(/capybara/).any? | ||
gem 'webdrivers' unless File.readlines('Gemfile').grep(/webdrivers/).any? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update this now.
end | ||
|
||
def add_tests | ||
copy_file 'spec/factories/blazer_queries.rb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be copying blazer_dashboards.rb
too?
copy_file 'spec/factories/blazer_queries.rb' | |
copy_file 'spec/factories/blazer_dashboards.rb' | |
copy_file 'spec/factories/blazer_queries.rb' |
Task
TR #400
Why?
Blazer is quickly becoming a tool that we reach for on almost every project. What is missing from our use of it? What common customizations or fixes can we package?
A few things we could/should do
Switch from passing SQL back and forth in Blazer (except where absolutely necessary) to eliminate SQL injection.
Could also package Blazer for non-admin reporting as used on BGEA & Maverick
And one last thing is to create a rolemodel_rails generator
What Changed
What changed in this PR?
Screenshots
If any UI changes need to be shown off, please add screenshots here.