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

Integrate new core events #973

Merged
merged 9 commits into from
Jun 6, 2016
Merged

Integrate new core events #973

merged 9 commits into from
Jun 6, 2016

Conversation

mattwynne
Copy link
Member

@mattwynne mattwynne commented Apr 24, 2016

Description

I decided to move the four main events (test case / step starting / finished) down to the core, so that we don't need a special "report" API anymore. The EventBus has moved down to the core too. I extended it a bit so you can give it multiple namespaces for events, so we can use a mix of Cucumber::Core::Events and Cucumber::Events.

Motivation and Context

This simplifies the code, and allows more freedom / flexibility for subscribing to events from the runner.

Type of change

This is a breaking change to the events API, and will need to go into a major release (slated for 3.0)

TODO:

@mattwynne mattwynne added this to the 3.0 milestone May 21, 2016
@@ -21,7 +21,7 @@ Thanks!
♡ The Cucumber Team ♡
}

s.add_dependency 'cucumber-core', '~> 1.4.0'
s.add_dependency 'cucumber-core', '~> 3.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

The cucumber-core version has been changed to "2.0"

@brasmusson
Copy link
Contributor

Now when #920 has been merged, the file lib/cucumber/filters/retry.rb needs to be updated for the moving of the event bus.


# @private
def_instance_delegator :event_bus, :notify
def notify(message, *args)
event_bus.send(message, *args)
Copy link
Contributor

Choose a reason for hiding this comment

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

The event bus does also have a broadcast method that takes an event class instance as argument. Should it also be made available through the configuration object?

@io = ensure_io(config.out_stream)
@feature_hashes = []
config.on_event :test_case_starting, &method(:on_before_test_case)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to name the methods call on an event with the pattern: on_<event_name>

@brasmusson brasmusson merged commit becc6d4 into master Jun 6, 2016
@brasmusson brasmusson deleted the events branch June 6, 2016 18:26
@mattwynne
Copy link
Member Author

Thanks for merging @brasmusson. Brave move!

I think this constitutes a breaking API change - the events API has changed, so we should release it as 3.0. Shall we have the master branch target 3.0 now? I had hoped to get all the formatters replaced and deprecate the old formatter API with a 3.0 release, but we could do that in a 4.0 release.

@brasmusson
Copy link
Contributor

If this should be released as 3.0, then we should have the master branch targeting 3.0. As there are a few bugfixes and upgrade to Gherkin 4.0 unreleased on the master before this, we should branch or maintenance branches before this merge and release a cucumber-core v1.5.0 gem and a cucumber v2.4.0 gem, I think (and then not intend to do anything else on those maintenance branches, but aiming that v3.0 will be the next release).

@mattwynne
Copy link
Member Author

Yes, I agree @brasmusson.

@mattwynne
Copy link
Member Author

If anyone has time, tidying up the milestones (and assignment of issues to them) to reflect this decision would be a useful exercise.

@brasmusson
Copy link
Contributor

Now are 'cucumber' v2.4.0 and 'cucumber-core' v1.5.0 released (from the new branches v2.x-bugfix and v1.x-bugfix.

@danascheider
Copy link
Contributor

I should be able to do that @mattwynne

@mattwynne
Copy link
Member Author

Fantastic, thanks @brasmusson!

Protocol-wise, do you think we should blog an announcement (e.g. https://cucumber.io/blog/2015/09/11/cucumber-2.1) and link to that from the google group, or just post on the google group?

I've not been very consistent in the past - it would be good to just make a rule and stick with it.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants