@@ -2446,109 +2446,6 @@ def set_default_role
24462446 add_gem 'sqlite3' , group : [ :development , :test ]
24472447 add_gem 'pg' , group : :production
24482448 end
2449- stage_three do
2450- say_wizard "recipe stage three"
2451- case prefs [ :email ]
2452- when 'gmail'
2453- append_file 'app.json' do <<-TEXT
2454- "GMAIL_USERNAME": {
2455- "description": "Your Gmail address for sending mail.",
2456- 2457- "required": false
2458- },
2459- "GMAIL_PASSWORD": {
2460- "description": "Your Gmail password for sending mail.",
2461- "value": "changeme",
2462- "required": false
2463- },
2464- TEXT
2465- end
2466- when 'sendgrid'
2467- append_file 'app.json' do <<-TEXT
2468- "SENDGRID_USERNAME": {
2469- "description": "Your SendGrid address for sending mail.",
2470- 2471- "required": false
2472- },
2473- "SENDGRID_PASSWORD": {
2474- "description": "Your SendGrid password for sending mail.",
2475- "value": "changeme",
2476- "required": false
2477- },
2478- TEXT
2479- end
2480- when 'mandrill'
2481- append_file 'app.json' do <<-TEXT
2482- "MANDRILL_USERNAME": {
2483- "description": "Your Mandrill address for sending mail.",
2484- 2485- "required": false
2486- },
2487- "MANDRILL_APIKEY": {
2488- "description": "Your Mandrill API key for sending mail.",
2489- "value": "changeme",
2490- "required": false
2491- },
2492- TEXT
2493- end
2494- end
2495- if prefer :authentication , 'omniauth'
2496- append_file 'app.json' do <<-TEXT
2497- "OMNIAUTH_PROVIDER_KEY": {
2498- "description": "Credentials from Twitter, Facebook, or another provider.",
2499- "value": "some_long_key",
2500- "required": false
2501- },
2502- "OMNIAUTH_PROVIDER_SECRET": {
2503- "description": "Credentials from Twitter, Facebook, or another provider.",
2504- "value": "some_long_key",
2505- "required": false
2506- },
2507- TEXT
2508- end
2509- end
2510- if prefer :authentication , 'devise'
2511- append_file 'app.json' do <<-TEXT
2512- "ADMIN_EMAIL": {
2513- "description": "The administrator's email address for signing in.",
2514- 2515- "required": true
2516- },
2517- "ADMIN_PASSWORD": {
2518- "description": "The administrator's password for signing in.",
2519- "value": "changeme",
2520- "required": true
2521- },
2522- "DOMAIN_NAME": {
2523- "description": "Required for sending mail. Give an app name or use a custom domain.",
2524- "value": "myapp.herokuapp.com",
2525- "required": false
2526- },
2527- TEXT
2528- end
2529- end
2530- if ( !prefs [ :secrets ] . nil? )
2531- prefs [ :secrets ] . each do |secret |
2532- append_file 'app.json' do <<-TEXT
2533- "#{ secret . upcase } ": {
2534- "description": "no description",
2535- "required": false
2536- },
2537- TEXT
2538- end
2539- end
2540- end
2541- append_file 'app.json' do <<-TEXT
2542- "RAILS_ENV": "production"
2543- }
2544- }
2545- TEXT
2546- end
2547- if File . exists? ( 'db/migrate' )
2548- gsub_file 'app.json' , /"scripts": {/ ,
2549- "\" scripts\" : {\" postdeploy\" : \" bundle exec rake db:migrate; bundle exec rake db:seed\" "
2550- end
2551- end
25522449end
25532450
25542451if prefer :deployment , 'capistrano3'
0 commit comments