Commit Graph

2365 Commits

Author SHA1 Message Date
eileencodes
c757e9b60a Remove #build_original_fullpath method
Removing `#build_original_fullpath` because it is no longer
used by the Rails' source code or called in the `#call` method becasue
the previous commit now uses `fullpath` from Rack.

The method was nodoc'ed so it's safe to remove.

NOTE: I did this as a separate commit so if this does cause a problem
with engines etc reverting is easy.
2015-03-20 08:48:04 -04:00
Aaron Patterson
7bdc7635b8 Merge pull request #19404 from dmathieu/remove_rack_env
Don't fallback to RACK_ENV when RAILS_ENV is not present
2015-03-19 07:46:57 -07:00
Arthur Neves
a9eb12393f Use absolute path on find_method location for the runner 2015-03-19 10:15:03 -04:00
Arthur Neves
9afd9d232c method_source needs to be a hard dependency on railties 2015-03-19 10:15:03 -04:00
Yves Senn
9959e9525b Merge pull request #19216 from senny/bin_test_runner
`bin/rails test` runner (rerun snippets, run tests by line, option documentation)
2015-03-19 14:27:01 +01:00
Damien Mathieu
d578cbfb5c don't fallback to RACK_ENV when RAILS_ENV is not present 2015-03-19 10:06:28 +01:00
Arthur Neves
2f23f97b2e Add a new-line to the end of route method generated code.
Fix regression on route method that was added by
bac812a7ef2660a2fe2ab00822e5e66228379822. The regression was that when
calling the `route` method, we were not appending a \n anymore.

