Ruby bundler inline gemfile
mouse 1326 · person cloud · link
Last update
2020-07-21
2020
07-21
« — »
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'benchmark-ips', require: 'benchmark/ips'
end

Benchmark.ips do |x|
  x.report('original') { naive_implementation() }
  x.report('optimized') { fast_implementation() }

  x.compare!
end

Running the script will automatically install the gem and run it.


Source: nithinbekal.com