Sha256: f7a19faf240ac1fad461c577170d9304aa35fad8561315e9739c73bd4a9da7b7

Contents?: true

Size: 1.33 KB

Versions: 4

Compression:

Stored size: 1.33 KB

Contents

# encoding: utf-8

module Hexx

  module Suit

    # The generator creates a Rakefile in a destination root
    class Install < Thor::Group
      include Thor::Actions

      # @!scope class
      # @!method start(args)
      # Populates the necessary files into current directory
      #
      # @param  [Array<String>] args An array of arguments from CLI (ARGV etc.)
      #
      # @return [undefined]
      #
      # @api public

      # @private
      def self.source_root
        @source_root ||= File.expand_path "../install", __FILE__
      end

      namespace :install
      desc "Installs the 'hexx-suit' gem."

      # @private
      def install_rspec
        Hexx::RSpec::Install.start %w(--no-rakefile)
      end

      # @private
      def create_rakefile
        copy_file "Rakefile"
      end

      # @private
      def create_guardfile
        copy_file "Guardfile"
      end

      # @private
      def create_yardopts
        copy_file "_yardopts", ".yardopts"
      end

      # @private
      def create_metrics
        directory "metrics", "config/metrics"
      end

      # @private
      def create_metrics_loader
        copy_file "_metrics", ".metrics"
      end

      # @private
      def create_rubocop_loader
        copy_file "_rubocop.yml", ".rubocop.yml"
      end

    end # class Install

  end # module Suit

end # module Hexx

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hexx-suit-2.0.0 lib/hexx/suit/install.rb
hexx-suit-1.5.0-x86_64-linux lib/hexx/suit/install.rb
hexx-suit-1.3.0-x86_64-linux lib/hexx/suit/install.rb
hexx-suit-1.2.0 lib/hexx/suit/install.rb