rails_apps_composer 2.4.43 → 2.4.44

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/recipes/email.rb +33 -33
  3. data/recipes/init.rb +11 -9
  4. data/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bff60e8ec11b99e0a8dc7d9a3062425392a0d585
4
- data.tar.gz: 9ea40dda8ce7e19d1d395c430aa14add792073cc
3
+ metadata.gz: bcc3be5bac3cdf00543a65af9d5f8234a8e5478f
4
+ data.tar.gz: d3f09e1f9f55f5bfb2e0beadaa95e2bbb4edde50
5
5
  SHA512:
6
- metadata.gz: a79de1da318a18301a020d6f9166e487f3f3cbba4a4929de3ca62288a6d68478750dc4423c84729d59e37a8a1a3e9d8408c6feb97aef2ca13500683d9a2dd4f5
7
- data.tar.gz: df0f7fa41b12dca56e51b7d0a1515264057745d119ea16e6dd49c6c82240a3d1c47ce54dfaa27d7da645d049d7c9e428ecc2b04c25b64fa2935a95e889f94703
6
+ metadata.gz: b2a0254725a93eff8eba126fb43f80311d45037471120f040d1d64a4ba4ae3082acdbf0614d3c4668a1b968beb7d4c299f9150ce35d53a9ee1dcce8453343987
7
+ data.tar.gz: 96179f1dbc708bdf8f09ff3b3ac8fb6a3781c62e7b8571100b34132e4116ca170a0fd1fbe372d40c17003bd3b86dab4ed321960a6959b4535421aa1ac03bc670
data/recipes/email.rb CHANGED
@@ -60,9 +60,8 @@ config.active_support.deprecation = :notify
60
60
  RUBY
61
61
  end
62
62
  end
63
- end
64
- if rails_4_1?
65
- email_configuration_text = <<-TEXT
63
+ if rails_4_1?
64
+ email_configuration_text = <<-TEXT
66
65
  \n
67
66
  config.action_mailer.smtp_settings = {
68
67
  address: "smtp.gmail.com",
@@ -74,22 +73,22 @@ RUBY
74
73
  password: Rails.application.secrets.email_provider_password
75
74
  }
76
75
  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
76
+ inject_into_file 'config/environments/development.rb', email_configuration_text, :after => "config.assets.debug = true"
77
+ inject_into_file 'config/environments/production.rb', email_configuration_text, :after => "config.active_support.deprecation = :notify"
78
+ case :email
79
+ when 'sendgrid'
80
+ gsub_file 'config/environments/development.rb', /smtp.gmail.com/, 'smtp.sendgrid.net'
81
+ gsub_file 'config/environments/production.rb', /smtp.gmail.com/, 'smtp.sendgrid.net'
82
+ when 'mandrill'
83
+ gsub_file 'config/environments/development.rb', /smtp.gmail.com/, 'smtp.mandrillapp.com'
84
+ gsub_file 'config/environments/production.rb', /smtp.gmail.com/, 'smtp.mandrillapp.com'
85
+ gsub_file 'config/environments/development.rb', /email_provider_password/, 'email_provider_apikey'
86
+ gsub_file 'config/environments/production.rb', /email_provider_password/, 'email_provider_apikey'
87
+ end
88
+ else
89
+ ### GMAIL ACCOUNT
90
+ if prefer :email, 'gmail'
91
+ gmail_configuration_text = <<-TEXT
93
92
  \n
94
93
  config.action_mailer.smtp_settings = {
95
94
  address: "smtp.gmail.com",
@@ -101,12 +100,12 @@ TEXT
101
100
  password: ENV["GMAIL_PASSWORD"]
102
101
  }
103
102
  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
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
110
109
  \n
111
110
  config.action_mailer.smtp_settings = {
112
111
  address: "smtp.sendgrid.net",
@@ -117,12 +116,12 @@ TEXT
117
116
  password: ENV["SENDGRID_PASSWORD"]
118
117
  }
119
118
  TEXT
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
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
126
125
  \n
127
126
  config.action_mailer.smtp_settings = {
128
127
  :address => "smtp.mandrillapp.com",
@@ -131,8 +130,9 @@ TEXT
131
130
  :password => ENV["MANDRILL_APIKEY"]
132
131
  }
133
132
  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"
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
136
136
  end
137
137
  end
138
138
  ### GIT
data/recipes/init.rb CHANGED
@@ -9,14 +9,14 @@ after_everything do
9
9
  when 'smtp'
10
10
  secrets_email = foreman_email = ''
11
11
  when 'gmail'
