rails_apps_composer 2.4.21 → 2.4.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1ea58b0f35b0fc4657f155d14d4e80e61c52544
4
- data.tar.gz: 989119829f968820c79d6f58f7bb8378cb5915c1
3
+ metadata.gz: 299c4828ce45b7ce362d4e45a07952c177a8bb85
4
+ data.tar.gz: d3b9a499fb7403b42f3b89a63a4ad10affec849a
5
5
  SHA512:
6
- metadata.gz: 3dfcb519c4c6779a7d727168515e4a34a19275e9062c85691d73d177705a5e4628f7d5b28c1f918bfa29c70d61a392a679ee0028b725bdacf74461780f8d94d4
7
- data.tar.gz: 808b78514aa3609532919895f25085c6d12c0288abeac4a6d5c01d887c6163cf594a3f2716c5aea8affab494e80f2b28dcfd2cc2d90a91f853689789e02e69de
6
+ metadata.gz: d8ed7c7a77e8d3fd6cbd34c7a5c76ad1fe476235337bcdcb5724505f9ef31e2bd061d02e219039c999e46572da002afc9a503bd2aa32e052ed82e93cc11ab07d
7
+ data.tar.gz: 28600687e4fa20097bc01818e78ab0a5243346e019226745b04e338d567934e7f47cb538d1da237714d788e3b43c52e35277caea9d17f63fa545fd75c6300285
data/README.textile CHANGED
@@ -12,16 +12,16 @@ You can use local recipes as well as recipes supplied with the gem.
12
12
 
13
13
  The "Rails Composer":http://railsapps.github.io/rails-composer/ tool is built with the rails_apps_composer gem. The Rails Composer tool creates the "example applications":http://railsapps.github.io/ for the "RailsApps":http://railsapps.github.io/ project.
14
14
 
15
- The "Guide to the Rails Apps Composer Gem":http://railsapps.github.io/tutorial-rails-apps-composer.html provides complete documentation:
15
+ The "Guide to the Rails Apps Composer Gem":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer provides complete documentation:
16
16
 
17
- * "Overview":http://railsapps.github.io/tutorial-rails-apps-composer.html#Overview
18
- * "Recipes":http://railsapps.github.io/tutorial-rails-apps-composer.html#Recipes
19
- * "Usage":http://railsapps.github.io/tutorial-rails-apps-composer.html#Usage
20
- * "Diagnostics":http://railsapps.github.io/tutorial-rails-apps-composer.html#Diagnostics
21
- * "Hacking the Gem":http://railsapps.github.io/tutorial-rails-apps-composer.html#Hacking
22
- * "Anatomy of a Recipe":http://railsapps.github.io/tutorial-rails-apps-composer.html#Anatomy
23
- * "Architecture":http://railsapps.github.io/tutorial-rails-apps-composer.html#Architecture
24
- * "Defaults File":http://railsapps.github.io/tutorial-rails-apps-composer.html#Defaults
17
+ * "Overview":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#overview
18
+ * "Recipes":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#recipes
19
+ * "Usage":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#usage
20
+ * "Diagnostics":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#diagnostics
21
+ * "Hacking the Gem":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#hacking-the-gem
22
+ * "Anatomy of a Recipe":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#anatomy-of-a-recipe
23
+ * "Architecture":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#architecture
24
+ * "Defaults File":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#defaults-file
25
25
 
26
26
  Any issues? Please create a "GitHub issue":http://github.com/RailsApps/rails_apps_composer/issues.
27
27
 
@@ -58,6 +58,18 @@ h4. Database
58
58
 
59
59
  Unless you use SQLite, which runs by default on Mac OS X, you'll need to have a database server running before you run rails_apps_composer. This is true if you want to use PostgreSQL, MySQL, or MongoDB. I recommend using SQLite if you don't want to set up a database server.
60
60
 
