ey_rails_wizard 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/ChangeLog.md +8 -0
  2. data/README.md +21 -17
  3. data/Rakefile +21 -6
  4. data/lib/rails_wizard.rb +5 -5
  5. data/lib/rails_wizard/command.rb +29 -23
  6. data/lib/rails_wizard/config.rb +6 -6
  7. data/lib/rails_wizard/{recipe.rb → scroll.rb} +10 -10
  8. data/lib/rails_wizard/{recipes.rb → scrolls.rb} +9 -9
  9. data/lib/rails_wizard/template.rb +23 -23
  10. data/sample.rb +2 -2
  11. data/{recipes → scrolls}/active_admin.rb +1 -1
  12. data/{recipes → scrolls}/activerecord.rb +0 -0
  13. data/{recipes → scrolls}/cancan.rb +0 -0
  14. data/{recipes → scrolls}/capybara.rb +0 -0
  15. data/{recipes → scrolls}/carrierwave.rb +0 -0
  16. data/{recipes → scrolls}/carrierwave_direct.rb +0 -0
  17. data/{recipes → scrolls}/cartographer.rb +0 -0
  18. data/{recipes → scrolls}/cucumber.rb +1 -1
  19. data/scrolls/delayed_job.rb +94 -0
  20. data/{recipes → scrolls}/devise.rb +2 -2
  21. data/{recipes → scrolls}/devise_invitable.rb +0 -0
  22. data/{recipes → scrolls}/env_yaml.rb +0 -0
  23. data/{recipes → scrolls}/event_calendar.rb +0 -0
  24. data/scrolls/eycloud.rb +62 -0
  25. data/{recipes → scrolls}/eycloud_recipes_on_deploy.rb +1 -1
  26. data/{recipes → scrolls}/factory_girl.rb +1 -1
  27. data/{recipes → scrolls}/ffaker.rb +0 -0
  28. data/{recipes → scrolls}/fixture_builder.rb +0 -0
  29. data/{recipes → scrolls}/forgery.rb +0 -0
  30. data/{recipes → scrolls}/git.rb +0 -0
  31. data/scrolls/github.rb +31 -0
  32. data/{recipes → scrolls}/haml.rb +0 -0
  33. data/{recipes → scrolls}/heroku.rb +0 -0
  34. data/{recipes → scrolls}/hoptoad.rb +1 -1
  35. data/{recipes → scrolls}/inherited_resources.rb +0 -0
  36. data/scrolls/intercom.rb +35 -0
  37. data/{recipes → scrolls}/jammit.rb +0 -0
  38. data/{recipes → scrolls}/jasmine.rb +0 -0
  39. data/{recipes → scrolls}/jquery.rb +0 -0
  40. data/{recipes → scrolls}/mini_magick.rb +0 -0
  41. data/{recipes → scrolls}/mongo_mapper.rb +0 -0
  42. data/{recipes → scrolls}/mongohq.rb +2 -2
  43. data/{recipes → scrolls}/mongoid.rb +0 -0
  44. data/{recipes → scrolls}/mootools.rb +0 -0
  45. data/{recipes → scrolls}/mysql.rb +12 -2
  46. data/scrolls/newrelic.rb +11 -0
  47. data/{recipes → scrolls}/nifty_generators.rb +1 -1
  48. data/{recipes → scrolls}/oa_oauth.rb +0 -0
  49. data/{recipes → scrolls}/omniauth.rb +0 -0
  50. data/{recipes → scrolls}/paper_trail.rb +0 -0
  51. data/{recipes → scrolls}/pow.rb +0 -0
  52. data/{recipes → scrolls}/prototype.rb +0 -0
  53. data/{recipes → scrolls}/puma.rb +0 -0
  54. data/{recipes → scrolls}/rails_admin.rb +0 -0
  55. data/{recipes → scrolls}/rails_basics.rb +9 -4
  56. data/{recipes → scrolls}/rails_dev_tweaks.rb +0 -0
  57. data/{recipes → scrolls}/rails_erd.rb +0 -0
  58. data/{recipes → scrolls}/rails_footnotes.rb +0 -0
  59. data/{recipes → scrolls}/ransack.rb +0 -0
  60. data/{recipes → scrolls}/redis.rb +4 -0
  61. data/scrolls/resque.rb +70 -0
  62. data/{recipes → scrolls}/rmagick.rb +0 -0
  63. data/{recipes → scrolls}/rspec.rb +0 -0
  64. data/{recipes → scrolls}/sass.rb +1 -1
  65. data/{recipes → scrolls}/sequel.rb +0 -0
  66. data/{recipes → scrolls}/settingslogic.rb +0 -0
  67. data/{recipes → scrolls}/shoulda_matchers.rb +0 -0
  68. data/scrolls/sidekiq.rb +23 -0
  69. data/{recipes → scrolls}/simple_form.rb +1 -1
  70. data/{recipes → scrolls}/slim.rb +0 -0
  71. data/{recipes → scrolls}/sqlite3.rb +0 -0
  72. data/{recipes → scrolls}/test_unit.rb +0 -0
  73. data/{recipes → scrolls}/thin.rb +0 -0
  74. data/{recipes → scrolls}/thinking_sphinx.rb +0 -0
  75. data/{recipes → scrolls}/twitter_bootstrap_rails.rb +1 -1
  76. data/{recipes → scrolls}/unicorn.rb +0 -0
  77. data/spec/rails_wizard/config_spec.rb +6 -6
  78. data/spec/rails_wizard/recipe_spec.rb +16 -16
  79. data/spec/rails_wizard/recipes/sanity_spec.rb +13 -13
  80. data/spec/rails_wizard/recipes_spec.rb +9 -9
  81. data/spec/rails_wizard/template_spec.rb +15 -15
  82. data/templates/helpers.erb +9 -9
  83. data/templates/layout.erb +7 -7
  84. data/templates/new_scroll.erb +20 -0
  85. data/templates/{recipe.erb → scroll.erb} +3 -3
  86. data/version.rb +1 -1
  87. metadata +88 -83
  88. data/recipes/delayed_job.rb +0 -16
  89. data/recipes/eycloud.rb +0 -30
  90. data/recipes/resque.rb +0 -37
