rails_apps_composer 2.5.1 → 2.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb7b070a8c93fc3dc7b3853ad4daabc4a1918f5e
4
- data.tar.gz: 8c0f8a43b0ec9825f90a70745e930173647619c5
3
+ metadata.gz: 0ea967b6c84219da0f3651f035b32872deca08d6
4
+ data.tar.gz: b469da4fc8f5da8335bee208ddc646ecc37c1ff9
5
5
  SHA512:
6
- metadata.gz: 3a60b89b7f043166097aa871f01e2882f46c18060f85586222e9e363caa230ab4b54e2b7e3808fae11a15d4cd7e88607e4b11b8eebb468189123bacd2a312c05
7
- data.tar.gz: 9f87d3a8c3dbe0952402d97d337a9d056bec4ecfad6ded0c470fe272fdd34b50d0cd80b757c596a99f289074c2dc9284ef9fab9f01fc60868995bc43848ec12a
6
+ metadata.gz: 5525cf0d454c887f085900085a7a6ac6e1cfb669e4b57c7f1ee87bc278785e0db6cb4eda2a0df453797b5ca3d2516dc4418ca3087355ec1af466183aa80cf085
7
+ data.tar.gz: 75c78f8ae2bcffdeab6fac289fc7b79bbb0ea6c4174ff50f85b0d4c7c581e1953080d305f8290200d9a8d90ccfa582eb9e0bf52549ad7a3113e9dc8146de0dec
data/recipes/core.rb CHANGED
@@ -10,5 +10,19 @@ name: core
10
10
  description: "Select all core recipes."
11
11
  author: RailsApps
12
12
 
13
- requires: [git, railsapps, setup, readme, gems, testing, tests4, email, models, controllers, views, routes, frontend, init, apps4, prelaunch, saas, extras, deployment]
13
+ requires: [git, railsapps,
14
+ learn_rails,
15
+ rails_bootstrap,
16
+ rails_foundation,
17
+ rails_omniauth,
18
+ rails_devise,
19
+ rails_devise_pundit,
20
+ rails_signup_download,
21
+ setup, readme, gems,
22
+ testing, tests4,
23
+ email,
24
+ models, controllers, views, routes,
25
+ frontend,
26
+ init, prelaunch, saas,
27
+ extras, deployment]
14
28
  category: collections
data/recipes/gems.rb CHANGED
@@ -51,6 +51,9 @@ add_gem 'pg' if prefer :database, 'postgresql'
51
51
  gsub_file 'Gemfile', /gem 'mysql2'.*/, ''
52
52
  add_gem 'mysql2' if prefer :database, 'mysql'
53
53
 
54
+ ## Gem to set up controllers, views, and routing in the 'apps4' recipe
55
+ add_gem 'rails_apps_pages', :group => :development if prefs[:apps4]
56
+
54
57
  ## Template Engine
55
58
  if prefer :templates, 'haml'
56
59
  add_gem 'haml-rails'
data/recipes/init.rb CHANGED
@@ -3,19 +3,25 @@
3
3
 
4
4
  after_everything do
5
5
  say_wizard "recipe running after everything"
6
+ prefs[:secrets].each do |secret|
7
+ env_var = " #{secret}: <%= ENV[\"#{secret.upcase}\"] %>"
8
+ inject_into_file 'config/secrets.yml', "\n" + env_var, :after => "development:" if rails_4_1?
9
+ ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
10
+ inject_into_file 'config/secrets.yml', "\n" + env_var + " ", :after => "production:" if rails_4_1?
11
+ end
6
12
  case prefs[:email]
7
13
  when 'none'
8
14
  secrets_email = foreman_email = ''
9
15
  when 'smtp'
10
16
  secrets_email = foreman_email = ''
11
17
  when 'gmail'
12
- secrets_email = " email_provider_username: <%= ENV[\"GMAIL_USERNAME\"] %>\n email_provider_password: <%= ENV[\"GMAIL_PASSWORD\"] %>\n domain_name: example.com %>"
13
- foreman_email = "GMAIL_USERNAME=Your_Username\nGMAIL_PASSWORD=Your_Password\nDOMAIN_NAME=example.com\n"
18
+ secrets_email = " email_provider_username: <%= ENV[\"GMAIL_USERNAME\"] %>\n email_provider_password: <%= ENV[\"GMAIL_PASSWORD\"] %>"
19
+ foreman_email = "GMAIL_USERNAME=Your_Username\nGMAIL_PASSWORD=Your_Password\nDOMAIN_NAME=example.com\n"
14
20
  when 'sendgrid'
15
- secrets_email = " email_provider_username: <%= ENV[\"SENDGRID_USERNAME\"] %>\n email_provider_password: <%= ENV[\"SENDGRID_PASSWORD\"] %>\n domain_name: example.com %>"
21
+ secrets_email = " email_provider_username: <%= ENV[\"SENDGRID_USERNAME\"] %>\n email_provider_password: <%= ENV[\"SENDGRID_PASSWORD\"] %>"
16
22
  foreman_email = "SENDGRID_USERNAME=Your_Username\nSENDGRID_PASSWORD=Your_Password\nDOMAIN_NAME=example.com\n"
