Commit Graph

2110 Commits

Author SHA1 Message Date
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
robertomiranda
27e95727d7 Add config.annotations, in order to register new extensions for Rake notes at config level 2014-03-16 14:57:21 -05:00
robertomiranda
ce38a6b8b6 Fix Shadowing extensions variable in Register Annotation Exentsions 2014-03-16 14:32:08 -05:00
robertomiranda
f43421cb65 Supporting .ruby, .yml and .yaml Extension in Rake Notes 2014-03-14 17:51:14 -05:00
robertomiranda
810af6f6ee Remove .scss, .sass, .less, .haml, .slim, coffee from Rake Notes. Now we have an API for register it in the corresponding gems 2014-03-14 17:39:04 -05:00
robertomiranda
a2fb164a4f Add Public Api for register new extensions for Rake Notes 2014-03-14 15:22:02 -05:00
schneems
aa27766e2f better test error messages 2014-03-14 11:40:14 -05:00
Robin Dupret
9c53b8b89f Make the rails:template rake task load initializers
Templates could rely on irregular inflections or external libraries for
instance so we should load the application's initializers when running
the rails:template task.

The introducing commit of this feature is f7f11361 ; the initializers
have never been loaded invoking this task.

Fixes #12133.
2014-03-08 15:59:22 +01:00
Prem Sichanugrist
2dd2fcf896
Introduce Rails.gem_version
This method return `Gem::Version.new(Rails.version)`, suggesting a more
reliable way to perform version comparison.

Example:

    Rails.version #=> "4.1.2"
    Rails.gem_version #=> #<Gem::Version "4.1.2">

    Rails.version > "4.1.10" #=> false
    Rails.gem_version > Gem::Version.new("4.1.10") #=> true
    Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true

This was originally introduced as `.version` by @charliesome in #8501
but got reverted in #10002 since it was not backward compatible.

Also, updating template for `rake update_versions`.
2014-03-05 12:37:38 -05:00
Guillermo Iguaran
b0767afac5 Merge pull request #14195 from robin850/issue-14079
Avoid namespacing routes inside engines
2014-02-28 19:26:04 -05:00
Yves Senn
14e697cf2a Merge pull request #14174 from kuldeepaggarwal/fix-resource_generator_test
fix test cases
2014-02-27 18:57:45 +01:00
Kuldeep Aggarwal
adff19cc3b modify model generator warning message. refs [#174c9f0] 2014-02-27 22:04:01 +05:30
Robin Dupret
fc61bca31d Avoid namespacing routes inside engines
Since #11544, invoking the controller generator, any generated route is
namespaced according to the class_path method. Since a mountable plugin
is namespaced, creating a controller inside would generate a namespaced
route based on the engine's name.

The controller generator now relies on regular_class_path which does not
contain the class hierarchy but the given path.

Fixes #14079.
2014-02-26 16:06:11 +01:00
Carlos Antonio da Silva
1d298bd621 Remove inclusion of rubysl gem for rbx on generated Gemfile
From #14026:

    Specific rbx-2 to limit testing on Rubinius 2.x (since there will be
    other versions of Rubinius > 2.x soon).

    Also, as of Rubinius 2.2.5, it is no longer necessary to bundle the
    rubysl gem.

This is what Rails master/4.1 supports, so we don't need to add rubysl to
gemfiles anymore.
2014-02-25 21:54:29 -03:00
Spencer Rogers
ad75539a0c [skip ci] Fix test name typo in app generator tests. 2014-02-25 17:25:41 -05:00
Yves Senn
b5c6c31dba build fix. follow up to 174c9f0df39cd338a4871f82794256cc64f68a81 2014-02-24 10:09:56 +01:00
Yves Senn
174c9f0df3 include names in model generator warning message. refs #13515.
This is a follow up to #13515. It includes the name given and
the singularized version in the warning message. This will aide the user
to see wether the detected singular was right or not.
2014-02-24 09:45:24 +01:00
Godfrey Chan
f8dcc48517 Merge pull request #13515 from kuldeepaggarwal/f-model-generation
Added warning when user tried to create model with pluralize name.
2014-02-22 23:44:08 -08:00
Kuldeep Aggarwal
de8bef9878 Add warning when user tried to create model with pluralize name.
1. Generate model with correct_name.
  2. It will help new users to avoid mistakes when tried to create model with wrong name.
2014-02-23 13:10:41 +05:30