topkit 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/topkit/app_builder.rb +8 -0
- data/lib/topkit/generators/app_generator.rb +5 -0
- data/lib/topkit/version.rb +1 -1
- data/templates/Gemfile_clean +1 -5
- metadata +1 -1
data/lib/topkit/app_builder.rb
CHANGED
@@ -27,6 +27,14 @@ module Topkit
|
|
27
27
|
copy_file 'Gemfile_clean', 'Gemfile'
|
28
28
|
end
|
29
29
|
|
30
|
+
def set_puma_as_default_server
|
31
|
+
config = <<-RUBY
|
32
|
+
require 'rack/handler'
|
33
|
+
Rack::Handler::WEBrick = Rack::Handler.get(:puma)
|
34
|
+
RUBY
|
35
|
+
inject_into_file "script/rails", config, before: "require 'rails/commands'"
|
36
|
+
end
|
37
|
+
|
30
38
|
def template_database_file
|
31
39
|
template 'database.mysql.yml.erb', 'config/database.yml', force: true
|
32
40
|
end
|
@@ -17,6 +17,7 @@ module Topkit
|
|
17
17
|
def topkit_customization
|
18
18
|
invoke :configure_generators
|
19
19
|
invoke :customize_gemfile
|
20
|
+
invoke :configure_puma
|
20
21
|
invoke :setup_database
|
21
22
|
invoke :remove_useless_files
|
22
23
|
invoke :remove_routes_comment_lines
|
@@ -42,6 +43,10 @@ module Topkit
|
|
42
43
|
bundle_command "package"
|
43
44
|
end
|
44
45
|
|
46
|
+
def configure_puma
|
47
|
+
build :set_puma_as_default_server
|
48
|
+
end
|
49
|
+
|
45
50
|
def setup_database
|
46
51
|
say "Setting up database"
|
47
52
|
build :template_database_file
|
data/lib/topkit/version.rb
CHANGED
data/templates/Gemfile_clean
CHANGED
@@ -7,9 +7,9 @@ gem 'rails-backbone'
|
|
7
7
|
gem 'simple_form'
|
8
8
|
gem 'truncate_html'
|
9
9
|
gem 'kaminari'
|
10
|
+
gem 'puma'
|
10
11
|
|
11
12
|
group :development, :test do
|
12
|
-
gem 'thin'
|
13
13
|
gem 'capybara'
|
14
14
|
gem 'rspec-rails'
|
15
15
|
gem 'faker'
|
@@ -35,7 +35,3 @@ group :test do
|
|
35
35
|
gem 'database_cleaner'
|
36
36
|
gem 'cucumber-rails', :require => false
|
37
37
|
end
|
38
|
-
|
39
|
-
group :staging, :production do
|
40
|
-
gem 'unicorn'
|
41
|
-
end
|