data/ChangeLog.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # ChangeLog
2
2
 
3
+ ## v0.4
4
+
5
+ * SCROLLS ARE IN, "recipes" are out. Wizards use scrolls. Alchemists use recipes.
6
+ * Scrolls have no dependencies on `eycloud` or `eycloud_recipes_on_deploy`; these are optional
7
+ * `github` - GitHub repository creation
8
+ * `resque` + `delayed_job` can install their admin consoles
9
+ * `sidekiq` - high performance, low cost alternative to `resque` or `delayed_job`
10
+
3
11
  ## v0.3
4
12
 
5
13
  * Engine Yard support - Resque
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Engine Yard Rails Wizard Gem
2
2
 
3
- The Engine Yard RailsWizard gem is both the official repository of recipes for [Engine Yard RailsWizard][1] as well as a stand-alone tool to generate rails templates from the command line. The website and the gem are kept in version sync, so any recipes released to the gem will be simultaneously available on the web builder.
3
+ The Engine Yard RailsWizard gem is both the official repository of scrolls for [Engine Yard RailsWizard][1] as well as a stand-alone tool to generate rails templates from the command line. The website and the gem are kept in version sync, so any scrolls released to the gem will be simultaneously available on the web builder.
4
4
 
5
5
  This is a fork of the original [RailsWizard gem][4] specifically for Engine Yard Cloud customers. We are very thankful to Michael Bleigh and Intridea for creating Rails Wizard.
6
6
 
7
- Generated applications may include EY Cloud recipes to setup/run required services.
7
+ Generated applications may include EY Cloud scrolls to setup/run required services.
8
8
 
9
9
  ## Installation
10
10
 
@@ -18,35 +18,39 @@ The primary usage of the `ey_rails_wizard` gem is to utilize its interactive ter
18
18
 
