Sha256: 0e1cfaf9d8a6e79cf35fed92db2bacf6c432d44aa20831fa43b1112c218840fc

Contents?: true

Size: 1 KB

Versions: 6

Compression:

Stored size: 1 KB

Contents

module Hexx
  module RSpec

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

      # @!scope class
      # @!method start
      # Populates files into current directory
      #
      # @return [undefined]
      #
      # @api public

      class_option(
        :rakefile,
        default: true,
        desc: "Create the Rakefile",
        type: :boolean
      )

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

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

      # @private
      def create_rakefile
        return unless options[:rakefile]
        copy_file "Rakefile"
      end

      # @private
      def create_rspec
        copy_file "_rspec", ".rspec"
      end

      # @private
      def create_simplecov
        copy_file "simplecov.yml", "config/metrics/simplecov.yml"
      end

    end # class Install

  end # module RSpec

end # module Hexx

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hexx-rspec-0.3.1 lib/hexx/rspec/install.rb
hexx-rspec-0.3.0 lib/hexx/rspec/install.rb
hexx-rspec-0.2.2 lib/hexx/rspec/install.rb
hexx-rspec-0.2.1 lib/hexx/rspec/install.rb
hexx-rspec-0.2.0 lib/hexx/rspec/install.rb
hexx-rspec-0.1.0 lib/hexx/rspec/install.rb