Commit Graph

57551 Commits

Author SHA1 Message Date
Jeremy Daer
f885587cc7 Merge pull request #24556 from vipulnsward/24542-changelog
Add changelog for #24542
2016-04-15 10:02:33 -07:00
Jeremy Daer
92182d0d5b Merge pull request #24559 from vipulnsward/fix-ac-tests
Fixed ActionCable::Connection::ClientSocketTest test
2016-04-15 09:51:09 -07:00
Sean Griffin
b0d7ac0ff7 Merge pull request #24517 from estolfo/transform-keys-return-type-master
Restore Hash#transform_keys behavior to always return a Hash instance
2016-04-15 09:25:02 -06:00
Sean Griffin
94a1edbc02 Filter scalar values when params permit hashes or arrays
This brings the behavior more inline with other similar cases, such as
receiving a hash when an array of scalars was expected. Prior to this
commit, the key would be present, but the value would be `nil`
2016-04-15 09:09:50 -06:00
प्रथमेश Sonpatki
b1f4c4bbcf Merge pull request #24560 from javiervidal/20160415
Fix broken link in 'Ruby on Rails 4.0 Release Notes'
2016-04-15 17:04:11 +05:30
Javier Vidal
14783cf569 Fix broken link in 'Ruby on Rails 4.0 Release Notes' [ci skip] 2016-04-15 13:15:03 +02:00
Vipul A M
02a31cfdd1 - Fixed ActionCable::Connection::ClientSocketTest that was overriding ActionCable::Connection::StreamTest test name
- Only add attr_readers for required attributes
2016-04-15 16:03:21 +05:30
Vipul A M
8ad9670abb Merge pull request #24557 from y-yagi/update_example_to_specify_ac_mount_path
update example to specify the Action Cable mount path [ci skip]
2016-04-15 16:00:42 +05:30
yuuji.yaginuma
a2f034335d update example to specify the Action Cable mount path [ci skip]
Follow up to 8b69f1e
2016-04-15 19:16:01 +09:00
Vipul A M
65a7e90cc1 Add changelog for #24542
[ci skip]
2016-04-15 12:06:56 +05:30
Jeremy Daer
a2de667b2e Merge pull request #24549 from kamipo/fix_quoted_time
Should keep quoting behaivor of a time column value in sqlite3 adapter
2016-04-14 21:41:07 -07:00
Ryuta Kamizono
73af7945d5 Should keep quoting behaivor of a time column value in sqlite3 adapter
Follow up to #24542.

In MySQL and PostgreSQL, a time column value is saved as ignored the
date part of it. But in SQLite3, a time column value is saved as a string.

We should keep previous quoting behavior in sqlite3 adapter.

```
sqlite> CREATE TABLE "foos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "start" time(0), "finish" time(4));
sqlite> INSERT INTO "foos" ("start", "finish") VALUES ('2000-01-01 12:30:00', '2000-01-01 12:30:00.999900');
sqlite> SELECT "foos".* FROM "foos";
1|2000-01-01 12:30:00|2000-01-01 12:30:00.999900
sqlite> SELECT  "foos".* FROM "foos" WHERE "foos"."start" = '2000-01-01 12:30:00' LIMIT 1;
1|2000-01-01 12:30:00|2000-01-01 12:30:00.999900
sqlite> SELECT  "foos".* FROM "foos" WHERE "foos"."start" = '12:30:00' LIMIT 1;
sqlite>
```
2016-04-15 03:45:02 +09:00
Sean Griffin
4769fc4b4d Merge pull request #24540 from sgrif/sg-actioncable-callbacks
Run Action Cable callbacks through the worker pool
2016-04-14 11:25:08 -06:00
Vipul A M
91798c75bc Merge pull request #24454 from iangilfillan/master
MariaDB documentation [ci skip]
2016-04-14 18:36:08 +05:30
iangilfillan
48ef9408bc MariaDB Documentation 2016-04-14 14:06:29 +02:00
Jeremy Daer
53ab1ee565 Merge pull request #24542 from kamipo/add_quoted_time
Add `quoted_time` for truncating the date part of a time column value
2016-04-13 22:30:35 -07:00
Ryuta Kamizono
28ec8c4a57 Add quoted_time for truncating the date part of a time column value
Context #24522.

TIME column on MariaDB doesn't ignore the date part of the string when
it coerces to time.

