Commit Graph

56283 Commits

Author SHA1 Message Date
Prathamesh Sonpatki 2669f3753d Update turbolinks-rails for passing railties test
Ref - https://github.com/turbolinks/turbolinks-rails/pull/3
2016-02-05 17:02:22 +05:30
Zachary Scott 2e1a4bd761 Merge branch 'master' of github.com:rails/rails 2016-02-05 19:56:54 +09:00
Zachary Scott be45d2f477 Check off some todos for the Testing guide with @senny [ci skip] 2016-02-05 19:56:23 +09:00
Kasper Timm Hansen 822e3c0b3e Merge pull request #23491 from y-yagi/move_changelog_entry_2
move CHANGELOG entry to the appropriate position [ci skip]
2016-02-05 11:56:04 +01:00
Yves Senn f5032667f4 docs, remove trailing whitespace from testing guide. [ci skip] 2016-02-05 10:43:38 +01:00
Yves Senn 507a952686 docs, link Rails specific assertions to the API. [ci skip] 2016-02-05 10:42:22 +01:00
yuuji.yaginuma c9768b8a88 move CHANGELOG entry to the appropriate position [ci skip]
Dummy apple icon files has been added after the 5.0.0.beta2 release.
ref: #23455
2016-02-05 18:27:22 +09:00
Vipul A M 3bf13b0651 Merge pull request #23489 from y-yagi/add_missing_include_to_engine_test_example
add missing include to engine test example [ci skip]
2016-02-05 09:57:28 +05:30
yuuji.yaginuma 924f33ad96 add missing include to engine test example [ci skip]
Using url helper method of engine in example code,
include `Engine.routes.url_helpers` is required to use helper method of engine.
2016-02-05 13:09:23 +09:00
Rafael França 22af61984c Merge pull request #23472 from jhubert/patch-2
Remove the assumption of schema in DATABASE_URL
2016-02-05 00:23:32 -02:00
Rafael França 3be9a34e78 Merge pull request #23473 from gsamokovarov/kernel-module-function
Don't publicize Kernel core extensions
2016-02-04 17:15:24 -02:00
Jeremy Baker 96fdbd3be3 Remove accidental additional test 2016-02-04 11:13:05 -08:00
Jeremy Baker d871696b4a Add a resolver test for the missing scheme 2016-02-04 10:59:52 -08:00
Sean Griffin ea59b68d75 Merge pull request #23481 from meinac/activemodel_errors_doc_for_behaviour
Add documentation about `ActiveModel::Errors#[]` method to describe how it works [ci skip]
2016-02-04 11:06:28 -07:00
Mehmet Emin İNAÇ e38ced376f Add documentation about method to describe how it works [ci skip] 2016-02-04 20:03:24 +02:00
Rafael França 2e46ccbecb Merge pull request #23484 from rubys/patch-1
hotlink to the source and results for AWDwR tests
2016-02-04 16:00:46 -02:00
Sam Ruby d601f4b08b hotlink to the source and results for AWDwR tests 2016-02-04 12:59:28 -05:00
Rafael Mendonça França dd67df6136 Test with Turbolinks 5 2016-02-04 14:24:36 -02:00
Rafael França d3fd7b99c1 Merge pull request #23479 from vipulnsward/23431-remove-jquery-on-sprockets-skip
Remove jquery-rails gem from generator if --skip-sprockets is true
2016-02-04 14:03:45 -02:00
Vipul A M c074343cff - app generate option --skip-sprockets leaves jquery-rails gem, which relies on sprockets environment
- Remove jquery-rails if --skip-sprockets is true

Fixes #23431
2016-02-04 21:01:45 +05:30
David Heinemeier Hansson ec1b249cec Merge pull request #23480 from sikachu/redis-commented-out
Update assertion on redis in generated Gemfile
2016-02-04 15:48:33 +01:00
Prem Sichanugrist b1ae3a32b5 Update assertion on redis in generated Gemfile
Redis now included in Gemfile but commented out. This change was made in
91864439c7 and is causing the test
failure.