61
+ h4. Gemsets and RVM
62
+
63
+ Ordinarily, when you create a new Rails application, you work with a single set of gems. Before you create your Rails application, the rails gem must be installed in your Ruby environment. If you wish to use rails_apps_composer commands to generate a Rails application or template, you must also install the rails_apps_composer gem.
64
+
65
+ The rails_apps_composer gem uses the @rails new@ command to create a new Rails application. The rails_apps_composer gem modifies the new Gemfile and runs Bundler to install the gems you want in your new application. The gems will be installed in your current Ruby environment (and must not conflict with other gems already installed).
66
+
67
+ Some developers like to use RVM, the "Ruby Version Manager":https://rvm.io/, to manage gemsets. The "extras" recipe offers an option of creating or using a project-specific RVM gemset. That means rails_apps_composer will switch from an initial gemset to a new gemset during the process of creating your new application. If you choose the option of using the project-specific RVM gemset from the "extras" recipe, before you start you must be using RVM and you must install the rvm gem in addition to the rails and rails_apps_composer gems.
68
+
69
+ If you choose the option of creating or using a project-specific RVM gemset, you will use two gemsets. First, the gems installed in the current Ruby environment (including rails and rails_apps_composer and perhaps rvm). Second, after the @rails new@ command creates a Gemfile, and before Bundler installs the gems you want, rails_apps_composer will use the rvm gem to use or create a new gemset that is specific to your new project. Configuration choices you make when you run rails_apps_composer often add gems to the new application Gemfile (such as html2haml if you select Haml). Rails_apps_composer will use Bundler to install these gems and run any @generate@ commands within the project-specific gemset.
70
+
71
+ If you answer "yes" to creating a project-specific gemset and you don't have the rvm gem installed, you will get an error during the generation process saying RVM cannot be loaded. It is important to recognize that the gemset you start with (when you launch rails_apps_composer) can be replaced with a new project-specific gemset by the "build and compose" script (the "extras.rb" recipe line @RVM.gemset_use!@ in the generated application template).
72
+
61
73
  h2. Installation and Usage
62
74
 
63
75
  I recommend installing and using RVM, the "Ruby Version Manager":https://rvm.io/, to create a new gemset for rails_apps_composer. Using an RVM gemset will make it easier to identify and isolate incompatibilities among gems. RVM will install Ruby and set up a global gemset with a minimal set of gems.
@@ -70,6 +82,7 @@ $ cd myapp
70
82
  $ rvm use ruby-2.0.0@myapp --ruby-version --create
71
83
  $ gem install rails
72
84
  $ gem install rails_apps_composer
85
+ $ gem install rvm # (only needed if creating a project-specific rvm gemset)
73
86
  $ rails_apps_composer new . -r core
74
87
  </pre>
75
88
 
@@ -81,7 +94,7 @@ You may have trouble if you install the rails_apps_composer gem by including it
81
94
 
82
95
  h2. Usage Options
83
96
 
84
- These commands are summarized here for your reference. See the "Guide to the Rails Apps Composer Gem":http://railsapps.github.io/tutorial-rails-apps-composer.html for details.
97
+ These commands are summarized here for your reference. See the "Guide to the Rails Apps Composer Gem":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer for details.
85
98
 
86
99
  h3. List Recipes
87
100
 
@@ -110,7 +123,7 @@ views # Add views needed for starter apps.
110
123
 
111
124
  The above list is current for rails_apps_composer 2.1; later releases will contain more recipes.
112
125
 
113
- See the Guide for more "detailed descriptions of recipes":http://railsapps.github.io/tutorial-rails-apps-composer.html#Recipes. You can find all available recipes in the repository "recipes directory":https://github.com/RailsApps/rails_apps_composer/tree/master/recipes. Examining the recipe source code is the very best way to learn what a recipe will do.
126
+ See the Guide for more "detailed descriptions of recipes":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#recipes. You can find all available recipes in the repository "recipes directory":https://github.com/RailsApps/rails_apps_composer/tree/master/recipes. Examining the recipe source code is the very best way to learn what a recipe will do.
114
127
 
115
128
  h3. Recommended Recipes
116
129
 
@@ -126,7 +139,7 @@ Recipes may also contain a @run_after@ directive. The rails_apps_composer progra
126
139
 
127
140
  In general, it's best to add (or list) recipes in the order they should execute as some recipes may not contain a necessary @requires@ or @run_after@ directive.
128
141
 
129
- See the "Anatomy of a Recipe":http://railsapps.github.io/tutorial-rails-apps-composer.html#Anatomy section in the Guide to learn about the format of a recipe.
142
+ See the "Anatomy of a Recipe":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#anatomy section in the Guide to learn about the format of a recipe.
130
143
 
131
144
  h3. Skipping Test::Unit or Active Record
132
145
 
