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.
- checksums.yaml +4 -4
- data/recipes/email.rb +33 -33
- data/recipes/init.rb +11 -9
- data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcc3be5bac3cdf00543a65af9d5f8234a8e5478f
|
4
|
+
data.tar.gz: d3f09e1f9f55f5bfb2e0beadaa95e2bbb4edde50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
64
|
-
|
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
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
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
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
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
|
-
|
135
|
-
|
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:
|
13
|
-
foreman_email = "GMAIL_USERNAME=Your_Username\nGMAIL_PASSWORD=Your_Password\nDOMAIN_NAME=
|
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:
|
16
|
-
foreman_email = "SENDGRID_USERNAME=Your_Username\nSENDGRID_PASSWORD=Your_Password\nDOMAIN_NAME=
|
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:
|
19
|
-
foreman_email = "MANDRILL_USERNAME=Your_Username\nMANDRILL_APIKEY=Your_API_Key\nDOMAIN_NAME=
|
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 + " "
|
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
|
-
|
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
|
-
|
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