Class: Hexx::RSpec::Install
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Hexx::RSpec::Install
- Includes:
- Thor::Actions
- Defined in:
- lib/hexx-rspec/install.rb
Overview
The generator creates a Rakefile in a destination root
Class Method Summary collapse
- .create_rakefile ⇒ Object
- .create_rspec ⇒ Object
- .create_simplecov ⇒ Object
- .create_spec_helper ⇒ Object
- .source_root ⇒ Object
-
.start ⇒ undefined
Populates files into current directory.
Class Method Details
.create_rakefile ⇒ Object
36 37 38 39 |
# File 'lib/hexx-rspec/install.rb', line 36 def create_rakefile return unless [:rakefile] copy_file "Rakefile" end |
.create_rspec ⇒ Object
42 43 44 |
# File 'lib/hexx-rspec/install.rb', line 42 def create_rspec copy_file "_rspec", ".rspec" end |
.create_simplecov ⇒ Object
47 48 49 |
# File 'lib/hexx-rspec/install.rb', line 47 def create_simplecov copy_file "simplecov.yml", "config/metrics/simplecov.yml" end |
.create_spec_helper ⇒ Object
52 53 54 |
# File 'lib/hexx-rspec/install.rb', line 52 def create_spec_helper template "spec_helper.erb", "spec/spec_helper.rb" end |
.source_root ⇒ Object
28 29 30 |
# File 'lib/hexx-rspec/install.rb', line 28 def self.source_root @source_root ||= File. "../install", __FILE__ end |
.start ⇒ undefined
Populates files into current directory
20 21 22 23 24 25 |
# File 'lib/hexx-rspec/install.rb', line 20 class_option( :rakefile, default: true, desc: "Create the Rakefile", type: :boolean ) |