@@ -216,7 +229,7 @@ Use a defaults file for recipes, preferences, and extra gems so you don't have t
216
229
  $ rails_apps_composer new myapp -d my_defaults.yaml
217
230
  </pre>
218
231
 
219
- Use the @my_defaults.yaml@ file to specify a list of recipes, preferences, and extra gems. You can use any name (and file extension) for the file. See the "Defaults File":http://railsapps.github.io/tutorial-rails-apps-composer.html#Defaults section in the Guide concerning the format of the defaults file.
232
+ Use the @my_defaults.yaml@ file to specify a list of recipes, preferences, and extra gems. You can use any name (and file extension) for the file. See the "Defaults File":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#defaults-file section in the Guide concerning the format of the defaults file.
220
233
 
221
234
  Use the "quiet flag" @-q@ if you want to skip all prompts:
222
235
 
@@ -273,7 +286,7 @@ Generate an application template using a defaults file and the @-d@ flag:
273
286
  $ rails_apps_composer template ~/Desktop/template.rb -d my_defaults.yaml
274
287
  </pre>
275
288
 
276
- Use the @my_defaults.yaml@ file to specify a list of recipes, preferences, and extra gems. You can use any name (and file extension) for the file. See the "Defaults File":http://railsapps.github.io/tutorial-rails-apps-composer.html#Defaults section in the Guide concerning the format of the defaults file. Use the "quiet flag" @-q@ if you want to skip all prompts.
289
+ Use the @my_defaults.yaml@ file to specify a list of recipes, preferences, and extra gems. You can use any name (and file extension) for the file. See the "Defaults File":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#defaults-file section in the Guide concerning the format of the defaults file. Use the "quiet flag" @-q@ if you want to skip all prompts.
277
290
 
278
291
  h3. Generate an Application Template With Your Own Layout
279
292
 
@@ -380,7 +393,7 @@ The @rails new@ command creates a new Rails application. If you want to use an a
380
393
 
381
394
  h2. Hacking the Gem
382
395
 
383
- See the "Guide to the Rails Apps Composer Gem":http://railsapps.github.io/tutorial-rails-apps-composer.html to learn how to customize the gem either for your own use or to share with others.
396
+ See the "Guide to the Rails Apps Composer Gem":https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer to learn how to customize the gem either for your own use or to share with others.
384
397
 
385
398
  See the "CONTRIBUTING":https://github.com/RailsApps/rails_apps_composer/blob/master/CONTRIBUTING.textile file for details about how you can contribute fixes or new features.
386
399
 
@@ -404,7 +417,7 @@ h2. MIT License
404
417
 
405
418
  "MIT License":http://www.opensource.org/licenses/mit-license
406
419
 
407
- Copyright © 2012-2013 Daniel Kehoe
420
+ Copyright © 2012-2014 Daniel Kehoe
408
421
 
409
422
  h2. Useful Links
410
423
 
