This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change the init_file method to cook related #76 * Adapt feature to the last refactor
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Configurators | ||
class Ci < Base | ||
|
||
askable 'Will you use a CI system' | ||
optionable %w(CircleCI None) | ||
|
||
def recipe | ||
case ask! | ||
when 'CircleCI' | ||
@pathfinder.add_recipe(Recipes::CircleCi.new(@pathfinder)) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Recipes | ||
class CircleCi < Base | ||
|
||
def cook | ||
generate_circle_ci_config | ||
end | ||
|
||
private | ||
|
||
def generate_circle_ci_config | ||
path = 'https://raw.githubusercontent.com/MarsBased/circleci/master/config/rails/' | ||
|
||
@template.run 'mkdir .circleci' | ||
@template.run "curl #{path}.circleci/config.yml > ./.circleci/config.yml" | ||
@template.run "curl #{path}config/database.ci.yml > ./config/database.ci.yml" | ||
end | ||
end | ||
end |