Commit Graph

2162 Commits

Author SHA1 Message Date
Rafael Mendonça França
b17330cf39 Remove mocha usage 2014-07-23 19:01:44 -03:00
Rafael Mendonça França
bec08e7744 Merge pull request #16267 from robin850/rbx-yaml
Set Psych as the YAML engine for Rubinius
2014-07-23 17:45:15 -03:00
Rafael Mendonça França
cd7d414e48 Do not set enforce_available_locales to i18n 0.7
Now the default is always true.

Users still can set it using config.i18n.enforce_available_locales.
2014-07-23 17:40:44 -03:00
Robin Dupret
558f8aa2ee Set Psych as the YAML engine for Rubinius
Since the rubysl-yaml gem doesn't ship with Psych by default because of
its dependency on libyaml, on Rubinius, the default engine is Syck.

However, if we want to be able to run the application safely on
different rubies, we need to make people using Rubinius rely on Psych.

See http://git.io/uuLVag for further information.
2014-07-23 20:05:14 +02:00
Rafael Mendonça França
08754f12e6 Merge branch 'rm-remove-mocha'
Conflicts:
	actionpack/test/abstract_unit.rb
2014-07-19 18:17:13 -03:00
Rafael Mendonça França
fd6aaaa0c3 Stop requiring mocha automatically
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.

This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.

Added FIXME notes to place that still need mocha removal
2014-07-19 17:35:12 -03:00
Rafael Mendonça França
fcc2231a04 Stop using mocha on dbconsole_test 2014-07-15 23:36:45 -03:00
Rafael Mendonça França
3121412cf1 Keep quietly and capture undeprecated on your suite 2014-07-15 17:56:27 -03:00
Rafael Mendonça França
9629dea4fb Add Rails::Application#config_for
This is a convenience for loading configuration for the current Rails
environment.
2014-07-15 15:35:13 -03:00
Guo Xiang Tan
d9396a07eb Fix incorrect unsubscription. 2014-07-11 16:38:26 +08:00
Rafael Mendonça França
a83efa4a1f Stop using mocha on console_test 2014-07-07 23:39:18 -03:00
Rafael Mendonça França
57e298fcd5 Set the application logger using configuration 2014-07-07 22:57:55 -03:00
Rafael Mendonça França
d3af622586 Stop using mocha on configuration_test 2014-07-07 22:46:39 -03:00
Rafael Mendonça França
fb9eb7019e Stop using mocha on app_rails_loader_test 2014-07-07 22:05:30 -03:00
Arun Agrawal
e197fd7f37 Display notice in index.html pages in scaffolded generated views
As we are setting notice in destroy action we should display that

For more information see https://github.com/rails/rails/pull/14044
And https://github.com/rails/jbuilder/pull/191

closes #14044
2014-07-04 16:20:53 +02:00
Rafael Mendonça França
5c87b5c524 Revert "Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format"
This reverts commit 46139d33c06715e74ad450428ece3ee84da98579, reversing
changes made to 8f247871bb18b2e3036a05df5f62cbfe3b402586.

Conflicts:
	activerecord/CHANGELOG.md
2014-07-02 09:41:52 -03:00
Rafael Mendonça França
72f58b0244 Rename preview_enabled option to show_previews 2014-07-01 13:09:24 -03:00
Leonard Garvey
84ed7b8dfe Add configuration to enable mail previews
Adds `config.action_mailer.preview_enabled`

This allows mail previewing to be enabled easily in non-development
environments such as staging. The default is set to true for development
so no changes should be required to existing Rails applications.

The mail preview path can still be configured using the existing
`config.action_mailer.preview_path` configuration option.

Adding this avoids devs from having to do stuff like:
https://gist.github.com/lengarvey/fa2c9bd6cdbeba96526a

Update actionmailer/CHANGELOG with new configuration.
Update configuring guide with new configuratation.
Add `config.action_mailer.preview_path` to configuring guide.
2014-07-01 14:39:59 +10:00
Rafael Mendonça França
ebdedaec32 Merge pull request #15933 from rafael/master
Add always permitted parameters as a configurable option.

[Rafael Mendonça França + Gary S. Weaver]
2014-06-27 18:16:52 -03:00
Rafael Chacón
58399e1dc3 Improvements per code review.
* General style fixes.
* Add changes to configuration guide.
* Add missing tests.
2014-06-27 13:08:40 -07:00
Viktar Basharymau
0813607c70 Add a test for db:migrate:status to check missing file scenario 2014-06-27 18:28:12 +03:00
Rafael Chacón
c197a7dc41 Add always_permitted_parameters as an option.
* This commit adds back the always_permitted_parameters
  configuration option to strong paramaters.
* The initial pull requests where this feature was added
  are the following:
  - https://github.com/rails/rails/pull/12682
  - https://github.com/rails/strong_parameters/pull/174
2014-06-26 23:01:30 -07:00
Lucas Mazza
4b173b8ed9 Add a '--skip-routes' flag for the Controller generator.
This way it is possible to skip the addition of the 'get "foo/bar"' routes when
generating a controller.
2014-06-24 14:06:03 -03:00
Rafael Mendonça França
7f7e2f12ab initialize the right variable 2014-06-17 20:39:49 -03:00
Rafael Mendonça França
1056589580 Add a generic --skip-gems options to generator
Also remove --skip-turbolinks.

This option is useful if users want to remove some gems like jbuilder,
turbolinks, coffee-rails, etc that don't have specific options on the
generator.

    rails new my_app --skip-gems turbolinks coffee-rails
