rails_apps_composer 2.4.40 → 2.4.41

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: 3459bf98aacee97bef2663fe7bd18b172cec45fd
4
- data.tar.gz: 166bea22dfd6ab328ce4b681d77b498809b66dde
3
+ metadata.gz: 62fd77bb4e60fc8495660eafa2ae21722598cdba
4
+ data.tar.gz: 38d83050b8882b9ab7c6865352681c55f65a47b5
5
5
  SHA512:
6
- metadata.gz: a618a18ac8f9d3967b122170223eb965ace16d17e9c132e9dbd01a97efc5601c603423db00e892a594655073d4258a77e3913e4cb654aa556808cfb18012ae58
7
- data.tar.gz: d41e721b0901bdf08b62301c63db9ba2486a898fdb6981d26d8d6aab5af4dd99102adeaf2ab8e756e410f913b055235aabec8e9697d31db5f778410c90889e38
6
+ metadata.gz: a19c3a3f675129316a0c241a4c1a3949e5824cdf91f7ba0c1079af2f723210c46ba6d0ccc3d8af4a5a30f629e8251e325f11aa9c4596395853c4394ed77b32a2
7
+ data.tar.gz: 93d8df24633f64708e446e4b4dadf39ad2163760de8babc569a37b7a8c523229db504677da55c9949c25ab19a290820f4c245d268e6b354a1ac4cbcbe7cd45a5
data/recipes/apps4.rb CHANGED
@@ -42,9 +42,7 @@ if prefer :apps4, 'learn-rails'
42
42
  copy_from_repo 'app/models/visitor.rb', :repo => repo
43
43
 
44
44
  # >-------------------------------[ Init ]--------------------------------<
45
- copy_from_repo 'config/application.yml', :repo => repo
46
- remove_file 'config/application.example.yml'
47
- copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
45
+ copy_from_repo 'config/secrets.yml', :repo => repo
48
46
 
49
47
  # >-------------------------------[ Controllers ]--------------------------------<
50
48
 
@@ -69,8 +67,6 @@ if prefer :apps4, 'learn-rails'
69
67
  # >-------------------------------[ Routes ]--------------------------------<
70
68
 
71
69
  copy_from_repo 'config/routes.rb', :repo => repo
72
- ### CORRECT APPLICATION NAME ###
73
- gsub_file 'config/routes.rb', /^.*.routes.draw do/, "#{app_const}.routes.draw do"
74
70
 
75
71
  # >-------------------------------[ Assets ]--------------------------------<
76
72
 
data/recipes/email.rb CHANGED
@@ -22,6 +22,8 @@ TEXT
22
22
  TEXT
23
23
  inject_into_file 'config/environments/development.rb', dev_email_text, :after => "config.assets.debug = true"
24
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' if rails_4_1?
26
+
25
27
  else
26
28
  ### DEVELOPMENT
27
29
  gsub_file 'config/environments/development.rb', /# Don't care if the mailer can't send/, '# ActionMailer Config'
@@ -59,9 +61,35 @@ RUBY
59
61
  end
60
62
  end
61
63
  end
62
- ### GMAIL ACCOUNT
63
- if prefer :email, 'gmail'
64
- gmail_configuration_text = <<-TEXT
64
+ if rails_4_1?
65
+ email_configuration_text = <<-TEXT
66
+ \n
67
+ config.action_mailer.smtp_settings = {
68
+ address: "smtp.gmail.com",
69
+ port: 587,
70
+ domain: Rails.application.secrets.domain_name,
71
+ authentication: "plain",
72
+ enable_starttls_auto: true,
73
+ user_name: Rails.application.secrets.email_provider_username,
74
+ password: Rails.application.secrets.email_provider_password
75
+ }
76
+ TEXT
77
+ inject_into_file 'config/environments/development.rb', email_configuration_text, :after => "config.assets.debug = true"
78
+ inject_into_file 'config/environments/production.rb', email_configuration_text, :after => "config.active_support.deprecation = :notify"
79
+ case :email
80
+ when 'sendgrid'
81
+ gsub_file 'config/environments/development.rb', /smtp.gmail.com/, 'smtp.sendgrid.net'
82
+ gsub_file 'config/environments/production.rb', /smtp.gmail.com/, 'smtp.sendgrid.net'
83
+ when 'mandrill'
84
+ gsub_file 'config/environments/development.rb', /smtp.gmail.com/, 'smtp.mandrillapp.com'
85
+ gsub_file 'config/environments/production.rb', /smtp.gmail.com/, 'smtp.mandrillapp.com'
86
+ gsub_file 'config/environments/development.rb', /email_provider_password/, 'email_provider_apikey'
87
+ gsub_file 'config/environments/production.rb', /email_provider_password/, 'email_provider_apikey'
88
+ end
89
+ else
90
+ ### GMAIL ACCOUNT
91
+ if prefer :email, 'gmail'
92
+ gmail_configuration_text = <<-TEXT
65
93
  \n
