-
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
#1 Setup Rails template #30
Conversation
@@ -0,0 +1,5 @@ | |||
# frozen_string_literal: true | |||
|
|||
def sanitize(html) |
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.
Doesn't depend on instance state (maybe move it to another class?) |
PR title should match the issue title. #1 Setup Rails template |
end | ||
|
||
def extract_locale_from_param | ||
return params[:locale] if I18n.locale_available?(params[:locale]) |
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.
Calls 'params[:locale]' 2 times |
|
||
private | ||
|
||
def default_url_options |
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.
Doesn't depend on instance state (maybe move it to another class?) |
private | ||
|
||
def default_url_options | ||
{ locale: I18n.locale == I18n.default_locale ? nil : I18n.locale } |
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.
Calls 'i18n.locale' 2 times |
# Usage for Rails: | ||
# in config/environments/test.rb | ||
# config.middleware.use Rack::NoAnimations | ||
class NoAnimations |
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.
Assumes too much for instance variable '@Body' |
# Usage for Rails: | ||
# in config/environments/test.rb | ||
# config.middleware.use Rack::NoAnimations | ||
class NoAnimations |
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.
Assumes too much for instance variable '@headers' |
# Usage for Rails: | ||
# in config/environments/test.rb | ||
# config.middleware.use Rack::NoAnimations | ||
class NoAnimations |
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.
Assumes too much for instance variable '@status' |
@app = app | ||
end | ||
|
||
def call(env) |
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.
Has approx 7 statements |
response = Rack::Response.new([], @status, @headers) | ||
|
||
@body.each { |fragment| response.write inject(fragment) } | ||
@body.close if @body.respond_to?(:close) |
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.
Manually dispatches method call |
# rubocop:disable Metrics/MethodLength | ||
# rubocop:disable Naming/HeredocDelimiterNaming | ||
# rubocop:disable Layout/HeredocIndentation | ||
def inject(fragment) |
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.
Doesn't depend on instance state (maybe move it to another class?) |
end | ||
end | ||
|
||
def configure_vcr_with_options(example, vcr_options) |
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.
Has approx 8 statements |
end | ||
|
||
def configure_vcr_with_options(example, vcr_options) | ||
cassette_options = vcr_options[:options] || {} |
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.
Refers to 'vcr_options' more than self (maybe move it to another class?) |
|
||
def configure_vcr_with_options(example, vcr_options) | ||
cassette_options = vcr_options[:options] || {} | ||
vcr_cassettes = vcr_options[:cassettes] || Array(vcr_options[:cassette]) |
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.
Refers to 'vcr_options' more than self (maybe move it to another class?) |
def configure_vcr_with_options(example, vcr_options) | ||
cassette_options = vcr_options[:options] || {} | ||
vcr_cassettes = vcr_options[:cassettes] || Array(vcr_options[:cassette]) | ||
cassette_group = vcr_options[:group] |
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.
Refers to 'vcr_options' more than self (maybe move it to another class?) |
BRAKEMAN REPORT
SUMMARY
SECURITY WARNINGS
Generated by 🚫 Danger |
@malparty As this PR is ready for review, we can move the related task into the |
…Junan issue on rails template
#1 Setup Rails template
What happened 👀
Basic deployment of Nimble Rails template & simple README.md update.
This is the start point for my project and enabling me to move forward.
Insight 📝
Rails Template has been configured with 2 addons:
Proof Of Work 📹