perforator 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 765608fcc481e88b7621130998a320433e424f61
4
- data.tar.gz: b4d0060e1a221516f3e4eec1263c5ea1da90d614
3
+ metadata.gz: 36e87bfccb3f05943f74240cde7af547592871db
4
+ data.tar.gz: a31a0f260075c7138836092f4bef8c514cc4ef40
5
5
  SHA512:
6
- metadata.gz: 52bbcde22a49ac34237cf3cfc401130f15cd1f6b94fda34ce21ece48c1cfde06c34030db01ce40fe5b52289cc5168fde415c632043cde79ddcdc36f7c0c1d4d1
7
- data.tar.gz: 19460fd73bf0913ef060651f30afe8e32185a5e06432ecabd683baa0b693c96f48a6fff6f384cc820585075d8936fd1fc95c3e8e46cb9a81ea865b285cd4a609
6
+ metadata.gz: a4759a91ba5ce3b21965f4ce7081b91da841c4b71d6a07de8a0c54a92f29d562fe439b1beaafe2c94a9488194abd854be14af43c746880b8c165825ce45c57eb
7
+ data.tar.gz: 3b30c9c4a33c173bcf02e4b39666335a4414afeeed3bd898fbb346221c835d81545cc32c23b5cdc9dac487d17d872fc557a90a02618763270259ebe4103b991b
@@ -1,3 +1,3 @@
1
1
  module Perforator
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/lib/perforator.rb CHANGED
@@ -57,10 +57,10 @@ module Perforator
57
57
  def execute_callbacks!
58
58
  return unless expected_time
59
59
 
60
- if spent_time < expected_time
60
+ if spent_time < expected_time && positive_callback
61
61
  log! "Spent time less than exepcted. Executing: #{positive_callback.inspect}"
62
62
  positive_callback.call
63
- else
63
+ elsif spent_time > expected_time && negative_callback
64
64
  log! "Spent time more than exepcted. Executing: #{positive_callback.inspect}"
65
65
  negative_callback.call
66
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perforator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Sveredyuk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-02 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler