floraison / et-orbi

Time zones for fugit and rufus-scheduler. Urbi et Orbi.
MIT License
24 stars 11 forks source link

Filter out only allowed options for Chronic #26

Closed stanhu closed 4 years ago

stanhu commented 4 years ago

As of https://github.com/mojombo/chronic/pull/269, the master version of Chronic validates all options. By default, et-orbi passes in zone, which causes Chronic::Parser to fail.

jmettraux commented 4 years ago

What about Chronic 0.10.2, then one currently on display at https://rubygems.org/search?utf8=%E2%9C%93&query=chronic ? Does it have a Chronic::Parser::DEFAULT_OPTIONS ?

stanhu commented 4 years ago

Yes: https://github.com/mojombo/chronic/blob/v0.10.2/lib/chronic/parser.rb#L8

It looks like the tests are failing because Hash#slice was added in Ruby 2.5.

jmettraux commented 4 years ago

Thanks.

edgar commented 4 years ago

@jmettraux are you planning to release a new version of EtOrbi with this fix?

jmettraux commented 4 years ago

@edgar Hello. Yes.

edgar commented 4 years ago

@jmettraux thanks!