rails_apps_composer 2.6.13 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rails_wizard/diagnostics.rb +12 -25
- data/recipes/admin.rb +3 -6
- data/recipes/core.rb +4 -5
- data/recipes/deployment.rb +2 -1
- data/recipes/devise.rb +32 -0
- data/recipes/email.rb +22 -108
- data/recipes/email_dev.rb +4 -7
- data/recipes/example.rb +5 -5
- data/recipes/extras.rb +9 -16
- data/recipes/frontend.rb +4 -4
- data/recipes/gems.rb +29 -100
- data/recipes/git.rb +2 -1
- data/recipes/init.rb +29 -100
- data/recipes/learn_rails.rb +3 -3
- data/recipes/omniauth.rb +32 -0
- data/recipes/pages.rb +33 -0
- data/recipes/rails_bootstrap.rb +1 -7
- data/recipes/rails_devise.rb +1 -4
- data/recipes/rails_devise_pundit.rb +1 -4
- data/recipes/rails_foundation.rb +1 -7
- data/recipes/rails_omniauth.rb +1 -19
- data/recipes/rails_signup_download.rb +3 -4
- data/recipes/railsapps.rb +15 -213
- data/recipes/readme.rb +5 -8
- data/recipes/roles.rb +36 -0
- data/recipes/setup.rb +20 -73
- data/recipes/{tests4.rb → tests.rb} +6 -6
- data/templates/helpers.erb +3 -11
- data/templates/layout.erb +6 -6
- data/version.rb +1 -1
- metadata +7 -10
- data/recipes/controllers.rb +0 -86
- data/recipes/models.rb +0 -112
- data/recipes/prelaunch.rb +0 -118
- data/recipes/routes.rb +0 -53
- data/recipes/saas.rb +0 -216
- data/recipes/testing.rb +0 -276
- data/recipes/views.rb +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cb9fc80e191886f0e81c1c2ee7d1ae1d896f91d
|
4
|
+
data.tar.gz: 137f77051b115e79f509246acc7c589aececa1b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98ffa12022ad53b069d7b55710f0d4f0f9581658ae2063f3d21bd48754e3b5e7cc3adbdeaa546c81a4fd33b6f22e08c06e08d7158779defda050c64a7bdea9e6
|
7
|
+
data.tar.gz: 7ce31d134260dd6cacf4e018f75da47f5d34bef4fc15f33821055fd1292e1650172adefc3481512ab7ed513ca8ef229c1f943788f1f57622ae2f3426f0111757
|
@@ -15,17 +15,18 @@ module RailsWizard
|
|
15
15
|
@@recipes << %w(gems git setup)
|
16
16
|
@@recipes << %w(gems git readme setup)
|
17
17
|
@@recipes << %w(extras gems git readme setup)
|
18
|
-
@@recipes << %w(
|
19
|
-
@@recipes << %w(
|
20
|
-
@@recipes << %w(
|
21
|
-
@@recipes << %w(
|
22
|
-
@@recipes << %w(
|
23
|
-
@@recipes << %w(
|
24
|
-
@@recipes << %w(
|
25
|
-
@@recipes << %w(apps4
|
26
|
-
@@recipes << %w(apps4
|
27
|
-
@@recipes << %w(apps4
|
28
|
-
@@recipes << %w(apps4
|
18
|
+
@@recipes << %w(email extras frontend gems git init railsapps readme setup testing)
|
19
|
+
@@recipes << %w(core email extras frontend gems git init railsapps readme setup testing)
|
20
|
+
@@recipes << %w(core email extras frontend gems git init railsapps readme setup testing)
|
21
|
+
@@recipes << %w(core email extras frontend gems git init railsapps readme setup testing)
|
22
|
+
@@recipes << %w(email example extras frontend gems git init railsapps readme setup testing)
|
23
|
+
@@recipes << %w(email example extras frontend gems git init railsapps readme setup testing)
|
24
|
+
@@recipes << %w(email example extras frontend gems git init railsapps readme setup testing)
|
25
|
+
@@recipes << %w(apps4 core email extras frontend gems git init railsapps readme setup testing)
|
26
|
+
@@recipes << %w(apps4 core email extras frontend gems git init railsapps readme setup tests)
|
27
|
+
@@recipes << %w(apps4 core deployment email extras frontend gems git init railsapps readme setup testing)
|
28
|
+
@@recipes << %w(apps4 core deployment email extras frontend gems git init railsapps readme setup tests)
|
29
|
+
@@recipes << %w(apps4 core deployment devise email extras frontend gems git init omniauth pundit railsapps readme setup tests)
|
29
30
|
|
30
31
|
### collections of preferences that are known to work together
|
31
32
|
|
@@ -45,20 +46,6 @@ module RailsWizard
|
|
45
46
|
# :templates
|
46
47
|
|
47
48
|
@@prefs = []
|
48
|
-
@@prefs << {:railsapps=>"rails-recurly-subscription-saas", :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"}
|
49
|
-
@@prefs << {:railsapps=>"rails-stripe-membership-saas", :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=>"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"}
|
51
|
-
@@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"}
|
52
|
-
@@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"}
|
53
|
-
@@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"}
|
54
|
-
@@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"}
|
55
|
-
@@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'}
|
56
|
-
@@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'}
|
57
|
-
@@prefs << {:railsapps=>"rails3-subdomains", :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=>'subdomains_app', :form_builder=>'none'}
|
58
|
-
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"rspec-capybara", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"none", :authentication=>"omniauth", :omniauth_provider=>"twitter", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
|
59
|
-
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"none", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"invitable", :authorization=>"cancan", :form_builder=>"simple_form", :starter_app=>"admin_app"}
|
60
|
-
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"bootstrap", :bootstrap=>"sass", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
|
61
|
-
@@prefs << {:railsapps=>"none", :database=>"sqlite", :unit_test=>"test_unit", :integration=>"none", :fixtures=>"none", :frontend=>"bootstrap", :bootstrap=>"less", :email=>"sendgrid", :authentication=>"devise", :devise_modules=>"confirmable", :authorization=>"cancan", :form_builder=>"none", :starter_app=>"admin_app"}
|
62
49
|
|
63
50
|
def self.recipes
|
64
51
|
@@recipes
|
data/recipes/admin.rb
CHANGED
@@ -9,15 +9,12 @@ case config['admin']
|
|
9
9
|
end
|
10
10
|
|
11
11
|
if prefer :admin, 'activeadmin'
|
12
|
-
|
13
|
-
add_gem 'activeadmin', github: 'gregbell/active_admin'
|
14
|
-
else
|
15
|
-
add_gem 'activeadmin'
|
16
|
-
end
|
12
|
+
add_gem 'activeadmin'
|
17
13
|
end
|
18
14
|
add_gem 'rails_admin' if prefer :admin, 'rails_admin'
|
19
15
|
|
20
|
-
|
16
|
+
stage_two do
|
17
|
+
say_wizard "recipe stage two"
|
21
18
|
if prefer :admin, 'activeadmin'
|
22
19
|
say_wizard "recipe installing activeadmin"
|
23
20
|
generate 'active_admin:install'
|
data/recipes/core.rb
CHANGED
@@ -19,10 +19,9 @@ requires: [git, railsapps,
|
|
19
19
|
rails_devise_pundit,
|
20
20
|
rails_signup_download,
|
21
21
|
setup, readme, gems,
|
22
|
-
|
22
|
+
tests,
|
23
23
|
email,
|
24
|
-
|
25
|
-
frontend,
|
26
|
-
init,
|
27
|
-
extras, deployment]
|
24
|
+
devise, omniauth, roles,
|
25
|
+
frontend, pages,
|
26
|
+
init, extras, deployment]
|
28
27
|
category: collections
|
data/recipes/deployment.rb
CHANGED
@@ -13,7 +13,8 @@ if prefer :deployment, 'capistrano3'
|
|
13
13
|
add_gem 'capistrano-bundler', group: :development
|
14
14
|
add_gem 'capistrano-rails', '~> 1.1.0', group: :development
|
15
15
|
add_gem 'capistrano-rails-console', group: :development
|
16
|
-
|
16
|
+
stage_two do
|
17
|
+
say_wizard "recipe stage two"
|
17
18
|
say_wizard 'recipe capistrano file'
|
18
19
|
run 'bundle exec cap install'
|
19
20
|
end
|
data/recipes/devise.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Application template recipe for the rails_apps_composer. Change the recipe here:
|
2
|
+
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/devise.rb
|
3
|
+
|
4
|
+
stage_two do
|
5
|
+
say_wizard "recipe stage two"
|
6
|
+
if prefer :authentication, 'devise'
|
7
|
+
# prevent logging of password_confirmation
|
8
|
+
gsub_file 'config/initializers/filter_parameter_logging.rb', /:password/, ':password, :password_confirmation'
|
9
|
+
generate 'devise:install'
|
10
|
+
generate 'devise_invitable:install' if prefer :devise_modules, 'invitable'
|
11
|
+
generate 'devise user' # create the User model
|
12
|
+
generate 'migration AddNameToUsers name:string'
|
13
|
+
if (prefer :devise_modules, 'confirmable') || (prefer :devise_modules, 'invitable')
|
14
|
+
gsub_file 'app/models/user.rb', /:registerable,/, ":registerable, :confirmable,"
|
15
|
+
generate 'migration AddConfirmableToUsers confirmation_token:string confirmed_at:datetime confirmation_sent_at:datetime unconfirmed_email:string'
|
16
|
+
end
|
17
|
+
run 'bundle exec rake db:migrate'
|
18
|
+
end
|
19
|
+
### GIT ###
|
20
|
+
git :add => '-A' if prefer :git, true
|
21
|
+
git :commit => '-qm "rails_apps_composer: devise"' if prefer :git, true
|
22
|
+
end
|
23
|
+
|
24
|
+
__END__
|
25
|
+
|
26
|
+
name: devise
|
27
|
+
description: "Add Devise for authentication"
|
28
|
+
author: RailsApps
|
29
|
+
|
30
|
+
requires: [setup, gems]
|
31
|
+
run_after: [setup, gems]
|
32
|
+
category: mvc
|
data/recipes/email.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# Application template recipe for the rails_apps_composer. Change the recipe here:
|
2
2
|
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/email.rb
|
3
3
|
|
4
|
-
|
5
|
-
say_wizard "recipe
|
4
|
+
stage_two do
|
5
|
+
say_wizard "recipe stage two"
|
6
6
|
unless prefer :email, 'none'
|
7
|
-
|
8
|
-
|
7
|
+
## ACTIONMAILER CONFIG
|
8
|
+
dev_email_text = <<-TEXT
|
9
9
|
# ActionMailer Config
|
10
10
|
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
11
11
|
config.action_mailer.delivery_method = :smtp
|
@@ -13,55 +13,18 @@ after_bundler do
|
|
13
13
|
# Send email in development mode?
|
14
14
|
config.action_mailer.perform_deliveries = true
|
15
15
|
TEXT
|
16
|
-
|
16
|
+
prod_email_text = <<-TEXT
|
17
17
|
# ActionMailer Config
|
18
18
|
config.action_mailer.default_url_options = { :host => 'example.com' }
|
19
19
|
config.action_mailer.delivery_method = :smtp
|
20
20
|
config.action_mailer.perform_deliveries = true
|
21
21
|
config.action_mailer.raise_delivery_errors = false
|
22
22
|
TEXT
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
### DEVELOPMENT
|
29
|
-
gsub_file 'config/environments/development.rb', /# Don't care if the mailer can't send/, '# ActionMailer Config'
|
30
|
-
gsub_file 'config/environments/development.rb', /config.action_mailer.raise_delivery_errors = false/ do
|
31
|
-
<<-RUBY
|
32
|
-
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
33
|
-
config.action_mailer.delivery_method = :smtp
|
34
|
-
# change to true to allow email to be sent during development
|
35
|
-
config.action_mailer.perform_deliveries = false
|
36
|
-
config.action_mailer.raise_delivery_errors = true
|
37
|
-
config.action_mailer.default :charset => "utf-8"
|
38
|
-
RUBY
|
39
|
-
end
|
40
|
-
### TEST
|
41
|
-
inject_into_file 'config/environments/test.rb', :before => "\nend" do
|
42
|
-
<<-RUBY
|
43
|
-
\n
|
44
|
-
# ActionMailer Config
|
45
|
-
config.action_mailer.default_url_options = { :host => 'example.com' }
|
46
|
-
RUBY
|
47
|
-
end
|
48
|
-
### PRODUCTION
|
49
|
-
gsub_file 'config/environments/production.rb', /config.active_support.deprecation = :notify/ do
|
50
|
-
<<-RUBY
|
51
|
-
config.active_support.deprecation = :notify
|
52
|
-
|
53
|
-
config.action_mailer.default_url_options = { :host => 'example.com' }
|
54
|
-
# ActionMailer Config
|
55
|
-
# Setup for production - deliveries, no errors raised
|
56
|
-
config.action_mailer.delivery_method = :smtp
|
57
|
-
config.action_mailer.perform_deliveries = true
|
58
|
-
config.action_mailer.raise_delivery_errors = false
|
59
|
-
config.action_mailer.default :charset => "utf-8"
|
60
|
-
RUBY
|
61
|
-
end
|
62
|
-
end
|
63
|
-
if rails_4_1?
|
64
|
-
email_configuration_text = <<-TEXT
|
23
|
+
inject_into_file 'config/environments/development.rb', dev_email_text, :after => "config.assets.debug = true"
|
24
|
+
inject_into_file 'config/environments/production.rb', prod_email_text, :after => "config.active_support.deprecation = :notify"
|
25
|
+
gsub_file 'config/environments/production.rb', /'example.com'/, 'Rails.application.secrets.domain_name'
|
26
|
+
## SMTP_SETTINGS
|
27
|
+
email_configuration_text = <<-TEXT
|
65
28
|
\n
|
66
29
|
config.action_mailer.smtp_settings = {
|
67
30
|
address: "smtp.gmail.com",
|
@@ -73,72 +36,23 @@ RUBY
|
|
73
36
|
password: Rails.application.secrets.email_provider_password
|
74
37
|
}
|
75
38
|
TEXT
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
end
|
88
|
-
else
|
89
|
-
### GMAIL ACCOUNT
|
90
|
-
if prefer :email, 'gmail'
|
91
|
-
gmail_configuration_text = <<-TEXT
|
92
|
-
\n
|
93
|
-
config.action_mailer.smtp_settings = {
|
94
|
-
address: "smtp.gmail.com",
|
95
|
-
port: 587,
|
96
|
-
domain: ENV["DOMAIN_NAME"],
|
97
|
-
authentication: "plain",
|
98
|
-
enable_starttls_auto: true,
|
99
|
-
user_name: ENV["GMAIL_USERNAME"],
|
100
|
-
password: ENV["GMAIL_PASSWORD"]
|
101
|
-
}
|
102
|
-
TEXT
|
103
|
-
inject_into_file 'config/environments/development.rb', gmail_configuration_text, :after => "config.assets.debug = true"
|
104
|
-
inject_into_file 'config/environments/production.rb', gmail_configuration_text, :after => "config.active_support.deprecation = :notify"
|
105
|
-
end
|
106
|
-
### SENDGRID ACCOUNT
|
107
|
-
if prefer :email, 'sendgrid'
|
108
|
-
sendgrid_configuration_text = <<-TEXT
|
109
|
-
\n
|
110
|
-
config.action_mailer.smtp_settings = {
|
111
|
-
address: "smtp.sendgrid.net",
|
112
|
-
port: 587,
|
113
|
-
domain: ENV["DOMAIN_NAME"],
|
114
|
-
authentication: "plain",
|
115
|
-
user_name: ENV["SENDGRID_USERNAME"],
|
116
|
-
password: ENV["SENDGRID_PASSWORD"]
|
117
|
-
}
|
118
|
-
TEXT
|
119
|
-
inject_into_file 'config/environments/development.rb', sendgrid_configuration_text, :after => "config.assets.debug = true"
|
120
|
-
inject_into_file 'config/environments/production.rb', sendgrid_configuration_text, :after => "config.active_support.deprecation = :notify"
|
121
|
-
end
|
122
|
-
### MANDRILL ACCOUNT
|
123
|
-
if prefer :email, 'mandrill'
|
124
|
-
mandrill_configuration_text = <<-TEXT
|
125
|
-
\n
|
126
|
-
config.action_mailer.smtp_settings = {
|
127
|
-
:address => "smtp.mandrillapp.com",
|
128
|
-
:port => 587,
|
129
|
-
:user_name => ENV["MANDRILL_USERNAME"],
|
130
|
-
:password => ENV["MANDRILL_APIKEY"]
|
131
|
-
}
|
132
|
-
TEXT
|
133
|
-
inject_into_file 'config/environments/development.rb', mandrill_configuration_text, :after => "config.assets.debug = true"
|
134
|
-
inject_into_file 'config/environments/production.rb', mandrill_configuration_text, :after => "config.active_support.deprecation = :notify"
|
135
|
-
end
|
39
|
+
inject_into_file 'config/environments/development.rb', email_configuration_text, :after => "config.assets.debug = true"
|
40
|
+
inject_into_file 'config/environments/production.rb', email_configuration_text, :after => "config.active_support.deprecation = :notify"
|
41
|
+
case :email
|
42
|
+
when 'sendgrid'
|
43
|
+
gsub_file 'config/environments/development.rb', /smtp.gmail.com/, 'smtp.sendgrid.net'
|
44
|
+
gsub_file 'config/environments/production.rb', /smtp.gmail.com/, 'smtp.sendgrid.net'
|
45
|
+
when 'mandrill'
|
46
|
+
gsub_file 'config/environments/development.rb', /smtp.gmail.com/, 'smtp.mandrillapp.com'
|
47
|
+
gsub_file 'config/environments/production.rb', /smtp.gmail.com/, 'smtp.mandrillapp.com'
|
48
|
+
gsub_file 'config/environments/development.rb', /email_provider_password/, 'email_provider_apikey'
|
49
|
+
gsub_file 'config/environments/production.rb', /email_provider_password/, 'email_provider_apikey'
|
136
50
|
end
|
137
51
|
end
|
138
52
|
### GIT
|
139
53
|
git :add => '-A' if prefer :git, true
|
140
54
|
git :commit => '-qm "rails_apps_composer: set email accounts"' if prefer :git, true
|
141
|
-
end
|
55
|
+
end
|
142
56
|
|
143
57
|
__END__
|
144
58
|
|
data/recipes/email_dev.rb
CHANGED
@@ -5,15 +5,12 @@ prefs[:mailcatcher] = true if config['mailcatcher']
|
|
5
5
|
prefs[:mail_view] = true if config['mail_view']
|
6
6
|
|
7
7
|
if prefs[:mailcatcher]
|
8
|
-
|
9
|
-
add_gem 'mailcatcher', github: 'sj26/mailcatcher', group: :development
|
10
|
-
else
|
11
|
-
add_gem 'mailcatcher', group: :development
|
12
|
-
end
|
8
|
+
add_gem 'mailcatcher', group: :development
|
13
9
|
end
|
14
10
|
add_gem 'mail_view', group: :development if prefs[:mail_view]
|
15
11
|
|
16
|
-
|
12
|
+
stage_two do
|
13
|
+
say_wizard "recipe stage two"
|
17
14
|
if prefs[:mailcatcher]
|
18
15
|
say_wizard "recipe installing mailcatcher"
|
19
16
|
create_file 'config/initializers/mailcatcher.rb' do <<-RUBY
|
@@ -49,7 +46,7 @@ class MailPreview < MailView
|
|
49
46
|
#def invitation
|
50
47
|
# account = Account.first
|
51
48
|
# inviter, invitee = account.users[0, 2]
|
52
|
-
# Notifier.invitation(inviter, invitee)
|
49
|
+
# Notifier.invitation(inviter, invitee)
|
53
50
|
#end
|
54
51
|
|
55
52
|
# Factory-like pattern
|
data/recipes/example.rb
CHANGED
@@ -26,18 +26,18 @@ if config['space_test']
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
|
29
|
+
stage_two do
|
30
30
|
# Code here is run after Bundler installs all the gems for the project.
|
31
31
|
# Use this section to run generators and rake tasks.
|
32
32
|
# Download any files from a repository for models, controllers, views, and routes.
|
33
|
-
say_wizard "recipe
|
33
|
+
say_wizard "recipe stage two"
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
# This block is run after the '
|
36
|
+
stage_three do
|
37
|
+
# This block is run after the 'stage_two' block.
|
38
38
|
# Use this section to finalize the application.
|
39
39
|
# Run database migrations or make a final git commit.
|
40
|
-
say_wizard "recipe
|
40
|
+
say_wizard "recipe stage three"
|
41
41
|
end
|
42
42
|
|
43
43
|
# A recipe has two parts: the Ruby code and YAML matter that comes after a blank line with the __END__ keyword.
|
data/recipes/extras.rb
CHANGED
@@ -86,11 +86,7 @@ if config['local_env_file']
|
|
86
86
|
end
|
87
87
|
if prefer :local_env_file, 'figaro'
|
88
88
|
say_wizard "recipe creating application.yml file for environment variables with figaro"
|
89
|
-
|
90
|
-
add_gem 'figaro', :github => 'laserlemon/figaro'
|
91
|
-
else
|
92
|
-
add_gem 'figaro'
|
93
|
-
end
|
89
|
+
add_gem 'figaro', '>= 1.0.0.rc1'
|
94
90
|
elsif prefer :local_env_file, 'foreman'
|
95
91
|
say_wizard "recipe creating .env file for development environment variables with foreman"
|
96
92
|
add_gem 'foreman', :group => :development
|
@@ -131,7 +127,8 @@ if config['ban_spiders']
|
|
131
127
|
end
|
132
128
|
if prefs[:ban_spiders]
|
133
129
|
say_wizard "recipe banning spiders by modifying 'public/robots.txt'"
|
134
|
-
|
130
|
+
stage_two do
|
131
|
+
say_wizard "recipe stage two"
|
135
132
|
gsub_file 'public/robots.txt', /# User-Agent/, 'User-Agent'
|
136
133
|
gsub_file 'public/robots.txt', /# Disallow/, 'Disallow'
|
137
134
|
end
|
@@ -147,8 +144,8 @@ case RbConfig::CONFIG['host_os']
|
|
147
144
|
end
|
148
145
|
end
|
149
146
|
|
150
|
-
|
151
|
-
|
147
|
+
stage_three do
|
148
|
+
say_wizard "recipe stage three"
|
152
149
|
say_wizard "recipe removing unnecessary files and whitespace"
|
153
150
|
%w{
|
154
151
|
public/index.html
|
@@ -180,7 +177,8 @@ if config['github']
|
|
180
177
|
end
|
181
178
|
if prefs[:github]
|
182
179
|
add_gem 'hub', :require => nil, :group => [:development]
|
183
|
-
|
180
|
+
stage_three do
|
181
|
+
say_wizard "recipe stage three"
|
184
182
|
say_wizard "recipe creating GitHub repository"
|
185
183
|
git_uri = `git config remote.origin.url`.strip
|
186
184
|
unless git_uri.size == 0
|
@@ -188,12 +186,7 @@ if prefs[:github]
|
|
188
186
|
say_wizard "#{git_uri}"
|
189
187
|
else
|
190
188
|
run "hub create #{app_name}"
|
191
|
-
|
192
|
-
run "hub push -u origin master"
|
193
|
-
else
|
194
|
-
run "hub push -u origin #{prefs[:prelaunch_branch]}"
|
195
|
-
run "hub push -u origin #{prefs[:main_branch]}" unless prefer :main_branch, 'none'
|
196
|
-
end
|
189
|
+
run "hub push -u origin master"
|
197
190
|
end
|
198
191
|
end
|
199
192
|
end
|
@@ -205,7 +198,7 @@ description: "Various extras."
|
|
205
198
|
author: RailsApps
|
206
199
|
|
207
200
|
requires: [gems]
|
208
|
-
run_after: [gems, init
|
201
|
+
run_after: [gems, init]
|
209
202
|
category: other
|
210
203
|
|
211
204
|
config:
|
data/recipes/frontend.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Application template recipe for the rails_apps_composer. Change the recipe here:
|
2
2
|
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/frontend.rb
|
3
3
|
|
4
|
-
|
5
|
-
say_wizard "recipe
|
4
|
+
stage_two do
|
5
|
+
say_wizard "recipe stage two"
|
6
6
|
# set up a front-end framework using the rails_layout gem
|
7
7
|
case prefs[:frontend]
|
8
8
|
when 'simple'
|
@@ -20,7 +20,7 @@ after_bundler do
|
|
20
20
|
### GIT ###
|
21
21
|
git :add => '-A' if prefer :git, true
|
22
22
|
git :commit => '-qm "rails_apps_composer: front-end framework"' if prefer :git, true
|
23
|
-
end
|
23
|
+
end
|
24
24
|
|
25
25
|
__END__
|
26
26
|
|
@@ -29,5 +29,5 @@ description: "Install a front-end framework for HTML5 and CSS."
|
|
29
29
|
author: RailsApps
|
30
30
|
|
31
31
|
requires: [setup, gems]
|
32
|
-
run_after: [setup, gems]
|
32
|
+
run_after: [setup, gems, devise, omniauth, roles]
|
33
33
|
category: frontend
|