19
19
  ey_rails_wizard new APP_NAME
20
20
 
21
- Where `APP_NAME` is the directory in which you wish to create the app (it mirrors the Rails creation syntax). You will then be guided through the recipe selection process and subsequently the Rails app generator will automatically run with the template and all appropriate command line options included.
21
+ Where `APP_NAME` is the directory in which you wish to create the app (it mirrors the Rails creation syntax). You will then be guided through the scroll selection process and subsequently the Rails app generator will automatically run with the template and all appropriate command line options included.
22
22
 
23
- ### Specifying Recipes
23
+ ### Specifying Scrolls
24
24
 
25
- If you wish to skip the interactive recipe selector, you may provide instead a list of recipes with the `-r` option:
25
+ If you wish to skip the interactive scroll selector, you may provide instead a list of scrolls with the `-r` option:
26
26
 
27
27
  ey_rails_wizard new APP_NAME -r jquery mongo_mapper sass
28
28
 
29
- This will automatically generate a Rails template with the provided recipes and begin the app generator.
29
+ This will automatically generate a Rails template with the provided scrolls and begin the app generator.
30
30
 
31
- ### Listing Recipes
31
+ ### Listing Scrolls
32
32
 
33
- You can also print out a simple list of recipes:
33
+ You can also print out a simple list of scrolls:
34
34
 
35
35
  ey_rails_wizard list
36
36
 
37
- Or print out a list of recipes for a specific category:
37
+ Or print out a list of scrolls for a specific category:
38
38
 
39
39
  ey_rails_wizard list persistence
40
40
 
41
- # EY Rails Wizard Recipes
41
+ # EY Rails Wizard Scrolls
42
42
 
43
- The Engine Yard Rails Wizard recipe collection now live in this GitHub repository to make them fork-friendly and available for use with the command-line tool. You can see all of the recipes in the [recipes directory][2].
43
+ The Engine Yard Rails Wizard scroll collection now live in this GitHub repository to make them fork-friendly and available for use with the command-line tool. You can see all of the scrolls in the [scrolls directory][2].
44
44
 
45
45
  If you're looking for the web app source code, it now lives at [ey_rails_wizard.web][3].
46
46
 
47
- ## Submitting a Recipe
47
+ ## Submitting a Scroll
48
48
 
49
- Submitting a recipe is actually a very straightforward process. Recipes are made of up **template code** and **YAML back-matter** stored in a ruby file. The `__END__` parsing convention is used so that each recipe is actually a valid, parseable Ruby file. The structure of a recipe looks something like this:
49
+ Create new scrolls using:
50
+
51
+ rake new NAME=scroll-name
52
+
53
+ Submitting a scroll is actually a very straightforward process. Scrolls are made of up **template code** and **YAML back-matter** stored in a ruby file. The `__END__` parsing convention is used so that each scroll is actually a valid, parseable Ruby file. The structure of a scroll looks something like this:
50
54
 
51
55
  ```ruby
52
56
  gem 'supergem'
@@ -63,16 +67,16 @@ description: Installs SuperGem which is useful for things
63
67
  author: mbleigh
64
68
  ```
65
69
 
66
- It's really that simple. The gem has RSpec tests that automatically validate each recipe in the repository, so you should run `rake spec` as a basic sanity check before submitting a pull request. Note that these don't verify that your recipe code itself works, just that Engine Yard Rails Wizard could properly parse and understand your recipe file.
70
+ It's really that simple. The gem has RSpec tests that automatically validate each scroll in the repository, so you should run `rake spec` as a basic sanity check before submitting a pull request. Note that these don't verify that your scroll code itself works, just that Engine Yard Rails Wizard could properly parse and understand your scroll file.
67
71
 
68
- For more information on all available options for authoring recipes,
72
+ For more information on all available options for authoring scrolls,
69
73
  please see the
70
74
 
71
75
  ## License
72
76
 
73
- Engine Yard Rails Wizard and its recipes are distributed under the MIT License.
77
+ Engine Yard Rails Wizard and its scrolls are distributed under the MIT License.
74
78
 