```
root@localhost [test] > CREATE TABLE `foos` (`id` int AUTO_INCREMENT PRIMARY KEY, `start` time(0), `finish` time(4)) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)

root@localhost [test] > INSERT INTO `foos` (`start`, `finish`) VALUES ('2000-01-01 12:30:00', '2000-01-01 12:30:00.999900');
Query OK, 1 row affected, 2 warnings (0.00 sec)

Note (Code 1265): Data truncated for column 'start' at row 1
Note (Code 1265): Data truncated for column 'finish' at row 1
root@localhost [test] > SELECT `foos`.* FROM `foos`;
+----+----------+---------------+
| id | start    | finish        |
+----+----------+---------------+
|  1 | 12:30:00 | 12:30:00.9999 |
+----+----------+---------------+
1 row in set (0.00 sec)

root@localhost [test] > SELECT  `foos`.* FROM `foos` WHERE `foos`.`start` = '2000-01-01 12:30:00' LIMIT 1;
Empty set (0.00 sec)

root@localhost [test] > SELECT  `foos`.* FROM `foos` WHERE `foos`.`start` = '12:30:00' LIMIT 1;
+----+----------+---------------+
| id | start    | finish        |
+----+----------+---------------+
|  1 | 12:30:00 | 12:30:00.9999 |
+----+----------+---------------+
1 row in set (0.00 sec)
```
2016-04-14 14:22:16 +09:00
Jeremy Daer
128923ca14 Merge pull request #24522 from vipulnsward/run-mariadb-on-travis
Test against MariaDB 10.0
2016-04-13 22:18:54 -07:00
Richard Schneeman
ad87acf8b2 Merge pull request #24543 from prathamesh-sonpatki/fix-ap-changelog
[ci skip] Remove extra `so` from the Action Pack CHANGELOG
2016-04-13 21:08:53 -07:00
Prathamesh Sonpatki
64b115b451
[ci skip] Remove extra so from the Action Pack CHANGELOG 2016-04-14 09:19:34 +05:30
Vipul A M
bbb8f518b5 Include running mariadb on travis
- Specify we want to run on latest stable ruby for mariadb

- change in runs of builds

Make mariadb? method publicly available
2016-04-14 04:42:41 +05:30
Sean Griffin
977be6d51e Merge pull request #24533 from vipulnsward/nodoc-version
:nodoc: version method.
2016-04-13 15:34:47 -06:00
Vipul A M
aeffcf25b4 Merge pull request #24525 from tomkadwill/action-mailer-base-docs2
Update ActionMailer base documentation [ci skip]
2016-04-14 02:14:58 +05:30
Tom Kadwill
d2f87d7000 Update ActionMailer base documentation [ci skip] 2016-04-13 21:40:03 +01:00
Sean Griffin
d1766ef53d Run Action Cable callbacks through the worker pool
Alternate implementation of #24162 with tests. The code had diverged
too far on master to pull that implemenation directly.

Fixes #23778
Close #24162

[Mattew Draper & Sean Griffin]
2016-04-13 13:09:16 -06:00
Sean Griffin
65246f9b1d Merge pull request #24539 from bogdan/diry-keyword-args
Fixed bug introduced in #24519. Makes build green again
2016-04-13 12:33:37 -06:00
Rafael França
511d034188 Merge pull request #24536 from vipulnsward/ruby-2-upgrading
Add ruby 2.2.2+ version requirement for Rails 5 apps
2016-04-13 15:30:57 -03:00
Bogdan Gusiev
80b9e5d7bd Fixed bug introduced in #24519. Makes build green again 2016-04-13 21:13:33 +03:00
Jeremy Daer
e25d7a78b5 Merge pull request #24519 from bogdan/diry-keyword-args
Switch to keyword args for attribute_changed?
2016-04-13 11:09:31 -07:00
Sean Griffin
efaa6e4f79 Properly serialize all JSON primitives in the AR JSON type
Previously we were assuming that the only valid types for encoding were
arrays and hashes. However, any JSON primitive is an accepted value by
both PG and MySQL.

This does involve a minor breaking change in the handling of `default`
in the schema dumper. This is easily worked around, as passing a
hash/array literal would have worked fine in previous versions of Rails.
However, because of this, I will not be backporting this to 4.2 or
earlier.

