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.
- data/README.rdoc +8 -1
- data/VERSION +1 -1
- data/bench_press.gemspec +1 -1
- data/bin/bench_press +10 -0
- data/lib/bench_press.rb +1 -0
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -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
|
+
0.1.2
|
data/bench_press.gemspec
CHANGED
data/bin/bench_press
CHANGED
@@ -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
|
|
data/lib/bench_press.rb
CHANGED