66
94
  config.action_mailer.smtp_settings = {
67
95
  address: "smtp.gmail.com",
@@ -73,12 +101,12 @@ RUBY
73
101
  password: ENV["GMAIL_PASSWORD"]
74
102
  }
75
103
  TEXT
76
- inject_into_file 'config/environments/development.rb', gmail_configuration_text, :after => "config.assets.debug = true"
77
- inject_into_file 'config/environments/production.rb', gmail_configuration_text, :after => "config.active_support.deprecation = :notify"
78
- end
79
- ### SENDGRID ACCOUNT
80
- if prefer :email, 'sendgrid'
81
- sendgrid_configuration_text = <<-TEXT
104
+ inject_into_file 'config/environments/development.rb', gmail_configuration_text, :after => "config.assets.debug = true"
105
+ inject_into_file 'config/environments/production.rb', gmail_configuration_text, :after => "config.active_support.deprecation = :notify"
106
+ end
107
+ ### SENDGRID ACCOUNT
108
+ if prefer :email, 'sendgrid'
109
+ sendgrid_configuration_text = <<-TEXT
82
110
  \n
83
111
  config.action_mailer.smtp_settings = {
84
112
  address: "smtp.sendgrid.net",
@@ -89,22 +117,23 @@ TEXT
89
117
  password: ENV["SENDGRID_PASSWORD"]
90
118
  }
91
119
  TEXT
92
- inject_into_file 'config/environments/development.rb', sendgrid_configuration_text, :after => "config.assets.debug = true"
93
- inject_into_file 'config/environments/production.rb', sendgrid_configuration_text, :after => "config.active_support.deprecation = :notify"
94
- end
95
- ### MANDRILL ACCOUNT
96
- if prefer :email, 'mandrill'
97
- mandrill_configuration_text = <<-TEXT
98
- \n
99
- config.action_mailer.smtp_settings = {
100
- :address => "smtp.mandrillapp.com",
101
- :port => 587,
102
- :user_name => ENV["MANDRILL_USERNAME"],
103
- :password => ENV["MANDRILL_APIKEY"]
104
- }
105
- TEXT
106
- inject_into_file 'config/environments/development.rb', mandrill_configuration_text, :after => "config.assets.debug = true"
107
- inject_into_file 'config/environments/production.rb', mandrill_configuration_text, :after => "config.active_support.deprecation = :notify"
120
+ inject_into_file 'config/environments/development.rb', sendgrid_configuration_text, :after => "config.assets.debug = true"
121
+ inject_into_file 'config/environments/production.rb', sendgrid_configuration_text, :after => "config.active_support.deprecation = :notify"
122
+ end
123
+ ### MANDRILL ACCOUNT
124
+ if prefer :email, 'mandrill'
125
+ mandrill_configuration_text = <<-TEXT
126
+ \n
127
+ config.action_mailer.smtp_settings = {
128
+ :address => "smtp.mandrillapp.com",
129
+ :port => 587,
130
+ :user_name => ENV["MANDRILL_USERNAME"],
131
+ :password => ENV["MANDRILL_APIKEY"]
132
+ }
133
+ TEXT
134
+ inject_into_file 'config/environments/development.rb', mandrill_configuration_text, :after => "config.assets.debug = true"
135
+ inject_into_file 'config/environments/production.rb', mandrill_configuration_text, :after => "config.active_support.deprecation = :notify"
136
+ end
108
137
  end