[fixes #19316]
2015-03-18 10:33:59 -04:00
Yves Senn
d9bbafb2e7 run test_test.rb using the bin/rails test. 2015-03-18 09:52:19 +01:00
Arthur Neves
f10c7e1849 Fix reporter test and verbose mode 2015-03-18 09:52:19 +01:00
Yves Senn
6ccbeb458a move ENV["BACKTRACE"] support into the TestRunner. 2015-03-18 09:52:19 +01:00
Yves Senn
ac5ead59ae -p, --pattern to run tests using a pattern. 2015-03-18 09:52:19 +01:00
Yves Senn
f78708c180 use bin/rails t runner in test_runner_test.rb. 2015-03-18 09:52:18 +01:00
Arthur Neves
de94929d70 Fix relative dir call on test runner 2015-03-18 09:52:18 +01:00
Arthur Neves
3cc783b6bf Add tests for runner#test_files method 2015-03-18 09:52:18 +01:00
Arthur Neves
b58c0914f4 Run multiple files on runner 2015-03-18 09:52:18 +01:00
Yves Senn
090c83672f -e / --environment for the test runner. 2015-03-18 09:52:18 +01:00
Yves Senn
613bdd9d4c get rid of NAMED_PATTERNS in favor of running a whole directory 2015-03-18 09:52:18 +01:00
Yves Senn
ff79441d49 add tests for our minitest reporter. 2015-03-18 09:52:17 +01:00
Arthur Neves
ccee7eea8e Show the right file when test raises 2015-03-18 09:52:17 +01:00
Arthur Neves
d1a5460e3e Better file:line parsing and filter method by file too 2015-03-18 09:52:17 +01:00
Yves Senn
c5532e06d9 spike of a OptionParser backed test runner. 2015-03-18 09:52:16 +01:00
Semyon Pupkov
82a1680fb1 Fix deprecation warning in rails_info_controller tests
Use keyword arguments in request methods
2015-03-17 11:45:14 +05:00
yuuji.yaginuma
5f6fc9e389 add mailer suffix to comments for email previews 2015-03-15 08:57:06 +09:00
Matthew Draper
c96cb66351 Merge pull request #19221 from matthewd/random-tests
Run all our tests in random order
2015-03-06 23:02:49 +10:30
Aaron Patterson
798a14a638 pass a config to the route set
This way we can get the relative_url_root from the application without
setting another global value
2015-03-05 13:12:06 -08:00
Matthew Draper
b5eb0b6cc3 Revert "Leave all our tests as order_dependent! for now"
This reverts commit 2f52f969885b2834198de0045748436a4651a94e.

Conflicts:
	actionmailer/test/abstract_unit.rb
	actionview/test/abstract_unit.rb
	activemodel/test/cases/helper.rb
	activerecord/test/cases/helper.rb
	activesupport/test/abstract_unit.rb
	railties/test/abstract_unit.rb
2015-03-06 04:38:54 +10:30
Hyonjee Joo
b181297ad7 Created rake restart task.
Fixes #18876. Rake restart touches `tmp/restart.txt` to restart
application on next request. Updated tests and documentation
accordingly.
2015-02-26 15:26:59 -05:00
brainopia
321db4aa2e Change filter on /rails/info/routes to use an actual path regexp from rails
Change filter on /rails/info/routes to use an actual path regexp from rails
and not approximate javascript version. Oniguruma supports much more
extensive list of features than javascript regexp engine.

Fixes #18402.
2015-02-23 19:57:01 +03:00
Josef Šimánek
6576f7354e Require belongs_to by default.
Deprecate `required` option in favor of `optional` for belongs_to.
2015-02-21 23:03:10 +01:00
Guillermo Iguaran
06d5d2c5e9 Merge pull request #18994 from tgxworld/run_delete_middleware_operations_last
Allow Rack::Runtime to be deleted from middleware stack.
2015-02-19 00:18:05 -05:00
Josef Šimánek
6447309817 Remove unused gsub_app_file method from Bukkit. 2015-02-19 02:44:49 +01:00
Guo Xiang Tan
a39498ae06 Allow Rack::Runtime to be deleted from middleware stack.
Fixes: https://github.com/rails/rails/issues/16433.
2015-02-19 08:44:24 +08:00
Rafael Mendonça França
39c936b760 Merge pull request #18393 from y-yagi/fix_mailer
follow up to #18074
2015-02-18 19:05:07 -02:00
Arthur Neves
2c5c0690cc Dont check bundler output on plugin generator test 2015-02-10 16:22:53 -05:00
Sean Griffin
7210a0371f Actually fix the build
Like for real this time. I checked.
2015-02-10 12:36:18 -07:00
Sean Griffin
84c20e27b6 Fix the build 2015-02-10 12:12:14 -07:00
Yves Senn
8ba7548877 tests, reset global to previous value.
The default of the global might change. It's better to reset it to
what it was than a hardcoded value.
2015-02-09 10:41:37 +01:00
Yuki Nishijima
f5c27446bf Remove warning from generator named base test
This removes the following warning:

  railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names
  activesupport/lib/active_support/core_ext/class/attribute.rb:86: warning: previous definition of pluralize_table_names was here
  railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names=
  activesupport/lib/active_support/core_ext/class/attribute.rb:83: warning: previous definition of pluralize_table_names= was here
2015-02-08 17:09:12 -08:00
Xavier Noria
89a12c931b README.rdoc -> README.md for newly generated applications
README.rdoc was generated to support the doc:app task. Now that
this task is gone we can switch to Markdown, which is nowadays
a better default.
2015-02-06 21:04:54 +01:00
Xavier Noria
cd7cc5254b Remove documentation tasks
This patch removes the tasks doc:app, doc:rails, and doc:guides.

In our experience applications do not generate APIs using doc:app.
Methods may be certainly documented for maintainers, annotated
with YARD tags, etc. but that is intended to be read with the
source code, not in a separate website. Then, teams also have
typically selected topics written down in Markdown files, or in
a GitHub wiki... that kind of thing.

If a team absolutely needs to generate application documentation
for internal purposes, they can still easily write their own task.

Regarding doc:rails and doc:guides, we live in 2015. We are used
to go to online docs all the time. If you really want access to the
API offline RubyGems generates it for every Rails component unless
you tell it not to, and you can checkout the Rails source code to
read the guides as Markdown, or download them for a Kindle reader.

All in all, maintaining this code does not seem to be worthwhile
anymore.

As a consequence of this, guides (+3 MB uncompressed) won't be
distributed with the rails gem anymore. Of course, guides and API
are going to be still part of releases, since documentation is
maintained alongside code and tests.

Also, time permitting, this will allow us to experiment with novel
ways to generate documentation in the Rails docs server, since
right now we were constrained by being able to generate them in
the user's environment.
2015-02-06 21:04:54 +01:00
Rafael Mendonça França
25bbe595f1 Merge pull request #18399 from kommen/unify-structure-file-envvar-names
Use SCHEMA instead of DB_STRUCTURE for specifiying structure file.

Conflicts:
	activerecord/CHANGELOG.md
2015-02-05 18:55:33 -02: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
Andrew White
80838d9bd5 Force generated route to be inserted
Thor isn't very discerning over whether some content is present when passed
to `inject_into_file`, e.g. a commented out route is detected as being present.
So to prevent people scratching their heads as to why a route hasn't appeared
it's better to fall on the side of having duplicate routes.
2015-02-05 17:54:23 +00:00
Andrew White
1c59ffca5c Don't remove all line endings from routes.rb
When there is a single scaffold in the routes.rb with no other lines
then revoking/destroying it will create a routes.rb file with a syntax
error. This is because the sentinel for the Thor `route` action didn't
include the newline but the logged route code did.

The fix is to add the newline to the sentinel and remove it from the
the logged route code.

Fixes #15913.
2015-02-03 22:53:23 +00:00
Vipul A M
6eced6a1fe Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 onwards. 2015-02-03 20:51:40 +05:30
robertomiranda
ce8efcf296 Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
2015-01-31 23:12:41 -05:00
Godfrey Chan
33030ea7cb Fixed a few things from ee9e4c3
Mostly cosmetics, except that `isolate_namespace` should be applied to the last
module in the chain.
2015-01-30 15:42:51 -08:00
Robin Böning
ee9e4c340e Allow hyphenated names for rails plugin new generator.
It was not possible to create a new gem with a hyphenated name via the `rails plugin new` generator.

The naming guide of rubygems clearly says dashes should be used for gems that extend other gems. http://guides.rubygems.org/name-your-gem/
2015-01-30 16:40:45 +01:00
Yves Senn
570ead9bed build fix II, adjust broken tests as a consequence of 670ac73126. 2015-01-30 13:52:18 +01:00
Yves Senn
f332ed0b9a build fix. 2015-01-30 13:35:35 +01:00