aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Bejar <jorge@wyeworks.com>2015-05-05 15:01:47 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2015-06-11 16:54:14 -0300
commitfa11f10c948fde0a580acf4668849664c8ae95c6 (patch)
treedf6ccfaebbc0439a894d8bff51f323adc60a8250
parentfd2508522c341c3f708219b5fc1834f24caf04e3 (diff)
downloadrails-fa11f10c948fde0a580acf4668849664c8ae95c6.tar.gz
rails-fa11f10c948fde0a580acf4668849664c8ae95c6.tar.bz2
rails-fa11f10c948fde0a580acf4668849664c8ae95c6.zip
Api only apps should include tmp and vendor folders
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb6
-rw-r--r--railties/test/generators/api_app_generator_test.rb2
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 4ad78137f0..6d35fc61f0 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -252,17 +252,19 @@ module Rails
end
def create_tmp_files
- build(:tmp) unless options[:api]
+ build(:tmp)
end
def create_vendor_files
- build(:vendor) unless options[:api]
+ build(:vendor)
end
def delete_app_assets_if_api_option
if options[:api]
remove_dir 'app/assets'
remove_dir 'lib/assets'
+ remove_dir 'tmp/cache/assets'
+ remove_dir 'vendor/assets'
end
end
diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb
index fc4c101309..3d80af9323 100644
--- a/railties/test/generators/api_app_generator_test.rb
+++ b/railties/test/generators/api_app_generator_test.rb
@@ -72,6 +72,8 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase
test/controllers
test/integration
test/models
+ tmp
+ vendor
)
files.concat %w(bin/bundle bin/rails bin/rake)
files