delorean 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/delorean.rb +6 -0
  2. metadata +4 -4
@@ -20,6 +20,12 @@ module Delorean
20
20
 
21
21
  def jump(seconds)
22
22
  mock_current_time Time.now + seconds
23
+ return unless block_given?
24
+ begin
25
+ yield
26
+ ensure
27
+ restore_previous_time
28
+ end
23
29
  end
24
30
 
25
31
  def now
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delorean
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 0
9
8
  - 1
10
- version: 1.0.1
9
+ - 0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Luismi Cavall\xC3\xA9"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-06-03 00:00:00 +02:00
19
+ date: 2011-06-24 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency