Comments (14)
Hi,
It's a possibility. I've not run it with 2.4 on my machine as I only installed 2.4 a couple of hours ago :) It seems to have last run on Travis with 2.2.5.
Have you tried using the release candidate? v2.0.0.rc1
I will update the Travis file and give 2.4 a try too.
Regards,
iain
from tickle.
I've just installed 2.4 too
Do functions with default values need () in this Ruby version?
from tickle.
from tickle.
I just ran the tests for v1.1.0 with ruby 2.4 and they passed. Running the examples.rb file, which I hadn't noticed existed tbh, throws up an error. There's barely anything in it though.
Is there a particular example that's not working for you?
iain
from tickle.
None of them works
from tickle.
Hmmm. All the ones I’ve tried in IRB from the README* work for me. Can you try these and see if you get the same results?
irb(main):010:0> Tickle.parse('3 months', {:until=>"2010-10-09 00:00:00 -0400"})
=> {:next=>2017-06-12 04:00:04 +0100, :expression=>"3 months", :starting=>2017-03-12 03:00:04 +0000, :until=>nil}
irb(main):011:0> Tickle.parse('every week starting this wednesday ends May 13th')
=> {:next=>2017-03-15 12:00:00 +0000, :expression=>"week", :starting=>2017-03-15 12:00:00 +0000, :until=>2017-05-13 12:00:00 +0100}
irb(main):012:0> Tickle.parse('every other day starting May 13')
=> {:next=>2017-05-13 12:00:00 +0100, :expression=>"other day", :starting=>2017-05-13 12:00:00 +0100, :until=>nil}
* that don’t have silly syntax errors like missing double quotes. Note to self to fix those.
iain
from tickle.
Running the examples you've given works just fine in irb, I'm going to look into my .rb file again
from tickle.
Trying to to run a simple .rb containing this code:
require 'tickle'
Tickle.parse('starting tomorrow and ending one week from now')
using the command ruby file.rb
in the terminal on MacOS Sierra
Gives this error message:
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/UserName/Desktop/file.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16/rbconfig.rb:213: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/2.0.0/gems/tickle-1.1.0/lib/tickle/tickle.rb:265:in `next_appropriate_year': undefined method `year' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/tickle-1.1.0/lib/tickle/tickle.rb:208:in `normalize_us_holidays'
from /Library/Ruby/Gems/2.0.0/gems/tickle-1.1.0/lib/tickle/tickle.rb:176:in `pre_filter'
from /Library/Ruby/Gems/2.0.0/gems/tickle-1.1.0/lib/tickle/tickle.rb:130:in `scan_expression'
from /Library/Ruby/Gems/2.0.0/gems/tickle-1.1.0/lib/tickle/tickle.rb:54:in `parse'
from /Users/UserName/Desktop/file.rb:3:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
from tickle.
setting the default ruby version doesn't help either
rvm --default use 2.4
from tickle.
from tickle.
from tickle.
I've pushed a branch called debugging-with-pry to make it more convenient to debug. Just call env DEBUG=1 bin/pry
(if you've installed pry via --binstubs) and then set break points where you like, e.g.
break lib/tickle/tickle.rb:130
break lib/tickle/tickle.rb:176
break lib/tickle/tickle.rb:208
break lib/tickle/tickle.rb:265
They are the ones I'm using right now.
iain
from tickle.
I've made a change to next_appropriate_year
and pushed it to the debug branch. It appears to bring back the right answer and it passes the tests (which doesn't say a lot, the specs on the rc branch are far more comprehensive).
Let me know if it works for you.
iain
from tickle.
@start was nil in 1.1.0, I'll run some test on the debugging branch
from tickle.
Related Issues (18)
- Unnecessarily limits to future dates only HOT 1
- Adding synonymous expression HOT 1
- the start date cannot occur after the end date HOT 6
- every year, every christmas, ..
- is there a way to serialize the Tickle object so I can retrieve from a DB and get the next_occurrence HOT 6
- daily versus every day at a time have different behaviors
- tickle's next occurrence is next year when starting today
- argument error HOT 2
- tickle (>= 1.1.1, ~> 1.1) was resolved to 1.1.1, which depends on chronic (~> 0.2.3) HOT 1
- "Every day at 9am" stopped working in v2.0.0rc HOT 7
- First wed each month
- Making this work for times less than 1 day HOT 4
- The :now option doesn't seem to work very well HOT 2
- uninitialized constant Module::Numerizer HOT 3
- how do I set/know the Time Zone HOT 2
- tickle changed an instance variable? HOT 3
- Every work day HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tickle.