17
23
  when 'mandrill'
18
- secrets_email = " email_provider_username: <%= ENV[\"MANDRILL_USERNAME\"] %>\n email_provider_apikey: <%= ENV[\"MANDRILL_APIKEY\"] %>\n domain_name: example.com %>"
24
+ secrets_email = " email_provider_username: <%= ENV[\"MANDRILL_USERNAME\"] %>\n email_provider_apikey: <%= ENV[\"MANDRILL_APIKEY\"] %>"
19
25
  foreman_email = "MANDRILL_USERNAME=Your_Username\nMANDRILL_APIKEY=Your_API_Key\nDOMAIN_NAME=example.com\n"
20
26
  end
21
27
  figaro_email = foreman_email.gsub('=', ': ')
@@ -30,6 +36,8 @@ after_everything do
30
36
  foreman_cancan = "ROLES=[admin, user, VIP]\n\n"
31
37
  figaro_cancan = foreman_cancan.gsub('=', ': ')
32
38
  ## EMAIL
39
+ inject_into_file 'config/secrets.yml', "\n" + " domain_name: example.com", :after => "development:" if rails_4_1?
40
+ inject_into_file 'config/secrets.yml', "\n" + " domain_name: <%= ENV[\"DOMAIN_NAME\"] %>", :after => "production:" if rails_4_1?
33
41
  inject_into_file 'config/secrets.yml', "\n" + secrets_email, :after => "development:" if rails_4_1?
34
42
  ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
35
43
  inject_into_file 'config/secrets.yml', "\n" + secrets_email + " ", :after => "production:" if rails_4_1?