75
79
  [1]:http://railswizard.engineyard.com/
76
- [2]:https://github.com/engineyard/ey_rails_wizard/tree/master/recipes
80
+ [2]:https://github.com/engineyard/ey_rails_wizard/tree/master/scrolls
77
81
  [3]:https://github.com/engineyard/ey_rails_wizard.web
78
82
  [4]:https://github.com/intridea/rails_wizard
data/Rakefile CHANGED
@@ -13,14 +13,14 @@ task :clean do
13
13
  system 'rm -rf test_run'
14
14
  end
15
15
 
16
- desc "Execute a test run with the specified recipes."
16
+ desc "Execute a test run with the specified scrolls."
17
17
  task :run => :clean do
18
- recipes = ENV['RECIPES'].split(',')
18
+ scrolls = ENV['SCROLLS'].split(',')
19
19
 
20
20
  require 'tempfile'
21
21
  require 'rails_wizard'
22
22
 
23
- template = RailsWizard::Template.new(recipes)
23
+ template = RailsWizard::Template.new(scrolls)
24
24
 
25
25
  begin
26
26
  dir = Dir.mktmpdir "rails_template"
@@ -36,10 +36,25 @@ task :run => :clean do
36
36
  end
37
37
  end
38
38
 
39
- desc "Prints out a template from the provided recipes."
39
+ desc "Prints out a template from the provided scrolls."
40
40
  task :print do
41
41
  require 'rails_wizard'
42
42
 
43
- recipes = ENV['RECIPES'].split(',')
44
- puts RailsWizard::Template.new(recipes).compile
43
+ scrolls = ENV['SCROLLS'].split(',')
44
+ puts RailsWizard::Template.new(scrolls).compile
45
45
  end
46
+
47
+ desc "Create a new template"
48
+ task :new do
49
+ unless (name = ENV['NAME']) && name.size > 0
50
+ $stderr.puts "USAGE: rake new NAME=scroll-name"
51
+ exit 1
52
+ end
53
+ require 'active_support/inflector'
54
+ require 'erb'
55
+ require 'rails_wizard/template'
56
+ scroll = RailsWizard::Template.render("new_scroll", binding)
57
+ scroll_path = "scrolls/#{name}.rb"
58
+ File.open(scroll_path, "w") { |file| file << scroll }
59
+ `open #{scroll_path}`
60
+ end
data/lib/rails_wizard.rb CHANGED
@@ -1,10 +1,10 @@
1
- require 'rails_wizard/recipes'
2
- require 'rails_wizard/recipe'
1
+ require 'rails_wizard/scrolls'
2
+ require 'rails_wizard/scroll'
3
3
  require 'rails_wizard/config'
4
4
  require 'rails_wizard/template'
5
5
 
6
- Dir[File.dirname(__FILE__) + '/../recipes/*.rb'].each do |path|
6
+ Dir[File.dirname(__FILE__) + '/../scrolls/*.rb'].each do |path|
7
7
  key = File.basename(path, '.rb')
8
- recipe = RailsWizard::Recipe.generate(key, File.open(path))
9
- RailsWizard::Recipes.add(recipe)
8
+ scroll = RailsWizard::Scroll.generate(key, File.open(path))
9
+ RailsWizard::Scrolls.add(scroll)
10
10
  end
@@ -5,39 +5,40 @@ module RailsWizard
5
5
  class Command < Thor
6
6
  include Thor::Actions
7
7
  desc "new APP_NAME", "create a new Rails app"
8
- method_option :recipes, :type => :array, :aliases => "-r"
8
+ method_option :scrolls, :type => :array, :aliases => "-s", :desc => "List scrolls, e.g. -s resque rails_basics jquery"
9
+ method_option :template, :type => :boolean, :aliases => "-t", :desc => "Only display template that would be used"
9
10
  def new(name)
10
- if options[:recipes]
11
- run_template(name, options[:recipes])
11
+ if options[:scrolls]
12
+ run_template(name, options[:scrolls], options[:template])
12
13
  else
