rails_apps_composer 2.2.22 → 2.2.23
Sign up to get free protection for your applications and to get access to all the features.
- data/recipes/email.rb +9 -9
- data/recipes/extras.rb +3 -15
- data/recipes/gems.rb +16 -0
- data/recipes/models.rb +3 -3
- data/recipes/saas.rb +3 -3
- data/version.rb +1 -1
- metadata +4 -4
data/recipes/email.rb
CHANGED
@@ -55,9 +55,9 @@ RUBY
|
|
55
55
|
TEXT
|
56
56
|
inject_into_file 'config/environments/development.rb', gmail_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
|
57
57
|
inject_into_file 'config/environments/production.rb', gmail_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
|
58
|
-
append_file 'config/
|
59
|
-
GMAIL_USERNAME:
|
60
|
-
GMAIL_PASSWORD:
|
58
|
+
append_file 'config/application.yml' do <<-FILE
|
59
|
+
# GMAIL_USERNAME: Your_Username
|
60
|
+
# GMAIL_PASSWORD: Your_Password
|
61
61
|
FILE
|
62
62
|
end
|
63
63
|
end
|
@@ -76,9 +76,9 @@ FILE
|
|
76
76
|
TEXT
|
77
77
|
inject_into_file 'config/environments/development.rb', sendgrid_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
|
78
78
|
inject_into_file 'config/environments/production.rb', sendgrid_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
|
79
|
-
append_file 'config/
|
80
|
-
SENDGRID_USERNAME:
|
81
|
-
SENDGRID_PASSWORD:
|
79
|
+
append_file 'config/application.yml' do <<-FILE
|
80
|
+
# SENDGRID_USERNAME: Your_Username
|
81
|
+
# SENDGRID_PASSWORD: Your_Password
|
82
82
|
FILE
|
83
83
|
end
|
84
84
|
end
|
@@ -95,9 +95,9 @@ SENDGRID_PASSWORD: 'Your_Password'
|
|
95
95
|
TEXT
|
96
96
|
inject_into_file 'config/environments/development.rb', mandrill_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
|
97
97
|
inject_into_file 'config/environments/production.rb', mandrill_configuration_text, :after => 'config.action_mailer.default :charset => "utf-8"'
|
98
|
-
append_file 'config/
|
99
|
-
MANDRILL_USERNAME:
|
100
|
-
MANDRILL_API_KEY:
|
98
|
+
append_file 'config/application.yml' do <<-FILE
|
99
|
+
# MANDRILL_USERNAME: Your_Username
|
100
|
+
# MANDRILL_API_KEY: Your_API_Key
|
101
101
|
FILE
|
102
102
|
end
|
103
103
|
end
|
data/recipes/extras.rb
CHANGED
@@ -15,20 +15,8 @@ if config['local_env_file']
|
|
15
15
|
prefs[:local_env_file] = true
|
16
16
|
end
|
17
17
|
if prefs[:local_env_file]
|
18
|
-
say_wizard "recipe creating
|
19
|
-
|
20
|
-
inject_into_file 'config/application.rb', :after => "config.assets.version = '1.0'\n" do <<-RUBY
|
21
|
-
|
22
|
-
# Set local environment variables from a file /config/local_env.yml
|
23
|
-
# See http://railsapps.github.com/rails-environment-variables.html
|
24
|
-
config.before_configuration do
|
25
|
-
env_file = File.join(Rails.root, 'config', 'local_env.yml')
|
26
|
-
YAML.load(File.open(env_file)).each do |key, value|
|
27
|
-
ENV[key.to_s] = value
|
28
|
-
end if File.exists?(env_file)
|
29
|
-
end
|
30
|
-
RUBY
|
31
|
-
end
|
18
|
+
say_wizard "recipe creating application.yml file for environment variables"
|
19
|
+
gem 'figaro', '>= 0.5.0'
|
32
20
|
end
|
33
21
|
|
34
22
|
## BETTER ERRORS
|
@@ -169,7 +157,7 @@ config:
|
|
169
157
|
prompt: Reduce assets logger noise during development?
|
170
158
|
- local_env_file:
|
171
159
|
type: boolean
|
172
|
-
prompt: Use
|
160
|
+
prompt: Use application.yml file for environment variables?
|
173
161
|
- better_errors:
|
174
162
|
type: boolean
|
175
163
|
prompt: Improve error reporting with 'better_errors' during development?
|
data/recipes/gems.rb
CHANGED
@@ -201,6 +201,22 @@ after_bundler do
|
|
201
201
|
generate 'simple_form:install'
|
202
202
|
end
|
203
203
|
end
|
204
|
+
## Figaro Gem
|
205
|
+
if prefs[:local_env_file]
|
206
|
+
generate 'figaro:install'
|
207
|
+
gsub_file 'config/application.yml', /# PUSHER_.*\n/, ''
|
208
|
+
gsub_file 'config/application.yml', /# STRIPE_.*\n/, ''
|
209
|
+
prepend_to_file 'config/application.yml' do <<-FILE
|
210
|
+
# Add account credentials and API keys here.
|
211
|
+
# See http://railsapps.github.com/rails-environment-variables.html
|
212
|
+
# This file should be listed in .gitignore to keep your settings secret!
|
213
|
+
# Each entry sets a local environment variable and overrides ENV variables in the Unix shell.
|
214
|
+
# For example, setting:
|
215
|
+
# GMAIL_USERNAME: Your_Gmail_Username
|
216
|
+
# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
|
217
|
+
FILE
|
218
|
+
end
|
219
|
+
end
|
204
220
|
## Git
|
205
221
|
git :add => '-A' if prefer :git, true
|
206
222
|
git :commit => '-qm "rails_apps_composer: generators"' if prefer :git, true
|
data/recipes/models.rb
CHANGED
@@ -53,9 +53,9 @@ RUBY
|
|
53
53
|
### OMNIAUTH ###
|
54
54
|
if prefer :authentication, 'omniauth'
|
55
55
|
repo = 'https://raw.github.com/RailsApps/rails3-mongoid-omniauth/master/'
|
56
|
-
append_file 'config/
|
57
|
-
OMNIAUTH_PROVIDER_KEY:
|
58
|
-
OMNIAUTH_PROVIDER_SECRET:
|
56
|
+
append_file 'config/application.yml' do <<-FILE
|
57
|
+
# OMNIAUTH_PROVIDER_KEY: Your_OmniAuth_Provider_Key
|
58
|
+
# OMNIAUTH_PROVIDER_SECRET: Your_OmniAuth_Provider_Secret
|
59
59
|
FILE
|
60
60
|
end
|
61
61
|
copy_from_repo 'config/initializers/omniauth.rb', :repo => repo
|
data/recipes/saas.rb
CHANGED
@@ -94,9 +94,9 @@ if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
94
94
|
copy_from_repo 'spec/stripe/stripe_config_spec.rb', :repo => repo
|
95
95
|
|
96
96
|
# >-------------------------------[ Extras ]--------------------------------<
|
97
|
-
append_file 'config/
|
98
|
-
STRIPE_API_KEY:
|
99
|
-
STRIPE_PUBLIC_KEY:
|
97
|
+
append_file 'config/application.yml' do <<-FILE
|
98
|
+
# STRIPE_API_KEY: Your_Stripe_API_key
|
99
|
+
# STRIPE_PUBLIC_KEY: Your_Stripe_Public_Key
|
100
100
|
FILE
|
101
101
|
end
|
102
102
|
|
data/version.rb
CHANGED
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.2.
|
4
|
+
version: 2.2.23
|
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-12-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -202,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
202
202
|
version: '0'
|
203
203
|
segments:
|
204
204
|
- 0
|
205
|
-
hash: -
|
205
|
+
hash: -552617243170200961
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
207
|
none: false
|
208
208
|
requirements:
|
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '0'
|
212
212
|
segments:
|
213
213
|
- 0
|
214
|
-
hash: -
|
214
|
+
hash: -552617243170200961
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project: rails_apps_composer
|
217
217
|
rubygems_version: 1.8.24
|