109
138
  ### GIT
110
139
  git :add => '-A' if prefer :git, true
data/recipes/gems.rb CHANGED
@@ -184,7 +184,7 @@ after_bundler do
184
184
  if prefer :database, 'postgresql'
185
185
  begin
186
186
  pg_username = prefs[:pg_username] || ask_wizard("Username for PostgreSQL?(leave blank to use the app name)")
187
- pg_host = prefs[:pg_username] || ask_wizard("Host for PostgreSQL in database.yml? (leave blank to use default socket connection)")
187
+ pg_host = prefs[:pg_host] || ask_wizard("Host for PostgreSQL in database.yml? (leave blank to use default socket connection)")
188
188
  if pg_username.blank?
189
189
  say_wizard "Creating a user named '#{app_name}' for PostgreSQL"
190
190
  run "createuser --createdb #{app_name}" if prefer :database, 'postgresql'
@@ -247,6 +247,9 @@ after_bundler do
247
247
  when 'bootstrap3'
248
248
  say_wizard "recipe installing simple_form for use with Bootstrap"
249
249
  generate 'simple_form:install --bootstrap'
250
+ when 'foundation5'
251
+ say_wizard "recipe installing simple_form for use with Zurb Foundation"
252
+ generate 'simple_form:install --foundation'
250
253
  when 'foundation4'
251
254
  say_wizard "recipe installing simple_form for use with Zurb Foundation"
252
255
  generate 'simple_form:install --foundation'
data/recipes/init.rb CHANGED
@@ -5,58 +5,52 @@ after_everything do
5
5
  say_wizard "recipe running after everything"
6
6
  case prefs[:email]
7
7
  when 'none'
8
- secrets_d_email = secrets_p_email = foreman_email = ''
8
+ secrets_email = foreman_email = ''
9
9
  when 'smtp'
10
- secrets_d_email = secrets_p_email = foreman_email = ''
10
+ secrets_email = foreman_email = ''
11
11
  when 'gmail'
12
- secrets_d_email = " gmail_username: Your_Username\n gmail_password: Your_Password\n"
13
- secrets_p_email = " gmail_username: <%= ENV[\"GMAIL_USERNAME\"] %>\n gmail_password: <%= ENV[\"GMAIL_PASSWORD\"] %>\n"
12
+ secrets_email = " email_provider_username: <%= ENV[\"GMAIL_USERNAME\"] %>\n email_provider_password: <%= ENV[\"GMAIL_PASSWORD\"] %>\n"
14
13
  foreman_email = "GMAIL_USERNAME=Your_Username\nGMAIL_PASSWORD=Your_Password\n"
15
14
  when 'sendgrid'
16
- secrets_d_email = " sendgrid_username: Your_Username\n sendgrid_password: Your_Password\n"
17
- secrets_p_email = " sendgrid_username: <%= ENV[\"SENDGRID_USERNAME\"] %>\n sendgrid_password: <%= ENV[\"SENDGRID_PASSWORD\"] %>\n"
15
+ secrets_email = " email_provider_username: <%= ENV[\"SENDGRID_USERNAME\"] %>\n email_provider_password: <%= ENV[\"SENDGRID_PASSWORD\"] %>\n"
18
16
  foreman_email = "SENDGRID_USERNAME=Your_Username\nSENDGRID_PASSWORD=Your_Password\n"
19
17
  when 'mandrill'
20
- secrets_d_email = " mandrill_username: Your_Username\n mandrill_apikey: Your_API_Key\n"
21
- secrets_p_email = " mandrill_username: <%= ENV[\"MANDRILL_USERNAME\"] %>\n mandrill_apikey: <%= ENV[\"MANDRILL_APIKEY\"] %>\n"
18
+ secrets_email = " email_provider_username: <%= ENV[\"MANDRILL_USERNAME\"] %>\n email_provider_apikey: <%= ENV[\"MANDRILL_APIKEY\"] %>\n"
22
19
  foreman_email = "MANDRILL_USERNAME=Your_Username\nMANDRILL_APIKEY=Your_API_Key\n"
23
20
  end
24
21
  figaro_email = foreman_email.gsub('=', ': ')