13
- @recipes = []
14
+ @scrolls = []
14
15
 
15
- while recipe = ask("#{print_recipes}#{bold}Which recipe would you like to add? #{clear}#{yellow}(blank to finish)#{clear}")
16
- if recipe == ''
17
- run_template(name, @recipes)
16
+ while scroll = ask("#{print_scrolls}#{bold}Which scroll would you like to add? #{clear}#{yellow}(blank to finish)#{clear}")
17
+ if scroll == ''
18
+ run_template(name, @scrolls)
18
19
  break
19
- elsif RailsWizard::Recipes.list.include?(recipe)
20
- @recipes << recipe
20
+ elsif RailsWizard::Scrolls.list.include?(scroll)
21
+ @scrolls << scroll
21
22
  puts
22
- puts "> #{green}Added '#{recipe}' to template.#{clear}"
23
+ puts "> #{green}Added '#{scroll}' to template.#{clear}"
23
24
  else
24
25
  puts
25
- puts "> #{red}Invalid recipe, please try again.#{clear}"
26
+ puts "> #{red}Invalid scroll, please try again.#{clear}"
26
27
  end
27
28
  end
28
29
  end
29
30
  end
30
31
 
31
- desc "list [CATEGORY]", "list available recipes (optionally by category)"
32
+ desc "list [CATEGORY]", "list available scrolls (optionally by category)"
32
33
  def list(category = nil)
33
34
  if category
34
- recipes = RailsWizard::Recipes.for(category).map{|r| RailsWizard::Recipe.from_mongo(r) }
35
+ scrolls = RailsWizard::Scrolls.for(category).map{|r| RailsWizard::Scroll.from_mongo(r) }
35
36
  else
36
- recipes = RailsWizard::Recipes.list_classes
37
+ scrolls = RailsWizard::Scrolls.list_classes
37
38
  end
38
39
 
39
- recipes.each do |recipe|
40
- puts recipe.key.ljust(15) + "# #{recipe.description}"
40
+ scrolls.each do |scroll|
41
+ puts scroll.key.ljust(15) + "# #{scroll.description}"
41
42
  end
42
43
  end
43
44
 
@@ -49,28 +50,33 @@ module RailsWizard
49
50
  def green; "\033[32m" end
50
51
  def yellow; "\033[33m" end
51
52
 
52
- def print_recipes
53
+ def print_scrolls
53
54
  puts
54
55
  puts
55
56
  puts
56
- if @recipes && @recipes.any?
57
- puts "#{green}#{bold}Your Recipes:#{clear} " + @recipes.join(", ")
57
+ if @scrolls && @scrolls.any?
58
+ puts "#{green}#{bold}Your Scrolls:#{clear} " + @scrolls.join(", ")
58
59
  puts
59
60
  end
60
- puts "#{bold}#{cyan}Available Recipes:#{clear} " + RailsWizard::Recipes.list.join(', ')
61
+ puts "#{bold}#{cyan}Available Scrolls:#{clear} " + RailsWizard::Scrolls.list.join(', ')
61
62
  puts
62
63
  end
63
64
 
64
- def run_template(name, recipes)
65
+ def run_template(name, scrolls, display_only = false)
65
66
  puts
66
67
  puts
67
68
  puts "#{bold}Generating and Running Template..."
68
69
  puts
69
70
  file = Tempfile.new('template')
70
- template = RailsWizard::Template.new(recipes)
71
+ template = RailsWizard::Template.new(scrolls)
71
72
  file.write template.compile
72
73
  file.close
73
- system "rails new #{name} -m #{file.path} #{template.args.join(' ')}"
74
+ if display_only
75
+ puts "Template stored to #{file.path}"
76
+ puts File.read(file.path)
77
+ else
78
+ system "rails new #{name} -m #{file.path} #{template.args.join(' ')}"
79
+ end
74
80
  ensure
75
81
  file.unlink
76
82
  end
@@ -41,7 +41,7 @@ module RailsWizard
41
41
  end
42
42
 
43
43
  def conditions
