| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Swallow bundler exceptions when running tests
|
| |
| |
| |
| | |
Let's avoid useless output when testing stuff related to Bundler.
|
| | |
|
|\ \
| | |
| | | |
rake railties:install:migrations respects the order of railties
|
| | |
| | |
| | |
| | | |
This PR fixes #8930 and some stuff from #8985
|
|\ \ \
| | | |
| | | |
| | | | |
Replace double quotes with single quotes while adding an entry into Gemfile
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
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.
|
|/ /
| |
| |
| | |
Minitest has already been required when calling Minitest.autorun.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Since the generated application’s Gemfile is using single quotation marks, it
seems fair to use it on plugin’s Gemfile as well.
|
|\ \
| | |
| | | |
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.
|
|/ / |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
| |
Like rake tasks and runner blocks these blocks should also being shared
between applications since they are stored at the classes.
Fixes #14748
|
| |
|
|\
| |
| | |
Improve debugging support
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
sprockets-rails 2.1 needs the precompile list to be available in all
environments.
|
| | |
|
|/ |
|
|
|
|
| |
Fixes #14620
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If the sqlite file name change in future version we this regexp should
catch
|
| |
|
|
|
|
| |
This is a test case for the fix provided in eafec4694c5b37eff9d83b1188b8e331fa6027fa
|
|
|
|
|
| |
Just pass in the expected database as argument rather than "caching"
it in a hash and using the hash in the helper methods.
|
|
|
|
| |
Also fix indent of test block.
|
| |
|
| |
|
|
|
|
| |
Refactor to a reusable method.
|
|
|
|
|
| |
No need to check that each line contains an extra space, just matching
the space in the regexp is enough to ensure that.
|
| |
|