@@ -0,0 +1,92 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/learn_rails.rb
3
+
4
+ if prefer :apps4, 'learn-rails'
5
+
6
+ # preferences
7
+ prefs[:authentication] = false
8
+ prefs[:authorization] = false
9
+ prefs[:ban_spiders] = false
10
+ prefs[:better_errors] = true
11
+ prefs[:database] = 'default'
12
+ prefs[:deployment] = 'none'
13
+ prefs[:devise_modules] = false
14
+ prefs[:dev_webserver] = 'webrick'
15
+ prefs[:email] = 'gmail'
16
+ prefs[:form_builder] = 'simple_form'
17
+ prefs[:frontend] = 'foundation5'
18
+ prefs[:github] = false
19
+ prefs[:git] = true
20
+ prefs[:local_env_file] = 'none'
21
+ prefs[:prod_webserver] = 'same'
22
+ prefs[:pry] = false
23
+ prefs[:quiet_assets] = true
24
+ prefs[:secrets] = ['owner_email', 'mailchimp_list_id', 'mailchimp_api_key']
25
+ prefs[:starter_app] = false
26
+ prefs[:templates] = 'erb'
27
+ prefs[:tests] = false
28
+
29
+ # gems
30
+ add_gem 'activerecord-tableless'
31
+ add_gem 'high_voltage'
32
+ add_gem 'gibbon'
33
+ add_gem 'google_drive'
34
+ gsub_file 'Gemfile', /gem 'sqlite3'\n/, ''
35
+ add_gem 'sqlite3', :group => :development
36
+ add_gem 'pg', :group => :production
37
+ add_gem 'thin', :group => :production
38
+ add_gem 'rails_12factor', :group => :production
39
+
40
+ after_everything do
41
+
42
+ repo = 'https://raw.github.com/RailsApps/learn-rails/master/'
43
+
44
+ # >-------------------------------[ Models ]--------------------------------<
45
+
46
+ copy_from_repo 'app/models/contact.rb', :repo => repo
47
+ copy_from_repo 'app/models/visitor.rb', :repo => repo
48
+
49
+ # >-------------------------------[ Controllers ]--------------------------------<
50
+
51
+ copy_from_repo 'app/controllers/contacts_controller.rb', :repo => repo
52
+ copy_from_repo 'app/controllers/visitors_controller.rb', :repo => repo
53
+
54
+ # >-------------------------------[ Mailers ]--------------------------------<
55
+
56
+ generate 'mailer UserMailer'
57
+ copy_from_repo 'app/mailers/user_mailer.rb', :repo => repo
58
+
59
+ # >-------------------------------[ Views ]--------------------------------<
60
+
61
+ copy_from_repo 'app/views/contacts/new.html.erb', :repo => repo
62
+ copy_from_repo 'app/views/pages/about.html.erb', :repo => repo
63
+ copy_from_repo 'app/views/user_mailer/contact_email.html.erb', :repo => repo
64
+ copy_from_repo 'app/views/user_mailer/contact_email.text.erb', :repo => repo
65
+ copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
66
+ # create navigation links using the rails_layout gem
67
+ generate 'layout:navigation -f'
68
+
69
+ # >-------------------------------[ Routes ]--------------------------------<
70
+
71
+ copy_from_repo 'config/routes.rb', :repo => repo
72
+
73
+ # >-------------------------------[ Assets ]--------------------------------<
74
+
75
+ copy_from_repo 'app/assets/javascripts/segmentio.js', :repo => repo
76
+
77
+ # >-------------------------------[ Cleanup ]--------------------------------<
78
+
79
+ gsub_file 'Gemfile', /.*gem 'rails_apps_pages'\n/, ''
80
+
81
+ end
82
+ end
83
+
84
+ __END__
85
+
86
+ name: learn_rails
87
+ description: "learn-rails starter application"
88
+ author: RailsApps
89
+
90
+ requires: [core]
91
+ run_after: [git]
92
+ category: apps
@@ -0,0 +1,35 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rails_bootstrap.rb
3
+
4
+ if prefer :apps4, 'rails-bootstrap'
5
+ prefs[:authentication] = false
6
+ prefs[:authorization] = false
7
+ prefs[:better_errors] = true
8
+ prefs[:database] = 'default'
9
+ prefs[:deployment] = 'none'
10
+ prefs[:devise_modules] = false
11
+ prefs[:email] = 'none'
12
+ prefs[:form_builder] = false
13
+ prefs[:frontend] = 'bootstrap3'
14
+ prefs[:git] = true
15
+ prefs[:local_env_file] = false
16
+ prefs[:pry] = false
17
+ prefs[:quiet_assets] = true
18
+ prefs[:starter_app] = false
19
+ add_gem 'high_voltage'
20
+ after_everything do
21
+ generate 'pages:home -f'
22
+ generate 'pages:about -f'
23
+ generate 'layout:navigation -f'
24
+ end
25
+ end
26
+
27
+ __END__
28
+
29
+ name: rails_bootstrap
30
+ description: "rails-bootstrap starter application"
31
+ author: RailsApps
32
+
33
+ requires: [core]
34
+ run_after: [git]
35
+ category: apps
@@ -0,0 +1,27 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rails_devise.rb
3
+
4
+ if prefer :apps4, 'rails-devise'
5
+ prefs[:authentication] = 'devise'
6
+ prefs[:authorization] = false
7
+ prefs[:better_errors] = true
8
+ prefs[:deployment] = 'none'
9
+ prefs[:git] = true
10
+ prefs[:local_env_file] = false
11
+ prefs[:pry] = false
12
+ prefs[:quiet_assets] = true
13
+ prefs[:starter_app] = false
14
+ after_everything do
15
+ generate 'pages:users -f'
16
+ end
17
+ end
18
+
19
+ __END__
20
+
21
+ name: rails_devise
22
+ description: "rails-devise starter application"
23
+ author: RailsApps
24
+
25
+ requires: [core]
26
+ run_after: [git]
27
+ category: apps
@@ -0,0 +1,27 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rails_devise_pundit.rb
3
+
4
+ if prefer :apps4, 'rails-devise-pundit'
5
+ prefs[:authentication] = 'devise'
6
+ prefs[:authorization] = 'pundit'
7
+ prefs[:better_errors] = true
8
+ prefs[:deployment] = 'none'
9
+ prefs[:git] = true
10
+ prefs[:local_env_file] = false
11
+ prefs[:pry] = false
12
+ prefs[:quiet_assets] = true
13
+ prefs[:starter_app] = false
14
+ after_everything do
15
+ generate 'pages:authorized -f'
16
+ end
17
+ end
18
+
19
+ __END__
20
+
21
+ name: rails_devise_pundit
22
+ description: "rails-devise-pundit starter application"
23
+ author: RailsApps
24
+
25
+ requires: [core]
26
+ run_after: [git]
27
+ category: apps
@@ -0,0 +1,35 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rails_foundation.rb
3
+
4
+ if prefer :apps4, 'rails-foundation'
5
+ prefs[:authentication] = false
6
+ prefs[:authorization] = false
7
+ prefs[:better_errors] = true
8
+ prefs[:database] = 'default'
9
+ prefs[:deployment] = 'none'
10
+ prefs[:devise_modules] = false
11
+ prefs[:email] = 'none'
12
+ prefs[:form_builder] = false
13
+ prefs[:frontend] = 'foundation5'
14
+ prefs[:git] = true
15
+ prefs[:local_env_file] = false
16
+ prefs[:pry] = false
17
+ prefs[:quiet_assets] = true
18
+ prefs[:starter_app] = false
19
+ add_gem 'high_voltage'
20
+ after_everything do
21
+ generate 'pages:home -f'
22
+ generate 'pages:about -f'
23
+ generate 'layout:navigation -f'
24
+ end
25
+ end
26
+
27
+ __END__
28
+
29
+ name: rails_foundation
30
+ description: "rails-foundation starter application"
31
+ author: RailsApps
32
+
33
+ requires: [core]
34
+ run_after: [git]
35
+ category: apps
@@ -0,0 +1,54 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rails_omniauth.rb
3
+
4
+ if prefer :apps4, 'rails-omniauth'
5
+
6
+ prefs[:authentication] = 'omniauth'
7
+ prefs[:authorization] = 'none'
8
+ prefs[:better_errors] = true
9
+ prefs[:deployment] = 'none'
10
+ prefs[:email] = 'none'
11
+ prefs[:git] = true
12
+ prefs[:local_env_file] = false
13
+ prefs[:pry] = false
14
+ prefs[:quiet_assets] = true
15
+ prefs[:starter_app] = false
16
+
17
+ after_everything do
18
+
19
+ repo = 'https://raw.github.com/RailsApps/rails-omniauth/master/'
20
+
21
+ # >-------------------------------[ Models ]--------------------------------<
22
+
23
+ copy_from_repo 'app/models/user.rb', :repo => repo
24
+
25
+ # >-------------------------------[ Controllers ]--------------------------------<
26
+
27
+ copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
28
+ copy_from_repo 'app/controllers/sessions_controller.rb', :repo => repo
29
+ gsub_file 'app/controllers/sessions_controller.rb', /twitter/, prefs[:omniauth_provider]
30
+ copy_from_repo 'app/controllers/users_controller.rb', :repo => repo
31
+
32
+ # >-------------------------------[ Views ]--------------------------------<
33
+
34
+ copy_from_repo 'app/views/home/index.html.erb', :repo => repo
35
+ copy_from_repo 'app/views/users/edit.html.erb', :repo => repo
36
+ copy_from_repo 'app/views/users/index.html.erb', :repo => repo
37
+ copy_from_repo 'app/views/users/show.html.erb', :repo => repo
38
+
39
+ # >-------------------------------[ Routes ]--------------------------------<
40
+
41
+ copy_from_repo 'config/routes.rb', :repo => repo
42
+
43
+ end
44
+ end
45
+
46
+ __END__
47
+
48
+ name: rails_omniauth
49
+ description: "rails-omniauth starter application"
50
+ author: RailsApps
51
+
52
+ requires: [core]
53
+ run_after: [git]
54
+ category: apps
@@ -0,0 +1,45 @@
1
+ # Application template recipe for the rails_apps_composer. Change the recipe here:
2
+ # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/rails_signup_download.rb
3
+
4
+ if prefer :apps4, 'rails-signup-download'
5
+ prefs[:authentication] = 'devise'
6
+ prefs[:authorization] = 'pundit'
7
+ prefs[:better_errors] = true
8
+ prefs[:deployment] = 'none'
9
+ prefs[:devise_modules] = false
10
+ prefs[:form_builder] = false
11
+ prefs[:git] = true
12
+ prefs[:local_env_file] = false
13
+ prefs[:pry] = false
14
+ prefs[:quiet_assets] = true
15
+ prefs[:starter_app] = false
16
+ after_everything do
17
+ generate 'pages:authorized -f'
18
+
19
+ repo = 'https://raw.github.com/RailsApps/rails-signup-download/master/'
20
+
21
+ # >-------------------------------[ Controllers ]--------------------------------<
22
+
23
+ copy_from_repo 'app/controllers/products_controller.rb', :repo => repo
24
+
25
+ # >-------------------------------[ Views ]--------------------------------<
26
+
27
+ copy_from_repo 'app/views/visitors/index.html.erb', :repo => repo
28
+ copy_from_repo 'app/views/products/product.pdf', :repo => repo
29
+
30
+ # >-------------------------------[ Routes ]--------------------------------<
31
+
32
+ copy_from_repo 'config/routes.rb', :repo => repo
33
+
34
+ end
35
+ end
36
+
37
+ __END__
38
+
39
+ name: rails_signup_download
40
+ description: "rails-signup-download starter application"
41
+ author: RailsApps
42
+
43
+ requires: [core]
44
+ run_after: [git]
45
+ category: apps
data/recipes/railsapps.rb CHANGED
@@ -34,7 +34,8 @@ when "4"
34
34
  ["rails-foundation", "rails-foundation"],
