Commit Graph

110 Commits

Author SHA1 Message Date
Xavier Noria
94dbc48887 adds --skip-listen to the application generator [closes #23590] 2016-02-17 00:59:42 +01:00
Xavier Noria
bd69718124 prevent apps in the railties test suite from running the evented monitor 2016-02-10 01:32:17 +01:00
Genadi Samokovarov
38492590cf Introduce new welcome page for new projects
As requested by David in 23233.
2016-01-26 00:27:49 +02:00
Aaron Patterson
ff30db1372 run against edge sass to eliminate circular require warnings 2015-09-30 07:42:58 -07:00
Jeremy Daer
20ec1e922c Eliminate overlapping app/assets load path
* Move `app/assets/manifest.js` to `app/assets/config/manifest.js`.
  Avoid the suggestion that you can/should deep-link `stylesheets/foo`.
* Pull in all toplevel stylesheets and JavaScripts, not just
  `application.js` and `.css`. Demonstrate how to use `link_directory`
  with a specified `.js`/`.css` type.
* Fix RAILS_ENV handling in assets tests.
* Shush warnings spam from third-party libs that distract from tests.
2015-09-29 11:56:58 -07:00
Aaron Patterson
46cd257aad make sure flash middleware is required 2015-09-25 15:53:15 -07:00
Andrew White
60239f3e5a Add support for inline images to mailer previews
Use a preview interceptor to search for inline cid: urls in src
attributes and convert them to data urls.
2015-05-04 10:56:59 +01:00
Islam Wazery
4521aadae0 Rename railties/bin to railties/exe
That will match the new Bundler executables convention.
Bundler Blog Post: http://bundler.io/blog/2015/03/20/moving-bins-to-exe.html
Also updated the necessary tests.
2015-04-11 19:26:34 +02:00
Josef Šimánek
6447309817 Remove unused gsub_app_file method from Bukkit. 2015-02-19 02:44:49 +01:00
Rafael Mendonça França
6953f16efa Merge pull request #18526 from vipulnsward/add-silence-stream
Extracted silence_stream method to new module in activesupport/testing
2015-02-05 18:28:51 -02:00
Vipul A M
166ce95f65 - Extracted silence_stream method to new module in activesupport/testing.
- Added include for the same in ActiveSupport::Test.
- Removed occurrences of silence_stream being used elsewhere.
- Reordered activesupport testcase requires alphabetically.

- Removed require of silence stream from test_case

- Moved quietly method to stream helper

- Moved capture output to stream helper module and setup requires for the same elsewhere
2015-01-20 22:28:48 +05:30
Prathamesh Sonpatki
88ff9fd2a3 Fixed test for assert_welcome
- Test was wrongly using assert with assignment statement.
2015-01-17 22:15:15 +05:30
Nobuyoshi Nakada
69e365d2f4 Use IO::NULL always 2015-01-10 15:11:05 +01:00
Rafael Mendonça França
481e49c64f Remove deprecated methods at Kernel.
`silence_stderr`, `silence_stream`, `capture` and `quietly`.
2015-01-04 11:58:40 -03:00
Godfrey Chan
6ea7065a18 Set the test_order in the basic app as well, see 58e8b48
This removes the unwanted deprecation warnings in the tests
2014-11-25 03:05:42 -08:00
Godfrey Chan
6f08eeb6e8 Set the default log_level to info in all tests
This is a follow-up to 116de07. That change was for two reasons: 1) speed up the
tests by reducing the amount of log lines 2) avoid a deprecation warning from
a6de6f5.

This setting need to be on the basic app too, otherwise the deprecation warning
will show up on other unrelated test cases.
2014-11-25 03:05:42 -08:00
Zachary Scott
116de0731e Always default the log_level to :info for Railties 2014-11-24 19:07:42 -08:00
Aaron Patterson
0d5a384498 add a test for #17106 2014-11-04 14:14:03 -08:00
Rafael Mendonça França
53e877f7d9 Define the configuration at Active Support 2014-09-11 00:54:43 -03:00
Rafael Mendonça França
8edb5eeb36 Set test order in ActiveSupport::TestCase of isolation/abstract_unit 2014-09-10 22:42:15 -03:00
Rafael Mendonça França
e4c529ea1d Set the test order to be random in the generated app
This will avoid the warning in our tests. We delete all the
config/environments/ files in the test app so our default code will not
work.
2014-09-10 22:34:55 -03:00
Carlos Antonio da Silva
e43271444b Fix failing railties tests
A combination of two commits led into these failures:

* The addition of a new active_record config in
  24bb8347b6ff0da90059314d9aece7a2c94a272c
* The revert of the config to use config.x as options holder in
  43073b393d234acd094ac7c220163f4e419d11f5

These tests remove activerecord from the load path, however the
configuration is still in the application file, and they blow up.
2014-08-19 22:37:18 -03:00
Rafael Mendonça França
3121412cf1 Keep quietly and capture undeprecated on your suite 2014-07-15 17:56:27 -03:00
schneems
b9095ec95c Favor canonical environment variables for secrets
Prefixing an environment variable with `RAILS_` should be used when there is otherwise a conflict, such as `RAILS_ENV` or if it is being used for a very Rails specific value.

If we remove the prefix of `RAILS_` in the case of `RAILS_SECRET_KEY_BASE` then we can push for a pseudo standard among other frameworks that will accept a common environment key `SECRET_KEY_BASE` to keep your app secure. This is beneficial for containerized deployments such as docker, Heroku, etc. So that the container need to know one less thing about your app (it can just set it no-matter what language or framework you are using). 

