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

Improve code coverage #109

Merged
merged 148 commits into from
Jun 2, 2020
Merged

Improve code coverage #109

merged 148 commits into from
Jun 2, 2020

Conversation

rokumatsumoto
Copy link
Owner

@rokumatsumoto rokumatsumoto commented Jun 2, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Bug Fix
  • Optimization

Description

This PR mainly focused on Rails Active Record models. Additionally, it contains some Service Objects. I understand and agree with the Create small PRs rule. For the next time, this will be exemplary to me.

During the process of improving code coverage, code has been carefully refactored and reviewed. As a result of that, code coverage for Rails Active Record models increased dramatically.

Models code coverage:

Models (97.24% covered at 37.82 hits/line)
21 files in total. 362 relevant lines. 352 lines covered and 10 lines missed

Overall code coverage:

All Files (47.39% covered at 11.0 hits/line)
130 files in total. 2433 relevant lines. 1153 lines covered and 1280 lines missed

I'm working on improving code coverage for Service Objects.

Other improvements

  • Configure Reek for code smells
  • Make the cops happy
  • Remove unused files and code blocks
  • Improve readability of code blocks
  • Use modules for common functionality

Related Tickets & Documents

Upgrade to Rails 6

Added tests?

  • yes

- Change method access control from protected to private
- Remove Boyutluseyler::Utils::StrongMemoize mixin
- Change method access control from public to private except execute method
- Add Designs::AfterCreateService class
- Move before_create code block into Designs::BuildService class
- Refactor Designs::BaseService class
- Add Designs::BeforeUpdateService class
- Move after_update code block into Designs::BeforeUpdateService class
@rokumatsumoto rokumatsumoto added the backstage Issues and merge request related to improvements like refactorings, tests, maintenance etc label Jun 2, 2020
@rokumatsumoto rokumatsumoto added this to the 0.12.1 milestone Jun 2, 2020
@rokumatsumoto rokumatsumoto self-assigned this Jun 2, 2020
@rokumatsumoto rokumatsumoto marked this pull request as ready for review June 2, 2020 17:28
@rokumatsumoto rokumatsumoto added staging Merge request has been deployed to staging environment staging succeed and removed staging Merge request has been deployed to staging environment labels Jun 2, 2020
@rokumatsumoto rokumatsumoto merged commit f00ddbd into master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backstage Issues and merge request related to improvements like refactorings, tests, maintenance etc staging succeed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant