Skip to content
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

Merged
merged 6 commits into from Jun 8, 2021
Merged

#1 Setup Rails template #30

merged 6 commits into from Jun 8, 2021

Conversation

malparty
Copy link
Owner

@malparty malparty commented Jun 8, 2021

#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:

  • Devise (authentication)
  • Bootstrap (UI lib)

Proof Of Work 📹

image

image

@malparty malparty added this to the 0.1.0 milestone Jun 8, 2021
@malparty malparty self-assigned this Jun 8, 2021
@malparty malparty added this to In development in Product backlog via automation Jun 8, 2021
@malparty
Copy link
Owner Author

malparty commented Jun 8, 2021

Checks not passing = it's normal as this tests config will be done in #2, #3 and #4.

@@ -0,0 +1,5 @@
# frozen_string_literal: true

def sanitize(html)
Copy link

@github-actions github-actions bot Jun 8, 2021

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?)

@ankitkalia1195
Copy link
Collaborator

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])
Copy link

@github-actions github-actions bot Jun 8, 2021

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
Copy link

@github-actions github-actions bot Jun 8, 2021

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 }
Copy link

@github-actions github-actions bot Jun 8, 2021

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
Copy link

@github-actions github-actions bot Jun 8, 2021

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
Copy link

@github-actions github-actions bot Jun 8, 2021

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
Copy link

@github-actions github-actions bot Jun 8, 2021

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)
Copy link

@github-actions github-actions bot Jun 8, 2021

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)
Copy link

@github-actions github-actions bot Jun 8, 2021

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)
Copy link

@github-actions github-actions bot Jun 8, 2021

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)
Copy link

@github-actions github-actions bot Jun 8, 2021

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] || {}
Copy link

@github-actions github-actions bot Jun 8, 2021

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])
Copy link

@github-actions github-actions bot Jun 8, 2021

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]
Copy link

@github-actions github-actions bot Jun 8, 2021

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?)

@github-actions
Copy link

github-actions bot commented Jun 8, 2021

3 Errors
🚫 Brakeman static analysis detected issues in the code. If this is a false positive, mark it as such.
🚫 Code coverage data not found
🚫 Undercover: coverage report cannot be found.

BRAKEMAN REPORT

Application path Rails version Brakeman version Started at Duration
/home/runner/work/google-search-ruby/google-search-ruby 6.1.3.1 5.0.1 2021-06-08 06:16:53 +0000 2.222365167 seconds
Checks performed
BasicAuth, BasicAuthTimingAttack, CSRFTokenForgeryCVE, ContentTag, CookieSerialization, CreateWith, CrossSiteScripting, DefaultRoutes, Deserialize, DetailedExceptions, DigestDoS, DynamicFinders, EscapeFunction, Evaluation, Execute, FileAccess, FileDisclosure, FilterSkipping, ForgerySetting, HeaderDoS, I18nXSS, JRubyXML, JSONEncoding, JSONEntityEscape, JSONParsing, LinkTo, LinkToHref, MailTo, MassAssignment, MimeTypeDoS, ModelAttrAccessible, ModelAttributes, ModelSerialize, NestedAttributes, NestedAttributesBypass, NumberToCurrency, PageCachingCVE, PermitAttributes, QuoteTableName, Redirect, RegexDoS, Render, RenderDoS, RenderInline, ResponseSplitting, RouteDoS, SQL, SQLCVEs, SSLVerify, SafeBufferManipulation, SanitizeMethods, SelectTag, SelectVulnerability, Send, SendFile, SessionManipulation, SessionSettings, SimpleFormat, SingleQuotes, SkipBeforeFilter, SprocketsPathTraversal, StripTags, SymbolDoSCVE, TemplateInjection, TranslateBug, UnsafeReflection, UnsafeReflectionMethods, ValidationRegex, VerbConfusion, WithoutProtection, XMLDoS, YAMLParsing

SUMMARY

Scanned/Reported Total
Controllers 1
Models 1
Templates 2
Errors 0
Security Warnings 1 (0)
Warning Type Total
Cross-Site Scripting 1

SECURITY WARNINGS

Confidence Class Method Warning Type Message
Medium Cross-Site Scripting loofah gem 2.10.0 is vulnerable (CVE-2018-8048). Upgrade to 2.2.1 near line 212

Generated by 🚫 Danger

@malparty malparty changed the title Chore/project init #1 Setup Rails template Jun 8, 2021
@junan
Copy link
Contributor

junan commented Jun 8, 2021

@malparty As this PR is ready for review, we can move the related task into the in code review section https://github.com/malparty/google-search-ruby/projects/1

Procfile.dev Outdated Show resolved Hide resolved
.rspec Outdated Show resolved Hide resolved
Procfile Outdated Show resolved Hide resolved
Product backlog automation moved this from In development to Ready for QA Jun 8, 2021
@malparty malparty merged commit 5552287 into develop Jun 8, 2021
Product backlog automation moved this from Ready for QA to Completed Jun 8, 2021
@malparty malparty deleted the chore/project-init branch June 8, 2021 06:33
@malparty malparty moved this from Completed to Ready for QA in Product backlog Jun 8, 2021
@malparty malparty mentioned this pull request Jun 11, 2021
@malparty malparty moved this from Ready for QA to Completed in Product backlog Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants