blueberry_rails 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/README.md +12 -1
  4. data/blueberry_rails.gemspec +17 -18
  5. data/lib/blueberry_rails/action_helpers.rb +4 -0
  6. data/lib/blueberry_rails/app_builder.rb +151 -18
  7. data/lib/blueberry_rails/generators/app_generator.rb +60 -2
  8. data/lib/blueberry_rails/version.rb +1 -1
  9. data/spec/blueberry_rails_spec.rb +42 -1
  10. data/spec/support/blueberry_rails_helpers.rb +1 -1
  11. data/templates/Gemfile_custom.erb +20 -5
  12. data/templates/admin_assets/javascripts/admin.coffee +6 -0
  13. data/templates/admin_assets/javascripts/admin/.keep +0 -0
  14. data/templates/admin_assets/stylesheets/admin.sass +4 -0
  15. data/templates/admin_assets/stylesheets/admin/.keep +0 -0
  16. data/templates/admin_controllers/base_controller.rb +6 -0
  17. data/templates/admin_controllers/dashboard_controller.rb +6 -0
  18. data/templates/admin_views/dashboard/show.html.slim +12 -0
  19. data/templates/admin_views/partials/_menu.html.slim +13 -0
  20. data/templates/assets/icons/_font_icons.scss +18 -0
  21. data/templates/assets/images/blueberry-logo.png +0 -0
  22. data/templates/assets/javascripts/application.coffee +6 -0
  23. data/templates/assets/javascripts/common/.keep +0 -0
  24. data/templates/assets/javascripts/frontend/.keep +0 -0
  25. data/templates/assets/stylesheets/application.sass +17 -0
  26. data/templates/assets/stylesheets/frontend/base/buttons.sass +0 -0
  27. data/templates/assets/stylesheets/frontend/base/fonts.sass +0 -0
  28. data/templates/assets/stylesheets/frontend/base/typo.sass +0 -0
  29. data/templates/assets/stylesheets/frontend/common/bootstrap-ms.sass +128 -0
  30. data/templates/assets/stylesheets/frontend/common/bootstrap-override.sass +4 -0
  31. data/templates/assets/stylesheets/frontend/common/variables.sass +26 -0
  32. data/templates/assets/stylesheets/frontend/components/.keep +0 -0
  33. data/templates/assets/stylesheets/frontend/components/navigation.sass +0 -0
  34. data/templates/assets/stylesheets/frontend/layout/body.sass +0 -0
  35. data/templates/assets/stylesheets/frontend/layout/footer.sass +0 -0
  36. data/templates/assets/stylesheets/frontend/layout/header.sass +0 -0
  37. data/templates/assets/stylesheets/frontend/pages/.keep +0 -0
  38. data/templates/assets/stylesheets/frontend/third-party/includes.sass +1 -0
  39. data/templates/assets/stylesheets/frontend/utils/functions.sass +23 -0
  40. data/templates/assets/stylesheets/frontend/utils/make-columns.sass +67 -0
  41. data/templates/assets/stylesheets/frontend/utils/mixins.sass +24 -0
  42. data/templates/assets/stylesheets/frontend/utils/render-to.sass +27 -0
  43. data/templates/assets/stylesheets/frontend/utils/renderto-debug.sass +22 -0
  44. data/templates/assets/stylesheets/ie.sass +0 -0
  45. data/templates/assets/stylesheets/print.sass +0 -0
  46. data/templates/config/initializers/airbrake.rb +6 -0
  47. data/templates/config/initializers/simple_form_bootstrap.rb +151 -0
  48. data/templates/config/initializers/translation_engine.rb +23 -0
  49. data/templates/controllers/errors_controller.rb +13 -0
  50. data/templates/fontcustom.yml +22 -0
  51. data/templates/helpers/application_helper.rb +23 -0
  52. data/templates/helpers/body_class_helper.rb +16 -0
  53. data/templates/helpers/gtm_helper.rb +30 -0
  54. data/templates/helpers/images_helper.rb +13 -0
  55. data/templates/locales/cs/cs.devise.yml +69 -0
  56. data/templates/locales/cs/cs.meta.yml +5 -0
  57. data/templates/locales/cs/cs.rails.yml +211 -0
  58. data/templates/locales/cs/cs.yml +4 -0
  59. data/templates/locales/en/en.meta.yml +5 -0
  60. data/templates/locales/en/en.yml +4 -0
  61. data/templates/public/icons/android-icon-144x144.png +0 -0
  62. data/templates/public/icons/android-icon-192x192.png +0 -0
  63. data/templates/public/icons/android-icon-36x36.png +0 -0
  64. data/templates/public/icons/android-icon-48x48.png +0 -0
  65. data/templates/public/icons/android-icon-72x72.png +0 -0
  66. data/templates/public/icons/android-icon-96x96.png +0 -0
  67. data/templates/public/icons/apple-icon-114x114.png +0 -0
  68. data/templates/public/icons/apple-icon-120x120.png +0 -0
  69. data/templates/public/icons/apple-icon-144x144.png +0 -0
  70. data/templates/public/icons/apple-icon-152x152.png +0 -0
  71. data/templates/public/icons/apple-icon-180x180.png +0 -0
  72. data/templates/public/icons/apple-icon-57x57.png +0 -0
  73. data/templates/public/icons/apple-icon-60x60.png +0 -0
  74. data/templates/public/icons/apple-icon-72x72.png +0 -0
  75. data/templates/public/icons/apple-icon-76x76.png +0 -0
  76. data/templates/public/icons/apple-icon-precomposed.png +0 -0
  77. data/templates/public/icons/apple-icon.png +0 -0
  78. data/templates/public/icons/favicon-16x16.png +0 -0
  79. data/templates/public/icons/favicon-32x32.png +0 -0
  80. data/templates/public/icons/favicon-96x96.png +0 -0
  81. data/templates/public/icons/favicon.ico +0 -0
  82. data/templates/public/icons/ms-icon-144x144.png +0 -0
  83. data/templates/public/icons/ms-icon-150x150.png +0 -0
  84. data/templates/public/icons/ms-icon-310x310.png +0 -0
  85. data/templates/public/icons/ms-icon-70x70.png +0 -0
  86. data/templates/{root_controller_spec.rb → spec/controllers/root_controller_spec.rb} +0 -0
  87. data/templates/{database_cleaner_setup.rb → spec/database_cleaner_setup.rb} +0 -0
  88. data/templates/spec/factories/administrators.rb +6 -0
  89. data/templates/{users_factory.rb → spec/factories/users.rb} +0 -0
  90. data/templates/{factories_spec.rb → spec/factories_spec.rb} +0 -0
  91. data/templates/{factory_girl_syntax.rb → spec/factory_girl_syntax.rb} +0 -0
  92. data/templates/{mail_body_helpers.rb → spec/mail_body_helpers.rb} +0 -0
  93. data/templates/{spec_helper.rb → spec/spec_helper.rb} +5 -0
  94. data/templates/tasks/icons.rake +19 -0
  95. data/templates/tasks/images.rake +12 -0
  96. data/templates/travis.yml.erb +19 -18
  97. data/templates/views/application/_favicon.html.slim +16 -0
  98. data/templates/views/application/_flashes.html.slim +5 -0
  99. data/templates/views/application/_footer.html.slim +1 -0
  100. data/templates/views/application/_gtm.html.slim +7 -0
  101. data/templates/views/application/_header.html.slim +1 -0
  102. data/templates/views/layouts/admin.html.slim.erb +21 -0
  103. data/templates/views/layouts/application.html.slim.erb +26 -0
  104. metadata +95 -12
  105. data/templates/_flashes.html.slim +0 -5
  106. data/templates/layout.html.slim +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d209641bc17ceaa8a6cfeaba032ed34a03eb787
