Commit Graph

2128 Commits

Author SHA1 Message Date
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
Pier-Olivier Thibault
d14fab04ff Use Rails::Paths::Path#existent in database_configuration
Database configuration was trying to load the first path that
config.paths['config/database'] was returning even if the path didn't
exist in the filesystem.

Because Rails::Paths::Path has the possibility to return more than 1
path (as an array), database_configuration should filter down the paths
to the existing one and then load the first one.

This would make it possible to move the database.yml file and add the
new path to paths['config/database'] and still load the configurations.
2014-05-07 18:18:00 -04:00
Paul B
d1fa1fc35a Return a non zero code when db has never been setup on status 2014-05-07 18:33:18 -03:00
Vipul A M
b2437050c8 rename str to string to fix overshadowing of variable 2014-05-07 14:32:27 +05:30
Arun Agrawal
c694c8e25c skip-git should not hit git commands plugin generators 2014-05-02 15:38:58 +02:00
Roman Shmatov
e8c310edf6 Works correctly if git not installed 2014-05-02 15:38:56 +02:00
Matthew Draper
4f31b7767e Precompile the image we're referencing, too.
You can't compile a file that references a non-compiled asset's path.

.. unless you turn off asset runtime errors.

Outside of a test case like this, `config.assets.precompile` would
normally retain its default entry, which precompiles all images (and
other non-JS/CSS files) that are in `app/assets`.
2014-04-24 04:49:02 +09:30
Rafael Mendonça França
43f525031a Make console and generators blocks works at Application instance level
Like rake tasks and runner blocks these blocks should also being shared
between applications since they are stored at the classes.

Fixes #14748
2014-04-14 18:59:47 -03:00
Rafael Mendonça França
e8c66288d6 ✂️ 2014-04-14 18:51:34 -03:00
Rafael Mendonça França
7bb8fd2f64 Merge pull request #14646 from deivid-rodriguez/provide_byebug_by_default
Improve debugging support
2014-04-11 13:55:10 -03:00
Matthew Draper
f612c2b052 Move assets precompile (and version) to an initializer
sprockets-rails 2.1 needs the precompile list to be available in all
environments.
2014-04-11 22:47:54 +09:30
David Rodríguez de Dios
6fae9ac581 Isolate debugger related code 2014-04-10 16:02:13 +02:00
Rafael Mendonça França
b053a47b3e depend_on_asset is not required anymore on sprockets-rails 2.1.2 2014-04-09 14:07:31 -03:00
David Heinemeier Hansson
4b0c8a9467 Use short-form for the scaffold render calls and drop the needless test 2014-04-08 20:57:24 +02:00
David Rodríguez de Dios
d8a4e48220 Update Gemfile templates to provide correct debugger 2014-04-08 20:57:12 +02:00
David Rodríguez de Dios
7901ae13a1 Keep debugger support only for rubies < 2.0.0 2014-04-08 20:55:23 +02:00
Rafael Mendonça França
e1404ec824 Rails.application should be set inside before_configuration hook
Fixes #14620
2014-04-07 17:35:00 -03:00
Rafael Mendonça França
bc6a949020 Declare the assets dependency 2014-04-04 18:03:14 -03:00
Matthew Draper
f846828dae Revise 'sqlite3:' URL handling for smoother upgrades
Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll
change to the absolute-path interpretation in 4.2.

The current "correct" spellings for in-memory, relative, and absolute
URLs, respectively, are:

    sqlite3::memory:
    sqlite3:relative/path
    sqlite3:/full/path

Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce.
Uncovered by @guilleiguaran while investigating #14495, though that
sounds like a different issue.
2014-04-03 01:30:27 +10:30
Rafael Mendonça França
8a081db357 Fix build with bundler 1.6 2014-03-26 22:19:29 -03:00
Kuldeep Aggarwal
5a3817cb16 Fix Generation of proper migration when
ActiveRecord::Base.pluralize_table_names = false.

  Previously, generation a migration like this:

      rails g migration add_column_name_to_user name

  would not generating the correct table name.

Fixes #13426.
2014-03-25 20:27:37 +05:30
Rafael Mendonça França
b9440c36dd Check if any sqlite files are not included in the gitignore
If the sqlite file name change in future version we this regexp should
catch
2014-03-24 09:24:47 -03:00
Dmitrii Golub
f42c7eee7e Remove sqlite3 lines from .gitignore if the application is not using sqlite3. 2014-03-24 14:53:38 +04:00
Yves Senn
582cbff616 test for structure:dump without schema information table. refs eafec46
This is a test case for the fix provided in eafec4694c5b37eff9d83b1188b8e331fa6027fa
2014-03-20 18:40:51 +01:00
Carlos Antonio da Silva
97229c69ea Remove some indirection in rake dbs test
Just pass in the expected database as argument rather than "caching"
it in a hash and using the hash in the helper methods.
2014-03-20 08:27:23 -03:00
Carlos Antonio da Silva
66dc576217 Check if the output is empty rather than asserting for equality
Also fix indent of test block.
2014-03-20 08:19:33 -03:00
Carlos Antonio da Silva
e0235c3721 Refactor assertion of line numbers matching 4 spaces 2014-03-19 21:47:38 -03:00
Carlos Antonio da Silva
29aff93dc4 Move booting/loading tasks setup to the rake notes helper method 2014-03-19 21:47:38 -03:00
Carlos Antonio da Silva
9c5c0bcfa6 Extract rake notes command and lines scan boilerplate
Refactor to a reusable method.
2014-03-19 21:47:38 -03:00
Carlos Antonio da Silva
3a3a386d4f Remove extra space assertion
No need to check that each line contains an extra space, just matching
the space in the regexp is enough to ensure that.
2014-03-19 21:47:38 -03:00
Carlos Antonio da Silva
dcf7a166f2 Extract common setup for loading tasks in rake notes tests 2014-03-19 21:47:38 -03:00
Guillermo Iguaran
4a69c933cf Merge pull request #14379 from robertomiranda/rake-notes.config
Add Public Api for Register New Extensions for Rake Notes
2014-03-17 17:47:24 -05:00
robertomiranda
3b073ac195 Rake notes should picked up new Extensions registered in the config/application.rb file 2014-03-17 17:03:52 -05:00
Carlos Antonio da Silva
1330274657 Fix assertions 2014-03-16 22:47:35 -03:00