Git Product home page Git Product logo

Comments (14)

yb66 avatar yb66 commented on August 27, 2024

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.

dodomarocgenex avatar dodomarocgenex commented on August 27, 2024

I've just installed 2.4 too
Do functions with default values need () in this Ruby version?

from tickle.

yb66 avatar yb66 commented on August 27, 2024

from tickle.

yb66 avatar yb66 commented on August 27, 2024

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.

dodomarocgenex avatar dodomarocgenex commented on August 27, 2024

None of them works 😔

from tickle.

yb66 avatar yb66 commented on August 27, 2024

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.

dodomarocgenex avatar dodomarocgenex commented on August 27, 2024

Running the examples you've given works just fine in irb, I'm going to look into my .rb file again

from tickle.

dodomarocgenex avatar dodomarocgenex commented on August 27, 2024

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.

dodomarocgenex avatar dodomarocgenex commented on August 27, 2024

setting the default ruby version doesn't help either

rvm --default use 2.4

from tickle.

yb66 avatar yb66 commented on August 27, 2024

from tickle.

yb66 avatar yb66 commented on August 27, 2024

from tickle.

yb66 avatar yb66 commented on August 27, 2024

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.

yb66 avatar yb66 commented on August 27, 2024

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.

dodomarocgenex avatar dodomarocgenex commented on August 27, 2024

@start was nil in 1.1.0, I'll run some test on the debugging branch

from tickle.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.