25
- secrets_d_devise = " admin_name: First User\n admin_email: user@example.com\n admin_password: changeme\n"
26
- secrets_p_devise = " admin_name: <%= ENV[\"ADMIN_NAME\"] %>\n admin_email: <%= ENV[\"ADMIN_EMAIL\"] %>\n admin_password: <%= ENV[\"ADMIN_PASSWORD\"] %>\n"
22
+ secrets_devise = " admin_name: <%= ENV[\"ADMIN_NAME\"] %>\n admin_email: <%= ENV[\"ADMIN_EMAIL\"] %>\n admin_password: <%= ENV[\"ADMIN_PASSWORD\"] %>\n"
27
23
  foreman_devise = "ADMIN_NAME=First User\nADMIN_EMAIL=user@example.com\nADMIN_PASSWORD=changeme\n"
28
24
  figaro_devise = foreman_devise.gsub('=', ': ')
29
- secrets_d_omniauth = " omniauth_provider_key: Your_Provider_Key\n omniauth_provider_secret: Your_Provider_Secret\n"
30
- secrets_p_omniauth = " omniauth_provider_key: <%= ENV[\"OMNIAUTH_PROVIDER_KEY\"] %>\n omniauth_provider_secret: <%= ENV[\"OMNIAUTH_PROVIDER_SECRET\"] %>\n"
25
+ secrets_omniauth = " omniauth_provider_key: <%= ENV[\"OMNIAUTH_PROVIDER_KEY\"] %>\n omniauth_provider_secret: <%= ENV[\"OMNIAUTH_PROVIDER_SECRET\"] %>\n"
31
26
  foreman_omniauth = "OMNIAUTH_PROVIDER_KEY: Your_Provider_Key\nOMNIAUTH_PROVIDER_SECRET: Your_Provider_Secret\n"
32
27
  figaro_omniauth = foreman_omniauth.gsub('=', ': ')
33
- secrets_d_cancan = " roles: [admin, user, VIP]\n" # unnecessary? CanCan will not be used with Rails 4.1?
34
- secrets_p_cancan = " roles: <%= ENV[\"ROLES\"] %>\n" # unnecessary? CanCan will not be used with Rails 4.1?
28
+ secrets_cancan = " roles: <%= ENV[\"ROLES\"] %>\n" # unnecessary? CanCan will not be used with Rails 4.1?
35
29
  foreman_cancan = "ROLES=[admin, user, VIP]\n\n"
36
30
  figaro_cancan = foreman_cancan.gsub('=', ': ')
37
31
  ## EMAIL
38
- inject_into_file 'config/secrets.yml', secrets_d_email, :after => "development:\n" if rails_4_1?
39
- inject_into_file 'config/secrets.yml', secrets_p_email, :after => "production:\n" if rails_4_1?
32
+ inject_into_file 'config/secrets.yml', secrets_email, :after => "development:\n" if rails_4_1?
33
+ inject_into_file 'config/secrets.yml', secrets_email, :after => "production:\n" if rails_4_1?
40
34
  append_file '.env', foreman_email if prefer :local_env_file, 'foreman'
41
35
  append_file 'config/application.yml', figaro_email if prefer :local_env_file, 'figaro'
42
36
  ## DEVISE
43
37
  if prefer :authentication, 'devise'
44
- inject_into_file 'config/secrets.yml', secrets_d_devise, :after => "development:\n" if rails_4_1?
45
- inject_into_file 'config/secrets.yml', secrets_p_devise, :after => "production:\n" if rails_4_1?
38
+ inject_into_file 'config/secrets.yml', secrets_devise, :after => "development:\n" if rails_4_1?
39
+ inject_into_file 'config/secrets.yml', secrets_devise, :after => "production:\n" if rails_4_1?
46
40
  append_file '.env', foreman_devise if prefer :local_env_file, 'foreman'
47
41
  append_file 'config/application.yml', figaro_devise if prefer :local_env_file, 'figaro'
48
42
  end
49
43
  ## OMNIAUTH
50
44
  if prefer :authentication, 'omniauth'
