Sha256: 3102c9bb22a24d1157650df2c5daca4affa724ccd488a456e37ca36eb41a6936

Contents?: true

Size: 698 Bytes

Versions: 33

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

module Doing
  # Hooks.register :post_config do |wwid|
  #   wwid.config['twizzle'] = 'Fo shizzle'
  #   wwid.write_config(File.expand_path('~/Desktop/wwidconfig.yml'))
  # end

  # Hooks.register :post_read, priority: 10 do |wwid|
  #   Doing.logger.warn('Hook 1:', 'triggered priority 10')
  #   Doing.logger.warn('Hook 2:', wwid.config['twizzle'])
  # end

  # Hooks.register :post_read, priority: 100 do |wwid|
  #   Doing.logger.warn('Hook 2:', 'triggered priority 100')
  # end

  Hooks.register :post_write do |filename|
    res = `/bin/bash /Users/ttscoff/scripts/after_doing.sh`.strip
    Doing.logger.debug('Hooks:', res) unless res =~ /^\.\.\.$/
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
doing-2.1.10 lib/examples/plugins/hooks.rb
doing-2.1.9 lib/examples/plugins/hooks.rb
doing-2.1.8 lib/examples/plugins/hooks.rb
doing-2.1.7 lib/examples/plugins/hooks.rb
doing-2.1.6 lib/examples/plugins/hooks.rb
doing-2.1.6pre lib/examples/plugins/hooks.rb
doing-2.1.5pre lib/examples/plugins/hooks.rb
doing-2.1.4pre lib/examples/plugins/hooks.rb
doing-2.1.3 lib/examples/plugins/hooks.rb
doing-2.1.2pre lib/examples/plugins/hooks.rb
doing-2.1.1pre lib/examples/plugins/hooks.rb
doing-2.1.0pre lib/examples/plugins/hooks.rb
doing-2.0.25 lib/examples/plugins/hooks.rb
doing-2.0.24 lib/examples/plugins/hooks.rb
doing-2.0.23 lib/examples/plugins/hooks.rb
doing-2.0.22 lib/examples/plugins/hooks.rb
doing-2.0.21 lib/examples/plugins/hooks.rb
doing-2.0.20 lib/examples/plugins/hooks.rb
doing-2.0.19 lib/examples/plugins/hooks.rb
doing-2.0.18 lib/examples/plugins/hooks.rb