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

Rubocop applications #365

Merged
merged 8 commits into from
Sep 27, 2018
Merged

Rubocop applications #365

merged 8 commits into from
Sep 27, 2018

Conversation

atz
Copy link
Contributor

@atz atz commented Sep 26, 2018

2 manual commits (Lint errors and Smpl.rb cleanup), otherwise all auto-corrections run by category.

Note this includes Performance and Security (yaml safe load) fixes.

I excluded HashSyntax and StringLiterals which would touch another 350 lines. I also did not do RSpec fixes, which tend to be more capricious.

If this gets merged, I'll probably follow up with those and wire rubocop into CI.

@atz atz added the review label Sep 26, 2018
@@ -16,40 +14,30 @@

module PreAssembly
class Smpl
include PreAssembly::Logging
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: wasn't actually using Logging!

@@ -101,7 +100,7 @@ def manifest_cols
private

def normalize_dir(dir)
dir.chomp('/') if dir
dir&.chomp('/')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been waiting so long for (1) Ruby to get a safe accessor, and (2) for its use to become conventional. Woo!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i really like this too, it's a very nice usability enhancement.

@coveralls
Copy link

coveralls commented Sep 26, 2018

Pull Request Test Coverage Report for Build 1147

  • 60 of 63 (95.24%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 88.54%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/lib/pre_assembly/bundle.rb 7 8 87.5%
app/lib/pre_assembly/digital_object.rb 4 5 80.0%
app/services/discovery_report.rb 0 1 0.0%
Totals Coverage Status
Change from base Build 1145: 0.2%
Covered Lines: 479
Relevant Lines: 541

💛 - Coveralls

- accessors not needed, use readers instead
- actually use the readers instead of instance vars in methods
- remove `puts` statement and related `verbose` option
- initialize `@manifest` in `#initialize`
- some beautification
Excludes `StringLiterals` and `HashSyntax` as high churn for now.
@atz atz mentioned this pull request Sep 27, 2018
@peetucket peetucket merged commit c72be33 into master Sep 27, 2018
@peetucket peetucket deleted the woop_woop branch September 27, 2018 21:24
@peetucket peetucket removed the review label Sep 27, 2018
Copy link
Member

@jmartin-sul jmartin-sul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha, peter beat me to the merge. but 👍 from me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants