Sha256: 0b52649ce81f7e97bdb20a78a9bddf04baaacd8f259554e18cac55c45fdf7285

Contents?: true

Size: 710 Bytes

Versions: 22

Compression:

Stored size: 710 Bytes

Contents

require 'eucalypt/generate/namespaces/generate-helper/generators/helper'
require 'eucalypt/app'
require 'eucalypt/errors'
require 'eucalypt/helpers'

module Eucalypt
  class Generate < Thor
    include Eucalypt::Helpers
    using Colorize
    option :spec, type: :boolean, default: true, desc: "Include a helper spec file"
    desc "helper [NAME]", "Generates a helper".colorize(:grey)
    def helper(name)
      directory = File.expand_path('.')
      if Eucalypt.app? directory
        helper = Eucalypt::Generators::Helper.new
        helper.destination_root = directory
        helper.generate(name: name, spec: options[:spec])
      else
        Eucalypt::Error.wrong_directory
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
eucalypt-0.9.0 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.8.0 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.7.2 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.7.1 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.7.0 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.6.2 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.6.1 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.6.0 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.5.4 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.5.3 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.5.2 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.5.1 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.5.0 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.4.2 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.4.1 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.4.0 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.3.5 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.3.4 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.3.3 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb
eucalypt-0.3.2 lib/eucalypt/generate/namespaces/generate-helper/cli/generate-helper.rb