bench_press 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,15 @@
2
2
 
3
3
  Sharable benchmarks
4
4
 
5
+ == Running the binary/examples locally
6
+ I use rubygems but this library is $LOAD_PATH friendly which means we need to
7
+ set up our own load path when playing locally.
8
+
9
+ This quick and dirty solution will work for a single shell instance:
10
+
11
+ export RUBYOPT='-r rubygems'
12
+
5
13
  == Note on Patches/Pull Requests
6
-
7
14
  * Fork the project.
8
15
  * Make your feature addition or bug fix.
9
16
  * Add tests for it. This is important so I don't break it in a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bench_press}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sandro Turriate"]
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'optparse'
3
+ require 'bench_press'
3
4
 
4
5
  options = {}
5
6
 
@@ -9,10 +10,19 @@ optparse = OptionParser.new do |opts|
9
10
  opts.on( '-p', '--publish', 'Publish the benchmark to http://rubybenchmark.com' ) do
10
11
  options[:publish] = true
11
12
  end
13
+
14
+ opts.on( '-v', '--version', 'Show the version of bench_press' ) do
15
+ options[:version] = true
16
+ end
12
17
  end
13
18
 
14
19
  optparse.parse!
15
20
 
21
+ if options[:version]
22
+ puts BenchPress::VERSION
23
+ exit
24
+ end
25
+
16
26
  filename = ARGV.first
17
27
  abort "You must supply a filename that you want to benchmark." if filename.nil?
18
28
 
@@ -7,6 +7,7 @@ require 'bench_press/report'
7
7
  require 'bench_press/system_information'
8
8
 
9
9
  module BenchPress
10
+ VERSION = '0.1.2'
10
11
 
11
12
  def self.extended(base)
12
13
  base.instance_variable_set(:@module_name, base.name) if base.respond_to?(:name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bench_press
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
  - Sandro Turriate