rails_init_gem 0.0.5 → 0.0.6
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/.gitignore +22 -24
- data/README.md +9 -2
- data/lib/generators/new/new_generator.rb +121 -36
- data/lib/rails_init_gem/version.rb +1 -1
- data/railsNew.sh +107 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75949856b53ec0aaf27503c67743b251970ea564
|
4
|
+
data.tar.gz: 25e182d8b16f6b56661c689351138fbd7d8448bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09fa10afbd44cff2e5f7737b7581aa6ab3c9e556fbe3590b2aebc1cacbb5b6c2c9f205f34d0cd282140b41886a04a844fbeb4a85cba193eb68e2396654a878c1
|
7
|
+
data.tar.gz: e099ff8b56397ee14c37241e43a84e45e199861a184c5f2879923e566a5edc9517b289cce8c13612bcee2a38ce265853e705a4c338c98606625fd51ede3273b6
|
data/.gitignore
CHANGED
@@ -1,25 +1,23 @@
|
|
1
|
-
*.rbc
|
2
|
-
capybara-*.html
|
3
|
-
.rspec
|
4
|
-
/log
|
5
|
-
/tmp
|
6
|
-
/db/*.sqlite3
|
7
|
-
/public/system
|
8
|
-
/coverage/
|
9
|
-
/spec/tmp
|
10
|
-
**.orig
|
11
1
|
*.gem
|
12
|
-
|
13
|
-
|
14
|
-
config
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
23
|
+
.git/
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# RailsInitGem
|
1
|
+
# RailsInitGem: A Gem to Integrate them All
|
2
|
+
[](http://badge.fury.io/rb/rails_init_gem)
|
3
|
+
|
4
|
+
The idea of this Gem is to Create a functioning Rails Project integrating lots of different Gems in such a way, that the resulting Project can be used in any Production Project. This version is the first one, and probably has some Bugs. I hope people will Help me to Keep this Updated.
|
2
5
|
|
3
6
|
This gem create a initial application with:
|
4
7
|
|
@@ -36,7 +39,11 @@ Or install it yourself as:
|
|
36
39
|
|
37
40
|
## Usage
|
38
41
|
|
39
|
-
$ rails g
|
42
|
+
$ rails g new
|
43
|
+
|
44
|
+
Another Option is to execute the railsNew.sh shell script, which will do the steps mention above
|
45
|
+
|
46
|
+
$ ./railsNew.sh NAME_OF_THE_PROJECT
|
40
47
|
|
41
48
|
## Contributing
|
42
49
|
|
@@ -19,7 +19,8 @@ class NewGenerator < Rails::Generators::Base
|
|
19
19
|
# Basic needs
|
20
20
|
gem 'rails'
|
21
21
|
gem "pg"
|
22
|
-
gem '
|
22
|
+
gem 'sqlite3'
|
23
|
+
gem 'rails_init_gem'
|
23
24
|
gem 'sass-rails'
|
24
25
|
gem 'coffee-rails'
|
25
26
|
gem 'jbuilder'
|
@@ -118,60 +119,113 @@ class NewGenerator < Rails::Generators::Base
|
|
118
119
|
run "bundle install"
|
119
120
|
end
|
120
121
|
# --------------------------------------------
|
122
|
+
|
123
|
+
# Drop Database
|
121
124
|
rake("db:drop")
|
122
125
|
rake("db:create")
|
126
|
+
|
127
|
+
# Install Annotate to facilitate development of Models
|
123
128
|
generate "annotate:install"
|
129
|
+
|
130
|
+
# Install JQuery
|
124
131
|
generate "jquery:install"
|
132
|
+
|
133
|
+
# Install Simple_Form with Bootstrap
|
125
134
|
generate "simple_form:install --bootstrap"
|
135
|
+
|
136
|
+
# Pre configure Bootstrap
|
126
137
|
generate "layout:install"
|
138
|
+
|
139
|
+
# Use Friendly ID to hide ID field from URLs
|
127
140
|
generate "friendly_id"
|
141
|
+
|
142
|
+
# Create Some Static Pages
|
128
143
|
generate "controller StaticPages home help about contact"
|
144
|
+
|
145
|
+
# Migrate DB
|
129
146
|
rake("db:migrate")
|
147
|
+
|
148
|
+
# Install Devise to manage Users
|
130
149
|
generate "devise:install"
|
150
|
+
|
151
|
+
# Add functionality to invite Friends
|
131
152
|
generate "devise_invitable:install"
|
153
|
+
|
154
|
+
# Add Necessary views to Users
|
132
155
|
generate "devise:views"
|
156
|
+
|
157
|
+
# Install Paypal System on the Project
|
133
158
|
generate "paypal:sdk:install"
|
159
|
+
|
160
|
+
# Install Testing utilities
|
134
161
|
generate "rspec:install"
|
162
|
+
|
163
|
+
# Create User Table
|
135
164
|
generate "devise User"
|
165
|
+
|
166
|
+
# Migrate DB
|
136
167
|
rake("db:migrate")
|
168
|
+
|
169
|
+
# Create Guest User
|
137
170
|
generate "devise_guests User"
|
171
|
+
|
172
|
+
# Add CanCan to manage Permissions
|
138
173
|
generate "cancan:ability"
|
174
|
+
|
175
|
+
# Add Rolify to Add roles to Users
|
139
176
|
generate "rolify Role User"
|
177
|
+
|
178
|
+
# Correct FileName Bug of Rolify
|
140
179
|
filename = Dir.glob("db/migrate/*rolify_create_roles")[0]
|
141
180
|
copy_file File.join(project_path, filename), filename + ".rb"
|
142
181
|
remove_file File.join(project_path, filename)
|
182
|
+
|
183
|
+
# Migrate
|
143
184
|
rake("db:migrate")
|
185
|
+
|
186
|
+
# Create Invitable User Table
|
144
187
|
generate "devise_invitable User"
|
188
|
+
|
189
|
+
# Migrate
|
145
190
|
rake("db:migrate")
|
191
|
+
|
192
|
+
# Create Devise Inviting Pages
|
146
193
|
generate "devise_invitable:views"
|
194
|
+
|
195
|
+
# Add Testing tools to test Emails
|
147
196
|
generate "email_spec:steps"
|
197
|
+
|
198
|
+
# Add slug to user to Hide ID from URLs
|
148
199
|
generate "migration add_slug_to_users slug:string:uniq"
|
200
|
+
|
201
|
+
# Add Some data to User (e.g CPF, CreditCard, Etc..)
|
149
202
|
generate "migration add_name_to_users name:string cpf:string cnpj:string"
|
150
203
|
generate "migration add_provider_to_users provider:boolean"
|
151
204
|
generate "migration add_client_to_users client:boolean"
|
205
|
+
|
206
|
+
# Set field default value to False (they are not clients nor providers at the beginning)
|
152
207
|
filename = Dir.glob("db/migrate/*add_client_to_users.rb")[0]
|
153
208
|
inject_into_file filename,", default: false",after: "boolean"
|
154
209
|
filename = Dir.glob("db/migrate/*add_provider_to_users.rb")[0]
|
155
210
|
inject_into_file filename,", default: false",after: "boolean"
|
211
|
+
|
212
|
+
# Migrate
|
156
213
|
rake("db:migrate")
|
157
214
|
|
158
215
|
|
216
|
+
# -------- Configure Redis (cahce service) -------------------
|
159
217
|
|
160
|
-
# --------------------------------------------
|
161
|
-
# gsub_file("#$oi/database.yml", "database: Ww_production", "database: "+project_name+"_production")
|
162
|
-
# gsub_file("#$oi/unicorn.rb", "Ww", project_name)
|
163
|
-
# gsub_file("#$oi/unicorn.rb", "root = \"/home/ziongh/railsProjects/current/ww\"", "root = \"#{project_path}\"")
|
164
|
-
# gsub_file("#$oi/unicorn_init.sh", "APP_ROOT=\"/home/ziongh/railsProjects/current/ww\"", "APP_ROOT=\"#{project_path}\"" )
|
165
|
-
# gsub_file("#$oi/secret_token.rb", "Ww::Application.config.secret_key_base = secret_token", project_name+"::Application.config.secret_key_base = secret_token")
|
166
|
-
|
167
|
-
# --------------------------------------------
|
168
|
-
# copy_file "database.yml", "config/database.yml"
|
169
|
-
# gsub_file("config/database.yml", "database: Ww_production", "database: "+project_name+"_production")
|
170
218
|
copy_file "redis.rb", "config/initializers/redis.rb"
|
171
219
|
copy_file "secret_token.rb", "config/initializers/secret_token.rb"
|
172
220
|
gsub_file("config/initializers/secret_token.rb", "Ww::Application.config.secret_key_base = secret_token", project_name+"::Application.config.secret_key_base = secret_token")
|
221
|
+
|
222
|
+
# filename = Dir.glob("config/secrets.yml")[0]
|
223
|
+
# remove_file File.join(project_path, filename)
|
224
|
+
|
173
225
|
copy_file "secret.yml", "config/secrets.yml"
|
174
|
-
# copy_file "i18n_backend.rb", "config/initializers/i18n_backend.rb"
|
226
|
+
# copy_file "i18n_backend.rb", "config/initializers/i18n_backend.rb" # Add Translation To Redis Server (quite expensive)
|
227
|
+
|
228
|
+
# -------- Install Unicorn (WebServer) -------------------
|
175
229
|
copy_file "unicorn.rb", "config/unicorn.rb"
|
176
230
|
gsub_file("config/unicorn.rb", "Ww", project_name)
|
177
231
|
gsub_file("config/unicorn.rb", "root = \"/home/ziongh/railsProjects/current/ww\"", "root = \"#{project_path}\"")
|
@@ -179,15 +233,17 @@ class NewGenerator < Rails::Generators::Base
|
|
179
233
|
gsub_file("config/unicorn_init.sh", "APP_ROOT=\"/home/EXAMPLE_USER/railsProjects/current/ww\"", "APP_ROOT=\"#{project_path}\"" )
|
180
234
|
gsub_file("config/unicorn_init.sh", "AS_USER=EXAMPLE_USER", "AS_USER=\"#{project_user}\"" )
|
181
235
|
|
182
|
-
#
|
236
|
+
# ----------- Configure Pages To use Bootstrap -------------
|
183
237
|
inject_into_file "app/assets/stylesheets/application.css.scss", "\n *= require bootstrap
|
184
238
|
*= require chosen", after: "*= require_tree ."
|
185
239
|
|
186
|
-
#
|
240
|
+
# ----------- Configure Routes ---------------------------------
|
187
241
|
inject_into_file "config/routes.rb", " match '/contact', to: 'static_pages#contact' , via: 'get'\n", :after => "Rails.application.routes.draw do\n"
|
188
242
|
inject_into_file "config/routes.rb", " match '/about', to: 'static_pages#about' , via: 'get'\n", :after => "Rails.application.routes.draw do\n"
|
189
243
|
inject_into_file "config/routes.rb", " match '/help', to: 'static_pages#help' , via: 'get'\n", :after => "Rails.application.routes.draw do\n"
|
190
244
|
inject_into_file "config/routes.rb", " root to: \"static_pages#home\"\n", :after => "Rails.application.routes.draw do\n"
|
245
|
+
|
246
|
+
# ----------- Configure Translations, assets and cache store -----------------------
|
191
247
|
inject_into_file "config/application.rb", "\n I18n.enforce_available_locales = true\n", :before => "end\nend"
|
192
248
|
inject_into_file "config/application.rb", "\n config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)\n", :before => "end\nend"
|
193
249
|
inject_into_file "config/application.rb", "\n config.assets.initialize_on_precompile = false\n", :before => "end\nend"
|
@@ -199,7 +255,7 @@ class NewGenerator < Rails::Generators::Base
|
|
199
255
|
\"production\" => \"#{project_name}.com\"
|
200
256
|
}\n", :before => "end\nend"
|
201
257
|
|
202
|
-
#
|
258
|
+
# ----------- Configure production properties and mailing system (Mandrill) ----------------------
|
203
259
|
inject_into_file "config/environments/production.rb", " config.static_cache_control = \"public, max-age=3600000\"\n", :after => "pplication.configure do\n"
|
204
260
|
inject_into_file "config/environments/production.rb", " config.assets.css_compressor = :yui\n", :after => "pplication.configure do\n"
|
205
261
|
gsub_file("config/environments/production.rb",'config.assets.compile = false','config.assets.compile = true')
|
@@ -226,7 +282,7 @@ class NewGenerator < Rails::Generators::Base
|
|
226
282
|
|
227
283
|
|
228
284
|
|
229
|
-
#
|
285
|
+
# ------------- Configure Mailing service for development (testing) -------------------------------
|
230
286
|
inject_into_file "config/environments/development.rb", "\n\n config.action_mailer.default_url_options = { :host => config.hosts[Rails.env] }
|
231
287
|
config.action_mailer.delivery_method = :smtp
|
232
288
|
# change to true to allow email to be sent during development
|
@@ -235,15 +291,12 @@ class NewGenerator < Rails::Generators::Base
|
|
235
291
|
config.action_mailer.default :charset => \"utf-8\"
|
236
292
|
\n\n", after: "pplication.configure do\n"
|
237
293
|
|
238
|
-
# --------------------------------------------
|
239
|
-
|
240
294
|
inject_into_file "config/environments/test.rb", "# ActionMailer Config
|
241
295
|
config.action_mailer.default_url_options = { :host => config.hosts[Rails.env] }
|
242
296
|
\n", before: "end"
|
243
297
|
|
244
298
|
|
245
|
-
|
246
|
-
# --------------------------------------------
|
299
|
+
# ------------- Configure HTML Compressor -------------------------------
|
247
300
|
inject_into_file "config/environments/production.rb", "\n options = {
|
248
301
|
:enabled => true,
|
249
302
|
:remove_multi_spaces => true,
|
@@ -266,11 +319,16 @@ class NewGenerator < Rails::Generators::Base
|
|
266
319
|
}\n
|
267
320
|
config.middleware.use HtmlCompressor::Rack, options", :before => "\nend"
|
268
321
|
|
269
|
-
#
|
322
|
+
# ------------- Create Secret for APP -------------------------------
|
323
|
+
|
324
|
+
# filename = Dir.glob(".secret")[0]
|
325
|
+
# remove_file File.join(project_path, filename)
|
326
|
+
|
327
|
+
|
270
328
|
create_file (".secret")
|
271
329
|
prepend_file(".secret", %x[rake secret])
|
272
330
|
|
273
|
-
#
|
331
|
+
# ---------- Configure Simple_form to be fast and compatible ------------------
|
274
332
|
# gsub_file("config/initializers/session_store.rb", "Rails.application.config.session_store :cookie_store", "Rails.application.config.session_store :redis_store")
|
275
333
|
gsub_file("config/initializers/simple_form.rb", "b.optional :pattern", "#b.optional :pattern")
|
276
334
|
gsub_file("config/initializers/simple_form.rb", "# config.collection_wrapper_class = nil", "config.collection_wrapper_class = nil")
|
@@ -280,10 +338,10 @@ class NewGenerator < Rails::Generators::Base
|
|
280
338
|
gsub_file("config/initializers/simple_form.rb", "# config.input_class = nil", "config.input_class = nil")
|
281
339
|
gsub_file("config/initializers/simple_form.rb", "# config.cache_discovery = !Rails.env.development?", "config.cache_discovery = !Rails.env.development?")
|
282
340
|
|
283
|
-
#
|
341
|
+
# ----------- Fix Simple_form Integration with Bootstrap---------------------------------
|
284
342
|
inject_into_file "config/initializers/simple_form_bootstrap.rb", "\n # b.use :pattern\n", after:"b.use :placeholder"
|
285
343
|
|
286
|
-
#
|
344
|
+
# ------------ Change APP Title --------------------------------
|
287
345
|
inject_into_file "app/helpers/application_helper.rb", "\n def title
|
288
346
|
base_title = \"#{project_name}\"
|
289
347
|
if @title.nil?
|
@@ -294,7 +352,7 @@ class NewGenerator < Rails::Generators::Base
|
|
294
352
|
end
|
295
353
|
", :after => "module ApplicationHelper"
|
296
354
|
|
297
|
-
#
|
355
|
+
# ------------ Configure Static Pages Title --------------------------------
|
298
356
|
inject_into_file "app/controllers/static_pages_controller.rb", "\n @title = nil\n", after: "def home"
|
299
357
|
inject_into_file "app/controllers/static_pages_controller.rb", "\n @title = \"About\"\n", after: "def about"
|
300
358
|
inject_into_file "app/controllers/static_pages_controller.rb", "\n @title = \"Help\"\n", after: "def help"
|
@@ -302,7 +360,7 @@ class NewGenerator < Rails::Generators::Base
|
|
302
360
|
|
303
361
|
|
304
362
|
|
305
|
-
#
|
363
|
+
# ------------- Authenticate Users -------------------------------
|
306
364
|
inject_into_file "app/controllers/application_controller.rb", "\n # before_action :authenticate_user!
|
307
365
|
before_action :configure_permitted_parameters, if: :devise_controller?
|
308
366
|
|
@@ -317,34 +375,62 @@ protected
|
|
317
375
|
devise_parameter_sanitizer.for(:account_update) { |u| u.permit({ roles: [] }, :email, :password, :password_confirmation, :current_password, :name,:cpf, :cnpj, :client, :provider) }
|
318
376
|
end\n", after: "protect_from_forgery with: :exception"
|
319
377
|
|
320
|
-
#
|
378
|
+
# ------------- Adds Navigation Bar to WebSite -------------------------------
|
379
|
+
|
380
|
+
# filename = Dir.glob("app/views/layouts/_navigation.html.erb")[0]
|
381
|
+
# remove_file File.join(project_path, filename)
|
382
|
+
|
321
383
|
copy_file "_navigation.html.erb" , "app/views/layouts/_navigation.html.erb"
|
384
|
+
|
385
|
+
# filename = Dir.glob("app/views/layouts/_navigation_links.html.erb")[0]
|
386
|
+
# remove_file File.join(project_path, filename)
|
387
|
+
|
322
388
|
copy_file "_navigation_links.html.erb" , "app/views/layouts/_navigation_links.html.erb"
|
389
|
+
|
390
|
+
# filename = Dir.glob("app/views/layouts/application.html.erb")[0]
|
391
|
+
# remove_file File.join(project_path, filename)
|
392
|
+
|
323
393
|
copy_file "application.html.erb" , "app/views/layouts/application.html.erb"
|
324
394
|
|
325
|
-
#
|
395
|
+
# ------------- Create Views -------------------------------
|
396
|
+
|
397
|
+
# filename = Dir.glob("app/views/static_pages/about.html.erb")[0]
|
398
|
+
# remove_file File.join(project_path, filename)
|
399
|
+
|
326
400
|
copy_file "about.html.erb" , "app/views/static_pages/about.html.erb"
|
401
|
+
|
402
|
+
# filename = Dir.glob("app/views/static_pages/contact.html.erb")[0]
|
403
|
+
# remove_file File.join(project_path, filename)
|
327
404
|
copy_file "about.html.erb" , "app/views/static_pages/contact.html.erb"
|
405
|
+
|
406
|
+
# filename = Dir.glob("app/views/static_pages/help.html.erb")[0]
|
407
|
+
# remove_file File.join(project_path, filename)
|
328
408
|
copy_file "about.html.erb" , "app/views/static_pages/help.html.erb"
|
329
|
-
|
409
|
+
|
410
|
+
gsub_file("app/views/static_pages/help.html.erb", "<h1>About</h1>", "<h1>Help</h1>")
|
330
411
|
gsub_file("app/views/static_pages/contact.html.erb", "<h1>About</h1>", "<h1>Contact</h1>")
|
412
|
+
|
413
|
+
# filename = Dir.glob("app/views/static_pages/home.html.erb")[0]
|
414
|
+
# remove_file File.join(project_path, filename)
|
331
415
|
copy_file "home.html.erb" , "app/views/static_pages/home.html.erb"
|
332
416
|
|
333
|
-
#
|
417
|
+
# ------------- Add some Styling to WebSite -------------------------------
|
334
418
|
#
|
335
419
|
|
336
420
|
copy_file "docs.css" , "app/assets/stylesheets/docs.css"
|
337
421
|
copy_file "custom.js" , "app/assets/javascripts/custom.js"
|
338
422
|
|
339
|
-
#
|
423
|
+
# ------------- Configure Friendly ID TO hide ID from URL-------------------------------
|
340
424
|
gsub_file("config/initializers/devise.rb","# config.scoped_views = false","config.scoped_views = true")
|
341
425
|
inject_into_file "app/models/user.rb","\nextend FriendlyId
|
342
426
|
friendly_id :name, use: :slugged
|
343
427
|
", after: "ActiveRecord::Base"
|
428
|
+
|
429
|
+
# ------------- Configure Mail address of Mandrill -------------------------------
|
344
430
|
gsub_file("config/initializers/devise.rb","# config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'","config.mailer_sender = 'info@#{project_name}.com'")
|
345
431
|
#inject_into_file "app/models/user.rb","\n config.mailer_sender = 'info@#{project_name}.com'", after: "ActiveRecord::Base"
|
346
432
|
|
347
|
-
#
|
433
|
+
# ------------- Adds abilities to Users -------------------------------
|
348
434
|
|
349
435
|
|
350
436
|
inject_into_file "app/models/ability.rb","\n user ||= User.new # guest user (not logged in)
|
@@ -355,7 +441,7 @@ inject_into_file "app/models/ability.rb","\n user ||= User.new # guest user (
|
|
355
441
|
end
|
356
442
|
", after: "def initialize(user)"
|
357
443
|
|
358
|
-
#
|
444
|
+
# ------------ Configure Stylesheets --------------------------------
|
359
445
|
|
360
446
|
gsub_file("app/assets/stylesheets/application.css.scss", "*= require_tree .
|
361
447
|
*= require bootstrap
|
@@ -369,13 +455,13 @@ inject_into_file "app/models/ability.rb","\n user ||= User.new # guest user (
|
|
369
455
|
|
370
456
|
inject_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n", before: "//= require_tree ."
|
371
457
|
|
372
|
-
#
|
458
|
+
# ------------ Config Database Pass and User to NULL --------------------------------
|
373
459
|
#
|
374
460
|
gsub_file("config/database.yml", "username:", "# username:" )
|
375
461
|
gsub_file("config/database.yml", "password:", "# password:" )
|
376
462
|
|
377
463
|
|
378
|
-
#
|
464
|
+
# ----------- Recreate app in all environments ---------------------------------
|
379
465
|
#
|
380
466
|
rake("db:drop")
|
381
467
|
rake("db:schema:cache:clear")
|
@@ -399,7 +485,6 @@ inject_into_file "app/models/ability.rb","\n user ||= User.new # guest user (
|
|
399
485
|
run "mkdir ./tmp/pids"
|
400
486
|
end
|
401
487
|
|
402
|
-
# --------------------------------------------
|
403
488
|
end
|
404
489
|
|
405
490
|
private
|
data/railsNew.sh
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
rails new "$1" --database=postgresql --skip-bundle
|
3
|
+
cd ./"$1"
|
4
|
+
rm ./Gemfile
|
5
|
+
cat > ./Gemfile << EOF
|
6
|
+
source 'https://rubygems.org'
|
7
|
+
|
8
|
+
# Basic needs
|
9
|
+
gem 'rails'
|
10
|
+
gem "pg"
|
11
|
+
gem 'sqlite3'
|
12
|
+
gem 'rails_init_gem'
|
13
|
+
gem 'sass-rails'
|
14
|
+
gem 'coffee-rails'
|
15
|
+
gem 'jbuilder'
|
16
|
+
gem 'jquery-rails'
|
17
|
+
|
18
|
+
# Speedup gems
|
19
|
+
gem 'uglifier'
|
20
|
+
gem 'turbolinks'
|
21
|
+
gem 'rails_serve_static_assets'
|
22
|
+
gem 'multi_fetch_fragments'
|
23
|
+
gem 'therubyracer'
|
24
|
+
gem 'htmlcompressor'
|
25
|
+
|
26
|
+
# Preitify gems
|
27
|
+
gem 'bootstrap-sass'
|
28
|
+
gem 'chosen-rails'
|
29
|
+
gem 'country_select'
|
30
|
+
gem 'friendly_id'
|
31
|
+
gem 'high_voltage'
|
32
|
+
|
33
|
+
# Security and Authentication gems
|
34
|
+
gem 'cancan'
|
35
|
+
gem 'devise', git: 'https://github.com/plataformatec/devise.git'
|
36
|
+
gem 'devise-encryptable'
|
37
|
+
gem 'devise_invitable'
|
38
|
+
gem 'devise-i18n'
|
39
|
+
gem 'devise-guests'
|
40
|
+
gem 'rolify'
|
41
|
+
|
42
|
+
# Forms Gem
|
43
|
+
gem 'simple_form', git: 'https://github.com/plataformatec/simple_form.git'
|
44
|
+
|
45
|
+
# Pagination Gem
|
46
|
+
gem 'will_paginate'
|
47
|
+
gem 'will_paginate-bootstrap'
|
48
|
+
|
49
|
+
# Cache Gem
|
50
|
+
#gem 'redis-rails'
|
51
|
+
#gem 'redis-namespace'
|
52
|
+
|
53
|
+
# Full-Text Search Gem
|
54
|
+
gem 'elasticsearch-model'
|
55
|
+
gem 'elasticsearch-rails'
|
56
|
+
|
57
|
+
# Jobs Gems
|
58
|
+
gem 'whenever'
|
59
|
+
gem "resque"
|
60
|
+
|
61
|
+
# Payment
|
62
|
+
gem 'activemerchant'
|
63
|
+
gem 'paypal-sdk-rest'
|
64
|
+
|
65
|
+
# Email
|
66
|
+
gem 'mandrill-api'
|
67
|
+
gem 'mandrill_mailer'
|
68
|
+
|
69
|
+
|
70
|
+
group :development do
|
71
|
+
# gem 'sqlite3'
|
72
|
+
gem 'better_errors'
|
73
|
+
gem 'binding_of_caller'
|
74
|
+
gem 'capistrano'
|
75
|
+
gem 'capistrano-bundler'
|
76
|
+
gem 'capistrano-rails'
|
77
|
+
gem 'capistrano-rails-console'
|
78
|
+
gem 'capistrano-rvm'
|
79
|
+
gem 'guard-bundler'
|
80
|
+
gem 'guard-rails'
|
81
|
+
gem 'guard-rspec'
|
82
|
+
gem 'quiet_assets'
|
83
|
+
gem 'rails_layout'
|
84
|
+
# gem 'active_reload'
|
85
|
+
gem 'annotate'
|
86
|
+
end
|
87
|
+
group :development, :test do
|
88
|
+
gem 'factory_girl_rails'
|
89
|
+
gem 'pry-rails'
|
90
|
+
gem 'pry-rescue'
|
91
|
+
gem 'pry-stack_explorer'
|
92
|
+
gem 'rspec-rails'
|
93
|
+
end
|
94
|
+
group :production do
|
95
|
+
gem 'unicorn'
|
96
|
+
gem 'yui-compressor'
|
97
|
+
end
|
98
|
+
group :test do
|
99
|
+
gem 'capybara'
|
100
|
+
gem 'database_cleaner'
|
101
|
+
gem 'email_spec'
|
102
|
+
gem 'colored'
|
103
|
+
gem 'deadweight', :require => 'deadweight/hijack/rails'
|
104
|
+
end
|
105
|
+
EOF
|
106
|
+
bundle install
|
107
|
+
rails g new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_init_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Riskalla Leal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/generators/new/templates/unicorn_init.sh
|
71
71
|
- lib/rails_init_gem.rb
|
72
72
|
- lib/rails_init_gem/version.rb
|
73
|
+
- railsNew.sh
|
73
74
|
- rails_init_gem.gemspec
|
74
75
|
homepage: https://github.com/ziongh/rails_init_gem
|
75
76
|
licenses:
|