Sha256: 82b2375abf276b33217cadb9e69e18c2cd365106fae7226bdf26c51c17fcd4e9

Contents?: true

Size: 336 Bytes

Versions: 3

Compression:

Stored size: 336 Bytes

Contents

require 'bundler/cli'
require 'bundler_timer/statistics'

module BundlerTimer
  class CLI < Bundler::CLI
    def initialize(*)
      @statistics = Statistics.instance
      super
    end

    no_tasks do
      def invoke_task(task, *args)
        @statistics.record(task.name) do
          super
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bundler_timer-1.1.2 lib/bundler_timer/cli.rb
bundler_timer-1.1.1 lib/bundler_timer/cli.rb
bundler_timer-1.1.0 lib/bundler_timer/cli.rb