rails_apps_composer 1.4.11 → 1.4.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,16 @@
1
1
  # Application template recipe for the rails_apps_composer. Check for a newer version here:
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/action_mailer.rb
3
3
 
4
+ case config['mailer']
5
+ when 'smtp'
6
+ recipes << 'smtp'
7
+ when 'gmail'
8
+ recipes << 'gmail'
9
+ when 'sendgrid'
10
+ gem 'sendgrid'
11
+ recipes << 'sendgrid'
12
+ end
13
+
4
14
  after_bundler do
5
15
  ### modifying environment configuration files for ActionMailer
6
16
  say_wizard "ActionMailer recipe running 'after bundler'"
@@ -10,8 +20,8 @@ after_bundler do
10
20
  <<-RUBY
11
21
  config.action_mailer.default_url_options = { :host => 'localhost:3000' }
12
22
  config.action_mailer.delivery_method = :smtp
13
- # change to false to prevent email from being sent during development
14
- config.action_mailer.perform_deliveries = true
23
+ # change to true to allow email to be sent during development
24
+ config.action_mailer.perform_deliveries = false
15
25
  config.action_mailer.raise_delivery_errors = true
16
26
  config.action_mailer.default :charset => "utf-8"
17
27
  RUBY
@@ -40,7 +50,7 @@ RUBY
40
50
  end
41
51
 
42
52
  ### modifying environment configuration files to send email using a GMail account
43
- if config['gmail']
53
+ if recipes.include? 'gmail'
44
54
  gmail_configuration_text = <<-TEXT
45
55
  \n
46
56
  config.action_mailer.smtp_settings = {
@@ -57,19 +67,38 @@ TEXT
57
67
  inject_into_file 'config/environments/development.rb', gmail_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
58
68
  inject_into_file 'config/environments/production.rb', gmail_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
59
69
  end
70
+
71
+ ### modifying environment configuration files to send email using a SendGrid account
72
+ if recipes.include? 'sendgrid'
73
+ sendgrid_configuration_text = <<-TEXT
74
+ \n
75
+ config.action_mailer.smtp_settings = {
76
+ address: "smtp.sendgrid.net",
77
+ port: 25,
78
+ domain: "example.com",
79
+ authentication: "plain",
80
+ user_name: ENV["SENDGRID_USERNAME"],
81
+ password: ENV["SENDGRID_PASSWORD"]
82
+ }
83
+ TEXT
84
+ say_wizard gmail_configuration_text
85
+ inject_into_file 'config/environments/development.rb', sendgrid_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
86
+ inject_into_file 'config/environments/production.rb', sendgrid_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
87
+ end
60
88
 
61
89
  end
62
-
90
+
63
91
  __END__
64
92
 
65
93
  name: ActionMailer
66
- description: "Configure ActionMailer to show errors during development and suppress failures when the app is deployed to production."
94
+ description: "Configure ActionMailer for email."
67
95
  author: RailsApps
68
96
 
69
97
  category: other
70
98
  tags: [utilities, configuration]
71
99
 
72
100
  config:
73
- - gmail:
74
- type: boolean
75
- prompt: Would you like the app to use a GMail account to send email?
101
+ - mailer:
102
+ type: multiple_choice
103
+ prompt: "How will you send email?"
104
+ choices: [["SMTP account", smtp], ["Gmail account", gmail], ["SendGrid account", sendgrid]]
data/recipes/add_user.rb CHANGED
@@ -91,9 +91,6 @@ RUBY
91
91
  end
92
92
  end
93
93
 
94
- # patch for https://github.com/RailsApps/rails3-application-templates/issues/35
95
- gsub_file 'app/models/user.rb', /:remember_meend/, ":remember_me\nend"
96
-
97
94
  unless recipes.include? 'haml'
98
95
 
99
96
  # Generate Devise views (unless you are using Haml)
data/recipes/devise.rb CHANGED
@@ -6,12 +6,12 @@ case config['devise']
6
6
  recipes.delete('devise')
7
7
  say_wizard "Devise recipe skipped."
8
8
  when 'standard'
9
- gem 'devise', '>= 2.1.0.rc2'
9
+ gem 'devise', '>= 2.1.0'
10
10
  when 'confirmable'
11
- gem 'devise', '>= 2.1.0.rc2'
11
+ gem 'devise', '>= 2.1.0'
12
12
  recipes << 'devise-confirmable'
13
13
  when 'invitable'
14
- gem 'devise', '>= 2.1.0.rc2'
14
+ gem 'devise', '>= 2.1.0'
15
15
  gem 'devise_invitable', '>= 1.0.1'
16
16
  recipes << 'devise-confirmable'
17
17
  recipes << 'devise-invitable'
data/recipes/haml.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/haml.rb
3
3
 
4
4
  if config['haml']
5
- gem 'haml', '>= 3.1.5'
5
+ gem 'haml', '>= 3.1.6'
6
6
  gem 'haml-rails', '>= 0.3.4', :group => :development
7
7
  else
8
8
  recipes.delete('haml')
data/recipes/html5.rb CHANGED
@@ -19,7 +19,7 @@ case config['css_option']
19
19
  when 'bootstrap_sass'
20
20
  # https://github.com/thomas-mcdonald/bootstrap-sass
21
21
  # http://rubysource.com/twitter-bootstrap-less-and-sass-understanding-your-options-for-rails-3-1/
22
- gem 'bootstrap-sass', '>= 2.0.1'
22
+ gem 'bootstrap-sass', '>= 2.0.3'
23
23
  recipes << 'bootstrap'
24
24
 
25
25
  end
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "1.4.11"
2
+ VERSION = "1.4.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_apps_composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.11
4
+ version: 1.4.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-13 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -225,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  segments:
227
227
  - 0
228
- hash: 816194076222959709
228
+ hash: -622808843777637371
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  none: false
231
231
  requirements:
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  version: '0'
235
235
  segments:
236
236
  - 0
237
- hash: 816194076222959709
237
+ hash: -622808843777637371
238
238
  requirements: []
239
239
  rubyforge_project: rails_apps_composer
240
240
  rubygems_version: 1.8.23