javan / javan/whenever

Quotes gets replaced by escaped single quotes

Open
#709 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

Hello,

Using rails 5.0.2, ruby-2.3.0 [ x86_64 ] and whenever (gem 'whenever', :require => false), my quotes are replaced by escaped single quotes.

When i do :

every 1.minute do
  runner "Subscription.end_trials" # or 'Subscription.end_trials"
end

I get this in the cron regardless if i use simple quote or double quotes to surround the method i want to run :

0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /bin/bash -l -c 'cd /root/authserver && bundle exec bin/rails runner -e development '\''Subscription.end_trials'\'''

Any idea ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Ruby example using every and runner in the issue, then reproduce the generated cron command shown for Rails 5.0.2, Ruby 2.3.0, and whenever. Trace how the runner argument is quoted and determine the expected generated command; done means the intended Subscription.end_trials invocation is represented correctly in cron.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.