See https://travis-ci.org/rails/rails/jobs/106994913#L1025
2016-02-04 09:47:24 -05:00
Rafael França 83147f1ff3 Merge pull request #23478 from vipulnsward/23470-pass-api-in-update-generator
Pass api only option to rails rails:update task to update only based on api Apps
2016-02-04 12:12:53 -02:00
Vipul A M e0e872f675 Pass api only option to rails rails:update task to update only based on API.
Fixes #23470
2016-02-04 19:40:23 +05:30
David Heinemeier Hansson f2306d05d8 Turbolinks has moved out
All grown up and shit!
2016-02-04 12:17:12 +01:00
David Heinemeier Hansson 91864439c7 Redis is now only needed if you want to use Action Cable in production
So no need to have it on by default in the Gemfile.
2016-02-04 12:16:57 +01:00
David Heinemeier Hansson 5e5fd246d5 Allow for non-standard redis connectors 2016-02-04 12:10:35 +01:00
Genadi Samokovarov 5a4e878876 Don't publicize Kernel core extensions
This is a reaction to a [bug] we hit in web-console. The cause of it was
a `Kernel` extension called `#console` that was public and was fighting
over Railties with console block to be run on `rails console`. We solved
it by making the method private. We did that through `module_function`
so `::Kernel.console` can be invoked even in `BasicObject`.

I'm proposing to make most of the core Active Support `Kernel`
extensions `module_function` as well. Those are currently public and we
are polluting every `Object` public interface with them.

```ruby
>> Object.new.respond_to? :silence_warnings
=> true

>> Object.new.respond_to? :with_warnings
=> true

>> Object.new.respond_to? :enable_warnings
=> true

>> Object.new.respond_to? :suppress
=> true
``

Some extensions like `Kernel#class_eval` should be public, but most of
them don't really need to be.

[bug]: https://github.com/rails/web-console/issues/184
2016-02-04 10:40:17 +01:00
Jeremy Baker 7429bc58a0 Remove the assumption of schema in DATABASE_URL
If you set the DATABASE_URL environment variable to `mydatabase` by accident, you end up getting a series of errors that are hard to trace. For example: 

```
warning: already initialized constant ActiveRecord::Base::OrmAdapter
```

Turns out the cascade of errors is due to the error raised by `.tr` being called on `nil`.

This commit makes sure that `scheme` is set before calling `.tr` on it. My previous iteration used `@uri.scheme.try(:tr, '-', '_')` but using the `&&` logical operator is a fair bit faster: http://stackoverflow.com/questions/26655032/try-vs-performance

With this change, the error message becomes much more understandable:

```
FATAL:  database "mydatabase" does not exist (ActiveRecord::NoDatabaseError)
```
2016-02-04 01:32:45 -08:00
Akira Matsuda dfa48f200c rake stats dynamically scales now
So it can properly show stats for an app with 1,000,000+ LOC
2016-02-04 18:25:05 +09:00
Akira Matsuda 2cd405f340 Revert "Lines of code can be 100,000+ in a Rails app"
This reverts commit 293bd95c3e.

