Commit Graph

41580 Commits

Author SHA1 Message Date
Arun Agrawal
c60edddc0f Merge pull request #13513 from ilja/master
Typo fix [ci skip]
2013-12-28 02:39:13 -08:00
Ilja Krijger
1196bec8e0 Typo fix [ci skip] 2013-12-28 11:24:01 +01:00
Guillermo Iguaran
04108f214c Merge branch 'master' of github.com:rails/rails 2013-12-27 15:02:57 -05:00
Yves Senn
4fd3204a04 Merge pull request #13474 from jdelStrother/becomes
Copy changed_attributes across to newly become'd records
2013-12-27 11:15:19 -08:00
Norman Clarke
ef28028c45 Update to Unicode 6.3.0
6.3.0 was released on September 30, 2013.

http://unicode-inc.blogspot.com.ar/2013/09/announcing-unicode-standard-version-63.html
2013-12-27 14:56:54 -03:00
Jonathan del Strother
b7bf025374 Copy changed_attributes across to newly become'd records
Without this, the original record's values won't get saved, since the partial insertions support (144e8691cb) checks for changed values and thinks there are none.
2013-12-27 15:54:06 +00:00
Yves Senn
b33555d3ef Merge pull request #13505 from robin850/patch-13
Ensure backward compatibility between Minitest 5 and 4
2013-12-27 02:34:37 -08:00
Robin Dupret
a9444916ee Ensure backward compatibility between Minitest 5 and 4
Define Minitest::Test in case we are running the gist under Minitest 4
and avoid relying on MiniTest::Unit::TestCase to avoid displaying
warning on version five.