2014-06-17 20:35:09 -03:00
Rafael Mendonça França
0724706b6d Merge pull request #15716 from schuetzm/skip-turbolinks
Add an option to skip installation of Turbolinks
2014-06-17 19:47:25 -03:00
Yves Senn
f59ed560ac allow preview interceptors to be registered through config.action_mailer.
This was partially broken because `preview_interceptors=` just assigned the
raw values, whithout going through `register_preview_interceptor`. Now the
Action Mailer railtie takes care of the `preview_interceptors` option.

This commit is a partial revert of:

Revert "Merge pull request #15739 from y-yagi/correct_doc_for_action_mailer_base"

This reverts commit a15704d7f35f17d34d0118546799141d6f853656, reversing
changes made to 1bd12a8609d275ad75fcc4b622ca4f5b32dc76be.

/cc @kuldeepaggarwal @y-yagi
2014-06-15 14:17:00 +02:00
Marc Schütz
e3dca3acc6 Add an option to skip installation of Turbolinks 2014-06-14 12:03:09 +02:00
Yves Senn
46139d33c0 Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format
ActiveRecord::Migration.maintain_test_schema! doesn't work with structure.sql

Conflicts:
	activerecord/CHANGELOG.md
2014-06-12 15:29:20 +02:00
Wojciech Wnętrzak
ad42aaed04 Fixed automatic maintaining test schema to properly handle sql structure schema format.
Additionally:
* It changes `purge` task on `sqlite3` adapter to recreate database file, to
be consistent with other adapters.
* Adds `purge` step when loading from `schema.rb`
2014-06-12 13:08:56 +02:00
Fabian Rodriguez
f374720402 remove unnused method from test 2014-06-11 20:26:47 -03:00
schneems
72f45ba292 Emit suggested generator names when not found
When someone types in a generator command it currently outputs all generators. Instead we can attempt to find a subtle mis-spelling by running all generator names through a levenshtein_distance algorithm provided by rubygems. 

So now a failure looks like this:

```ruby
$ rails generate migratioooons
Could not find generator 'migratioooons'. Maybe you meant 'migration' or 'integration_test' or 'generator'
Run `rails generate --help` for more options.
```

If the suggestions are bad we leave the user with the hint to run `rails generate --help` to see all commands.
2014-06-04 16:28:43 -05:00
Yves Senn
75f75a8719 Merge pull request #14881 from robin850/patch-19
Swallow bundler exceptions when running tests
2014-06-01 18:23:10 +02:00
Wojciech Wnętrzak
df6dc1b51a Added missing test case for migrations when using sql structure 2014-06-01 17:30:05 +02:00
Yves Senn
7ba6b75910 bin/setup script to bootstrap applications. 2014-05-30 11:15:56 +02:00
Rafael Mendonça França
be4b3df8bb Merge pull request #15269 from arunagw/aa-fixes-8930
rake railties:install:migrations respects the order of railties
2014-05-27 19:27:40 -03:00
Arun Agrawal
50de394cc8 rake railties:install:migrations respects the order of railties
This PR fixes #8930 and some stuff from #8985
2014-05-27 16:12:36 +02:00
Yves Senn
83cb356093 Merge pull request #15327 from alexbel/replace_double_quotes_with_single_quotes
Replace double quotes with single quotes while adding an entry into Gemfile
2014-05-27 09:27:36 +02:00
alexbel
6aaf4bff18 Replace double quotes with single quotes while adding an entry into Gemfile 2014-05-26 19:08:03 -04:00
Rafael Mendonça França
70d126779e Merge pull request #15294 from schneems/schneems/generator-output-in-error2
print generators on failed generate
2014-05-26 14:51:15 -03:00
schneems
e83ce84ef9 print generators on failed generate
Let's say we just ran:

```
$ rails g migrate add_click_to_issue_assignment
```

We will get an error that looks like:

```
Could not find generator migrate.
```

This patch adds all existing migrations to the output to make it easier for a developer to find a valid migration.

```
Could not find generator "migrate". Please select a valid generator:
Rails:
  assets
  controller
  generator
  helper
  integration_test
  mailer
  migration
  model
  resource
  scaffold
  scaffold_controller
  task
```


It would be nice to do some spelling detection and suggest alternatives, but for now this should  help.
2014-05-26 10:11:07 -05:00
Guo Xiang Tan
4ca5a5ea67 Remove unnecessary require of Minitest.
Minitest has already been required when calling Minitest.autorun.
2014-05-24 20:36:05 -07:00
Dan Kang
f369bcf9a0 Default config.assets.digests to true in development 2014-05-17 23:01:22 -04:00
Rafael Mendonça França
31fb1ef536 New applications should be created with json serializer
The fix introduced at 75ba7425f6d235f254c00a45a58f42e88f80301a were
missing this case.

To fix the original issue mentioned at that commit the correct is to
remove update_config_files from the command list since we should not run
both config_files command when creating a new application.

Tests were added to make sure everything is working fine.
2014-05-17 15:46:33 -03:00
Christian Wesselhoeft
75ba7425f6 Fix app generator test hanging. 2014-05-17 09:53:44 -07:00
Rafael Mendonça França
890a189bb4 Ok. Enough models for today 😡 2014-05-12 21:28:39 -03:00
Rafael Mendonça França
392e627b12 This is also a model 2014-05-12 21:03:58 -03:00
Rafael Mendonça França
be6ff39199 This model is a model so it should behaves like one 2014-05-12 20:54:06 -03:00
Josemar Luedke
08b435e1bd Change Gemfile’s double quotes in plugin generator
Since the generated application’s Gemfile is using single quotation marks, it
seems fair to use it on plugin’s Gemfile as well.
2014-05-10 17:56:16 -03:00
Rafael Mendonça França
5ff7c591d3 Merge pull request #15015 from pothibo/database-configuration
Use Rails::Paths::Path#existent in database_configuration
2014-05-07 19:25:56 -03:00