rails_apps_composer 2.4.28 → 2.4.29
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/apps4.rb +0 -12
- data/recipes/extras.rb +8 -4
- data/recipes/gems.rb +3 -3
- data/recipes/init.rb +58 -70
- data/recipes/prelaunch.rb +0 -1
- data/recipes/railsapps.rb +11 -7
- data/recipes/saas.rb +0 -2
- data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4049365587388cda87244bc3e327179ce7b1301c
|
4
|
+
data.tar.gz: c05599a6a23bb672bd6400bde16b6d794bc3a34e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f14205a03748de93235ed6e39250baa06842b1e4c7dd7538ee808f64d3ee26791e413104b1ae62c77176f80ae0f17da799d97fa9e4a6147e2d4b2e574982a32
|
7
|
+
data.tar.gz: f57a9f504ccf1d47f7f5dccc568c8c52cb4598a9b1266bc560de37abd89d48ac5825f4075ccc6646f8c48b105d11a7567765a7db23e8071054893fb4c8984869
|
data/recipes/apps4.rb
CHANGED
@@ -159,12 +159,6 @@ if prefer :apps4, 'rails-devise'
|
|
159
159
|
say_wizard "recipe running after 'bundle install'"
|
160
160
|
repo = 'https://raw.github.com/RailsApps/rails-devise/master/'
|
161
161
|
|
162
|
-
# >-------------------------------[ Init ]--------------------------------<
|
163
|
-
|
164
|
-
copy_from_repo 'config/application.yml', :repo => repo
|
165
|
-
remove_file 'config/application.example.yml'
|
166
|
-
copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
|
167
|
-
|
168
162
|
# >-------------------------------[ Controllers ]--------------------------------<
|
169
163
|
|
170
164
|
copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
|
@@ -220,12 +214,6 @@ if prefer :apps4, 'rails-omniauth'
|
|
220
214
|
say_wizard "recipe running after 'bundle install'"
|
221
215
|
repo = 'https://raw.github.com/RailsApps/rails-omniauth/master/'
|
222
216
|
|
223
|
-
# >-------------------------------[ Init ]--------------------------------<
|
224
|
-
|
225
|
-
copy_from_repo 'config/application.yml', :repo => repo
|
226
|
-
remove_file 'config/application.example.yml'
|
227
|
-
copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
|
228
|
-
|
229
217
|
# >-------------------------------[ Models ]--------------------------------<
|
230
218
|
|
231
219
|
copy_from_repo 'app/models/user.rb', :repo => repo
|
data/recipes/extras.rb
CHANGED
@@ -84,9 +84,13 @@ if config['local_env_file']
|
|
84
84
|
prefs[:local_env_file] = 'foreman'
|
85
85
|
end
|
86
86
|
end
|
87
|
-
if prefer :local_env_file, 'figaro'
|
87
|
+
if prefer :local_env_file, 'figaro'
|
88
88
|
say_wizard "recipe creating application.yml file for environment variables with figaro"
|
89
|
-
|
89
|
+
if rails_4_1?
|
90
|
+
add_gem 'figaro', :github => 'laserlemon/figaro'
|
91
|
+
else
|
92
|
+
add_gem 'figaro'
|
93
|
+
end
|
90
94
|
elsif prefer :local_env_file, 'foreman'
|
91
95
|
say_wizard "recipe creating .env file for development environment variables with foreman"
|
92
96
|
add_gem 'foreman', :group => :development
|
@@ -191,8 +195,8 @@ config:
|
|
191
195
|
prompt: Create a GitHub repository?
|
192
196
|
- local_env_file:
|
193
197
|
type: multiple_choice
|
194
|
-
prompt:
|
195
|
-
choices: [ [None, none], [
|
198
|
+
prompt: Add gem and file for environment variables?
|
199
|
+
choices: [ [None, none], [Add .env with Foreman, foreman], [Add application.yml with Figaro, figaro]]
|
196
200
|
- quiet_assets:
|
197
201
|
type: boolean
|
198
202
|
prompt: Reduce assets logger noise during development?
|
data/recipes/gems.rb
CHANGED
@@ -255,7 +255,7 @@ after_bundler do
|
|
255
255
|
end
|
256
256
|
end
|
257
257
|
## Figaro Gem
|
258
|
-
if prefer :local_env_file, 'figaro'
|
258
|
+
if prefer :local_env_file, 'figaro'
|
259
259
|
generate 'figaro:install'
|
260
260
|
gsub_file 'config/application.yml', /# PUSHER_.*\n/, ''
|
261
261
|
gsub_file 'config/application.yml', /# STRIPE_.*\n/, ''
|
@@ -263,7 +263,7 @@ after_bundler do
|
|
263
263
|
# Add account credentials and API keys here.
|
264
264
|
# See http://railsapps.github.io/rails-environment-variables.html
|
265
265
|
# This file should be listed in .gitignore to keep your settings secret!
|
266
|
-
# Each entry sets a local environment variable
|
266
|
+
# Each entry sets a local environment variable.
|
267
267
|
# For example, setting:
|
268
268
|
# GMAIL_USERNAME: Your_Gmail_Username
|
269
269
|
# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
|
@@ -276,7 +276,7 @@ FILE
|
|
276
276
|
create_file '.env' do <<-FILE
|
277
277
|
# Add account credentials and API keys here.
|
278
278
|
# This file should be listed in .gitignore to keep your settings secret!
|
279
|
-
# Each entry sets a local environment variable
|
279
|
+
# Each entry sets a local environment variable.
|
280
280
|
# For example, setting:
|
281
281
|
# GMAIL_USERNAME=Your_Gmail_Username
|
282
282
|
# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
|
data/recipes/init.rb
CHANGED
@@ -3,77 +3,77 @@
|
|
3
3
|
|
4
4
|
after_everything do
|
5
5
|
say_wizard "recipe running after everything"
|
6
|
-
### CONFIGURATION FILE ###
|
7
|
-
## EMAIL
|
8
6
|
case prefs[:email]
|
9
7
|
when 'none'
|
10
|
-
|
8
|
+
secrets_d_email = secrets_p_email = foreman_email = ''
|
11
9
|
when 'smtp'
|
12
|
-
|
10
|
+
secrets_d_email = foreman_email = ''
|
13
11
|
when 'gmail'
|
14
|
-
|
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"
|
14
|
+
foreman_email = "GMAIL_USERNAME=Your_Username\nGMAIL_PASSWORD=Your_Password\n"
|
15
15
|
when 'sendgrid'
|
16
|
-
|
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"
|
18
|
+
foreman_email = "SENDGRID_USERNAME=Your_Username\nSENDGRID_PASSWORD=Your_Password\n"
|
17
19
|
when 'mandrill'
|
18
|
-
|
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"
|
22
|
+
foreman_email = "MANDRILL_USERNAME=Your_Username\nMANDRILL_APIKEY=Your_API_Key\n"
|
19
23
|
end
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
FILE
|
52
|
-
end
|
53
|
-
end
|
54
|
-
## AUTHENTICATION
|
55
|
-
if prefer :authentication, 'omniauth'
|
56
|
-
append_file '.env' do <<-FILE
|
57
|
-
OMNIAUTH_PROVIDER_KEY=Your_OmniAuth_Provider_Key
|
58
|
-
OMNIAUTH_PROVIDER_SECRET=Your_OmniAuth_Provider_Secret
|
59
|
-
FILE
|
60
|
-
end
|
61
|
-
end
|
62
|
-
## AUTHORIZATION
|
63
|
-
if (prefer :authorization, 'cancan')
|
64
|
-
append_file '.env', "ROLES=[admin, user, VIP]\n"
|
65
|
-
end
|
24
|
+
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"
|
27
|
+
foreman_devise = "ADMIN_NAME=First User\nADMIN_EMAIL=user@example.com\nADMIN_PASSWORD=changeme\n"
|
28
|
+
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"
|
31
|
+
foreman_omniauth = "OMNIAUTH_PROVIDER_KEY: Your_Provider_Key\nOMNIAUTH_PROVIDER_SECRET: Your_Provider_Secret\n"
|
32
|
+
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?
|
35
|
+
foreman_cancan = "ROLES=[admin, user, VIP]\n\n"
|
36
|
+
figaro_cancan = foreman_cancan.gsub('=', ': ')
|
37
|
+
## 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?
|
40
|
+
append_file '.env', foreman_email if prefer :local_env_file, 'foreman'
|
41
|
+
append_file 'config/application.yml', figaro_email if prefer :local_env_file, 'figaro'
|
42
|
+
## DEVISE
|
43
|
+
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?
|
46
|
+
append_file '.env', foreman_devise if prefer :local_env_file, 'foreman'
|
47
|
+
append_file 'config/application.yml', figaro_devise if prefer :local_env_file, 'figaro'
|
48
|
+
end
|
49
|
+
## OMNIAUTH
|
50
|
+
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?
|
53
|
+
append_file '.env', foreman_omniauth if prefer :local_env_file, 'foreman'
|
54
|
+
append_file 'config/application.yml', figaro_omniauth if prefer :local_env_file, 'figaro'
|
66
55
|
end
|
67
|
-
|
56
|
+
## CANCAN
|
57
|
+
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?
|
60
|
+
append_file '.env', foreman_cancan if prefer :local_env_file, 'foreman'
|
61
|
+
append_file 'config/application.yml', figaro_cancan if prefer :local_env_file, 'figaro'
|
62
|
+
end
|
63
|
+
### SUBDOMAINS (FIGARO ONLY) ###
|
68
64
|
copy_from_repo 'config/application.yml', :repo => 'https://raw.github.com/RailsApps/rails3-subdomains/master/' if prefer :starter_app, 'subdomains_app'
|
69
|
-
###
|
70
|
-
if prefer :local_env_file, 'figaro'
|
65
|
+
### EXAMPLE FILE FOR FOREMAN AND FIGARO ###
|
66
|
+
if prefer :local_env_file, 'figaro'
|
71
67
|
copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
|
72
68
|
elsif prefer :local_env_file, 'foreman'
|
73
69
|
copy_file destination_root + '/.env', destination_root + '/.env.example'
|
74
70
|
end
|
75
71
|
### DATABASE SEED ###
|
76
|
-
if prefer :
|
72
|
+
if (prefer :authentication, 'devise') and (rails_4_1?)
|
73
|
+
copy_from_repo 'db/seeds.rb', :repo => 'https://raw.github.com/RailsApps/rails-devise/master/'
|
74
|
+
copy_from_repo 'app/services/create_admin_service.rb', :repo => 'https://raw.github.com/RailsApps/rails-devise/master/'
|
75
|
+
end
|
76
|
+
if prefer :local_env_file, 'figaro'
|
77
77
|
append_file 'db/seeds.rb' do <<-FILE
|
78
78
|
# Environment variables (ENV['...']) can be set in the file config/application.yml.
|
79
79
|
# See http://railsapps.github.io/rails-environment-variables.html
|
@@ -109,21 +109,11 @@ FILE
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
## DEVISE-DEFAULT
|
112
|
-
if (prefer :authentication, 'devise') and (not prefer :apps4, 'rails-devise')
|
112
|
+
if (prefer :authentication, 'devise') and (not prefer :apps4, 'rails-devise') and (not rails_4_1?)
|
113
113
|
append_file 'db/seeds.rb' do <<-FILE
|
114
114
|
puts 'DEFAULT USERS'
|
115
115
|
user = User.find_or_create_by_email :name => ENV['ADMIN_NAME'].dup, :email => ENV['ADMIN_EMAIL'].dup, :password => ENV['ADMIN_PASSWORD'].dup, :password_confirmation => ENV['ADMIN_PASSWORD'].dup
|
116
116
|
puts 'user: ' << user.name
|
117
|
-
FILE
|
118
|
-
end
|
119
|
-
# Mongoid doesn't have a 'find_or_create_by' method
|
120
|
-
gsub_file 'db/seeds.rb', /find_or_create_by_email/, 'create!' if prefer :orm, 'mongoid'
|
121
|
-
end
|
122
|
-
if prefer :apps4, 'rails-devise'
|
123
|
-
append_file 'db/seeds.rb' do <<-FILE
|
124
|
-
puts 'DEFAULT USERS'
|
125
|
-
user = User.find_or_create_by_email :email => ENV['ADMIN_EMAIL'].dup, :password => ENV['ADMIN_PASSWORD'].dup, :password_confirmation => ENV['ADMIN_PASSWORD'].dup
|
126
|
-
puts 'user: ' << user.email
|
127
117
|
FILE
|
128
118
|
end
|
129
119
|
# Mongoid doesn't have a 'find_or_create_by' method
|
@@ -152,10 +142,8 @@ FILE
|
|
152
142
|
say_wizard "applying migrations and seeding the database"
|
153
143
|
if prefer :local_env_file, 'foreman'
|
154
144
|
run 'foreman run bundle exec rake db:migrate'
|
155
|
-
run 'foreman run bundle exec rake db:test:prepare'
|
156
145
|
else
|
157
146
|
run 'bundle exec rake db:migrate'
|
158
|
-
run 'bundle exec rake db:test:prepare'
|
159
147
|
end
|
160
148
|
end
|
161
149
|
else
|
data/recipes/prelaunch.rb
CHANGED
@@ -50,7 +50,6 @@ if prefer :railsapps, 'rails-prelaunch-signup'
|
|
50
50
|
copy_file destination_root + '/config/application.yml', destination_root + '/config/application.example.yml'
|
51
51
|
copy_from_repo 'db/seeds.rb', :repo => repo
|
52
52
|
run 'bundle exec rake db:seed'
|
53
|
-
run 'bundle exec rake db:test:prepare'
|
54
53
|
|
55
54
|
# >-------------------------------[ Controllers ]--------------------------------<
|
56
55
|
|
data/recipes/railsapps.rb
CHANGED
@@ -27,12 +27,16 @@ when "4"
|
|
27
27
|
["I want to build my own application", "none"]] unless prefs.has_key? :apps4
|
28
28
|
case prefs[:apps4]
|
29
29
|
when 'railsapps'
|
30
|
-
|
31
|
-
|
32
|
-
["rails-
|
33
|
-
|
34
|
-
["
|
35
|
-
|
30
|
+
if rails_4_1?
|
31
|
+
prefs[:apps4] = multiple_choice "Starter apps for Rails 4.1. More to come.",
|
32
|
+
[["rails-devise", "rails-devise"]]
|
33
|
+
else
|
34
|
+
prefs[:apps4] = multiple_choice "Starter apps for Rails 4.0. More to come.",
|
35
|
+
[["learn-rails", "learn-rails"],
|
36
|
+
["rails-bootstrap", "rails-bootstrap"],
|
37
|
+
["rails-foundation", "rails-foundation"],
|
38
|
+
["rails-omniauth", "rails-omniauth"]]
|
39
|
+
end
|
36
40
|
when 'contributed_app'
|
37
41
|
prefs[:apps4] = multiple_choice "No contributed applications are available.",
|
38
42
|
[["continue", "none"]]
|
@@ -118,7 +122,7 @@ case prefs[:apps4]
|
|
118
122
|
prefs[:authorization] = false
|
119
123
|
prefs[:starter_app] = false
|
120
124
|
prefs[:quiet_assets] = true
|
121
|
-
prefs[:local_env_file] =
|
125
|
+
prefs[:local_env_file] = false
|
122
126
|
prefs[:better_errors] = true
|
123
127
|
when 'rails-omniauth'
|
124
128
|
prefs[:git] = true
|
data/recipes/saas.rb
CHANGED
@@ -40,7 +40,6 @@ if prefer :railsapps, 'rails-stripe-membership-saas'
|
|
40
40
|
copy_from_repo 'db/seeds.rb', :repo => repo
|
41
41
|
copy_from_repo 'config/initializers/stripe.rb', :repo => repo
|
42
42
|
run 'bundle exec rake db:seed'
|
43
|
-
run 'bundle exec rake db:test:prepare'
|
44
43
|
|
45
44
|
# >-------------------------------[ Controllers ]--------------------------------<
|
46
45
|
copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
|
@@ -143,7 +142,6 @@ if prefer :railsapps, 'rails-recurly-subscription-saas'
|
|
143
142
|
copy_from_repo 'db/seeds.rb', :repo => repo
|
144
143
|
copy_from_repo 'config/initializers/recurly.rb', :repo => repo
|
145
144
|
run 'bundle exec rake db:seed'
|
146
|
-
run 'bundle exec rake db:test:prepare'
|
147
145
|
|
148
146
|
# >-------------------------------[ Controllers ]--------------------------------<
|
149
147
|
copy_from_repo 'app/controllers/home_controller.rb', :repo => repo
|
data/version.rb
CHANGED
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.
|
4
|
+
version: 2.4.29
|
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-02-
|
11
|
+
date: 2014-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|