[ci skip]
2013-12-27 11:30:53 +01:00
Yves Senn
864514a460 Merge pull request #13483 from aditya-kapoor/add-missing-slashes
Adding missing backslashes in active_model files so as to avoid unwanted [ci skip]
2013-12-27 01:13:02 -08:00
Yves Senn
aabfba7aa0 doc fix. Use sess.path within open_session. Closes #13490. [ci skip] 2013-12-27 09:35:14 +01:00
aditya-kapoor
fe49f432c9 Adding missing backslashes in active_model files so as to avoid unwanted links in rdoc [ci skip] 2013-12-27 13:58:31 +05:30
Yves Senn
eff8196190 Merge pull request #13500 from arunagw/remove-unused-require
rbconfig is not used in these files remove unused requires
2013-12-26 23:58:58 -08:00
Guillermo Iguaran
7d1d11e620 Merge pull request #13502 from arunagw/bug-report-template-warning
Minitest::Unit::TestCase is Minitest::Test [ci skip]
2013-12-26 14:57:27 -08:00
Arun Agrawal
fd1c515d4d Minitest::Unit::TestCase is Minitest::Test [ci skip] 2013-12-26 23:55:59 +01:00
Arun Agrawal
f593b695fe rbconfig is not used in these files
remove unused requires
2013-12-26 21:18:14 +01:00
Jeremy Kemper
037665cbe1 Merge pull request #13495 from norman/tidy_bytes
Use String#scrub when available to tidy bytes
2013-12-26 12:14:30 -08:00
Arun Agrawal
cef8c8f772 Merge pull request #13498 from dmitrydims/master
Fixed typo in Rails 4.1 Release Notes [CI skip]
2013-12-26 11:43:33 -08:00
Semenyk Dmitriy
46096a082f Fixed typo [CI skip] 2013-12-27 00:28:47 +05:00
Norman Clarke
ab195841dd Use String#scrub when available to tidy bytes 2013-12-26 12:36:52 -03:00
Xavier Noria
8003c541f7 Merge pull request #13493 from Domon/improve-some-code-font-in-api-doc
Improve font of some code in API documentation [ci skip]
2013-12-26 03:20:19 -08:00
Chun-wei Kuo
fbbd4e1899 Improve font of some code in API documentation [ci skip]
* Add "<tt>" or "+" to improve font of some code and filenames in API documentation
* Does not contain wording changes
2013-12-26 18:54:46 +08:00
Godfrey Chan
87323487ce Merge pull request #13442 from aditya-kapoor/update-docs
Updated documentation for Attribute Methods [ci skip]
2013-12-26 02:02:53 -08:00
Guillermo Iguaran
c99d969160 Merge pull request #13485 from schneems/schneems/fix-more-railties-tests
Partial fix of database url tests
2013-12-25 16:38:49 -08:00
schneems
2409c61661 Fix failure introduced from #13488 2013-12-25 18:45:26 -05:00
schneems
d0926d3d5e fix 2.1.0 bug :( 2013-12-25 18:27:09 -05:00
schneems
707be603cf ensure environment is run before db:structure:load
Right now `db:drop` depends on `load_config` since so when `db:drop` gets executed `load_config` gets run. `db:structure:load` depends on `[:environment, :load_config]`. So before it runs, it executes `environment` but because `load_config` has already executed it is skipped. Note `db:load_config` is "invoke"-d twice, but only "execute"-d once:

```
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:drop
** Invoke db:structure:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config
** Execute db:structure:load
```

The fix for this is making sure that the environment is run before any `load_config`:

```
** Invoke environment (first_time)
** Execute environment
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:drop
** Invoke db:structure:load (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:structure:load
```
2013-12-25 18:03:55 -05:00
schneems
ba882934bb Partial fix of database url tests
Prior to #13463 when `DATABASE_URL` was set, Rails automagically used that value instead of the database.yml. There are tests in dbs_test that expect this to still be true. After that PR, `RAILS_DATABASE_URL` is expected to be read into the YAML file via ERB, this PR fixes that behavior.

Note: this does not entirely fix the tests. It seems that `ActiveRecord::Tasks::DatabaseTasks.current_config` does not process the url string correctly (convert it into a hash), and ` ActiveRecord::Tasks::DatabaseTasks.structure_load(current_config, filename)` as well as other methods in `DatabaseTasks` expect a hash.

It seems like we should involve the resolver somewhere in this process to correctly convert the database url, I do not know the best place for that /cc @josevalim
2013-12-25 18:03:55 -05:00
Guillermo Iguaran
d80ad96b95 Fix tests names: tokens.yml => secrets.yml 2013-12-25 17:34:25 -05:00
Guillermo Iguaran
e9f8fe2707 Merge pull request #13488 from strzalek/fix-railties-warnings
Fix railties warnings
2013-12-25 14:31:29 -08:00
Łukasz Strzałkowski
dd55033777 Cast env to symbol, fixes deprecation warning
Warning:

  DEPRECATION WARNING: Passing a string to ActiveRecord::Base.establish_connection for a configuration lookup is deprecated, please pass a symbol (:development) instead.
2013-12-25 23:26:53 +01:00
Łukasz Strzałkowski
7a9d2925d7 Avoid getting redefined method warning
Warning:

  ~/projects/rails/activerecord/lib/active_record/railtie.rb:140: warning: method redefined; discarding old extend_message
  ~/projects/rails/activerecord/lib/active_record/errors.rb:104: warning: previous definition of extend_message was here
2013-12-25 23:25:53 +01:00
Guillermo Iguaran
278bbfd7df Merge pull request #13478 from schneems/schneems/fix-mysql
Move mysql2 test for when adapter will be loaded
2013-12-25 12:21:38 -08:00
Guillermo Iguaran
2aceccf974 Test with 2.1.0 2013-12-25 15:17:08 -05:00
aditya-kapoor
1dae89ccce Added Backslashes to ActiveModel::AttributeMethods to prevent unwanted links in the rdoc + some other doc fixes.[ci skip] 2013-12-25 18:34:11 +05:30
Arun Agrawal
ed072bd5cb Merge pull request #13482 from aayushkhandelwal11/typo
Typo rectified commom => common[ci skip]
2013-12-25 05:00:24 -08:00
Aayush khandelwal
db7065b53c Typo rectified commom => common[ci skip] 2013-12-25 18:22:26 +05:30
José Valim
84d47d073e Merge pull request #13480 from kuldeepaggarwal/f-removed-depricated-config
using symbol instead of string in establish_connection
2013-12-25 04:48:56 -08:00
Kuldeep Aggarwal
b9d79b1f5f using symbol instead of string in establish_connection 2013-12-25 15:24:25 +05:30
Akira Matsuda
ccc1a7b7b0 Unused classes in AP tests 2013-12-25 18:10:56 +09:00
Akira Matsuda
f57e5f224b Unused class in AV test 2013-12-25 10:33:42 +09:00
schneems
8e2c0803f5 Move mysql2 test for when adapter will be loaded
When run with only the Mysql adapter, we get this failure: https://travis-ci.org/rails/rails/jobs/15937907#L2416

Porting the test over to only run when mysql2 is loaded
2013-12-24 17:28:40 -05: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
José Valim
db22a5a8eb Merge pull request #13472 from schneems/schneems/fix-master-database-url-tests
Fix railties tests in master
2013-12-24 10:20:51 -08:00
José Valim
df09ce966e Merge pull request #13471 from schneems/schneems/better-secrets-error-message
Better missing `secret_key_base` error message
2013-12-24 08:22:30 -08:00
José Valim
9705df5c2b Merge pull request #13469 from schneems/schneems/no-database-errors-all
Raise NoDatabaseError when db does not exist
2013-12-24 08:17:21 -08: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
schneems
d641a0cf0d Better missing secret_key_base error message
Previously the error was:

```
RuntimeError: You must set secret_key_base in your app's config
```

Will now be:


```
RuntimeError: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`
```
2013-12-24 11:08:16 -05:00
José Valim
959cfcef72 Ensure secret_key_base is set for all environments 2013-12-24 16:35:43 +01:00
schneems
f0311c2487 Raise NoDatabaseError when db does not exist
Building on the work of #13427 this PR adds a helpful error message to the adapters: mysql, mysql2, and sqlite3
2013-12-24 10:13:12 -05:00
Arun Agrawal
6570448dcd Merge pull request #13467 from JuanitoFatas/getting-started
[ci skip] Update getting started Ruby version.
2013-12-24 04:51:43 -08:00