51
- inject_into_file 'config/secrets.yml', secrets_d_omniauth, :after => "development:\n" if rails_4_1?
52
- inject_into_file 'config/secrets.yml', secrets_p_omniauth, :after => "production:\n" if rails_4_1?
45
+ inject_into_file 'config/secrets.yml', secrets_omniauth, :after => "development:\n" if rails_4_1?
46
+ inject_into_file 'config/secrets.yml', secrets_omniauth, :after => "production:\n" if rails_4_1?
53
47
  append_file '.env', foreman_omniauth if prefer :local_env_file, 'foreman'
54
48
  append_file 'config/application.yml', figaro_omniauth if prefer :local_env_file, 'figaro'
55
49
  end
56
50
  ## CANCAN
57
51
  if (prefer :authorization, 'cancan')
58
- inject_into_file 'config/secrets.yml', secrets_d_cancan, :after => "development:\n" if rails_4_1?
59
- inject_into_file 'config/secrets.yml', secrets_p_cancan, :after => "production:\n" if rails_4_1?
52
+ inject_into_file 'config/secrets.yml', secrets_cancan, :after => "development:\n" if rails_4_1?
53
+ inject_into_file 'config/secrets.yml', secrets_cancan, :after => "production:\n" if rails_4_1?
60
54
  append_file '.env', foreman_cancan if prefer :local_env_file, 'foreman'
61
55
  append_file 'config/application.yml', figaro_cancan if prefer :local_env_file, 'figaro'
62
56
  end
data/recipes/railsapps.rb CHANGED
@@ -29,14 +29,14 @@ when "4"
29
29
  when 'railsapps'
30
30
  if rails_4_1?
31
31
  prefs[:apps4] = prefs[:rails_4_1_starter_app] || (multiple_choice "Starter apps for Rails 4.1. More to come.",
32
- [["rails-bootstrap", "rails-bootstrap"],
32
+ [["learn-rails", "learn-rails"],
33
+ ["rails-bootstrap", "rails-bootstrap"],
33
34
  ["rails-foundation", "rails-foundation"],
34
35
  ["rails-omniauth", "rails-omniauth"],
35
36
  ["rails-devise", "rails-devise"],
36
37
  ["rails-devise-pundit", "rails-devise-pundit"]])
37
38
  else
38
- prefs[:apps4] = multiple_choice "Please upgrade to Rails 4.1 for more starter apps.",
39
- [["learn-rails", "learn-rails"]]
39
+ say_wizard "Please upgrade to Rails 4.1 to get the starter apps."
40
40
  end
41
41
  when 'contributed_app'
42
42
  prefs[:apps4] = multiple_choice "No contributed applications are available.",
@@ -68,20 +68,27 @@ case prefs[:apps4]
68
68
  prefs[:ban_spiders] = false
69
69
  prefs[:continuous_testing] = false
70
70
  when 'learn-rails'
71
+ prefs[:dev_webserver] = 'webrick'
72
+ prefs[:prod_webserver] = 'same'
73
+ prefs[:templates] = 'erb'
71
74
  prefs[:git] = true
72
75
  prefs[:database] = 'default'
73
76
  prefs[:unit_test] = false
74
77
  prefs[:integration] = false
75
78
  prefs[:fixtures] = false
79
+ prefs[:frontend] = 'foundation5'
76
80
  prefs[:email] = 'gmail'
77
81
  prefs[:authentication] = false
78
82
  prefs[:devise_modules] = false
79
83
  prefs[:authorization] = false
80
84
  prefs[:starter_app] = false
81
85
  prefs[:form_builder] = 'simple_form'
86
+ prefs[:continuous_testing] = false
82
87
  prefs[:quiet_assets] = true
83
- prefs[:local_env_file] = 'figaro'
88
+ prefs[:local_env_file] = 'none'
84
89
  prefs[:better_errors] = true
90
+ prefs[:ban_spiders] = false
91
+ prefs[:github] = false
85
92
  when 'rails-bootstrap'
86
93
  prefs[:git] = true
87
94
  prefs[:database] = 'default'
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.40"
2
+ VERSION = "2.4.41"
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.40
4
+ version: 2.4.41
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-04 00:00:00.000000000 Z
11
+ date: 2014-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n