[Refacoring] Factoring out cucumber-core?

24 views
Skip to first unread message

Matt Wynne

unread,
Oct 14, 2009, 4:40:11 AM10/14/09
to cu...@googlegroups.com
A thought occurred to me today that a useful strategy for the
refactoring, as well as pulling out gems for specific things like
formatters, might be to to try to separate the core domain of Cucumber
(parsing and executing features) from the CLI user-interface. We could
pull out the core stuff into another gem and leave only the user-
interface stuff behind in the actual cucumber gem.

There are a few advantages to this separation:
* it would force us to clean up the interface between the user-
interface (Cucumber::Cli::*) and the core feature parsing / running
stuff, which right now is quite messy.
* it would give us a clear place to start writing rdoc: for the core.
* it would allow tools like testjour to depend on just the cucumber-
core gem, rather than having the UI stuff as well.
* it might help people / us to think about building other UIs for
Cucumber than the CLI.

WDYT?

cheers,
Matt Wynne

http://www.songkick.com
http://blog.mattwynne.net

aslak hellesoy

unread,
Oct 14, 2009, 4:53:42 AM10/14/09
to cu...@googlegroups.com
I like this idea. But let's wait until we have replaced Treetop with
Gherkin. That will require quite a bit of internal refactoring and
things can get messy if we have two parallel refactoring efforts.

Let's call it 0.5 when we have Gherkin. Then we can do what you suggest for 0.6.

WDYT?

Aslak

Stephen Eley

unread,
Oct 14, 2009, 10:59:29 AM10/14/09
to cu...@googlegroups.com
On Wed, Oct 14, 2009 at 4:40 AM, Matt Wynne <ma...@songkick.com> wrote:
>
>  * it might help people / us to think about building other UIs for
> Cucumber than the CLI.

+1. Maybe +2, if I get enough points for that.

--
Have Fun,
Steve Eley (sfe...@gmail.com)
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org

Paul Campbell

unread,
Oct 14, 2009, 11:03:23 AM10/14/09
to cu...@googlegroups.com
Definitely a good plan, although sometimes stuff like this sends a
mixed marketing message.

eg. Rails (ActiveRecord, ActionPack etc.)
merb-more, merb-core

I prefer the monolithic thing, where it would be

Cucumber (cucumber-cli, gherkin, cucumber-core)

rather than being generally "available" separately.

It makes no difference to the organisation of the code at the end of
the day, but I think it's important to the marketing message that it's
a coherent whole, albeit one that's very well organised into distinct
interoperating parts!

Paul
--


Paul Campbell
pa...@rushedsunlight.com
- - - - - - - - - - - - - - - - - - -
blog http://www.pabcas.com
twitter http://www.twitter.com/paulca
github http://www.github.com/paulca
phone +353 87 914 8162
- - - - - - - - - - - - - - - - - - -

Jim Meyer

unread,
Oct 14, 2009, 11:35:57 AM10/14/09
to cu...@googlegroups.com
On Oct 14, 2009, at 7:59 AM, Stephen Eley <sfe...@gmail.com> wrote:
> On Wed, Oct 14, 2009 at 4:40 AM, Matt Wynne <ma...@songkick.com> wrote:
>>
>> * it might help people / us to think about building other UIs for
>> Cucumber than the CLI.
>
> +1. Maybe +2, if I get enough points for that.

I'll loan you mine just in case.

+1

--j

Jim Meyer

unread,
Oct 14, 2009, 11:42:32 AM10/14/09
to cu...@googlegroups.com
On Oct 14, 2009, at 8:03 AM, Paul Campbell <pa...@rslw.com> wrote:
> Definitely a good plan, although sometimes stuff like this sends a
> mixed marketing message.
>
> eg. Rails (ActiveRecord, ActionPack etc.)
> merb-more, merb-core
>
> I prefer the monolithic thing, where it would be
>
> Cucumber (cucumber-cli, gherkin, cucumber-core)
>
> rather than being generally "available" separately.

If I follow you, you're saying that 'gem install cucumber' should
install all the basics required to write and execute a feature from
the command line as we do now; under the hood it's really a thin
dependancy wrapper to install cucumber-{core,cli} and gherkin, which
makes it easy for other gems to just pull in cucumber-core.

+1 for that, and apologies if I've got your intent wrong.

--j

Mike Sassak

unread,
Oct 14, 2009, 12:02:28 PM10/14/09
to cu...@googlegroups.com
Given some of the tickets I have opened, I think it's clear what my
opinion is on the matter: big +1. Especially for alternate UIs.

Greg and I are planning on bringing the pain, err... pair-programming
to Gherkin in the next few days, so hopefully 0.5 won't be (too) far
off.

Mike

Paul Campbell

unread,
Oct 14, 2009, 12:23:15 PM10/14/09
to cu...@googlegroups.com
> If I follow you, you're saying that 'gem install cucumber' should
> install all the basics required to write and execute a feature from
> the command line as we do now; under the hood it's really a thin
> dependancy wrapper to install cucumber-{core,cli} and gherkin, which
> makes it easy for other gems to just pull in cucumber-core.

Exactly! Things "just work" great right now, and I think that it
should stay that way.

>
> +1 for that, and apologies if I've got your intent wrong.
>
> --j
>
> >
>



Matt Wynne

unread,
Oct 14, 2009, 5:22:32 PM10/14/09
to cu...@googlegroups.com

On 14 Oct 2009, at 17:23, Paul Campbell wrote:

>
>> If I follow you, you're saying that 'gem install cucumber' should
>> install all the basics required to write and execute a feature from
>> the command line as we do now; under the hood it's really a thin
>> dependancy wrapper to install cucumber-{core,cli} and gherkin, which
>> makes it easy for other gems to just pull in cucumber-core.
>
> Exactly! Things "just work" great right now, and I think that it
> should stay that way.

Yes, that's exactly what I'm suggesting. I'd just like the layers
underneath, should you care to look down there, to have clearer
separation which will make Cucumber more extensible in the long game.

cheers,
Matt

+447974 430184
ma...@mattwynne.net
http://blog.mattwynne.net

Reply all
Reply to author
Forward
0 new messages