benelux 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,12 @@
1
1
  BENELUX, CHANGES
2
2
 
3
+ #### 0.5.7 (2010-02-20) ###############################
4
+
5
+ * CHANGE: Remove hanna dependency
6
+ * CHANGE: Remove hexoid dependency
7
+ * CHANGE: Combine mixins to single file
8
+
9
+
3
10
  #### 0.5.6 (2010-02-10) ###############################
4
11
 
5
12
  * ADDED: Benelux::Tms#to_f
data/Rakefile CHANGED
@@ -1,13 +1,16 @@
1
1
 
2
2
  require 'rake/clean'
3
3
  require 'rake/gempackagetask'
4
- require 'hanna/rdoctask'
5
4
  require 'rake/testtask'
6
- require 'shoulda/tasks'
7
5
  require 'rake/runtest'
8
- require 'monkeyspecdoc' # http://jgre.org/2008/09/03/monkeyspecdoc/
9
6
  require 'fileutils'
10
7
  include FileUtils
8
+
9
+ begin
10
+ require 'hanna/rdoctask'
11
+ rescue LoadError
12
+ require 'rake/rdoctask'
13
+ end
11
14
 
12
15
  task :default => :test
13
16
 
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "benelux"
3
3
  s.rubyforge_project = 'benelux'
4
- s.version = "0.5.6"
4
+ s.version = "0.5.7"
5
5
  s.summary = "Benelux: A mad way to time Ruby codes"
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
@@ -13,8 +13,6 @@
13
13
  s.rdoc_options = ["--line-numbers", "--title", s.summary, "--main", "README.rdoc"]
14
14
  s.require_paths = %w[lib]
15
15
 
16
- s.add_dependency 'hexoid'
17
-
18
16
  # = MANIFEST =
19
17
  # git ls-files
20
18
  s.files = %w(
@@ -25,8 +23,7 @@
25
23
  benelux.gemspec
26
24
  lib/benelux.rb
27
25
  lib/benelux/mark.rb
28
- lib/benelux/mixins/symbol.rb
29
- lib/benelux/mixins/thread.rb
26
+ lib/benelux/mixins.rb
30
27
  lib/benelux/packer.rb
31
28
  lib/benelux/range.rb
32
29
  lib/benelux/stats.rb
@@ -41,6 +38,7 @@
41
38
  tryouts/20_tracks_tryouts.rb
42
39
  tryouts/30_reporter_tryouts.rb
43
40
  tryouts/30_timeline_tryouts.rb
41
+ tryouts/benelux_bm.rb
44
42
  tryouts/proofs/alias_performance.rb
45
43
  tryouts/proofs/array_performance.rb
46
44
  tryouts/proofs/thread_array.rb
@@ -1,11 +1,10 @@
1
1
  require 'attic'
2
- require 'hexoid'
3
2
  require 'thread'
4
3
  require 'thwait'
5
4
  require 'selectable'
6
5
 
7
6
  module Benelux
8
- VERSION = "0.5.6"
7
+ VERSION = "0.5.7"
9
8
  NOTSUPPORTED = [Class, Object, Kernel]
10
9
 
11
10
  class BeneluxError < RuntimeError; end
@@ -18,10 +17,9 @@ module Benelux
18
17
  require 'benelux/track'
19
18
  require 'benelux/range'
20
19
  require 'benelux/stats'
20
+ require 'benelux/mixins'
21
21
  require 'benelux/packer'
22
22
  require 'benelux/timeline'
23
- require 'benelux/mixins/thread'
24
- require 'benelux/mixins/symbol'
25
23
 
26
24
  class << self
27
25
  attr_reader :packed_methods
@@ -1,5 +1,26 @@
1
1
 
2
2
 
3
+
4
+ class Object
5
+ def hex_object_id
6
+ prefix = RUBY_VERSION >= '1.9' ? '0x00000' : '0x'
7
+ "%s%x" % [prefix, (self.object_id.abs << 1)]
8
+ end
9
+ alias hexoid hex_object_id
10
+ end
11
+
12
+
13
+
14
+ #if RUBY_VERSION =~ /1.8/
15
+ class Symbol
16
+ def <=>(other)
17
+ self.to_s <=> other.to_s
18
+ end
19
+ end
20
+ #end
21
+
22
+
23
+
3
24
  class Thread
4
25
  extend Attic
5
26
  attic :timeline
@@ -0,0 +1,9 @@
1
+ # $ ruby -Ilib tryouts/benelux_bm.rb
2
+
3
+ require 'benelux'
4
+
5
+ a = Benelux.bm(1000000, 5) do
6
+ rand
7
+ end
8
+
9
+ p a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benelux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,19 +9,10 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-10 00:00:00 -05:00
12
+ date: 2010-02-20 00:00:00 -05:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: hexoid
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
14
+ dependencies: []
15
+
25
16
  description: "Benelux: A mad way to time Ruby codes"
26
17
  email: delano@solutious.com
27
18
  executables: []
@@ -40,8 +31,7 @@ files:
40
31
  - benelux.gemspec
41
32
  - lib/benelux.rb
42
33
  - lib/benelux/mark.rb
43
- - lib/benelux/mixins/symbol.rb
44
- - lib/benelux/mixins/thread.rb
34
+ - lib/benelux/mixins.rb
45
35
  - lib/benelux/packer.rb
46
36
  - lib/benelux/range.rb
47
37
  - lib/benelux/stats.rb
@@ -56,6 +46,7 @@ files:
56
46
  - tryouts/20_tracks_tryouts.rb
57
47
  - tryouts/30_reporter_tryouts.rb
58
48
  - tryouts/30_timeline_tryouts.rb
49
+ - tryouts/benelux_bm.rb
59
50
  - tryouts/proofs/alias_performance.rb
60
51
  - tryouts/proofs/array_performance.rb
61
52
  - tryouts/proofs/thread_array.rb
@@ -1,8 +0,0 @@
1
-
2
- #if RUBY_VERSION =~ /1.8/
3
- class Symbol
4
- def <=>(other)
5
- self.to_s <=> other.to_s
6
- end
7
- end
8
- #end