35
35
  ["rails-omniauth", "rails-omniauth"],
36
36
  ["rails-devise", "rails-devise"],
37
- ["rails-devise-pundit", "rails-devise-pundit"]])
37
+ ["rails-devise-pundit", "rails-devise-pundit"],
38
+ ["rails-signup-download", "rails-signup-download"]])
38
39
  else
39
40
  say_wizard "Please upgrade to Rails 4.1 to get the starter apps."
40
41
  end
@@ -44,114 +45,6 @@ when "4"
44
45
  end
45
46
  end
46
47
 
47
- case prefs[:apps4]
48
- when 'simple-test'
49
- prefs[:dev_webserver] = 'webrick'
50
- prefs[:prod_webserver] = 'same'
51
- prefs[:templates] = 'erb'
52
- prefs[:git] = false
53
- prefs[:github] = false
54
- prefs[:database] = 'sqlite'
55
- prefs[:unit_test] = false
56
- prefs[:integration] = false
57
- prefs[:fixtures] = false
58
- prefs[:frontend] = false
59
- prefs[:email] = false
60
- prefs[:authentication] = false
61
- prefs[:devise_modules] = false
62
- prefs[:authorization] = false
63
- prefs[:starter_app] = false
64
- prefs[:form_builder] = false
65
- prefs[:quiet_assets] = false
66
- prefs[:local_env_file] = 'none'
67
- prefs[:better_errors] = false
68
- prefs[:pry] = false
69
- prefs[:deployment] = 'none'
70
- prefs[:ban_spiders] = false
71
- prefs[:continuous_testing] = false
72
- when 'learn-rails'
73
- prefs[:dev_webserver] = 'webrick'
74
- prefs[:prod_webserver] = 'same'
75
- prefs[:templates] = 'erb'
76
- prefs[:git] = true
77
- prefs[:database] = 'default'
78
- prefs[:frontend] = 'foundation5'
79
- prefs[:email] = 'gmail'
80
- prefs[:authentication] = false
81
- prefs[:devise_modules] = false
82
- prefs[:authorization] = false
83
- prefs[:starter_app] = false
84
- prefs[:form_builder] = 'simple_form'
85
- prefs[:quiet_assets] = true
86
- prefs[:local_env_file] = 'none'
87
- prefs[:better_errors] = true
88
- prefs[:pry] = false
89
- prefs[:deployment] = 'none'
90
- prefs[:ban_spiders] = false
91
- prefs[:github] = false
92
- when 'rails-bootstrap'
93
- prefs[:git] = true
94
- prefs[:database] = 'default'
95
- prefs[:frontend] = 'bootstrap3'
96
- prefs[:email] = 'none'
97
- prefs[:authentication] = false
98
- prefs[:devise_modules] = false
99
- prefs[:authorization] = false
100
- prefs[:starter_app] = false
101
- prefs[:form_builder] = false
102
- prefs[:quiet_assets] = true
103
- prefs[:local_env_file] = false
104
- prefs[:better_errors] = true
105
- prefs[:pry] = false
106
- prefs[:deployment] = 'none'
107
- when 'rails-foundation'
108
- prefs[:git] = true
109
- prefs[:database] = 'default'
110
- prefs[:frontend] = 'foundation5'
111
- prefs[:email] = 'none'
112
- prefs[:authentication] = false
113
- prefs[:devise_modules] = false
114
- prefs[:authorization] = false
115
- prefs[:starter_app] = false
116
- prefs[:form_builder] = false
117
- prefs[:quiet_assets] = true
118
- prefs[:local_env_file] = false
119
- prefs[:better_errors] = true
120
- prefs[:pry] = false
121
- prefs[:deployment] = 'none'
122
- when 'rails-devise'
123
- prefs[:git] = true
124
- prefs[:authentication] = 'devise'
125
- prefs[:authorization] = false
126
- prefs[:starter_app] = false
127
- prefs[:quiet_assets] = true
128
- prefs[:local_env_file] = false
129
- prefs[:better_errors] = true
130
- prefs[:pry] = false
131
- prefs[:deployment] = 'none'
132
- when 'rails-devise-pundit'
133
- prefs[:git] = true
134
- prefs[:authentication] = 'devise'
135
- prefs[:authorization] = 'pundit'
136
- prefs[:starter_app] = 'admin_app'
137
- prefs[:quiet_assets] = true
138
- prefs[:local_env_file] = false
139
- prefs[:better_errors] = true
140
- prefs[:pry] = false
141
- prefs[:deployment] = 'none'
142
- when 'rails-omniauth'
143
- prefs[:git] = true
144
- prefs[:email] = 'none'
145
- prefs[:authentication] = 'omniauth'
146
- prefs[:authorization] = 'none'
147
- prefs[:starter_app] = false
148
- prefs[:quiet_assets] = true
149
- prefs[:local_env_file] = false
150
- prefs[:better_errors] = true
151
- prefs[:pry] = false
152
- prefs[:deployment] = 'none'
153
- end
154
-
155
48
  case prefs[:railsapps]
