Sha256: 73f9c40af3d117dd3945b19edd5ca4784a313b3607babe45123a7ed94f0b4edf

Contents?: true

Size: 311 Bytes

Versions: 25

Compression:

Stored size: 311 Bytes

Contents

require 'time'

Time.class_eval { 
  @@advance_by_days = 0
  cattr_accessor :advance_by_days

  class << Time
    alias now_old now
    def now
      if Time.advance_by_days != 0
        return Time.at(now_old.to_i + Time.advance_by_days * 60 * 60 * 24 + 1)
      else
        now_old
      end
    end
  end
}

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
salted_login_generator-1.0.8 templates/mock_time.rb
salted_login_generator-1.0.7 templates/mock_time.rb
salted_login_generator-1.1.0 templates/mock_time.rb
salted_login_generator-2.0.2 templates/mock_time.rb
salted_login_generator-2.0.0 templates/mock_time.rb