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

Refactor DRY the runner and DSL #6

Merged
merged 17 commits into from
May 3, 2016

Commits on Apr 25, 2016

  1. Add RSpec

    To perform deeper refactoring a unit test suite will be useful.
    
    I like to make explicit the distinction between the specs which document
    the public API (tagged as :public) and those which are only refactoring
    guards and can be changed when necessary (tagged as :protected or
    :private depending on how stable they are intended to be).
    
    The 'spec:public' and 'spec:development' Rake tasks reflect
    that distinction.
    gonzalo-bulnes committed Apr 25, 2016
    Configuration menu
    Copy the full SHA
    bd3e847 View commit details
    Browse the repository at this point in the history
  2. Add DreddHooks::Methods specs

    Minor fix missing link in testing documentation
    gonzalo-bulnes committed Apr 25, 2016
    Configuration menu
    Copy the full SHA
    98af610 View commit details
    Browse the repository at this point in the history
  3. Refactor move from Runner module to instance

    This will allow later to store the hooks content in the runner.
    gonzalo-bulnes committed Apr 25, 2016
    Configuration menu
    Copy the full SHA
    20f4d22 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2016

  1. Refactor move hooks registration to Runner

    Minor use parens in multiple arguments method calls
    Minor use parens in non-tivial method calls
    
    The DreddHooks::Methods exposes the public DSL of DreddHooks.
    As an interface, I would like it to be as simple as possible,
    and as immutable as possible.
    
    Since the DSL and the runner were closely related already, the latter
    seems to be a good place to store the hooks that need to be runned.
    
    Also, because the DSL is an interface for the runner, I prefer the
    dependency to go from the interface to the runner, that the contrary.
    
    Finally, I made the runner a Singleton because it was already unique
    when defined as a Module, and because it make trivial its retrieval
    from the DSL.
    gonzalo-bulnes committed Apr 26, 2016
    Configuration menu
    Copy the full SHA
    3f4e1b2 View commit details
    Browse the repository at this point in the history
  2. Refactor isolate instance vars in registration methods

    Isolating them will make clearer the dynamic method generation in
    the next DRYing step.
    gonzalo-bulnes committed Apr 26, 2016
    Configuration menu
    Copy the full SHA
    f8fdff9 View commit details
    Browse the repository at this point in the history
  3. Refactor isolate instance vars in run methods

    Isolating them will make clearer the dynamic method generation in
    the next DRYing step.
    gonzalo-bulnes committed Apr 26, 2016
    Configuration menu
    Copy the full SHA
    4015d08 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fd63abd View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2016

  1. Configuration menu
    Copy the full SHA
    dfd7f9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    126470e View commit details
    Browse the repository at this point in the history
  3. Refactor move instance variables initialization

    The default values are clodely related to their setters anyway, so
    they can be generated in place at the price of very little duplication.
    gonzalo-bulnes committed Apr 27, 2016
    Configuration menu
    Copy the full SHA
    e5f8828 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a627db View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a980d68 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9ce2866 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0ff806a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    21931de View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    54badf8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d427b32 View commit details
    Browse the repository at this point in the history