Sha256: e631233fd757da7792f0fb093f7ff6438917033a218134ba656ca0d7e26b5f13

Contents?: true

Size: 1.94 KB

Versions: 37

Compression:

Stored size: 1.94 KB

Contents

# Application template recipe for the rails_apps_composer. Change the recipe here:
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/example.rb

before_config do
  # Code here is run before any configuration prompts.
  say_wizard "recipe running before configuration"
end

if config['space_test']
  say_wizard "running a space test"
  test_count = config['test_count']
  say_wizard "will run the test #{test_count} times"
  say_wizard "will run the test in #{config['orbit']} orbit"
  unless config['mars_test']
    say_wizard "Mars test not available"
  end
  # the @config@ hash is only available to the recipe
  # the @prefs{}@ hash is available to all the recipes
  prefs[:test_orbit] = config['orbit']
end

stage_two do
  # Code here is run after Bundler installs all the gems for the project.
  # Use this section to run generators and rake tasks.
  # Download any files from a repository for models, controllers, views, and routes.
  say_wizard "recipe stage two"
end

stage_three do
  # This block is run after the 'stage_two' block.
  # Use this section to finalize the application.
  # Run database migrations or make a final git commit.
  say_wizard "recipe stage three"
end

# A recipe has two parts: the Ruby code and YAML matter that comes after a blank line with the __END__ keyword.

__END__

name: example
description: "Example of a recipe."
author: githubname

category: example

config:
  - space_test:
      type: boolean
      prompt: Do you want to test your application in space?
  - mars_test:
      type: boolean
      prompt: Do you also want to test your application on Mars?
      if: space_test
      if_recipe: mars_lander
  - test_count:
      type: string
      prompt: How many times would you like to repeat the test?
      if: space_test
  - orbit:
      type: multiple_choice
      prompt: "What orbit do you want?"
      choices: [ [Low Earth orbit, leo], [Sun-synchronous, spy], [Geostationary, gps] ]
      if: space_test

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
rails_apps_composer-3.1.36 recipes/example.rb
rails_apps_composer-3.1.35 recipes/example.rb
rails_apps_composer-3.1.34 recipes/example.rb
rails_apps_composer-3.1.33 recipes/example.rb
rails_apps_composer-3.1.31 recipes/example.rb
rails_apps_composer-3.1.30 recipes/example.rb
rails_apps_composer-3.1.29 recipes/example.rb
rails_apps_composer-3.1.28 recipes/example.rb
rails_apps_composer-3.1.27 recipes/example.rb
rails_apps_composer-3.1.25 recipes/example.rb
rails_apps_composer-3.1.24 recipes/example.rb
rails_apps_composer-3.1.23 recipes/example.rb
rails_apps_composer-3.1.22 recipes/example.rb
rails_apps_composer-3.1.21 recipes/example.rb
rails_apps_composer-3.1.20 recipes/example.rb
rails_apps_composer-3.1.19 recipes/example.rb
rails_apps_composer-3.1.18 recipes/example.rb
rails_apps_composer-3.1.17 recipes/example.rb
rails_apps_composer-3.1.16 recipes/example.rb
rails_apps_composer-3.1.15 recipes/example.rb