@@ -47,7 +47,7 @@ module RailsWizard
47
47
  @@prefs << {:railsapps=>"rails-stripe-membership-saas", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"mandrill", :authentication=>"devise", :devise_modules=>"confirmable", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
48
48
  @@prefs << {:railsapps=>"rails-prelaunch-signup", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"mandrill", :authentication=>"devise", :devise_modules=>"confirmable", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
49
49
  @@prefs << {:railsapps=>"rails3-bootstrap-devise-cancan", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form"}
50
- @@prefs << {:railsapps=>"rails3-bootstrap-devise-cancan", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form", :local_env_file=>true, :continuous_testing=>"none"}
50
+ @@prefs << {:railsapps=>"rails3-bootstrap-devise-cancan", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :starter_app=>"admin_app", :form_builder=>"simple_form", :local_env_file=>"figaro", :continuous_testing=>"none"}
51
51
  @@prefs << {:railsapps=>"rails3-devise-rspec-cucumber", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"none", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"none", :starter_app=>"users_app", :form_builder=>"none"}
52
52
  @@prefs << {:railsapps=>"rails3-mongoid-devise", :database=>'mongodb', :orm=>'mongoid', :unit_test=>'rspec', :integration=>'cucumber', :fixtures=>'factory_girl', :frontend=>'none', :email=>'gmail', :authentication=>'devise', :devise_modules=>'default', :authorization=>'none', :starter_app=>'users_app', :form_builder=>'none'}
53
53
  @@prefs << {:railsapps=>"rails3-mongoid-omniauth", :database=>'mongodb', :orm=>'mongoid', :unit_test=>'rspec', :integration=>'cucumber', :fixtures=>'factory_girl', :frontend=>'none', :email=>'none', :authentication=>'omniauth', :omniauth_provider=>'twitter', :authorization=>'none', :starter_app=>'users_app', :form_builder=>'none'}
data/recipes/admin.rb ADDED
@@ -0,0 +1,46 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/admin.rb
3
+
4
+ case config['admin']
5
+ when 'activeadmin'
6
+ prefs[:admin] = 'activeadmin'
7
+ when 'rails_admin'
8
+ prefs[:admin] = 'rails_admin'
9
+ end
10
+
11
+ if prefer :admin, 'activeadmin'
12
+ if Rails::VERSION::MAJOR.to_s == "4"
13
+ gem 'activeadmin', github: 'gregbell/active_admin'
14
+ else
15
+ gem 'activeadmin'
16
+ end
17
+ end
18
+ gem 'rails_admin' if prefer :admin, 'rails_admin'
19
+
20
+ after_bundler do
21
+ if prefer :admin, 'active_admin'
22
+ say_wizard "recipe installing activeadmin"
23
+ generate 'active_admin:install'
24
+ end
25
+ if prefer :admin, 'rails_admin'
26
+ say_wizard "recipe installing rails_admin"
27
+ generate 'rails_admin:install'
28
+ end
29
+ end
30
+
31
+ __END__
32
+
33
+ name: admin
34
+ description: "Adding rails admin gem to your application"
35
+ author: JangoSteve
36
+
37
+ category: admin
38
+ requires: [setup]
39
+ run_after: [setup]
40
+ args: -T
41
+
42
+ config:
43
+ - admin:
44
+ type: multiple_choice
45
+ prompt: Install admin gem?
46
+ choices: [ ["None", "none"], ["ActiveAdmin", "activeadmin"], ["RailsAdmin", "rails_admin"] ]
data/recipes/extras.rb CHANGED
@@ -77,11 +77,19 @@ end
77
77
 
78
78
  ## LOCAL_ENV.YML FILE
79
79
  if config['local_env_file']
80
- prefs[:local_env_file] = true
80
+ case config['local_env_file']
81
+ when 'figaro'
82
+ prefs[:local_env_file] = 'figaro'
83
+ when 'foreman'
84
+ prefs[:local_env_file] = 'foreman'
85
+ end
81
86
  end
82
- if prefs[:local_env_file]
83
- say_wizard "recipe creating application.yml file for environment variables"
87
+ if prefer :local_env_file, 'figaro'
88
+ say_wizard "recipe creating application.yml file for environment variables with figaro"
84
89
  add_gem 'figaro'
90
+ elsif prefer :local_env_file, 'foreman'
91
+ say_wizard "recipe creating .env file for development environment variables with foreman"
92
+ add_gem 'foreman', :group => :development
85
93
  end
86
94
 
87
95
  ## BETTER ERRORS
@@ -182,8 +190,9 @@ config:
182
190
  type: boolean
183
191
  prompt: Create a GitHub repository?
184
192
  - local_env_file:
185
- type: boolean
186
- prompt: Use application.yml file for environment variables?
193
+ type: multiple_choice
194
+ prompt: Use file for environment variables?
195
+ choices: [ [None, none], [Use application.yml with Figaro, figaro], [Use .env with Foreman, foreman] ]
187
196
  - quiet_assets:
188
197
  type: boolean
189
198
  prompt: Reduce assets logger noise during development?
data/recipes/gems.rb CHANGED
@@ -180,6 +180,7 @@ after_bundler do
180
180
  if prefer :database, 'postgresql'
181
181
  begin
182
182
  pg_username = prefs[:pg_username] || ask_wizard("Username for PostgreSQL?(leave blank to use the app name)")
183
+ pg_host = prefs[:pg_username] || ask_wizard("Host for PostgreSQL in database.yml? (leave blank to use default socket connection)")
183
184
  if pg_username.blank?
184
185
  say_wizard "Creating a user named '#{app_name}' for PostgreSQL"
185
186
  run "createuser --createdb #{app_name}" if prefer :database, 'postgresql'
@@ -190,6 +191,10 @@ after_bundler do
190
191
  gsub_file "config/database.yml", /password:/, "password: #{pg_password}"
191
192
  say_wizard "set config/database.yml for username/password #{pg_username}/#{pg_password}"
192
193
  end
194
+ if pg_host.present?
195
+ gsub_file "config/database.yml", /#host: localhost/, "host: #{pg_host}"
196
+ gsub_file "config/database.yml", /test:/, "test:\n host: #{pg_host}"
197
+ end
193
198
  rescue StandardError => e
194
199
  raise "unable to create a user for PostgreSQL, reason: #{e}"
195
200
  end
@@ -247,7 +252,7 @@ after_bundler do
247
252
  end
248
253
  end
249
254
  ## Figaro Gem
250
- if prefs[:local_env_file]
255
+ if prefer :local_env_file, 'figaro'
251
256
  generate 'figaro:install'
252
257
  gsub_file 'config/application.yml', /# PUSHER_.*\n/, ''
253
258
  gsub_file 'config/application.yml', /# STRIPE_.*\n/, ''
@@ -260,6 +265,19 @@ after_bundler do
260
265
  # GMAIL_USERNAME: Your_Gmail_Username
261
266
  # makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
262
267
 
268
+ FILE
269
+ end
270
+ end
271
+ ## Foreman Gem
272
+ if prefer :local_env_file, 'foreman'
273
+ create_file '.env' do <<-FILE
274
+ # Add account credentials and API keys here.
275
+ # This file should be listed in .gitignore to keep your settings secret!
276
+ # Each entry sets a local environment variable and overrides ENV variables in the Unix shell.
277
+ # For example, setting:
278
+ # GMAIL_USERNAME=Your_Gmail_Username
279
+ # makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
280
+
263
281
  FILE
264
282
  end
265
283
  end
data/recipes/init.rb CHANGED
@@ -17,8 +17,9 @@ after_everything do
17
17
  when 'mandrill'
18
18
  credentials = "MANDRILL_USERNAME: Your_Username\nMANDRILL_APIKEY: Your_API_Key\n"
19
19
  end
20
- append_file 'config/application.yml', credentials if prefs[:local_env_file]
21
- if prefs[:local_env_file]
20
+ append_file 'config/application.yml', credentials if prefer :local_env_file, 'figaro'
21
+ append_file '.env', credentials.gsub(': ', '=') if prefer :local_env_file, 'foreman'
22
+ if prefer :local_env_file, 'figaro'
22
23
  ## DEFAULT USER
23
24
  unless prefer :starter_app, false
24
25
  append_file 'config/application.yml' do <<-FILE
@@ -40,18 +41,47 @@ FILE
40
41
  if (prefer :authorization, 'cancan')
41
42
  append_file 'config/application.yml', "ROLES: [admin, user, VIP]\n"
42
43
  end
44
+ elsif prefer :local_env_file, 'foreman'
45
+ ## DEFAULT USER
46
+ unless prefer :starter_app, false
47
+ append_file '.env' do <<-FILE
48
+ ADMIN_NAME=First User
49
+ ADMIN_EMAIL=user@example.com
50
+ ADMIN_PASSWORD=changeme
51
+ FILE
52
+ end
53
+ end
54
+ ## AUTHENTICATION
55
+ if prefer :authentication, 'omniauth'
56
+ append_file '.env' do <<-FILE
57
+ OMNIAUTH_PROVIDER_KEY=Your_OmniAuth_Provider_Key
58
+ OMNIAUTH_PROVIDER_SECRET=Your_OmniAuth_Provider_Secret
59
+ FILE
60
+ end
61
+ end
62
+ ## AUTHORIZATION
63
+ if (prefer :authorization, 'cancan')
64
+ append_file '.env', "ROLES=[admin, user, VIP]\n"
65
+ end
43
66
  end
44
67
  ### SUBDOMAINS ###
45
68
  copy_from_repo 'config/application.yml', :repo => 'https://raw.github.com/RailsApps/rails3-subdomains/master/' if prefer :starter_app, 'subdomains_app'
46
69
  ### APPLICATION.EXAMPLE.YML ###
47
- if prefs[:local_env_file]
70
+ if prefer :local_env_file, 'figaro'
48
71
  copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
72
+ elsif prefer :local_env_file, 'foreman'
73
+ copy_file destination_root + '/.env', destination_root + '/.env.example'
49
74
  end
50
75
  ### DATABASE SEED ###
51
- if prefs[:local_env_file]
76
+ if prefer :local_env_file, 'figaro'
52
77
  append_file 'db/seeds.rb' do <<-FILE
53
78
  # Environment variables (ENV['...']) can be set in the file config/application.yml.
54
79
  # See http://railsapps.github.io/rails-environment-variables.html
80
+ FILE
81
+ end
82
+ elsif prefer :local_env_file, 'foreman'
83
+ append_file 'db/seeds.rb' do <<-FILE
84
+ # Environment variables (ENV['...']) can be set in the file .env file.
55
85
  FILE
56
86
  end
57
87
  end
data/recipes/railsapps.rb CHANGED
@@ -57,7 +57,7 @@ case prefs[:apps4]
57
57
  prefs[:starter_app] = false
58
58
  prefs[:form_builder] = false
59
59
  prefs[:quiet_assets] = false
60
- prefs[:local_env_file] = false
60
+ prefs[:local_env_file] = 'none'
61
61
  prefs[:better_errors] = false
62
62
  prefs[:ban_spiders] = false
63
63
  prefs[:continuous_testing] = false
@@ -74,7 +74,7 @@ case prefs[:apps4]
74
74
  prefs[:starter_app] = false
75
75
  prefs[:form_builder] = 'simple_form'
76
76
  prefs[:quiet_assets] = true
77
- prefs[:local_env_file] = true
77
+ prefs[:local_env_file] = 'figaro'
78
78
  prefs[:better_errors] = true
79
79
  when 'rails-bootstrap'
80
80
  prefs[:git] = true
@@ -90,7 +90,7 @@ case prefs[:apps4]
90
90
  prefs[:starter_app] = false
91
91
  prefs[:form_builder] = 'simple_form'
92
92
  prefs[:quiet_assets] = true
93
- prefs[:local_env_file] = true
93
+ prefs[:local_env_file] = 'figaro'
94
94
  prefs[:better_errors] = true
95
95
  when 'rails-foundation'
96
96
  prefs[:git] = true
@@ -106,7 +106,7 @@ case prefs[:apps4]
106
106
  prefs[:starter_app] = false
107
107
  prefs[:form_builder] = 'simple_form'
108
108
  prefs[:quiet_assets] = true
109
- prefs[:local_env_file] = true
109
+ prefs[:local_env_file] = 'figaro'
110
110
  prefs[:better_errors] = true
111
111
  when 'rails-devise'
112
112
  prefs[:git] = true
@@ -117,7 +117,7 @@ case prefs[:apps4]
117
117
  prefs[:authorization] = false
118
118
  prefs[:starter_app] = false
119
119
  prefs[:quiet_assets] = true
120
- prefs[:local_env_file] = true
120
+ prefs[:local_env_file] = 'figaro'
121
121
  prefs[:better_errors] = true
122
122
  end
123
123
 
@@ -143,7 +143,7 @@ case prefs[:railsapps]
143
143
  prefs[:starter_app] = 'admin_app'
144
144
  prefs[:form_builder] = 'simple_form'
145
145
  prefs[:quiet_assets] = true
146
- prefs[:local_env_file] = true
146
+ prefs[:local_env_file] = 'figaro'
147
147
  prefs[:better_errors] = true
148
148
  when 'rails-recurly-subscription-saas'
149
149
  prefs[:git] = true
@@ -159,7 +159,7 @@ case prefs[:railsapps]
159
159
  prefs[:starter_app] = 'admin_app'
160
160
  prefs[:form_builder] = 'simple_form'
161
161
  prefs[:quiet_assets] = true
162
- prefs[:local_env_file] = true
162
+ prefs[:local_env_file] = 'figaro'
163
163
  prefs[:better_errors] = true
164
164
  when 'rails-prelaunch-signup'
165
165
  prefs[:git] = true
@@ -175,7 +175,7 @@ case prefs[:railsapps]
175
175
  prefs[:starter_app] = 'admin_app'
176
176
  prefs[:form_builder] = 'simple_form'
177
177
  prefs[:quiet_assets] = true
178
- prefs[:local_env_file] = true
178
+ prefs[:local_env_file] = 'figaro'
179
179
  prefs[:better_errors] = true
180
180
  if prefer :git, true
181
181
  prefs[:prelaunch_branch] = multiple_choice "Git branch for the prelaunch app?",
@@ -207,7 +207,7 @@ case prefs[:railsapps]
207
207
  prefs[:starter_app] = 'admin_app'
208
208
  prefs[:form_builder] = 'simple_form'
209
209
  prefs[:quiet_assets] = true
210
- prefs[:local_env_file] = true
210
+ prefs[:local_env_file] = 'figaro'
211
211
  prefs[:better_errors] = true
212
212
  when 'rails3-devise-rspec-cucumber'
213
213
  prefs[:git] = true
@@ -223,7 +223,7 @@ case prefs[:railsapps]
223
223
  prefs[:starter_app] = 'users_app'
224
224
  prefs[:form_builder] = 'none'
225
225
  prefs[:quiet_assets] = true
226
- prefs[:local_env_file] = true
226
+ prefs[:local_env_file] = 'figaro'
227
227
  prefs[:better_errors] = true
228
228
  when 'rails3-devise-rspec-cucumber-fabrication'
229
229
  prefs[:git] = true
@@ -239,7 +239,7 @@ case prefs[:railsapps]
239
239
  prefs[:starter_app] = 'users_app'
240
240
  prefs[:form_builder] = 'none'
241
241
  prefs[:quiet_assets] = true
242
- prefs[:local_env_file] = true
242
+ prefs[:local_env_file] = 'figaro'
243
243
  prefs[:better_errors] = true
244
244
  when 'rails3-mongoid-devise'
245
245
  prefs[:git] = true
@@ -256,7 +256,7 @@ case prefs[:railsapps]
256
256
  prefs[:starter_app] = 'users_app'
257
257
  prefs[:form_builder] = 'none'
258
258
  prefs[:quiet_assets] = true
259
- prefs[:local_env_file] = true
259
+ prefs[:local_env_file] = 'figaro'
260
260
  prefs[:better_errors] = true
261
261
  when 'rails3-mongoid-omniauth'
262
262
  prefs[:git] = true
@@ -273,7 +273,7 @@ case prefs[:railsapps]
273
273
  prefs[:starter_app] = 'users_app'
274
274
  prefs[:form_builder] = 'none'
275
275
  prefs[:quiet_assets] = true
276
- prefs[:local_env_file] = true
276
+ prefs[:local_env_file] = 'figaro'
277
277
  prefs[:better_errors] = true
278
278
  when 'rails3-subdomains'
279
279
  prefs[:git] = true
@@ -290,7 +290,7 @@ case prefs[:railsapps]
290
290
  prefs[:starter_app] = 'subdomains_app'
291
291
  prefs[:form_builder] = 'none'
292
292
  prefs[:quiet_assets] = true
293
- prefs[:local_env_file] = true
293
+ prefs[:local_env_file] = 'figaro'
294
294
  prefs[:better_errors] = true
295
295
  end
296
296
 
data/recipes/readme.rb CHANGED
@@ -70,6 +70,10 @@ after_everything do
70
70
  gsub_file "README.textile", /Authentication: None/, "Authentication: OmniAuth" if prefer :authentication, 'omniauth'
71
71
  gsub_file "README.textile", /Authorization: None/, "Authorization: CanCan" if prefer :authorization, 'cancan'
72
72
 
73
+ # Admin
74
+ append_file "README.textile", "\nh2. Admin\n\n Admin: ActiveAdmin" if prefer :admin, 'activeadmin'
75
+ append_file "README.textile", "\nh2. Admin\n\n Admin: RailsAdmin" if prefer :admin, 'rails_admin'
76
+
73
77
  git :add => '-A' if prefer :git, true
74
78
  git :commit => '-qm "rails_apps_composer: add README files"' if prefer :git, true
75
79
 
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.21"
2
+ VERSION = "2.4.22"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.21
4
+ version: 2.4.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-12 00:00:00.000000000 Z
11
+ date: 2014-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -118,6 +118,7 @@ files:
118
118
  - lib/rails_wizard/recipe.rb
119
119
  - lib/rails_wizard/recipes.rb
120
120
  - lib/rails_wizard/template.rb
121
+ - recipes/admin.rb
121
122
  - recipes/apps4.rb
122
123
  - recipes/controllers.rb
123
124
  - recipes/core.rb