timers 4.0.4 → 4.1.0

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: fc5b681c3922f53f0a1c332aad2955d61ee278a4
4
- data.tar.gz: 4e90a800064db9f6cf1cdb4410cbb1ca8badd2ac
3
+ metadata.gz: 8fd3554aab4028decec14d741c973f4ffe5d414a
4
+ data.tar.gz: 082bf7c3ec19a1d60df84d1b81a033a888e6b922
5
5
  SHA512:
6
- metadata.gz: fd8330e2dfd5b23813c55d242ad44d6c8d7c00e251a047f4206c72511132eeeb8fdf640fc2802a9e83e87dabab2134532dea10f25a993e9fd98fb9b759c3faca
7
- data.tar.gz: 5e8d5e38d58ee3c7167dae55a293c5bf2a5cc6f84ea65edbba5435eafc8b85b31d2865f81cec97cdc8b612af4f87654fadc8a4da565822e61dc09e6756a65b05
6
+ metadata.gz: 354c245b317b5cf5127b6bc0ce76d24c0c9c73f7a170afd4e2d7d286a007018a94ee9c628ce86793b799c71946e07a718d83154b3a8e1a25254adaea91e72725
7
+ data.tar.gz: 56d3a3b9d8e54171892347c7ab67dc936216c12bda07f910ddc3b766a99f7ccd8398179e980285ab7307d734a516d91623b93e68db1ae59cc3df686585f78f5f
data/CHANGES.md CHANGED
@@ -1,11 +1,3 @@
1
- 4.0.4 (2015-09-01)
2
- ------------------
3
- * Re-release of the `4.1.1` version under the `4.0.4` designation to work-around issues caused by yanking `4.0.2` a couple weeks ago.
4
-
5
- 4.1.1 (2015-08-21)
6
- ------------------
7
- * Remove `RubyProf` from Gemfile and a test, due to it providing no substantial benefit while increasing problems building bundles under Rubinius.
8
-
9
1
  4.1.0 (2015-08-16)
10
2
  ------------------
11
3
  * Addition of `now_and_every` method; fires block immediately, then sets recurring timer.
data/Gemfile CHANGED
@@ -4,3 +4,7 @@ gem 'coveralls', :require => false
4
4
 
5
5
  # Specify your gem's dependencies in timers.gemspec
6
6
  gemspec
7
+
8
+ unless RUBY_PLATFORM =~ /java/
9
+ gem "ruby-prof", :group => :development
10
+ end
@@ -1,3 +1,3 @@
1
1
  module Timers
2
- VERSION = "4.0.4"
2
+ VERSION = "4.1.0"
3
3
  end
@@ -1,4 +1,6 @@
1
+
1
2
  require 'spec_helper'
3
+ require 'ruby-prof' unless RUBY_PLATFORM =~ /java/
2
4
 
3
5
  # Event based timers:
4
6
 
@@ -39,7 +41,25 @@ require 'spec_helper'
39
41
  # Serviced 1142649 events in 11.194903921 seconds, 102068.70405115146 e/s.
40
42
 
41
43
  RSpec.describe Timers::Group do
44
+ if defined? RubyProf
45
+ before(:each) do
46
+ # Running RubyProf makes the code slightly slower.
47
+ RubyProf.start
48
+ puts "*** Running with RubyProf reduces performance ***"
49
+ end
42
50
 
51
+ after(:each) do |arg|
52
+ if RubyProf.running?
53
+ # file = arg.metadata[:description].gsub(/\s+/, '-')
54
+
55
+ result = RubyProf.stop
56
+
57
+ printer = RubyProf::FlatPrinter.new(result)
58
+ printer.print($stderr, min_percent: 1.0)
59
+ end
60
+ end
61
+ end
62
+
43
63
  it "runs efficiently" do
44
64
  result = []
45
65
  range = (1..500)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timers
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.4
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-01 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hitimes