Skip to content

Refactor command hooks so they could use Pry::Hooks (newer API)#1391

Merged
kyrylo merged 3 commits intomasterfrom
651-command-hooks-refactoring
Mar 11, 2015
Merged

Refactor command hooks so they could use Pry::Hooks (newer API)#1391
kyrylo merged 3 commits intomasterfrom
651-command-hooks-refactoring

Conversation

@kyrylo
Copy link
Copy Markdown
Member

@kyrylo kyrylo commented Mar 11, 2015

Fixes #651 ({after,before}_command hooks should be unified with
Pry::Hooks system)

  • The support for the Pry.commands.{after,before}_command API was kept
  • Hooks defined via the older API use random names
  • The order of hooks execution was changed from LIFO to FIFO

kyrylo added 3 commits March 11, 2015 16:17
Fixes #651 ({after,before}_command hooks should be unified with
Pry::Hooks system)

* The support for the `Pry.commands.{after,before}_command` API was kept
* Hooks defined via the older API use random names
* The order of hooks execution was changed from LIFO to FIFO
kyrylo added a commit that referenced this pull request Mar 11, 2015
Refactor command hooks so they could use Pry::Hooks (newer API)
@kyrylo kyrylo merged commit d67b5fd into master Mar 11, 2015
@kyrylo kyrylo deleted the 651-command-hooks-refactoring branch March 11, 2015 14:42
Comment thread lib/pry/command.rb
# @see {Pry::CommandSet#after_command}
def hooks
@hooks ||= {:before => [], :after => []}
Pry.hooks
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🙄

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.

{after,before}_command hooks should be unified with Pry::Hooks system

2 participants