Fixes #24234
2016-04-13 10:52:07 -06:00
Vipul A M
4e40fcb402 Add ruby 2.2.2+ version requirement for Rails 5 apps
[ci skip]
2016-04-13 21:37:34 +05:30
Vipul A M
1eb95899d4 :nodoc: version method.
Reason:
 - Its not publicly used method.
 - Exposing it makes an assumption that other adapters support it based on its usage - ActiveRecord::Base.connection.version

 [ci skip]
2016-04-13 16:09:33 +05:30
Rafael Mendonça França
2b92069a49 Remove unused variable 2016-04-13 01:32:24 -03:00
Rafael Mendonça França
ff9b38a7b5 Remove time calculatiosn extension
We are using compare_without_coercion.
2016-04-13 01:31:50 -03:00
Rafael Mendonça França
0c21fb361c Merge pull request #24318 from bogdanvlviv/patch-1
extension synonyms yml and yaml
2016-04-12 23:26:45 -03:00
Rafael França
a162600499 Merge pull request #24524 from prathamesh-sonpatki/cablejs-for-channels
Generate `cable.js` file if does not exist when generating channel
2016-04-12 23:02:48 -03:00
Bogdan Gusiev
afb1f32e79 Use keyword arguments to cleanup without droping performance 2016-04-13 02:03:51 +03:00
Sean Griffin
ba194d4230 Merge pull request #24515 from Sen-Zhang/attribute_changed_not_return_nil
prevent 'attribute_changed?' from returning nil
2016-04-12 14:54:31 -06:00
Richard Schneeman
ecd53667fa Merge pull request #24502 from ankit8898/freezing-dot-in-delimiter-helper
Lesser '.' objects for number helpers
2016-04-12 13:40:17 -07:00
Xavier Noria
b1f10502e6 copy edits some comments [ci skip]
Note that the fact that mtimes in the future are ignore was documented
just a few lines above. Since we know this has to be done, and the code
is quite clear due to variable naming, I think we can get rid of the
comment in the middle of the loop and shorten it even further.
2016-04-12 20:09:06 +02:00
Yves Senn
a08efa1065 Merge pull request #24494 from vipulnsward/guides-changelog-pass
Guides changelog pass [ci skip]
2016-04-12 20:07:21 +02:00
Xavier Noria
b271eda703 Merge pull request #24523 from BlakeMesdag/as-max_time-fix-edges
Handle max_time edge cases for epoch times and add test
2016-04-12 10:56:42 -07:00
Blake Mesdag
f05704fc1a No more need for an early return 2016-04-12 13:49:41 -04:00
Blake Mesdag
fad2428e35 More readable version 2016-04-12 13:29:56 -04:00
Prathamesh Sonpatki
d0023deb74
Generate cable.js file if does not exist when generating channel
- Before this, while generating a channel, we were not creating
  `cable.js` if it does not already exist.
- We have similar code for application mailer here -
  0b3ae023d2.
- Based on the comment -
  https://github.com/rails/rails/issues/24418#issuecomment-205421995.
2016-04-12 22:49:38 +05:30
Sean Griffin
714ab8cb59 Allow symbols using "dot notation" to be passed to where
In 04ac5655be91f49cd4dfe2838df96213502fb274 I assumed that we would
never want to pass the "table_name.column_name" form to where with a
symbol. However, in Ruby 2.2 and later, you can quote symbols using the
new hash syntax, so it's a semi-reasonable thing to do if we want to
support the dot notation (which I'd rather deprecate, but that would be
too painful of a migration).

Instead we've changed the definition of "this is a table name with a
dot" to when the value associated is a hash. It would make very little
sense to write `where("table_name.column_name": { foo: :bar })` in any
scenario (other than equality for a JSON column which we don't support
through `where` in this way).

Close #24514.
2016-04-12 10:42:28 -06:00
Blake Mesdag
b0bce0b8ce Handle max_time edge cases for epoch times and add test 2016-04-12 12:07:56 -04:00
Xavier Noria
d6769f4d10 Merge pull request #24520 from BlakeMesdag/activesupport-fileupdate-checker-mtime-optimization
Use a single loop in ActiveSupport:FileUpdateChecker#max_mtime
2016-04-12 08:11:28 -07:00
Blake Mesdag
fcde948e43 Use Time#compare_without_coercion for super speed 2016-04-12 09:46:25 -04:00
Blake Mesdag
a8c99a2580 Use a single memoized loop to find max mtime in ActiveSupport::FileUpdateChecker#max_mtime 2016-04-12 08:41:06 -04:00