benchmark_driver 0.14.10 → 0.14.11

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
- SHA256:
3
- metadata.gz: 0dbeec40145165cfa39b1140a5a7d83cabbc65c4390ca251372bc594204a5171
4
- data.tar.gz: 30ff49304d76cb27c07483218c9da52a7e89842b36f369ec60b1844620cb65f0
2
+ SHA1:
3
+ metadata.gz: ea67b1978c4c95fbd8b1de80767755679f516353
4
+ data.tar.gz: 216d8eddb8d24dd6d0dcf20b3f2210700b31c703
5
5
  SHA512:
6
- metadata.gz: 8a295d1b04b389b94012e7dbdb0fe7119c3794ba985be43dc49f3bde59f8580fbbfdf90a74914a06c312a53f0b603558ffe3415b7a1c3202812f385e76b27394
7
- data.tar.gz: 1c7392ca04cdeedba85961927de34928a95adc100eeaf05f0859c1f34d59036b47be603890c00af4105cb80bf257d087e4381c056fdd62a599bc1d16ec4bbc20
6
+ metadata.gz: 5880d2e183cdf296153036a842c1dc7336816f773725b8657fd446e26f9f144e177d544476bae3bea77994f6c799aae12274a834a7a8822d80e1d8c4a9d34ac0
7
+ data.tar.gz: eef0aced7759c5947347205c85b2da8e40f7d6f13fcd705d08c595bf01e1c79fd87195cda64a1d74bcb585d6984f9b550030018c0d5bb239a52e435d0af36c81
@@ -1,3 +1,8 @@
1
+ # v0.14.11
2
+
3
+ - Add `x.executable` method to Ruby interface for specifying Ruby executable which is not managed by rbenv
4
+ [#50](https://github.com/benchmark-driver/benchmark-driver/pull/50)
5
+
1
6
  # v0.14.10
2
7
 
3
8
  - Resolve internal Ruby warnings
data/README.md CHANGED
@@ -379,7 +379,7 @@ Comparison:
379
379
 
380
380
  ## Contributing
381
381
 
382
- Bug reports and pull requests are welcome on GitHub at https://github.com/k0kubun/benchmark_driver.
382
+ Bug reports and pull requests are welcome on GitHub at https://github.com/benchmark-driver/benchmark-driver.
383
383
 
384
384
  ## License
385
385
 
@@ -1,4 +1,5 @@
1
1
  require 'benchmark_driver/struct'
2
+ require 'rbconfig'
2
3
 
3
4
  module BenchmarkDriver
4
5
  # All CLI options
@@ -71,6 +71,11 @@ module BenchmarkDriver
71
71
  end
72
72
  end
73
73
 
74
+ def executable(name:, command:)
75
+ raise ArgumentError, "`command' should be an Array" unless command.kind_of? Array
76
+ @executables << BenchmarkDriver::Config::Executable.new(name: name, command: command)
77
+ end
78
+
74
79
  def verbose(level = 1)
75
80
  @config.verbose = level
76
81
  end
@@ -3,12 +3,21 @@
3
3
  # * Default value configuration
4
4
  # * Deeply freezing members
5
5
  module BenchmarkDriver
6
+ class ::Struct
7
+ SUPPORT_KEYWORD_P = begin
8
+ ::Struct.new(:a, keyword_init: true)
9
+ true
10
+ rescue TypeError
11
+ false
12
+ end
13
+ end
14
+
6
15
  class << Struct = Module.new
7
16
  # @param [Array<Symbol>] args
8
17
  # @param [Hash{ Symbol => Object }] defaults
9
18
  def new(*args, defaults: {}, &block)
10
19
  # Polyfill `keyword_init: true`
11
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
20
+ if ::Struct::SUPPORT_KEYWORD_P
12
21
  klass = ::Struct.new(*args, keyword_init: true, &block)
13
22
  else
14
23
  klass = keyword_init_struct(*args, &block)
@@ -1,3 +1,3 @@
1
1
  module BenchmarkDriver
2
- VERSION = '0.14.10'
2
+ VERSION = '0.14.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.10
4
+ version: 0.14.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-07 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.7.6
146
+ rubygems_version: 2.6.13
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Fully-featured accurate benchmark driver for Ruby