4
- data.tar.gz: 10e1518b10d15b6d424616877147466a1e13ecbc
3
+ metadata.gz: ad73f9f1faa51a145051e88b2b0a2d0526215793
4
+ data.tar.gz: 4b5544ca9d8fd5a966243b210c1c569f4dc94ef3
5
5
  SHA512:
6
- metadata.gz: e33b7e2050451c2d2470b7312dfc57b7744f60b518c9094c1bbe45cafe4f5233f15bf5e789027a00c67e40e0cc1c41b755e679e6adc23f38f23b033a5ce3df0f
7
- data.tar.gz: 67bd96aed578621549131cc469809ab43ecaf32f8903884516d711b6c2cd796559bdc4767fa3f30404e0c4c69c69a611ad2de8571498b589688c7d6de07f01e3
6
+ metadata.gz: 9133fcb4f9ab213384cb227e2c5b255982e18982213a7ccf940a911a99a074a9eaa2148207200b9506707daff57d3d483ed3886c7b812aaed5351595748bb85a
7
+ data.tar.gz: d2d4e2af8041a6b6b657b4c12b53273eb43370d1e31ea037a4ed1ff557dbbe61510a07cc6609ec8f42138fad80485562cc5dbd5448535d1b3d119257c347e1a4
data/.travis.yml CHANGED
@@ -3,4 +3,5 @@ script: 'bundle exec rake'
3
3
  rvm:
4
4
  - 2.2.3
5
5
  before_install:
6
+ - gem cleanup bundler
6
7
  - gem update --system
data/README.md CHANGED
@@ -14,6 +14,18 @@ Then you can run
14
14
 
15
15
  ### Available options
16
16
 
17
+ Translation Engine
18
+
19
+ --translation-engine
20
+
21
+ Custom Erros
22
+
23
+ --custom-errors
24
+
25
+ Fontcustom
26
+
27
+ --fontncustom
28
+
17
29
  Twitter bootstrap
18
30
 
19
31
  --bootstrap
@@ -113,4 +125,3 @@ gem by [thoughtbot](http://thoughtbot.com/community).
113
125
  3. Commit your changes (`git commit -am 'Add some feature'`)
114
126
  4. Push to the branch (`git push origin my-new-feature`)
115
127
  5. Create new Pull Request
116
-
@@ -3,27 +3,26 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'blueberry_rails/version'
5
5
 
6
- Gem::Specification.new do |spec|
7
- spec.name = 'blueberry_rails'
8
- spec.version = BlueberryRails::VERSION
9
- spec.authors = ['BlueberryApps']
10
- spec.email = ['jzajpt@blueberry.cz']
11
- spec.description = %q{A Rails app template by BlueberryApps }
12
- spec.summary = %q{A Rails app template by BlueberryApps}
13
- spec.homepage = 'https://github.com/blueberryapps/blueberry_rails'
14
- spec.license = 'MIT'
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'blueberry_rails'
8
+ gem.version = BlueberryRails::VERSION
9
+ gem.authors = ['BlueberryApps']
10
+ gem.email = ['jzajpt@blueberry.cz']
11
+ gem.description = %q{A Rails app template by BlueberryApps }
12
+ gem.summary = %q{A Rails app template by BlueberryApps}
13
+ gem.homepage = 'https://github.com/blueberryapps/blueberry_rails'
14
+ gem.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ['lib']
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'bundler', '~> 1.3'
22
- spec.add_dependency 'rails', BlueberryRails::RAILS_VERSION
21
+ gem.add_dependency 'bundler', '~> 1.3'
22
+ gem.add_dependency 'rails', BlueberryRails::RAILS_VERSION
23
23
 
24
- spec.add_development_dependency 'rake'
24
+ gem.add_development_dependency 'rake'
25
25
 
26
- spec.required_ruby_version = '>= 1.9.2'
26
+ gem.required_ruby_version = '>= 1.9.2'
27
27
 
28
28
  end
29
-
@@ -20,5 +20,9 @@ module BlueberryRails
20
20
  File.open(path, "w") { |file| file.write(contents) }
21
21
  end
22
22
 
23
+ def rename_file(path_old, path_new)
24
+ File.rename File.join(destination_root, path_old),
25
+ File.join(destination_root, path_new)
26
+ end
23
27
  end
24
28
  end
@@ -30,8 +30,8 @@ module BlueberryRails
30
30
  end
31
31
 
32
32
  def setup_mailer_hosts
33
- action_mailer_host 'development', "#{app_name}.dev"
34
- action_mailer_host 'test', 'www.example.com'
33
+ action_mailer_host 'development', "development.#{app_name}.com"
34
+ action_mailer_host 'test', "test.#{app_name}.com"
35
35
  action_mailer_host 'staging', "staging.#{app_name}.com"
36
36
  action_mailer_host 'production', "#{app_name}.com"
37
37
  end
@@ -44,19 +44,81 @@ module BlueberryRails
44
44
 
45
45
  def setup_staging_environment
46
46
  run 'cp config/environments/production.rb config/environments/staging.rb'
47
+
48
+ replace_in_file 'config/environments/staging.rb',
49
+ 'config.consider_all_requests_local = false',
50
+ 'config.consider_all_requests_local = true'
47
51
  end
48
52
 
49
- def create_partials_directory
50
- empty_directory 'app/views/application'
53
+ def setup_admin
54
+ directory 'admin_controllers', 'app/controllers/admin'
55
+ directory 'admin_views', 'app/views/admin'
56
+
57
+ template 'views/layouts/admin.html.slim.erb',
58
+ 'app/views/layouts/admin.html.slim'
59
+
60
+ inject_into_file 'config/routes.rb',
61
+ "\n namespace :admin do\n" \
62
+ " root to: 'dashboard#show'\n" \
63
+ " end\n\n",
64
+ before: " root"
51
65
  end
52
66
 
53
- def create_shared_flashes
54
- copy_file '_flashes.html.slim', 'app/views/application/_flashes.html.slim'
67
+ def create_partials_directory
68
+ directory 'views/application', 'app/views/application'
55
69
  end
56
70
 
57
71
  def create_application_layout
58
72
  remove_file 'app/views/layouts/application.html.erb'
59
- copy_file 'layout.html.slim', 'app/views/layouts/application.html.slim'
73
+
74
+ template 'views/layouts/application.html.slim.erb',
75
+ 'app/views/layouts/application.html.slim'
76
+
77
+ remove_file 'app/helpers/application_helper.rb'
78
+ copy_file 'helpers/application_helper.rb',
79
+ 'app/helpers/application_helper.rb'
80
+
81
+ remove_file 'public/favicon.ico'
82
+ directory 'public/icons', 'public'
83
+ end
84
+
85
+ def copy_assets_directory
86
+ remove_file 'app/assets/stylesheets/application.css'
87
+ remove_file 'app/assets/javascripts/application.js'
88
+
89
+ directory 'assets', 'app/assets'
90
+
91
+ remove_file 'app/assets/icons'
92
+
93
+ replace_in_file 'config/initializers/assets.rb',
94
+ '# Rails.application.config.assets.precompile += %w( search.js )',
95
+ 'Rails.application.config.assets.precompile += %w( print.css ie.css )'
96
+
97
+ if options[:administration]
98
+ directory 'admin_assets', 'app/assets'
99
+
100
+ replace_in_file 'config/initializers/assets.rb',
101
+ '.precompile += %w( ',
102
+ '.precompile += %w( admin.css admin.js '
103
+ end
104
+ end
105
+
106
+ def copy_print_style
107
+ copy_file 'assets/stylesheets/print.sass',
108
+ 'app/assets/stylesheets/print.sass'
109
+ end
110
+
111
+ def copy_initializers
112
+ if options[:translation_engine]
113
+ copy_file 'config/initializers/translation_engine.rb',
114
+ 'config/initializers/translation_engine.rb'
115
+ end
116
+ if options[:bootstrap]
117
+ copy_file 'config/initializers/simple_form_bootstrap.rb',
118
+ 'config/initializers/simple_form_bootstrap.rb', force: true
119
+ end
120
+ copy_file 'config/initializers/airbrake.rb',
121
+ 'config/initializers/airbrake.rb'
60
122
  end
61
123
 
62
124
  def create_pryrc
@@ -79,17 +141,17 @@ module BlueberryRails
79
141
  end
80
142
 
81
143
  def configure_rspec
82
- copy_file 'spec_helper.rb', 'spec/spec_helper.rb', force: true
144
+ copy_file 'spec/spec_helper.rb', 'spec/spec_helper.rb', force: true
83
145
  end
84
146
 
85
147
  def test_factories_first
86
- copy_file 'factories_spec.rb', 'spec/models/factories_spec.rb'
148
+ copy_file 'spec/factories_spec.rb', 'spec/models/factories_spec.rb'
87
149
  end
88
150
 
89
151
  def setup_rspec_support_files
90
- copy_file 'factory_girl_syntax.rb', 'spec/support/factory_girl.rb'
91
- copy_file 'database_cleaner_setup.rb', 'spec/support/database_cleaner.rb'
92
- copy_file 'mail_body_helpers.rb', 'spec/mixins/mail_body_helpers.rb'
152
+ copy_file 'spec/factory_girl_syntax.rb', 'spec/support/factory_girl.rb'
153
+ copy_file 'spec/database_cleaner_setup.rb', 'spec/support/database_cleaner.rb'
154
+ copy_file 'spec/mail_body_helpers.rb', 'spec/support/mixins/mail_body_helpers.rb'
93
155
  end
94
156
 
95
157
  def init_guard
@@ -125,6 +187,19 @@ module BlueberryRails
125
187
  inject_into_class 'config/application.rb', 'Application', config
126
188
  end
127
189
 
190
+ def configure_i18n
191
+ replace_in_file 'config/application.rb',
192
+ "# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]",
193
+ "config.i18n.load_path += Dir[Rails.root.join 'config/locales/**/*.{rb,yml}']"
194
+
195
+ replace_in_file 'config/application.rb',
196
+ '# config.i18n.default_locale = :de',
197
+ "config.i18n.available_locales = [:cs, :en]\n config.i18n.default_locale = :cs"
198
+
199
+ remove_file 'config/locales/en.yml'
200
+ directory 'locales', 'config/locales'
201
+ end
202
+
128
203
  def configure_i18n_logger
129
204
  configure_environment 'development',
130
205
  "# I18n debug\n I18nLogger = ActiveSupport::" \
@@ -142,7 +217,7 @@ module BlueberryRails
142
217
  else
143
218
  "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
144
219
  end
145
- add_file '.ruby-version', version
220
+ add_file '.ruby-version', "#{version}\n"
146
221
  end
147
222
 
148
223
  def remove_routes_comment_lines
@@ -161,6 +236,18 @@ module BlueberryRails
161
236
  if options[:devise_model].present?
162
237
  generate 'devise', options[:devise_model]
163
238
  end
239
+
240
+ if options[:administration]
241
+ generate 'devise', 'administrator'
242
+ replace_in_file 'app/models/administrator.rb',
243
+ ' :registerable,',
244
+ ''
245
+ end
246
+
247
+ copy_file 'locales/cs/cs.devise.yml', 'config/locales/cs/cs.devise.yml'
248
+
249
+ rename_file 'config/locales/devise.en.yml',
250
+ 'config/locales/en/en.devise.yml'
164
251
  end
165
252
 
166
253
  def setup_capistrano
@@ -174,20 +261,30 @@ module BlueberryRails
174
261
  def configure_simple_form
175
262
  if options[:bootstrap]
176
263
  generate 'simple_form:install --bootstrap'
264
+
265
+ replace_in_file 'config/initializers/simple_form.rb',
266
+ '# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }',
267
+ 'config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }'
268
+
177
269
  else
178
270
  generate 'simple_form:install'
179
271
  end
272
+ rename_file 'config/locales/simple_form.en.yml',
273
+ 'config/locales/en/en.simple_form.yml'
180
274
  end
181
275
 
182
276
  def replace_users_factory
183
- remove_file 'spec/factories/users.rb'
184
- copy_file 'users_factory.rb', 'spec/factories/users.rb'
277
+ copy_file 'spec/factories/users.rb',
278
+ 'spec/factories/users.rb', force: true
279
+ if options[:administration]
280
+ copy_file 'spec/factories/administrators.rb',
281
+ 'spec/factories/administrators.rb', force: true
282
+ end
185
283
  end
186
284
 
187
285
  def replace_root_controller_spec
188
- remove_file 'spec/controllers/root_controller_spec.rb'
189
- copy_file 'root_controller_spec.rb',
190
- 'spec/controllers/root_controller_spec.rb'
286
+ copy_file 'spec/controllers/root_controller_spec.rb',
287
+ 'spec/controllers/root_controller_spec.rb', force: true
191
288
  end
192
289
 
193
290
  def setup_gitignore
@@ -206,6 +303,42 @@ module BlueberryRails
206
303
  run 'git init'
207
304
  end
208
305
 
306
+ def copy_rake_tasks
307
+ copy_file 'tasks/images.rake', 'lib/tasks/images.rake'
308
+ if options[:fontcustom]
309
+ copy_file 'tasks/icons.rake', 'lib/tasks/icons.rake'
310
+ end
311
+ end
312
+
313
+ def copy_custom_errors
314
+ copy_file 'controllers/errors_controller.rb', 'app/controllers/errors_controller.rb'
315
+
316
+ config = <<-RUBY
317
+ config.exceptions_app = self.routes
318
+
319
+ RUBY
320
+
321
+ inject_into_class 'config/application.rb', 'Application', config
322
+
323
+ remove_file 'public/404.html'
324
+ remove_file 'public/422.html'
325
+ remove_file 'public/500.html'
326
+ end
327
+
328
+ def copy_fontcustom_config
329
+ copy_file 'fontcustom.yml', 'fontcustom.yml'
330
+ copy_file 'assets/icons/_font_icons.scss',
331
+ 'app/assets/icons/_font_icons.scss'
332
+ end
333
+
334
+ def configure_bin_setup
335
+
336
+ original = "# puts \"\\n== Copying sample files ==\"\n # unless File.exist?(\"config/database.yml\")\n # system \"cp config/database.yml.sample config/database.yml\"\n # end"
337
+ updated = "puts \"\\n== Copying sample files ==\"\n unless File.exist?(\"config/database.yml\")\n system \"cp config/database.yml.sample config/database.yml\"\n end"
338
+
339
+ replace_in_file 'bin/setup', original, updated
340
+ end
341
+
209
342
  # Gulp
210
343
  def gulp_files
211
344
  copy_file 'gulp/gulp_helper.rb', 'app/helpers/gulp_helper.rb'
@@ -35,7 +35,22 @@ module BlueberryRails
35
35
  class_option :capistrano, type: :boolean, aliases: '-c', default: false,
36
36
  desc: 'Include Capistrano'
37
37
 
38
+ class_option :administration, type: :boolean, aliases: '-a', default: false,
39
+ desc: 'Include Admin part of application'
40
+
41
+ class_option :fontcustom, type: :boolean, aliases: '-fc', default: false,
42
+ desc: 'Include Fontcustom'
43
+
44
+ class_option :translation_engine, type: :boolean, aliases: '-te', default: false,
45
+ desc: 'Include Tranlsation Engine'
46
+
47
+ class_option :custom_errors, type: :boolean, aliases: '-ce', default: false,
48
+ desc: 'Include Errors Controller'
49
+
38
50
  def finish_template
51
+ if options[:administration] && (!options[:devise] || !options[:bootstrap])
52
+ raise 'Administration depends on bootstrap and devise!'
53
+ end
39
54
  invoke :blueberry_customization
40
55
  super
41
56
  end
@@ -47,11 +62,17 @@ module BlueberryRails
47
62
  invoke :setup_test_environment
48
63
  invoke :setup_staging_environment
49
64
  invoke :create_views
65
+ invoke :create_assets
50
66
  invoke :configure_app
51
67
  invoke :remove_routes_comment_lines
52
68
  invoke :setup_gems
53
69
  invoke :setup_git
54
70
  invoke :setup_gulp
71
+ invoke :setup_admin
72
+ invoke :rake_tasks
73
+ invoke :setup_custom_errors
74
+ invoke :setup_initializers
75
+ invoke :setup_fontcustom
55
76
  end
56
77
 
57
78
  def customize_gemfile
@@ -91,12 +112,44 @@ module BlueberryRails
91
112
  build :setup_staging_environment
92
113
  end
93
114
 
115
+ def setup_initializers
116
+ say 'Setting up initializers'
117
+ build :copy_initializers
118
+ end
119
+
120
+ def setup_fontcustom
121
+ if options[:fontcustom]
122
+ say 'Setting up fontcustom'
123
+ build :copy_fontcustom_config
124
+ end
125
+ end
126
+
127
+ def setup_admin
128
+ if options[:administration]
129
+ build :setup_admin
130
+ end
131
+ end
132
+
133
+ def setup_custom_errors
134
+ if options[:custom_errors]
135
+ say 'Setting up custom errors'
136
+ build :copy_custom_errors
137
+ end
138
+ end
139
+
94
140
  def create_views
95
141
  build :create_partials_directory
96
- build :create_shared_flashes
97
142
  build :create_application_layout
98
143
  end
99
144
 
145
+ def create_assets
146
+ if options[:bootstrap]
147
+ build :copy_assets_directory
148
+ else
149
+ build :copy_print_style
150
+ end
151
+ end
152
+
100
153
  def configure_app
101
154
  build :secret_token
102
155
  build :disable_xml_params
@@ -104,6 +157,8 @@ module BlueberryRails
104
157
  build :create_pryrc
105
158
  build :add_ruby_version_file
106
159
  build :hound_config
160
+ build :configure_i18n
161
+ build :configure_bin_setup
107
162
  end
108
163
 
109
164
  def remove_routes_comment_lines
@@ -138,6 +193,10 @@ module BlueberryRails
138
193
  end
139
194
  end
140
195
 
196
+ def rake_tasks
197
+ build :copy_rake_tasks
198
+ end
199
+
141
200
  def run_bundle
142
201
  end
143
202
 
@@ -148,4 +207,3 @@ module BlueberryRails
148
207
  end
149
208
  end
150
209
  end
151
-