Sha256: 3c24ed03cb30ddbd8c719bec129e2c5989a263173bc236849ea7f765df69b695

Contents?: true

Size: 866 Bytes

Versions: 5

Compression:

Stored size: 866 Bytes

Contents

require 'thor'
require 'venom/generators/workshop'

module Venom
  class Generator < Thor
    desc "workshop NAME", "Create a new workshop."
    method_option :driver, aliases: "-d", type: :string, required: false, desc: "Framework driver to use. (Default value is 'symbiont'.)"
    method_option :library, aliases: "-l", type: :boolean, desc: "Use a shared library directory."
    method_option :restart, aliases: "-r", type: :boolean, desc: "Restart browser for each scenario."
    
    def workshop(name)
      puts "Name of workshop: #{name}"
      driver = options[:driver].nil? ? 'symbiont' : options[:driver]
      library = options[:library] == true ? 'true' : 'false'
      restart = options[:restart] == true ? 'true' : 'false'

      Venom::Generators::Workshop.start([name, driver, library, restart])
    end
  end # class: Generator
end # module: Venom

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
venom-0.0.7 lib/venom/generator.rb
venom-0.0.6 lib/venom/generator.rb
venom-0.0.5 lib/venom/generator.rb
venom-0.0.4 lib/venom/generator.rb
venom-0.0.3 lib/venom/generator.rb