12
- secrets_email = " email_provider_username: <%= ENV[\"GMAIL_USERNAME\"] %>\n email_provider_password: <%= ENV[\"GMAIL_PASSWORD\"] %>\n domain_name: <%= ENV[\"DOMAIN_NAME\"] %>"
13
- foreman_email = "GMAIL_USERNAME=Your_Username\nGMAIL_PASSWORD=Your_Password\nDOMAIN_NAME=Your_Domain\n"
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"
14
14
  when 'sendgrid'
15
- secrets_email = " email_provider_username: <%= ENV[\"SENDGRID_USERNAME\"] %>\n email_provider_password: <%= ENV[\"SENDGRID_PASSWORD\"] %>\n domain_name: <%= ENV[\"DOMAIN_NAME\"] %>"
16
- foreman_email = "SENDGRID_USERNAME=Your_Username\nSENDGRID_PASSWORD=Your_Password\nDOMAIN_NAME=Your_Domain\n"
15
+ secrets_email = " email_provider_username: <%= ENV[\"SENDGRID_USERNAME\"] %>\n email_provider_password: <%= ENV[\"SENDGRID_PASSWORD\"] %>\n domain_name: example.com %>"
16
+ foreman_email = "SENDGRID_USERNAME=Your_Username\nSENDGRID_PASSWORD=Your_Password\nDOMAIN_NAME=example.com\n"
17
17
  when 'mandrill'
18
- secrets_email = " email_provider_username: <%= ENV[\"MANDRILL_USERNAME\"] %>\n email_provider_apikey: <%= ENV[\"MANDRILL_APIKEY\"] %>\n domain_name: <%= ENV[\"DOMAIN_NAME\"] %>"
19
- foreman_email = "MANDRILL_USERNAME=Your_Username\nMANDRILL_APIKEY=Your_API_Key\nDOMAIN_NAME=Your_Domain\n"
18
+ secrets_email = " email_provider_username: <%= ENV[\"MANDRILL_USERNAME\"] %>\n email_provider_apikey: <%= ENV[\"MANDRILL_APIKEY\"] %>\n domain_name: example.com %>"
19
+ foreman_email = "MANDRILL_USERNAME=Your_Username\nMANDRILL_APIKEY=Your_API_Key\nDOMAIN_NAME=example.com\n"
20
20
  end
21
21
  figaro_email = foreman_email.gsub('=', ': ')
22
22
  secrets_d_devise = " admin_name: First User\n admin_email: user@example.com\n admin_password: changeme"
@@ -32,7 +32,7 @@ after_everything do
32
32
  ## EMAIL
33
33
  inject_into_file 'config/secrets.yml', "\n" + secrets_email, :after => "development:" if rails_4_1?
34
34
  ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
35
- inject_into_file 'config/secrets.yml', "\n" + secrets_email + " " , :after => "production:" if rails_4_1?
35
+ inject_into_file 'config/secrets.yml', "\n" + secrets_email + " ", :after => "production:" if rails_4_1?
36
36
  append_file '.env', foreman_email if prefer :local_env_file, 'foreman'
37
37
  append_file 'config/application.yml', figaro_email if prefer :local_env_file, 'figaro'
38
38
  ## DEVISE
@@ -45,14 +45,16 @@ after_everything do
45
45
  ## OMNIAUTH
46
46
  if prefer :authentication, 'omniauth'
47
47
  inject_into_file 'config/secrets.yml', "\n" + secrets_omniauth, :after => "development:" if rails_4_1?
48
- inject_into_file 'config/secrets.yml', "\n" + secrets_omniauth, :after => "production:" if rails_4_1?
48
+ ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
49
+ inject_into_file 'config/secrets.yml', "\n" + secrets_omniauth + " ", :after => "production:" if rails_4_1?
49
50
  append_file '.env', foreman_omniauth if prefer :local_env_file, 'foreman'
50
51
  append_file 'config/application.yml', figaro_omniauth if prefer :local_env_file, 'figaro'
51
52
  end
52
53
  ## CANCAN
53
54
  if (prefer :authorization, 'cancan')
54
55
  inject_into_file 'config/secrets.yml', "\n" + secrets_cancan, :after => "development:" if rails_4_1?
55
- inject_into_file 'config/secrets.yml', "\n" + secrets_cancan, :after => "production:" if rails_4_1?
56
+ ### 'inject_into_file' doesn't let us inject the same text twice unless we append the extra space, why?
57
+ inject_into_file 'config/secrets.yml', "\n" + secrets_cancan + " ", :after => "production:" if rails_4_1?
56
58
  append_file '.env', foreman_cancan if prefer :local_env_file, 'foreman'
57
59
  append_file 'config/application.yml', figaro_cancan if prefer :local_env_file, 'figaro'
58
60
  end
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RailsWizard
2
- VERSION = "2.4.43"
2
+ VERSION = "2.4.44"
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: 2.4.43
4
+ version: 2.4.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe