Hey all, I''ve got some code that I (mostly) inherited. It essentially has a couple of AR class methods that look for a specific record by id: class Project < ActiveRecord::Base class << self def specific_project @another_specific_project ||= Project.find(10) if Project.exists?(10) end def another_specific_project @specific_project ||= Project.find(11) if Project.exists?(11) end end end Typically, when I''ve specced this code (or more accurately, code that uses it), I''ve stubbed out those methods to return a mocked model. Lately, I''ve started using cucumber and adding stories for areas we''re adding features to or finding regressions in. From what I can tell, I can''t stub or mock anything from within cucumber step files. Realizing that the pattern is a bit of code smell, I feel like I have two directions I could go: 1. Is there a way to stub out the model to return some fixture-type records? 2. Does anyone have an idea as to how we could refactor this into a better pattern? Those 2 "projects" are pretty specific to the production data and will "never be edited," but it still doesn''t make me comfortable. I''m not sure how to phrase this better. Let me know what other detail I can provide to make it more clear what I''m looking for. thanks, tim
On Mon, Sep 15, 2008 at 4:14 PM, Tim Glen <tim at pivotib.com> wrote:> Hey all, > > I''ve got some code that I (mostly) inherited. It essentially has a couple of > AR class methods that look for a specific record by id: > > class Project < ActiveRecord::Base > class << self > def specific_project > @another_specific_project ||= Project.find(10) if Project.exists?(10) > end > > def another_specific_project > @specific_project ||= Project.find(11) if Project.exists?(11) > end > end > end > > Typically, when I''ve specced this code (or more accurately, code that uses > it), I''ve stubbed out those methods to return a mocked model. Lately, I''ve > started using cucumber and adding stories for areas we''re adding features to > or finding regressions in. From what I can tell, I can''t stub or mock > anything from within cucumber step files. Realizing that the pattern is a > bit of code smell, I feel like I have two directions I could go: > 1. Is there a way to stub out the model to return some fixture-type records?I don''t think you''re really supposed to mock or stub when using cucumber.> 2. Does anyone have an idea as to how we could refactor this into a better > pattern? Those 2 "projects" are pretty specific to the production data and > will "never be edited," but it still doesn''t make me comfortable.Maybe you could add a column that represents the unique characteristic of the particular projects. I''d probably end up with: def internal_project @internal_project ||= Project.find(:first, :conditions => "internal IS TRUE") end def demo_project @demo_project ||= Project.find(:first, :conditions => "demo IS TRUE") end or maybe have one column and let its value change: def internal_project @internal_project ||= Project.find(:first, :conditions => "role=''internal''") end def demo_project @demo_project ||= Project.find(:first, :conditions => "role=''demo''") end Pat
Tim Glen wrote:> 1. Is there a way to stub out the model to return some fixture-type > records? > 2. Does anyone have an idea as to how we could refactor this into a > better pattern? Those 2 "projects" are pretty specific to the > production data and will "never be edited," but it still doesn''t make > me comfortable. > > I''m not sure how to phrase this better. Let me know what other detail > I can provide to make it more clear what I''m looking for. > > thanks, > timAs Pat said I would avoid mocking/stubbing, you want your cucumber tests to cut through all the layers of your app including touching the database. As for setting up the data, I tend not to use fixtures (I only want to have the data created for certain tests). Instead I save the relevant models in the Given steps, preparing for the feature test. If you are going to repeat the given steps a lot I would extract the model set-up into a ruby function and reuse this. -- Joseph Wilk http://www.joesniff.co.uk -- Posted via http://www.ruby-forum.com/.
On Mon, Sep 15, 2008 at 11:01 PM, Joseph Wilk <lists at ruby-forum.com> wrote:> Tim Glen wrote: >> 1. Is there a way to stub out the model to return some fixture-type >> records? >> 2. Does anyone have an idea as to how we could refactor this into a >> better pattern? Those 2 "projects" are pretty specific to the >> production data and will "never be edited," but it still doesn''t make >> me comfortable. >> >> I''m not sure how to phrase this better. Let me know what other detail >> I can provide to make it more clear what I''m looking for. >> >> thanks, >> tim > > As Pat said I would avoid mocking/stubbing, you want your cucumber tests > to cut through all the layers of your app including touching the > database. >I second that. Aslak> As for setting up the data, I tend not to use fixtures (I only want to > have the data created for certain tests). Instead I save the relevant > models in the Given steps, preparing for the feature test. If you are > going to repeat the given steps a lot I would extract the model set-up > into a ruby function and reuse this. > > -- > Joseph Wilk > http://www.joesniff.co.uk > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Mon, Sep 15, 2008 at 4:01 PM, Joseph Wilk <lists at ruby-forum.com> wrote:> Tim Glen wrote: >> 1. Is there a way to stub out the model to return some fixture-type >> records? >> 2. Does anyone have an idea as to how we could refactor this into a >> better pattern? Those 2 "projects" are pretty specific to the >> production data and will "never be edited," but it still doesn''t make >> me comfortable. >> >> I''m not sure how to phrase this better. Let me know what other detail >> I can provide to make it more clear what I''m looking for. >> >> thanks, >> tim > > As Pat said I would avoid mocking/stubbing, you want your cucumber tests > to cut through all the layers of your app including touching the > database. > > As for setting up the data, I tend not to use fixtures (I only want to > have the data created for certain tests). Instead I save the relevant > models in the Given steps, preparing for the feature test. If you are > going to repeat the given steps a lot I would extract the model set-up > into a ruby function and reuse this.You might also take a look at http://github.com/flogic/object_daddy. Cheers, David> > -- > Joseph Wilk > http://www.joesniff.co.uk > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On 15 Sep 2008, at 21:14, Tim Glen wrote:> Hey all, > > I''ve got some code that I (mostly) inherited. It essentially has a > couple of AR class methods that look for a specific record by id: > > class Project < ActiveRecord::Base > class << self > def specific_project > @another_specific_project ||= Project.find(10) if > Project.exists?(10) > end > > def another_specific_project > @specific_project ||= Project.find(11) if Project.exists?(11) > end > end > end > > Typically, when I''ve specced this code (or more accurately, code > that uses it), I''ve stubbed out those methods to return a mocked > model. Lately, I''ve started using cucumber and adding stories for > areas we''re adding features to or finding regressions in. From what > I can tell, I can''t stub or mock anything from within cucumber step > files. Realizing that the pattern is a bit of code smell, I feel > like I have two directions I could go: > 1. Is there a way to stub out the model to return some fixture-type > records? > 2. Does anyone have an idea as to how we could refactor this into a > better pattern? Those 2 "projects" are pretty specific to the > production data and will "never be edited," but it still doesn''t > make me comfortable.If those objects are built into your system and will never, ever change, I would consider storing their definition in the code rather than in the database anyway. http://www.refactoring.com/catalog/replaceTypeCodeWithSubclasses.html That would get around your issues with the pristine test database being different to the production / development database, and IMO more clearly communicates to future developers that these objects are ''special''. Of course it depends on how many of them there are, whether you have a use case for editing them etc, but it''s worth thinking about. Alternatively you could call the migrations that insert this stock data (presumably you have some) from your spec pre-requisites. cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine.
>> I''ve got some code that I (mostly) inherited. It essentially has a >> couple of AR class methods that look for a specific record by id: >> >> class Project < ActiveRecord::Base >> class << self >> def specific_project >> @another_specific_project ||= Project.find(10) if >> Project.exists?(10) >> end >> >> def another_specific_project >> @specific_project ||= Project.find(11) if Project.exists?(11) >> end >> end >> end >> >> Typically, when I''ve specced this code (or more accurately, code >> that uses it), I''ve stubbed out those methods to return a mocked >> model. Lately, I''ve started using cucumber and adding stories for >> areas we''re adding features to or finding regressions in. From what >> I can tell, I can''t stub or mock anything from within cucumber step >> files. Realizing that the pattern is a bit of code smell, I feel >> like I have two directions I could go: >> 1. Is there a way to stub out the model to return some fixture-type >> records? >> 2. Does anyone have an idea as to how we could refactor this into a >> better pattern? Those 2 "projects" are pretty specific to the >> production data and will "never be edited," but it still doesn''t >> make me comfortable. > > If those objects are built into your system and will never, ever > change, I would consider storing their definition in the code rather > than in the database anyway. > > http://www.refactoring.com/catalog/replaceTypeCodeWithSubclasses.html > > That would get around your issues with the pristine test database > being different to the production / development database, and IMO > more clearly communicates to future developers that these objects > are ''special''. > > Of course it depends on how many of them there are, whether you have > a use case for editing them etc, but it''s worth thinking about.Thanks all for the ideas. I knew that stubbing or mocking from within Cucumber was the wrong direction. I started exploring going that direction, but all my instincts were crying out against it. I''m going to look into either subclassing the Project model or putting the differences in the database itself. I''ve considered putting the differences into the data previously, but we''re talking about 2 distinct projects out of 100+. I would need 2 new columns for the data and they would only ever each be used for 1 project - doesn''t feel right somehow. Matt - in terms of subclassing it, I have the entire stable of projects, 1 "internal" project and 1 "slush fund" project. If I''m subclassing the project, I assume that I still need to have a record for them in the database that needs to be findable. So while the subclass suggestion helps, I''m not sure it gets me all the way there? Could very well be that I''m missing something there...>> As for setting up the data, I tend not to use fixtures (I only want >> to >> have the data created for certain tests). Instead I save the relevant >> models in the Given steps, preparing for the feature test. If you are >> going to repeat the given steps a lot I would extract the model set- >> up >> into a ruby function and reuse this. > > You might also take a look at http://github.com/flogic/object_daddy.For test data, I''ve been using the FixtureReplacement plugin rather than fixtures - it basically abstracts the creation and destruction of objects for every scenario. However, I''ve only been using it for about a week now. It works well, but I''m not married to it yet by any stretch. Is Object Daddy in a stable state? it looks pretty tasty, I have to say. thanks again, tim
On 16 Sep 2008, at 15:41, Tim Glen wrote:> Matt - in terms of subclassing it, I have the entire stable of > projects, 1 "internal" project and 1 "slush fund" project. If I''m > subclassing the project, I assume that I still need to have a > record for them in the database that needs to be findable. So while > the subclass suggestion helps, I''m not sure it gets me all the way > there? Could very well be that I''m missing something there...Yeah this is where ActiveRecord''s tight coupling to databases really starts to bite. You *could* override all the Project.find calls and merge in the two stock, hard-coded projects (not subclasses) into every resultset but that sounds like quite hard work. You could also use STI maybe, and store a row for the two stock projects but only store the type and put everything else in code. If you only want one of each though, I don''t think that refactoring to subclasses is really appropriate. You more want to be able to call Project.internal or Project.slush_fund and always get back that singleton instance of Project... I''ve never needed to do this yet in ruby / rails so you may notice I''m becoming rather hand-wavey at this point. I think I''ll get my coat... cheers, Matt ---- http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily reflect the views of any former, current or future employers of mine.
On Sep 15, 2008, at 4:14 PM, Tim Glen wrote:> Hey all, > > I''ve got some code that I (mostly) inherited. It essentially has a > couple of AR class methods that look for a specific record by id: > > class Project < ActiveRecord::Base > class << self > def specific_project > @another_specific_project ||= Project.find(10) if > Project.exists?(10) > end > > def another_specific_project > @specific_project ||= Project.find(11) if Project.exists?(11) > end > end > endWhy don''t use just use a slug for these things? In other words - use a unique name for each record, since the numbers 10 and 11 don''t mean much to anyone. Then, use a factory (like FixtureReplacement or Object Daddy) to generate the records in env.rb. Here''s how you''d do that with FixtureReplacement (at the bottom of your env.rb file): include FixtureReplacement create_project(:slug => "my-unique-name-for-project1") create_project(:slug => "my-unique-name-for-the-second-project") Scott
> Why don''t use just use a slug for these things? In other words - use > a unique name for each record, since the numbers 10 and 11 don''t > mean much to anyone. > > Then, use a factory (like FixtureReplacement or Object Daddy) to > generate the records in env.rb. Here''s how you''d do that with > FixtureReplacement (at the bottom of your env.rb file): > > include FixtureReplacement > > create_project(:slug => "my-unique-name-for-project1") > create_project(:slug => "my-unique-name-for-the-second-project")Yah - I actually did a similar thing for another model I found with the same issue. This way I only have to add one column to the db. For now, those are the only 2 projects we would need a slug for but, if we needed more, we could add them later. thanks for the logical conclusion to my issue :)
On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote:> I don''t think you''re really supposed to mock or stub when using > cucumber.We need to stub time in some of our scenarios, which exist to to verify behavior over time. We''re looking into a before/after to support mocking/stubbing for this scenario. Cheers, Luke -- Luke Melia luke at lukemelia.com http://www.lukemelia.com/
On Tue, Sep 30, 2008 at 9:55 AM, Luke Melia <luke at lukemelia.com> wrote:> On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote: > >> I don''t think you''re really supposed to mock or stub when using cucumber. > > We need to stub time in some of our scenarios, which exist to to verify > behavior over time. We''re looking into a before/after to support > mocking/stubbing for this scenario.There''s no direct hooks into the mock framework and I don''t think there should be, but you can roll your own in the supplied Before/After methods: Before do #do some magic w/ time end After do #undo some magic w/ time end Those run before and after every scenario.> > Cheers, > Luke > -- > Luke Melia > luke at lukemelia.com > http://www.lukemelia.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Sep 30, 2008, at 11:06 AM, David Chelimsky wrote:> On Tue, Sep 30, 2008 at 9:55 AM, Luke Melia <luke at lukemelia.com> > wrote: >> On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote: >> >>> I don''t think you''re really supposed to mock or stub when using >>> cucumber. >> >> We need to stub time in some of our scenarios, which exist to to >> verify >> behavior over time. We''re looking into a before/after to support >> mocking/stubbing for this scenario. > > There''s no direct hooks into the mock framework and I don''t think > there should be, but you can roll your own in the supplied > Before/After methods: > > Before do > #do some magic w/ time > end > > After do > #undo some magic w/ time > end > > Those run before and after every scenario.How would you do this? I guess you could just require spec/mocks/ mock, mock / stub as usual, and then in the After block call Spec::Mocks::Space#reset_all ? Scott
On Tue, Sep 30, 2008 at 10:26 AM, Scott Taylor <mailing_lists at railsnewbie.com> wrote:> > On Sep 30, 2008, at 11:06 AM, David Chelimsky wrote: > >> On Tue, Sep 30, 2008 at 9:55 AM, Luke Melia <luke at lukemelia.com> wrote: >>> >>> On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote: >>> >>>> I don''t think you''re really supposed to mock or stub when using >>>> cucumber. >>> >>> We need to stub time in some of our scenarios, which exist to to verify >>> behavior over time. We''re looking into a before/after to support >>> mocking/stubbing for this scenario. >> >> There''s no direct hooks into the mock framework and I don''t think >> there should be, but you can roll your own in the supplied >> Before/After methods: >> >> Before do >> #do some magic w/ time >> end >> >> After do >> #undo some magic w/ time >> end >> >> Those run before and after every scenario. > > How would you do this? I guess you could just require spec/mocks/mock, mock > / stub as usual, and then in the After block call > Spec::Mocks::Space#reset_all ?That could work. And actually, I''d be OK w/ the idea of stubs, just not message expectations (mocks). Aslak?> > Scott > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Have you thought about building a fake object instead of using mocking / stubbing? It might be simpler, and you can use Pat''s ServiceLocator idea to substitute your fake for the cucumber runs. On 30 Sep 2008, at 15:55, Luke Melia wrote:> On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote: > >> I don''t think you''re really supposed to mock or stub when using >> cucumber. > > We need to stub time in some of our scenarios, which exist to to > verify behavior over time. We''re looking into a before/after to > support mocking/stubbing for this scenario. > > Cheers, > Luke > -- > Luke Melia > luke at lukemelia.com > http://www.lukemelia.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Scott Taylor <mailing_lists at railsnewbie.com> writes:> On Sep 30, 2008, at 11:06 AM, David Chelimsky wrote: > >> On Tue, Sep 30, 2008 at 9:55 AM, Luke Melia <luke at lukemelia.com> >> wrote: >>> On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote: >>> >>>> I don''t think you''re really supposed to mock or stub when using >>>> cucumber. >>> >>> We need to stub time in some of our scenarios, which exist to to >>> verify >>> behavior over time. We''re looking into a before/after to support >>> mocking/stubbing for this scenario. >> >> There''s no direct hooks into the mock framework and I don''t think >> there should be, but you can roll your own in the supplied >> Before/After methods: >> >> Before do >> #do some magic w/ time >> end >> >> After do >> #undo some magic w/ time >> end >> >> Those run before and after every scenario. > > How would you do this? I guess you could just require spec/mocks/ > mock, mock / stub as usual, and then in the After block call > Spec::Mocks::Space#reset_all ?You can do magic without mocks... orig_now = Time.method(:now) Before do now = Time.now (class << Time; self; end).send(:define_method, :now) { now } end After do (class << Time; self; end).send(:define_method, :now) { orig_now.call } end Pat
On Sep 30, 2008, at 12:04 PM, Pat Maddox wrote:> Scott Taylor <mailing_lists at railsnewbie.com> writes: > >> On Sep 30, 2008, at 11:06 AM, David Chelimsky wrote: >> >>> On Tue, Sep 30, 2008 at 9:55 AM, Luke Melia <luke at lukemelia.com> >>> wrote: >>>> On Sep 15, 2008, at 4:35 PM, Pat Maddox wrote: >>>> >>>>> I don''t think you''re really supposed to mock or stub when using >>>>> cucumber. >>>> >>>> We need to stub time in some of our scenarios, which exist to to >>>> verify >>>> behavior over time. We''re looking into a before/after to support >>>> mocking/stubbing for this scenario. >>> >>> There''s no direct hooks into the mock framework and I don''t think >>> there should be, but you can roll your own in the supplied >>> Before/After methods: >>> >>> Before do >>> #do some magic w/ time >>> end >>> >>> After do >>> #undo some magic w/ time >>> end >>> >>> Those run before and after every scenario. >> >> How would you do this? I guess you could just require spec/mocks/ >> mock, mock / stub as usual, and then in the After block call >> Spec::Mocks::Space#reset_all ? > > You can do magic without mocks... > > orig_now = Time.method(:now) > Before do > now = Time.now > (class << Time; self; end).send(:define_method, :now) { now } > end > > After do > (class << Time; self; end).send(:define_method, :now) > { orig_now.call } > endSure. If our mocks were macros, wouldn''t it expand into this code? Scott
Evan David Light
2008-Sep-30 19:02 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
Subject says most of it. I''d love to use Cucumber in my project but I need to be able to install it in a Rails app and by a particular version number. I forked it and struggled with getting GitHub gems deployer to behave itself. Maybe a "canonical" version can be kept and updated in RubyForge occasionally because of occasional gem problems with GitHub? Evan
On Sep 30, 2008, at 10:55 AM, Luke Melia wrote:> We need to stub time in some of our scenarios, which exist to to > verify behavior over time. We''re looking into a before/after to > support mocking/stubbing for this scenario.Thanks for everyone''s thoughts. I understand that mocks are generally an anathema to story tests. We''ve decided to use them to solve this particular problem, though, and rely on our own self-discipline to not abuse their presence. Here''s what we''re going with for now in our env.rb: require ''spec/mocks'' require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "vendor", "plugins", "rspec", "plugins", "mock_frameworks", "rspec")) include Spec::Plugins::MockFramework Before do setup_mocks_for_rspec end After do begin verify_mocks_for_rspec ensure teardown_mocks_for_rspec end end Luke -- Luke Melia luke at lukemelia.com http://www.lukemelia.com/
aslak hellesoy
2008-Sep-30 21:20 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light <lists at tiggerpalace.com> wrote:> Subject says most of it. I''d love to use Cucumber in my project but I need > to be able to install it in a Rails app and by a particular version number. >You can do that with git pull and git checkout. Would it help if detailed instructions were posted to the wiki?> I forked it and struggled with getting GitHub gems deployer to behave > itself. > > Maybe a "canonical" version can be kept and updated in RubyForge > occasionally because of occasional gem problems with GitHub? >Yes, I''ll probably do that soon. GitHub fails to build the gem every time for me (not occasionally). http://logicalawesome.lighthouseapp.com/projects/8570-github/tickets/945 Aslak> Evan > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Evan Light
2008-Sep-30 21:28 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Sep 30, 2008, at 5:20 PM, aslak hellesoy wrote:> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light > <lists at tiggerpalace.com> wrote: >> Subject says most of it. I''d love to use Cucumber in my project >> but I need >> to be able to install it in a Rails app and by a particular version >> number. >> > > You can do that with git pull and git checkout. Would it help if > detailed instructions were posted to the wiki? >Not so much. I can get the repo, build, and install the gem. I''m trying to make it easier for members of my team who get a copy of our repo but need to install the dependent gems.>> Maybe a "canonical" version can be kept and updated in RubyForge >> occasionally because of occasional gem problems with GitHub? >> > > Yes, I''ll probably do that soon. GitHub fails to build the gem every > time for me (not occasionally). > http://logicalawesome.lighthouseapp.com/projects/8570-github/tickets/945It''s worse than that for me: it keeps disabling the "Rubygems" setting in the Admin screen. I lose a little bit of love for GitHub over such an important feature working incorrectly. Evan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080930/7b126dcd/attachment.html>
Chris Flipse
2008-Oct-01 15:11 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy <aslak.hellesoy at gmail.com>wrote:> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light > <lists at tiggerpalace.com> wrote: > > Subject says most of it. I''d love to use Cucumber in my project but I > need > > to be able to install it in a Rails app and by a particular version > number. > > > > You can do that with git pull and git checkout. Would it help if > detailed instructions were posted to the wiki? >That gets you whatever the latest is, which is good if you want to live on edge. I''m behind a firewall, and living on edge isn''t necessarily a good option. Would it be too much to ask if you could tag the repo when you jump to a new release, like David is doing with rspec? Github lets you download a snapshot of the repo by tags, and I just build the gems from that, and toss them up into a behind-the-firewall gem server, and let everyone gem install from there. It''s a bit harder with cucumber, because I''m not sure where the "released, stable" point is ...> > > I forked it and struggled with getting GitHub gems deployer to behave > > itself. > > > > Maybe a "canonical" version can be kept and updated in RubyForge > > occasionally because of occasional gem problems with GitHub? > > > > Yes, I''ll probably do that soon. GitHub fails to build the gem every > time for me (not occasionally). > http://logicalawesome.lighthouseapp.com/projects/8570-github/tickets/945 > > Aslak > > > Evan > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- // anything worth taking seriously is worth making fun of // http://blog.devcaffeine.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081001/4305c053/attachment.html>
aslak hellesoy
2008-Oct-01 15:20 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <cflipse at gmail.com> wrote:> On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy <aslak.hellesoy at gmail.com> > wrote: >> >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light >> <lists at tiggerpalace.com> wrote: >> > Subject says most of it. I''d love to use Cucumber in my project but I >> > need >> > to be able to install it in a Rails app and by a particular version >> > number. >> > >> >> You can do that with git pull and git checkout. Would it help if >> detailed instructions were posted to the wiki? > > That gets you whatever the latest is, which is good if you want to live on > edge. I''m behind a firewall, and living on edge isn''t necessarily a good > option.Have you tried this? export http_proxy=http://yourproxy:yourport git clone http://github.com/aslakhellesoy/cucumber git checkout SHA-of-the-rev-you-want> Would it be too much to ask if you could tag the repo when you jump > to a new release, like David is doing with rspec? >Absolutely - I''ll tag it when there is a release. And push a gem to RubyForge. But there hasn''t been one yet.> Github lets you download a snapshot of the repo by tags, and I just build > the gems from that, and toss them up into a behind-the-firewall gem server, > and let everyone gem install from there. It''s a bit harder with cucumber, > because I''m not sure where the "released, stable" point is ... >It''s whenever I feel like it and have some spare time :-) Probably within the next week or so. Aslak>> >> > I forked it and struggled with getting GitHub gems deployer to behave >> > itself. >> > >> > Maybe a "canonical" version can be kept and updated in RubyForge >> > occasionally because of occasional gem problems with GitHub? >> > >> >> Yes, I''ll probably do that soon. GitHub fails to build the gem every >> time for me (not occasionally). >> http://logicalawesome.lighthouseapp.com/projects/8570-github/tickets/945 >> >> Aslak >> >> > Evan >> > _______________________________________________ >> > rspec-users mailing list >> > rspec-users at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/rspec-users >> > >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > > > -- > // anything worth taking seriously is worth making fun of > // http://blog.devcaffeine.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Chris Flipse
2008-Oct-01 15:30 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <aslak.hellesoy at gmail.com>wrote:> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <cflipse at gmail.com> wrote: > > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy < > aslak.hellesoy at gmail.com> > > wrote: > >> > >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light > >> <lists at tiggerpalace.com> wrote: > >> > Subject says most of it. I''d love to use Cucumber in my project but I > >> > need > >> > to be able to install it in a Rails app and by a particular version > >> > number. > >> > > >> > >> You can do that with git pull and git checkout. Would it help if > >> detailed instructions were posted to the wiki? > > > > That gets you whatever the latest is, which is good if you want to live > on > > edge. I''m behind a firewall, and living on edge isn''t necessarily a good > > option. > > Have you tried this? > > export http_proxy=http://yourproxy:yourport > git clone http://github.com/aslakhellesoy/cucumber > > git checkout SHA-of-the-rev-you-want >That''d work if I had git on the windows machine that can actually access the internet. Unfortunately, I don''t, and I won''t. It''s pretty tightly locked down. "firewall" is a bad term, because it implies there''s an actual path to the internet. There isn''t, at least not from the place I do actual work. Have to burn files and copy them. Virus paranoia and such. ... yes, it''s a pain in the ass.> > Would it be too much to ask if you could tag the repo when you jump > > to a new release, like David is doing with rspec? > > > > Absolutely - I''ll tag it when there is a release. And push a gem to > RubyForge. But there hasn''t been one yet.Ah. I''d been going on the assumption that the occasional gem version bumps were signifying real checkpoints. If not, then, I havn''t yet been burned by pulling down head once a week or so -- // anything worth taking seriously is worth making fun of // http://blog.devcaffeine.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081001/df80a33f/attachment.html>
aslak hellesoy
2008-Oct-01 15:53 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Wed, Oct 1, 2008 at 5:30 PM, Chris Flipse <cflipse at gmail.com> wrote:> > > On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <aslak.hellesoy at gmail.com> > wrote: >> >> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <cflipse at gmail.com> wrote: >> > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy >> > <aslak.hellesoy at gmail.com> >> > wrote: >> >> >> >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light >> >> <lists at tiggerpalace.com> wrote: >> >> > Subject says most of it. I''d love to use Cucumber in my project but >> >> > I >> >> > need >> >> > to be able to install it in a Rails app and by a particular version >> >> > number. >> >> > >> >> >> >> You can do that with git pull and git checkout. Would it help if >> >> detailed instructions were posted to the wiki? >> > >> > That gets you whatever the latest is, which is good if you want to live >> > on >> > edge. I''m behind a firewall, and living on edge isn''t necessarily a >> > good >> > option. >> >> Have you tried this? >> >> export http_proxy=http://yourproxy:yourport >> git clone http://github.com/aslakhellesoy/cucumber >> >> git checkout SHA-of-the-rev-you-want > > That''d work if I had git on the windows machine that can actually access the > internet. Unfortunately, I don''t, and I won''t. It''s pretty tightly locked > down. "firewall" is a bad term, because it implies there''s an actual path > to the internet. There isn''t, at least not from the place I do actual > work. Have to burn files and copy them. Virus paranoia and such. > > ... yes, it''s a pain in the ass. >I can feel your pain. I have worked for this kind of clients. Insurance and government. They don''t seem to understand how big an impediment this is. And that people who need to work around this (us) will do it anyway to get work done. It''s just stupid.>> >> > Would it be too much to ask if you could tag the repo when you jump >> > to a new release, like David is doing with rspec? >> > >> >> Absolutely - I''ll tag it when there is a release. And push a gem to >> RubyForge. But there hasn''t been one yet. > > Ah. I''d been going on the assumption that the occasional gem version bumps > were signifying real checkpoints. If not, then, I havn''t yet been burned by > pulling down head once a week or soNo, actually - it''s been me trying to convince the GitHub pixies to build the gem. To no avail. Aslak> -- > // anything worth taking seriously is worth making fun of > // http://blog.devcaffeine.com/ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Evan Light
2008-Oct-01 16:05 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Oct 1, 2008, at 11:53 AM, aslak hellesoy wrote:> No, actually - it''s been me trying to convince the GitHub pixies to > build the gem. To no avail.Not to belabor a point overly but hence my suggestion to put a gem on RubyForge. I''m dying for a stable version of Cucumber -- even if it''s only "stable" ;-) Evan
Ashley Moran
2008-Oct-01 16:09 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On 1 Oct 2008, at 16:53, aslak hellesoy wrote:> No, actually - it''s been me trying to convince the GitHub pixies to > build the gem. To no avail.Have we witnessed the birth of Pixie Driven Development this week? I feel like we need PixieSpec and Pixie Stories next :) Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
Evan Light
2008-Oct-01 16:32 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Oct 1, 2008, at 12:09 PM, Ashley Moran wrote:> > On 1 Oct 2008, at 16:53, aslak hellesoy wrote: > >> No, actually - it''s been me trying to convince the GitHub pixies to >> build the gem. To no avail. > > Have we witnessed the birth of Pixie Driven Development this week? > I feel like we need PixieSpec and Pixie Stories next :) >No, I think it''s a matter of "GitHub Driven Deployment" -- or non- Deployment as the case would be. :-/ Evan
Luis Lavena
2008-Oct-01 17:03 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Wed, Oct 1, 2008 at 12:30 PM, Chris Flipse <cflipse at gmail.com> wrote:> > > On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <aslak.hellesoy at gmail.com> > wrote: >> >> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <cflipse at gmail.com> wrote: >> > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy >> > <aslak.hellesoy at gmail.com> >> > wrote: >> >> >> >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light >> >> <lists at tiggerpalace.com> wrote: >> >> > Subject says most of it. I''d love to use Cucumber in my project but >> >> > I >> >> > need >> >> > to be able to install it in a Rails app and by a particular version >> >> > number. >> >> > >> >> >> >> You can do that with git pull and git checkout. Would it help if >> >> detailed instructions were posted to the wiki? >> > >> > That gets you whatever the latest is, which is good if you want to live >> > on >> > edge. I''m behind a firewall, and living on edge isn''t necessarily a >> > good >> > option. >> >> Have you tried this? >> >> export http_proxy=http://yourproxy:yourport >> git clone http://github.com/aslakhellesoy/cucumber >> >> git checkout SHA-of-the-rev-you-want > > That''d work if I had git on the windows machine that can actually access the > internet. Unfortunately, I don''t, and I won''t. It''s pretty tightly locked > down. "firewall" is a bad term, because it implies there''s an actual path > to the internet. There isn''t, at least not from the place I do actual > work. Have to burn files and copy them. Virus paranoia and such. > > ... yes, it''s a pain in the ass. >I hear ya brother, same here, luckily not anymore. you can do the following (at home): gem search cucumber --remote --source http://gems.github.com gem fetch cucumber --source http://gems.github.com This will put the .gem file in the folder you performed the task for you to easily copy to your locked down environment :-D>> >> > Would it be too much to ask if you could tag the repo when you jump >> > to a new release, like David is doing with rspec? >> > >> >> Absolutely - I''ll tag it when there is a release. And push a gem to >> RubyForge. But there hasn''t been one yet. > > Ah. I''d been going on the assumption that the occasional gem version bumps > were signifying real checkpoints. If not, then, I havn''t yet been burned by > pulling down head once a week or soGithub gems are only updated when the cucumber.gemspec file is updated. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams
aslak hellesoy
2008-Oct-01 18:50 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Wed, Oct 1, 2008 at 7:03 PM, Luis Lavena <luislavena at gmail.com> wrote:> On Wed, Oct 1, 2008 at 12:30 PM, Chris Flipse <cflipse at gmail.com> wrote: >> >> >> On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <aslak.hellesoy at gmail.com> >> wrote: >>> >>> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <cflipse at gmail.com> wrote: >>> > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy >>> > <aslak.hellesoy at gmail.com> >>> > wrote: >>> >> >>> >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light >>> >> <lists at tiggerpalace.com> wrote: >>> >> > Subject says most of it. I''d love to use Cucumber in my project but >>> >> > I >>> >> > need >>> >> > to be able to install it in a Rails app and by a particular version >>> >> > number. >>> >> > >>> >> >>> >> You can do that with git pull and git checkout. Would it help if >>> >> detailed instructions were posted to the wiki? >>> > >>> > That gets you whatever the latest is, which is good if you want to live >>> > on >>> > edge. I''m behind a firewall, and living on edge isn''t necessarily a >>> > good >>> > option. >>> >>> Have you tried this? >>> >>> export http_proxy=http://yourproxy:yourport >>> git clone http://github.com/aslakhellesoy/cucumber >>> >>> git checkout SHA-of-the-rev-you-want >> >> That''d work if I had git on the windows machine that can actually access the >> internet. Unfortunately, I don''t, and I won''t. It''s pretty tightly locked >> down. "firewall" is a bad term, because it implies there''s an actual path >> to the internet. There isn''t, at least not from the place I do actual >> work. Have to burn files and copy them. Virus paranoia and such. >> >> ... yes, it''s a pain in the ass. >> > > I hear ya brother, same here, luckily not anymore. > > you can do the following (at home): > > gem search cucumber --remote --source http://gems.github.com > > gem fetch cucumber --source http://gems.github.com > > This will put the .gem file in the folder you performed the task for > you to easily copy to your locked down environment :-D > >>> >>> > Would it be too much to ask if you could tag the repo when you jump >>> > to a new release, like David is doing with rspec? >>> > >>> >>> Absolutely - I''ll tag it when there is a release. And push a gem to >>> RubyForge. But there hasn''t been one yet. >> >> Ah. I''d been going on the assumption that the occasional gem version bumps >> were signifying real checkpoints. If not, then, I havn''t yet been burned by >> pulling down head once a week or so > > Github gems are only updated when the cucumber.gemspec file is updated. >Yes, but only in theory: http://logicalawesome.lighthouseapp.com/projects/8570-github/tickets/945 Does anyone want Cucumber gems? No? Yes? Anyone? OK I HEARD YOU! :-) http://rubyforge.org/frs/?group_id=797 Just chill till it rsyncs around. Install docs are updated: http://github.com/aslakhellesoy/cucumber/wikis/home Aslak> -- > Luis Lavena > AREA 17 > - > Human beings, who are almost unique in having the ability to learn from > the experience of others, are also remarkable for their apparent > disinclination to do so. > Douglas Adams > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Evan Light
2008-Oct-01 20:27 UTC
[rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again
On Oct 1, 2008, at 2:50 PM, aslak hellesoy wrote:> Does anyone want Cucumber gems? No? Yes? Anyone? OK I HEARD YOU! :-) > > http://rubyforge.org/frs/?group_id=797 > > Just chill till it rsyncs around. Install docs are updated: > http://github.com/aslakhellesoy/cucumber/wikis/homeThank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081001/4c48d553/attachment.html>