44
- [config_conditions, recipe_conditions].join(' && ')
44
+ [config_conditions, scroll_conditions].join(' && ')
45
45
  end
46
46
 
47
47
  def config_conditions
@@ -54,11 +54,11 @@ module RailsWizard
54
54
  end
55
55
  end
56
56
 
57
- def recipe_conditions
58
- if details['if_recipe']
59
- "recipe?('#{details['if_recipe']}')"
60
- elsif details['unless_recipe']
61
- "!recipe?('#{details['unless_recipe']}')"
57
+ def scroll_conditions
58
+ if details['if_scroll']
59
+ "scroll?('#{details['if_scroll']}')"
60
+ elsif details['unless_scroll']
61
+ "!scroll?('#{details['unless_scroll']}')"
62
62
  else
63
63
  'true'
64
64
  end
@@ -5,7 +5,7 @@ require 'yaml'
5
5
  require 'erb'
6
6
 
7
7
  module RailsWizard
8
- class Recipe
8
+ class Scroll
9
9
  extend Comparable
10
10
 
11
11
  def self.<=>(another)
@@ -28,7 +28,7 @@ module RailsWizard
28
28
  if template_or_file.respond_to?(:read)
29
29
  file = template_or_file.read
30
30
  parts = file.split(/^__END__$/)
31
- raise ArgumentError, "The recipe file must have YAML matter after an __END__" unless parts.size == 2
31
+ raise ArgumentError, "The scroll file must have YAML matter after an __END__" unless parts.size == 2
32
32
  template = parts.first.strip
33
33
  attributes = YAML.load(parts.last).inject({}) do |h,(k,v)|
34
34
  h[k.to_sym] = v
@@ -38,12 +38,12 @@ module RailsWizard
38
38
  template = template_or_file
39
39
  end
40
40
 
41
- recipe_class = Class.new(RailsWizard::Recipe)
42
- recipe_class.attributes = attributes
43
- recipe_class.template = template
44
- recipe_class.key = key
41
+ scroll_class = Class.new(RailsWizard::Scroll)
42
+ scroll_class.attributes = attributes
43
+ scroll_class.template = template
44
+ scroll_class.key = key
45
45
 
46
- recipe_class
46
+ scroll_class
47
47
  end
48
48
 
49
49
  ATTRIBUTES.each do |setter|
@@ -81,7 +81,7 @@ module RailsWizard
81
81
  end
82
82
 
83
83
  def self.compile
