[Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-02 Thread 'Ryan' via Ruby on Rails: Core
It could be set as an alias for #travel_back. >From a semantic perspective #unfreeze_time would read like an opposite to #freeze_time, just like #travel_back is an opposite of #travel_to It's a relatively small change that could improve the user experience of using #freeze_time -- You receive

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-02 Thread Xavier Noria
I think it makes sense. For the code to read well, both verbs have to match. Would you like to contribute a patch? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-02 Thread Geoff Harcourt
Would this be easier if freezing time took place in a block, and any unfrozen time followed the closure of the block? Then we wouldn't need a separate method. I think this was the recommended practice with Timecop. On Sun, Sep 2, 2018, 6:18 PM Xavier Noria wrote: > I think it makes sense. For th

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-02 Thread Xavier Noria
On Mon, Sep 3, 2018 at 1:28 AM, Geoff Harcourt wrote: Would this be easier if freezing time took place in a block, and any > unfrozen time followed the closure of the block? Then we wouldn't need a > separate method. I think this was the recommended practice with Timecop. > Right. Generally you'

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-03 Thread 'Ryan' via Ruby on Rails: Core
Yes I'd love to contribute a patch for this. I posted it as an issue in the rails repo and they directed me here. https://github.com/rails/rails/issues/33771#issuecomment-417848091 Could you advise on your normal process for this? I've contributed a rails before, but that was for an issue someo

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-04 Thread Xavier Noria
On Mon, Sep 3, 2018 at 11:16 PM, 'Ryan' via Ruby on Rails: Core < rubyonrails-core@googlegroups.com> wrote: Yes I'd love to contribute a patch for this. > > I posted it as an issue in the rails repo and they directed me here. > https://github.com/rails/rails/issues/33771#issuecomment-417848091 > >

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-04 Thread 'Ryan' via Ruby on Rails: Core
Right, I see the process is to fork rails and and make a PR with the patch. Thanks for the tips, and for the offer of further support. On Tuesday, 4 September 2018 15:12:54 UTC+1, Xavier Noria wrote: > > On Mon, Sep 3, 2018 at 11:16 PM, 'Ryan' via Ruby on Rails: Core < > rubyonra...@googlegroups

Re: [Rails-core] Re: [ActiveSupport] feature proposal: Create #unfreeze_time to complement #freeze_time in ActiveSupport::Testing::TimeHelpers

2018-09-07 Thread 'Ryan' via Ruby on Rails: Core
I have now submitted a PR with this change https://github.com/rails/rails/pull/33813 On Tuesday, 4 September 2018 18:47:37 UTC+1, Ryan wrote: > > Right, I see the process is to fork rails and and make a PR with the > patch. Thanks for the tips, and for the offer of further support. > > On Tuesd