bench_bloc 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dad410c5841fb6c223c45992e2b4ca748c0075269651046c831a2c2366a8ca8b
4
- data.tar.gz: 6ffa3987c58346c1bb33eef6f35bc00312785b9c695830d032169437453ae85e
3
+ metadata.gz: 56343016a84956351156e61c1c464fc6c37c5ec6978675fbaf15f69217655f94
4
+ data.tar.gz: 2f777add873199136a385e56a5fba1b0fd81444d94208ede67102de9f7f6939c
5
5
  SHA512:
6
- metadata.gz: 153c78bfd3d9135851f775ca1e7a8f98bf3a3ff2d2806ed249a6214042a06a0fceeb8a69775c60ef781f5112fad8f69f834a843999744be6220a057a7771c057
7
- data.tar.gz: 90c0e32914cd89ca0761a55bdb84c413c417cceb9c517bdc77290a89308009129f3617d59153560a3ac730e8b065f7166c472060c1c68edc544eecaf4d98d121
6
+ metadata.gz: 5c3d646dd114200cf255002d086f5ccea3037a234a66b1dad8ea47687a643d69659b7b2371d16a65ad742d566bfee045f70dbef8621903eea027a83bccd1230a
7
+ data.tar.gz: 3c97c11abbd2d7abfbc3bf18f519904ab2c64861f91d7d71b26015cc345b8b76d4e936b47ecaf83852225a4ce46f9bb4789d86d2e3faf98313025b4e2b2f5bc2
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ bench_bloc-*.gem
@@ -1,7 +1,9 @@
1
1
  module BenchBloc
2
2
  class Railtie < Rails::Railtie
3
+ railtie_name :bench_bloc
3
4
  rake_tasks do
4
- load 'tasks/bench_bloc.rake'
5
+ path = File.expand_path(__dir__)
6
+ Dir.glob("#{path}/tasks/gen_bench_bloc.rake").each { |f| load f }
5
7
  end
6
8
  end
7
9
  end
@@ -0,0 +1,16 @@
1
+ def bench_tasks
2
+ Rake.application.tasks.select do |task|
3
+ task.name.starts_with?("bench") &&
4
+ !task.name.ends_with?("_util") &&
5
+ task.name != "bench:all"
6
+ end
7
+ end
8
+
9
+ def option_parser
10
+ OptionParser.new do |opts|
11
+ opts.banner = "Usage: rake bench:* [options]"
12
+ opts.on("-r", "--ruby-prof", "Print a RubyProf report") do |rp|
13
+ @options[:ruby_prof] = rp
14
+ end
15
+ end
16
+ end
@@ -2,9 +2,10 @@
2
2
  require 'rake'
3
3
  require 'pry'
4
4
  require 'benchmark'
5
- require "#{Rails.root}/benchmarks/bench_utils"
5
+ require 'bench_bloc'
6
+ require 'bench_bloc/rake_helper.rb'
6
7
 
7
- CONFIG_FILES=FileList['benchmarks/*.block.rb']
8
+ CONFIG_FILES=FileList["benchmarks/*.block.rb"]
8
9
 
9
10
  def put_namespace key, namespace
10
11
  namespace key do
@@ -1,3 +1,3 @@
1
1
  module BenchBloc
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/bench_bloc.rb CHANGED
@@ -32,21 +32,4 @@ module BenchBloc
32
32
  def format_result result
33
33
  "\t\t#{result.label}\n\t\t\t#{result.real.round(2)} seconds"
34
34
  end
35
-
36
- def bench_tasks
37
- Rake.application.tasks.select do |task|
38
- task.name.starts_with?("bench") &&
39
- !task.name.ends_with?("_util") &&
40
- task.name != "bench:all"
41
- end
42
- end
43
-
44
- def option_parser
45
- OptionParser.new do |opts|
46
- opts.banner = "Usage: rake bench:* [options]"
47
- opts.on("-r", "--ruby-prof", "Print a RubyProf report") do |rp|
48
- @options[:ruby_prof] = rp
49
- end
50
- end
51
- end
52
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bench_bloc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy
@@ -68,15 +68,14 @@ files:
68
68
  - LICENSE.txt
69
69
  - README.md
70
70
  - Rakefile
71
- - bench_bloc-0.1.0.gem
72
- - bench_bloc-0.1.1.gem
73
71
  - bench_bloc.gemspec
74
72
  - bin/console
75
73
  - bin/setup
76
74
  - lib/bench_bloc.rb
77
75
  - lib/bench_bloc/railtie.rb
76
+ - lib/bench_bloc/rake_helper.rb
77
+ - lib/bench_bloc/tasks/gen_bench_bloc.rake
78
78
  - lib/bench_bloc/version.rb
79
- - lib/tasks/bench_bloc.rake
80
79
  homepage: https://github.com/jdpaterson/bench_bloc
81
80
  licenses:
82
81
  - MIT
data/bench_bloc-0.1.0.gem DELETED
Binary file
data/bench_bloc-0.1.1.gem DELETED
Binary file