84
- "# >#{"[ #{name} ]".center(75,'-')}<\n\n# #{description}\nsay_recipe '#{name}'\n\n#{template}\n"
84
+ "# >#{"[ #{name} ]".center(75,'-')}<\n\n# #{description}\nsay_scroll '#{name}'\n\n#{template}\n"
85
85
  end
86
86
  def compile; self.class.compile end
87
87
 
@@ -95,8 +95,8 @@ module RailsWizard
95
95
  end
96
96
 
97
97
  def self.from_mongo(key)
98
- return key if key.respond_to?(:superclass) && key.superclass == RailsWizard::Recipe
99
- RailsWizard::Recipes[key]
98
+ return key if key.respond_to?(:superclass) && key.superclass == RailsWizard::Scroll
99
+ RailsWizard::Scrolls[key]
100
100
  end
101
101
 
102
102
  def self.get_binding
@@ -1,14 +1,14 @@
1
1
  module RailsWizard
2
- module Recipes
2
+ module Scrolls
3
3
  @@categories = {}
4
4
  @@list = {}
5
5
 
6
- def self.add(recipe)
7
- RailsWizard::Recipes.const_set ActiveSupport::Inflector.camelize(recipe.key), recipe
8
- @@list[recipe.key] = recipe
9
- (@@categories[recipe.category.to_s] ||= []) << recipe.key
10
- @@categories[recipe.category.to_s].uniq!
11
- recipe
6
+ def self.add(scroll)
7
+ RailsWizard::Scrolls.const_set ActiveSupport::Inflector.camelize(scroll.key), scroll
8
+ @@list[scroll.key] = scroll
9
+ (@@categories[scroll.category.to_s] ||= []) << scroll.key
10
+ @@categories[scroll.category.to_s].uniq!
11
+ scroll
12
12
  end
13
13
 
14
14
  def self.[](key)
@@ -31,8 +31,8 @@ module RailsWizard
31
31
  (@@categories[category.to_s] || []).sort
32
32
  end
33
33
 
34
- def self.remove_from_category(category, recipe)
35
- (@@categories[category.to_s] ||= []).delete(recipe.key)
34
+ def self.remove_from_category(category, scroll)
35
+ (@@categories[category.to_s] ||= []).delete(scroll.key)
36
36
  end
37
37
  end
38
38
  end
@@ -1,16 +1,16 @@
1
1
  module RailsWizard
2
2
  class Template
3
- attr_reader :recipes, :unknown_recipe_names
3
+ attr_reader :scrolls, :unknown_scroll_names
4
4
 
5
- def initialize(recipes)
6
- @unknown_recipe_names = []
7
- @recipes = recipes.inject([]) do |list, name|
8
- recipe = RailsWizard::Recipe.from_mongo(name)
9
- if recipe
10
- list << recipe
5
+ def initialize(scrolls)
6
+ @unknown_scroll_names = []
7
+ @scrolls = scrolls.inject([]) do |list, name|
8
+ scroll = RailsWizard::Scroll.from_mongo(name)
9
+ if scroll
10
+ list << scroll
11
11
  else
12
- @unknown_recipe_names << name
13
- $stderr.puts "Unknown recipe '#{name}'. Skipping."
12
+ @unknown_scroll_names << name
13
+ $stderr.puts "Unknown scroll '#{name}'. Skipping."
14
14
  end
15
15
  list
16
16
  end
@@ -27,30 +27,30 @@ module RailsWizard
27
27
  def render(template_name, binding = nil); self.class.render(template_name, binding) end
28
28
 
29
29
 
30
- def resolve_recipes
31
- @resolve_recipes ||= recipes_with_dependencies.sort
30
+ def resolve_scrolls
31
+ @resolve_scrolls ||= scrolls_with_dependencies.sort
32
32
  end
33
33
 
34
- def recipe_classes
35
- @recipe_classes ||= recipes.map { |name| RailsWizard::Recipe.from_mongo(name) }
34
+ def scroll_classes
35
+ @scroll_classes ||= scrolls.map { |name| RailsWizard::Scroll.from_mongo(name) }
36
36
  end
37
37
 
38
- def recipes_with_dependencies
39
- @recipes_with_dependencies ||= recipe_classes
38
+ def scrolls_with_dependencies
39
+ @scrolls_with_dependencies ||= scroll_classes
40
40
 
41
41
  added_more = false
42
- for recipe in recipe_classes
43
- recipe.requires.each do |requirement|
44
- requirement = RailsWizard::Recipe.from_mongo(requirement)
45
- count = @recipes_with_dependencies.size
46
- (@recipes_with_dependencies << requirement).uniq!
47
- unless @recipes_with_dependencies.size == count
42
+ for scroll in scroll_classes
43
+ scroll.requires.each do |requirement|
44
+ requirement = RailsWizard::Scroll.from_mongo(requirement)
45
+ count = @scrolls_with_dependencies.size
46
+ (@scrolls_with_dependencies << requirement).uniq!
47
+ unless @scrolls_with_dependencies.size == count
48
48
  added_more = true
49
49
  end
50
50
  end
51
51
  end
52
52
 
53
- added_more ? recipes_with_dependencies : @recipes_with_dependencies
53
+ added_more ? scrolls_with_dependencies : @scrolls_with_dependencies
54
54
  end
55
55
 
56
56
  def compile
@@ -58,7 +58,7 @@ module RailsWizard
58
58
  end
59
59
 
60
60
  def args
61
- recipes.map(&:args).uniq
61
+ scrolls.map(&:args).uniq
62
62
  end
63
63
 
64
64
  def custom_code?; false end