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

A big pile of refactoring #140

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Commits on May 21, 2018

  1. Remove unused and redundant CongressMember methods

    Removes aliases that make common congress_member instance methods
    into class methods.  I wonder why those seemed useful.
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    958e028 View commit details
    Browse the repository at this point in the history
  2. Refactor CongressMember model

    * shorten long lines
    * move single-use method into the only place it's used
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    1972c6e View commit details
    Browse the repository at this point in the history
  3. Fix test db setup

    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    1ea4c94 View commit details
    Browse the repository at this point in the history
  4. Little refactors to debug_controller_spec

        * DRY up last_response_json
        * use `let` to create instance methods
        * use string interpolation instead of `'' + foo.to_s`
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    861bdb7 View commit details
    Browse the repository at this point in the history
  5. Refactor CongressMemberAction model

    * break the crazy-long execute method into smaller methods
    * move some code that doesn't pertain to the model out of the model
    * fewer nested if statements
    * put `extends` calls and ActiveRecord methods at the top of the file
    * don't pass the CongressMember, the record already knows its CongressMember.
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    4ad4ff5 View commit details
    Browse the repository at this point in the history
  6. Simplify FormFilling concern

    * remove unused `fill_out_form!` method
    * shallower if statments
    * move code into named methods
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    03fb25a View commit details
    Browse the repository at this point in the history
  7. One file, one factory

    Split the giant factories.rb into smaller, single-model factories.
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    a8ec759 View commit details
    Browse the repository at this point in the history
  8. Be firm about the possible CongressMemberAction actions

    Move the list into a constant that the wider app can rely on
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    fd55f6a View commit details
    Browse the repository at this point in the history
  9. Clean up DelayedJobHelper

    * Everything is a class method; use class << self instead of declaring
    individually
    * Remove unused methods
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    9e04834 View commit details
    Browse the repository at this point in the history
  10. Move delayed_job tasks into their own file

    Smaller, more focused files are more legible than larger ones.
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    c362b33 View commit details
    Browse the repository at this point in the history
  11. Replace demeter violation in CongressMember

    * delegate to a named scope in CongressMemberAction
    * use new hash syntax
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    5dd061e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1f81929 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2fcb225 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f8c7daf View commit details
    Browse the repository at this point in the history
  15. Move PhantomJS fillers into their own file

    Now it will be easy to swap out PhantomJS with something else!
    * the CongressMemberAction model doesn't need to know about Capybara,
    * move screenshot methods into their own file
    k-stewart committed May 21, 2018
    Configuration menu
    Copy the full SHA
    69ec7c2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c5f15a6 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a6b7e57 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    84204e9 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2018

  1. Configuration menu
    Copy the full SHA
    5b83272 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    40bfa92 View commit details
    Browse the repository at this point in the history
  3. Refactor rake congress_member:fill_out_all

    Pull the logic into a tidy lib class
    k-stewart committed May 22, 2018
    Configuration menu
    Copy the full SHA
    d524140 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2018

  1. Refactor helpers

    * code style consistency
    * DRY up repeated logic
    * keep constants in one place
    * more expressive names
    k-stewart committed May 23, 2018
    Configuration menu
    Copy the full SHA
    3ae57ca View commit details
    Browse the repository at this point in the history

Commits on May 24, 2018

  1. Clean up controllers

    * DRY up repeated logic
    * use .map instead of instantiating and pushing to an ary
    * fix some typos
    k-stewart committed May 24, 2018
    Configuration menu
    Copy the full SHA
    4b8753f View commit details
    Browse the repository at this point in the history