This change also allows the defaults to be consistent with the way the secret key is accessed so `secrets.secret_key_base` is aliased to `SECRET_KEY_BASE` instead of `RAILS_SECRET_KEY_BASE`.
2014-01-13 14:31:43 -06:00
José Valim
f89c5f46b5 Revert "Ensure secret_key_base is set for all environments"
A better solution has been pushed to master.

This reverts commit 959cfcef7255bba720ce3f15323056533ea7b50a.
2013-12-24 19:29:31 +01:00
schneems
14c175c572 Fix railties tests in master
Tests are failing due to missing env var on master https://travis-ci.org/rails/rails/jobs/15930622#L641

This adds an environment variable `ENV['RAILS_SECRET_KEY_BASE']` so these tests will pass.
2013-12-24 11:13:47 -05:00
José Valim
959cfcef72 Ensure secret_key_base is set for all environments 2013-12-24 16:35:43 +01:00
José Valim
d8336cab32 Fix build failures related to the new ENV options in yml 2013-12-24 09:26:34 +01:00
Guillermo Iguaran
3eaa29840b Load secret_key_base from tokens.yml, fallback to config.secret_key_base 2013-12-12 14:59:11 -05:00
Łukasz Strzałkowski
a2ca04bb3a Extend basic rendering, test it in railties 2013-08-25 11:40:10 +02:00
Łukasz Strzałkowski
e291e6a479 Include AV railtie in railties isolation tests 2013-08-25 11:39:12 +02:00
wangjohn
55d708d597 Calls to the application constant have been refactored to use
Rails.application when drawing routes and creating other configurations
on the application.
2013-06-10 20:59:37 -07:00
Akira Matsuda
517cfbe110 --no-rc in the railties tests
so that the tester's local .railsrc file does not affect the test results
2013-02-01 22:10:45 +09:00
Jeremy Kemper
009873aec8 Introduce ./bin for your app's executables: bin/bundle, bin/rails, bin/rake. Executable scripts are versioned code like the rest of your app. To generate a stub for a bundled gem: 'bundle binstubs unicorn' and 'git add bin/unicorn' 2013-01-06 21:41:36 -07:00
Rafael Mendonça França
5da4d5142a Add active_support/testing/autorun
minitest/autorun load minitest/spec polluting the global namespace with
the DSL that we don't want on Rails
2012-12-31 13:57:24 -03:00
Santiago Pastorino
4faa041845 Rename secret_token_key to secret_key_base 2012-11-03 14:57:54 -02:00
Santiago Pastorino
60609bb50d Sign cookies using key deriver 2012-11-03 14:57:53 -02:00
Robin Dupret
5ad7f8ab41 Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
Guillermo Iguaran
4b608c009e config.activerecord.whitelist_attributes isn't used anymore, remove reference from abstract_unit 2012-09-16 23:58:20 -05:00
Piotr Sarnacki
62fa173bd9 Don't use Gemfile in test application in railties
Option to run `bundle install` after generating new appplication was
added recently to rails. Since introduction, it contained a subtle bug
that caused it to use `Gemfile` from current directory (if it exists)
rather than from generated directory. This also accidentaly caused
railties tests to work without any problems - after generating test app
it just used `Gemfile` from the repository, rather than the one in
generated app. After fixing the bug mentioned above, this of course
broke. The easiest way to bypass that is to not generate a `Gemfile` for
test application - with such setup Bundler will just use first available
`Gemfile` in one of the parent directories.
2012-08-31 20:52:29 +02:00
Carlos Antonio da Silva
b85894e854 Set eager load option in "make_basic_app" for railties tests
Avoid output with config option not set when running some tests.
2012-08-21 17:36:00 -03:00
José Valim
e6747d87f3 Allow users to choose when to eager_load the application or not.
Previously, the eager load behavior was mostly coupled to
config.cache_classes, however this was suboptimal since in
some environments a developer may want to cache classes but
not necessarily load them all on boot (for example, test env).

This pull request also promotes the use of config.eager_load
set to true by default in production. In the majority of the
cases, this is the behavior you want since it will copy most
of your app into memory on boot (which was also the previous
behavior).

Finally, this fix a long standing Rails bug where it was
impossible to access a model in a rake task when Rails was
set as thread safe.
2012-08-21 14:46:12 -03:00
Jon Leighton
09d2671cb6 remove some artifacts of dependent_restrict_raises that I missed 2012-08-10 18:12:26 +01:00
José Valim
0470ddcf03 Remove unnecessary Railties structure now that plugins are gone 2012-06-29 15:43:16 +02:00
Aaron Patterson
265f13495f run railties tests in parallel, default to 2 cores 2012-06-19 17:08:23 -07:00
Aaron Patterson
7b6efb9cda join any extra args to the tmp path 2012-06-19 16:27:54 -07:00
Aaron Patterson
c445f0d61f expand the tmpdir to the realpath so tests on OS X pass 2012-06-19 15:41:52 -07:00
Aaron Patterson
7896f35be3 use system tmpdir rather than our own 2012-06-19 14:41:31 -07:00
Santiago Pastorino
36dd1857dc Remove useless load path modifications 2012-05-11 19:00:35 -03:00
Carlos Antonio da Silva
af024f4b1e Remove Declarative module extending, it is already part of AS::TestCase
Removes method redefined warning.
2012-04-28 12:46:05 -03:00