156
49
  when 'saas'
157
50
  prefs[:railsapps] = prefs[:billing] || (multiple_choice "Billing with Stripe or Recurly?",
data/recipes/tests4.rb CHANGED
@@ -20,7 +20,7 @@ end # after_bundler
20
20
 
21
21
  after_everything do
22
22
  say_wizard "recipe running after everything"
23
- if prefer :authentication, 'devise'
23
+ if (prefer :authentication, 'devise') && (prefer :tests, 'rspec')
24
24
  generate 'testing:configure devise -f'
25
25
  end
26
26
  end # after_everything
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.5.1"
2
+ VERSION = "2.6.0"
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.5.1
4
+ version: 2.6.0
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-04-26 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -119,7 +119,6 @@ files:
119
119
  - lib/rails_wizard/recipes.rb
120
120
  - lib/rails_wizard/template.rb
121
121
  - recipes/admin.rb
122
- - recipes/apps4.rb
123
122
  - recipes/controllers.rb
124
123
  - recipes/core.rb
125
124
  - recipes/deployment.rb
@@ -131,8 +130,15 @@ files:
131
130
  - recipes/gems.rb
132
131
  - recipes/git.rb
133
132
  - recipes/init.rb
133
+ - recipes/learn_rails.rb
134
134
  - recipes/models.rb
135
135
  - recipes/prelaunch.rb
136
+ - recipes/rails_bootstrap.rb
137
+ - recipes/rails_devise.rb
138
+ - recipes/rails_devise_pundit.rb
139
+ - recipes/rails_foundation.rb
140
+ - recipes/rails_omniauth.rb
141
+ - recipes/rails_signup_download.rb
136
142
  - recipes/railsapps.rb
137
143
  - recipes/readme.rb
138
144
  - recipes/routes.rb
data/recipes/apps4.rb DELETED
@@ -1,317 +0,0 @@
1
- # Application template recipe for the rails_apps_composer. Change the recipe here:
2
- # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/apps4.rb
3
-
4
- ### LEARN-RAILS ####
5
-
6
- if prefer :apps4, 'learn-rails'
7
-
8
- # >-------------------------------[ Gems ]--------------------------------<
9
-
10
- add_gem 'activerecord-tableless'
11
- add_gem 'high_voltage'
12
- add_gem 'gibbon'
13
- add_gem 'google_drive'
14
- gsub_file 'Gemfile', /gem 'sqlite3'\n/, ''
15
- add_gem 'sqlite3', :group => :development
16
- add_gem 'pg', :group => :production
17
- add_gem 'thin', :group => :production
18
- add_gem 'rails_12factor', :group => :production
19
-
20
- # >-------------------------------[ after_everything ]--------------------------------<
21
-
22
- after_everything do
23
- say_wizard "recipe running after 'bundle install'"
24
- repo = 'https://raw.github.com/RailsApps/learn-rails/master/'
25
-
26
- # >-------------------------------[ Clean up starter app ]--------------------------------<
27
-
28
- # remove commented lines and multiple blank lines from Gemfile
29
- # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
30
- gsub_file 'Gemfile', /#.*\n/, "\n"
31
- gsub_file 'Gemfile', /\n^\s*\n/, "\n"
32
- # remove commented lines and multiple blank lines from config/routes.rb
33
- gsub_file 'config/routes.rb', / #.*\n/, "\n"
34
- gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
35
- # GIT
36
- git :add => '-A' if prefer :git, true
37
- git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
38
-
39
- # >-------------------------------[ Models ]--------------------------------<
40
-
41
- copy_from_repo 'app/models/contact.rb', :repo => repo
42
- copy_from_repo 'app/models/visitor.rb', :repo => repo
43
-
44
- # >-------------------------------[ Init ]--------------------------------<
45
- copy_from_repo 'config/secrets.yml', :repo => repo
46
-
47
- # >-------------------------------[ Controllers ]--------------------------------<
48
-
49
- copy_from_repo 'app/controllers/contacts_controller.rb', :repo => repo
50
- copy_from_repo 'app/controllers/visitors_controller.rb', :repo => repo
51
-
52
- # >-------------------------------[ Mailers ]--------------------------------<
53
-
54
- generate 'mailer UserMailer'
55
- copy_from_repo 'app/mailers/user_mailer.rb', :repo => repo
56
-
57
- # >-------------------------------[ Views ]--------------------------------<
58
-
59
- copy_from_repo 'app/views/contacts/new.html.erb', :repo => repo
60
- copy_from_repo 'app/views/pages/about.html.erb', :repo => repo
61
- copy_from_repo 'app/views/user_mailer/contact_email.html.erb', :repo => repo
62
- copy_from_repo 'app/views/user_mailer/contact_email.text.erb', :repo => repo
63
- copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
64
- # create navigation links using the rails_layout gem
65
- generate 'layout:navigation -f'
66
-
67
- # >-------------------------------[ Routes ]--------------------------------<
68
-
69
- copy_from_repo 'config/routes.rb', :repo => repo
70
-
71
- # >-------------------------------[ Assets ]--------------------------------<
72
-
73
- copy_from_repo 'app/assets/javascripts/segmentio.js', :repo => repo
74
-
75
- ### GIT ###
76
- git :add => '-A' if prefer :git, true
77
- git :commit => '-qm "rails_apps_composer: learn-rails app"' if prefer :git, true
78
- end # after_bundler
79
- end # learn-rails
80
-
81
- ### RAILS-BOOTSTRAP or RAILS-FOUNDATION ####
82
-
83
- if (prefer :apps4, 'rails-bootstrap') || (prefer :apps4, 'rails-foundation')
84
-
85
- # >-------------------------------[ Gems ]--------------------------------<
86
-
87
- add_gem 'high_voltage'
88
-
89
- # >-------------------------------[ after_everything ]--------------------------------<
90
-
91
- after_everything do
92
- say_wizard "recipe running after 'bundle install'"
93
- repo = 'https://raw.github.com/RailsApps/rails-bootstrap/master/' if prefer :apps4, 'rails-bootstrap'
94
- repo = 'https://raw.github.com/RailsApps/rails-foundation/master/' if prefer :apps4, 'rails-foundation'
95
-
96
- # >-------------------------------[ Clean up starter app ]--------------------------------<
97
-
98
- # remove commented lines and multiple blank lines from Gemfile
99
- # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
100
- gsub_file 'Gemfile', /#.*\n/, "\n"
101
- gsub_file 'Gemfile', /\n^\s*\n/, "\n"
102
- # remove commented lines and multiple blank lines from config/routes.rb
103
- gsub_file 'config/routes.rb', / #.*\n/, "\n"
104
- gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
105
- # GIT
106
- git :add => '-A' if prefer :git, true
107
- git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
108
-
109
- # >-------------------------------[ Models ]--------------------------------<
110
-
111
- # no models
112
-
113
- # >-------------------------------[ Init ]--------------------------------<
114
- copy_from_repo 'config/application.yml', :repo => repo
115
- remove_file 'config/application.example.yml'
116
- copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
117
-
118
- # >-------------------------------[ Controllers ]--------------------------------<
119
-
120
- copy_from_repo 'app/controllers/visitors_controller.rb', :repo => repo
121
-
122
- # >-------------------------------[ Views ]--------------------------------<
123
-
124
- copy_from_repo 'app/views/pages/about.html.erb', :repo => repo
125
- copy_from_repo 'app/views/visitors/new.html.erb', :repo => repo
126
- # create navigation links using the rails_layout gem
127
- generate 'layout:navigation -f'
128
-
129
- # >-------------------------------[ Routes ]--------------------------------<
130
-
131
- copy_from_repo 'config/routes.rb', :repo => repo
132
- ### CORRECT APPLICATION NAME ###
133
- gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
134
-
135
- # >-------------------------------[ Assets ]--------------------------------<
136
-
137
- # no assets
138
-
139
- ### GIT ###
140
- if prefer :git, true
141
- git :add => '-A'
142
- git :commit => '-qm "rails_apps_composer: rails-bootstrap app"' if prefer :apps4, 'rails-bootstrap'
143
- git :commit => '-qm "rails_apps_composer: rails-foundation app"' if prefer :apps4, 'rails-foundation'
144
- end
145
- end # after_bundler
146
- end # rails-bootstrap
147
-
148
- ### RAILS-DEVISE ####
149
-
150
- if prefer :apps4, 'rails-devise'
151
-
152
- # >-------------------------------[ after_bundler ]--------------------------------<
153
-
154
- after_bundler do
155
- say_wizard "recipe running after 'bundle install'"
156
- repo = 'https://raw.github.com/RailsApps/rails-devise/master/'
157
-
158
- # >-------------------------------[ Controllers ]--------------------------------<
159
-
160
- copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
161
- copy_from_repo 'app/controllers/users_controller.rb', :repo => repo
162
- copy_from_repo 'app/controllers/registrations_controller.rb', :repo => repo
163
-
164
- # >-------------------------------[ Views ]--------------------------------<
165
-
166
- copy_from_repo 'app/views/home/index.html.erb', :repo => repo
167
- copy_from_repo 'app/views/users/index.html.erb', :repo => repo
168
- copy_from_repo 'app/views/users/show.html.erb', :repo => repo
169
-
170
- # >-------------------------------[ Routes ]--------------------------------<
171
-
172
- copy_from_repo 'config/routes.rb', :repo => repo
173
- ### CORRECT APPLICATION NAME ###
174
- gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
175
-
176
- end
177
-
178
- # >-------------------------------[ after_everything ]--------------------------------<
179
-
180
- after_everything do
181
- say_wizard "recipe running after 'bundle install'"
182
-
183
- # >-------------------------------[ Clean up starter app ]--------------------------------<
184
-
185
- # remove commented lines and multiple blank lines from Gemfile
186
- # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
187
- gsub_file 'Gemfile', /#.*\n/, "\n"
188
- gsub_file 'Gemfile', /\n^\s*\n/, "\n"
189
- # remove commented lines and multiple blank lines from config/routes.rb
190
- gsub_file 'config/routes.rb', / #.*\n/, "\n"
191
- gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
192
- # GIT
193
- git :add => '-A' if prefer :git, true
194
- git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
195
-
196
- ### GIT ###
197
- git :add => '-A' if prefer :git, true
198
- git :commit => '-qm "rails_apps_composer: learn-rails app"' if prefer :git, true
199
-
200
- end # after_bundler
201
- end # rails-devise
202
-
203
- ### RAILS-DEVISE-PUNDIT ####
204
-
205
- if prefer :apps4, 'rails-devise-pundit'
206
-
207
- # >-------------------------------[ after_bundler ]--------------------------------<
208
-
209
- after_bundler do
210
- say_wizard "recipe running after 'bundle install'"
211
- repo = 'https://raw.github.com/RailsApps/rails-devise-pundit/master/'
212
-
213
- # >-------------------------------[ Controllers ]--------------------------------<
214
-
215
- copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
216
-
217
- # >-------------------------------[ Views ]--------------------------------<
218
-
219
- copy_from_repo 'app/views/home/index.html.erb', :repo => repo
220
-
221
- end
222
-
223
- # >-------------------------------[ after_everything ]--------------------------------<
224
-
225
- after_everything do
226
- say_wizard "recipe running after 'bundle install'"
227
-
228
- # >-------------------------------[ Clean up starter app ]--------------------------------<
229
-
230
- # remove commented lines and multiple blank lines from Gemfile
231
- # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
232
- gsub_file 'Gemfile', /#.*\n/, "\n"
233
- gsub_file 'Gemfile', /\n^\s*\n/, "\n"
234
- # remove commented lines and multiple blank lines from config/routes.rb
235
- gsub_file 'config/routes.rb', / #.*\n/, "\n"
236
- gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
237
- # GIT
238
- git :add => '-A' if prefer :git, true
239
- git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
240
-
241
- ### GIT ###
242
- git :add => '-A' if prefer :git, true
243
- git :commit => '-qm "rails_apps_composer: learn-rails app"' if prefer :git, true
244
-
245
- end # after_bundler
246
- end # rails-devise-pundit
247
-
248
- ### RAILS-OMNIAUTH ####
249
-
250
- if prefer :apps4, 'rails-omniauth'
251
-
252
- # >-------------------------------[ after_bundler ]--------------------------------<
253
-
254
- after_bundler do
255
- say_wizard "recipe running after 'bundle install'"
256
- repo = 'https://raw.github.com/RailsApps/rails-omniauth/master/'
257
-
258
- # >-------------------------------[ Models ]--------------------------------<
259
-
260
- copy_from_repo 'app/models/user.rb', :repo => repo
261
-
262
- # >-------------------------------[ Controllers ]--------------------------------<
263
-
264
- copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
265
- copy_from_repo 'app/controllers/sessions_controller.rb', :repo => repo
266
- gsub_file 'app/controllers/sessions_controller.rb', /twitter/, prefs[:omniauth_provider]
267
- copy_from_repo 'app/controllers/users_controller.rb', :repo => repo
268
-
269
- # >-------------------------------[ Views ]--------------------------------<
270
-
271
- copy_from_repo 'app/views/home/index.html.erb', :repo => repo
272
- copy_from_repo 'app/views/users/edit.html.erb', :repo => repo
273
- copy_from_repo 'app/views/users/index.html.erb', :repo => repo
274
- copy_from_repo 'app/views/users/show.html.erb', :repo => repo
275
-
276
- # >-------------------------------[ Routes ]--------------------------------<
277
-
278
- copy_from_repo 'config/routes.rb', :repo => repo
279
- ### CORRECT APPLICATION NAME ###
280
- gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
281
-
282
- end
283
-
284
- # >-------------------------------[ after_everything ]--------------------------------<
285
-
286
- after_everything do
287
- say_wizard "recipe running after 'bundle install'"
288
-
289
- # >-------------------------------[ Clean up starter app ]--------------------------------<
290
-
291
- # remove commented lines and multiple blank lines from Gemfile
292
- # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
293
- gsub_file 'Gemfile', /#.*\n/, "\n"
294
- gsub_file 'Gemfile', /\n^\s*\n/, "\n"
295
- # remove commented lines and multiple blank lines from config/routes.rb
296
- gsub_file 'config/routes.rb', / #.*\n/, "\n"
297
- gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
298
- # GIT
299
- git :add => '-A' if prefer :git, true
300
- git :commit => '-qm "rails_apps_composer: clean up starter app"' if prefer :git, true
301
-
302
- ### GIT ###
303
- git :add => '-A' if prefer :git, true
304
- git :commit => '-qm "rails_apps_composer: learn-rails app"' if prefer :git, true
305
-
306
- end # after_bundler
307
- end # rails-omniauth
308
-
309
- __END__
310
-
311
- name: apps4
312
- description: "Install RailsApps starter applications for Rails 4.0."
313
- author: RailsApps
314
-
315
- requires: [core]
316
- run_after: [setup, gems]
317
- category: apps