Code Monkey home page Code Monkey logo

Comments (3)

ArturT avatar ArturT commented on May 20, 2024

It is used here:
https://github.com/ArturT/knapsack/blob/master/lib/knapsack/tracker.rb#L84

def now_without_mock_time
  Time.now_without_mock_time
end

now_without_mock_time is Timecop method: https://github.com/travisjeffery/timecop/search?utf8=%E2%9C%93&q=now_without_mock_time&type=

Anyway thanks for checking :)

from knapsack.

ArturT avatar ArturT commented on May 20, 2024

Note to myself. It was done this way on purpose. Timecop is a regular dependency and I don't want to use Time.now because someone could stub Time.now and that would prevent to determine the correct time.

Here is related commit in knapsack_pro KnapsackPro/knapsack_pro-ruby@f6fe6a2/knapsack_pro.gemspec#diff-0

from knapsack.

ArturT avatar ArturT commented on May 20, 2024

I figured out how Timecop gem could be moved to development dependencies. I did change in knapsack_pro KnapsackPro/knapsack_pro-ruby#38

A similar thing could be done here in knapsack gem. If anyone wants to help it's basically copy & paste from the PR

first-timers-only info

This could be an easy task for someone new who would like to contribute to open source.

Tips for first timers how to make pull request https://github.com/CPAN-PRC/resources/wiki/My-first-Pull-Request

from knapsack.

Related Issues (20)

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.