This broke the header :<
2016-02-04 18:07:35 +09:00
Akira Matsuda 250c0d08c4 Typos in AR tests 2016-02-04 17:24:00 +09:00
Sean Griffin e22404a8b2 Merge pull request #23464 from kamipo/remove_commented_out_code_in_travis_rb
Remove commented out code in `ci/travis.rb` [ci skip]
2016-02-03 19:18:32 -07:00
Sean Griffin 56719517a1 Merge pull request #23460 from kamipo/innodb_supports_fulltext_and_spatial_indexes
InnoDB supports FULLTEXT and Spatial Indexes [ci skip]
2016-02-03 19:13:08 -07:00
Sean Griffin 9df3083926 Merge pull request #23458 from kamipo/activerecord_supports_mysql_5.0_and_up
Active Record supports MySQL >= 5.0
2016-02-03 19:12:20 -07:00
Jon Moss 8ee91d4051 Merge pull request #23452 from phusion/action_cable
Document the fact that Action Cable does not require a multi-threaded app server
2016-02-03 20:58:27 -05:00
Sean Griffin 089d98e842 Merge pull request #23465 from kamipo/sqlite2_support_has_been_dropped
SQLite 2 support has been dropped [ci skip]
2016-02-03 17:32:24 -07:00
Ryuta Kamizono c9feea6c9a SQLite 2 support has been dropped [ci skip] 2016-02-04 09:23:11 +09:00
Ryuta Kamizono 210c81440a Remove commented out code in `ci/travis.rb` [ci skip] 2016-02-04 09:15:25 +09:00
Arthur Nogueira Neves c85a4f1f0f Merge pull request #23459 from mperham/master
Remove unused dependency
2016-02-03 18:32:55 -05:00
Matthew Draper eeaf6ee284 Merge pull request #23457 from matthewd/arel-attribute
Defer Arel attribute lookup to the model class
2016-02-04 09:43:21 +10:30
Matthew Draper 5952861948 Extract a Relation#arel_attribute 2016-02-04 09:14:05 +10:30
Ryuta Kamizono 8b8ee6539c InnoDB supports FULLTEXT and Spatial Indexes [ci skip]
https://dev.mysql.com/doc/refman/5.7/en/innodb-fulltext-index.html
https://dev.mysql.com/doc/refman/5.7/en/creating-spatial-indexes.html
2016-02-04 07:30:05 +09:00
Mike Perham cf18c34e3a Remove unused dependency
railties uses method_source, activesupport does not.  I assume code was refactored and the dependency wasn't removed.
2016-02-03 14:28:55 -08:00
Ryuta Kamizono c7f8019bff Active Record supports MySQL >= 5.0
Currently some features uses `information_schema` (e.g. foreign key
support). `information_schema` introduced since MySQL 5.0.
2016-02-04 07:08:33 +09:00
Kasper Timm Hansen 13b918d1e9 Merge pull request #23456 from kaspth/line-filter-triggers-one-runnable
Fix line filters running tests from multiple runnables.
2016-02-03 22:55:50 +01:00
Matthew Draper cdc112e3ea Defer Arel attribute lookup to the model class
This still isn't as separated as I'd like, but it at least moves most of
the burden of alias mapping in one place.
2016-02-04 08:02:45 +10:30
Kasper Timm Hansen d10b48dd0a Fix model test path typo uncovered in previous commit.
Because of the expanding whitelist for test filters, this test ended up
running the tests on lines 4 and 9 in the post test even though the path
wasn't right.

Happened incidentally because the same line numbers were used in both
account and post test.

Add the .rb line so the file is required correctly and the filters are
applied.
2016-02-03 22:14:51 +01:00
Kasper Timm Hansen e4f0608164 Fix line filters running tests from multiple runnables.
`derive_regexp` was written with the assumption that we were run from a
blank slate — that if the filter didn't match we might as well return it
because it was nil.

This isn't the case because minitest calls `run` on every runnable. Which
is any subclass of Minitest::Runnable, such as ActiveSupport::TestCase,
ActionDispatch::IntegrationTest as well as any inheriting from those.

Thus after the first `run` we'd have put in a composite filter in
`options[:filter]` making the next `run` create a linked list when it
failed to match the regexp and put the composite filter as the head.

Every runnable would accumulate more and more of the same filters,
which effectively acted like an expanding whitelist and we ran tests
from other runnables.

Clog the accumulation by returning nil if there's no filter to derive
a regexp from.

Note: we pass a seed in the tests because Minitest shuffles the runnables
to ensure the whitelist is expanded enough that the failure is triggered.
2016-02-03 22:13:09 +01:00
Rafael França a14cd3261c Merge pull request #23455 from alexeyzab/add_apple_dummy_icon_files
Add dummy apple icon files
2016-02-03 18:12:48 -02:00