Commit Graph

1577 Commits

Author SHA1 Message Date
Rahul P. Chaudhari
40262ab88f Made file name and class name consistant 2012-07-02 11:40:27 +05:30
Carlos Antonio da Silva
83302a4c13 Fix failing test related to persist glob when replacing a path
Introduced in pull request #6910, merged in 2ee3fa1a48513a2c42833e2e1f60fe03769bc295
2012-07-01 13:56:11 -03:00
José Valim
2ee3fa1a48 Merge pull request #6910 from mulder/fix_path_glob
Persist glob when replacing a path
2012-07-01 02:54:33 -07:00
Nicholas Mulder
0f4d005501 Persist glob when replacing a path
When Rails::Paths::Root's []= is used to replace a path it should persist the previous path's glob. Without passing the glob along we get gnarly bugs when trying to wire up things like engines.

    module FooEngine
      class Engine < ::Rails::Engine
        isolate_namespace FooEngine

        config.paths['config/initializers'] = "lib/foo_engine/initializers"
      end
    end

    ## Example of behaviour before this commit.
    #
    # Before the initializer override:
    >> FooEngine::Engine.config.paths["config/initializers"].glob
    => "**/*.rb"

    # After the initializer override:
    >> FooEngine::Engine.config.paths["config/initializers"].glob
    => nil

    ## Example of behaviour after this commit.
    #
    # Before the initializer override:
    >> FooEngine::Engine.config.paths["config/initializers"].glob
    => "**/*.rb"

    # After the initializer override:
    >> FooEngine::Engine.config.paths["config/initializers"].glob
    => "**/*.rb"
2012-06-30 16:59:07 -04:00
Carlos Antonio da Silva
a4dd8719e5 Remove another missing test related to draw external routes
Related with 5e7d6bb
2012-06-29 14:55:09 -03:00
José Valim
5e7d6bba79 Revert "Allow loading external route files from the router"
This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b.

Usage of this feature did not reveal any improvement in existing apps.

Conflicts:

	actionpack/lib/action_dispatch/routing/mapper.rb
	guides/source/routing.textile
	railties/lib/rails/engine.rb
	railties/lib/rails/paths.rb
	railties/test/paths_test.rb
2012-06-29 17:44:10 +02:00
José Valim
50b6110106 Remove unused responsibilities and add a few load definitions to engines
Since plugins were removed, we can clean up a few methods in engines.
We also use this opportunity to move `load_console`, `load_tasks` and
`load_runner` to Rails::Engine. This means that, if someone wants to
improve script/rails for engines to support console or runner commands,
part of the work is already done.
2012-06-29 17:04:47 +02:00
José Valim
0470ddcf03 Remove unnecessary Railties structure now that plugins are gone 2012-06-29 15:43:16 +02:00
José Valim
dbc43bcce6 Rename RouteInspect to RoutesInspector for consistency 2012-06-29 14:04:24 +02:00
Carlos Antonio da Silva
565d54d9ec Merge pull request #6880 from kennyj/fix_20120628
Fix wrong testcase for db:test:prepare, and wrong environment in AR rake task.
2012-06-27 09:03:34 -07:00
Carlos Antonio da Silva
52f6e47682 Merge pull request #6856 from lexmag/polymorphic_generators
Add polymorphic option to model generator

For instance,

    $ rails g model Product supplier:references{polymorphic}

generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration.
2012-06-27 08:46:00 -07:00
kennyj
066e839467 Fix wrong testcase. This is a testcase for db:test:prepare. 2012-06-28 00:33:08 +09:00
Aleksey Magusev
94b230e189 Add polymorphic option to model generator
For instance,

    $ rails g model Product supplier:references{polymorphic}

generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration.

Also fix model_generator_test.rb#L196 and #L201
2012-06-27 18:12:28 +04:00
kennyj
0ebd4f22c5 Change the behavior of db:test:prepare task when schema_format is sql for consistency. 2012-06-26 04:06:45 +09:00
kennyj
9ab805d880 Change the behavior of db:test:clone task when schema_format is sql for consistency. 2012-06-26 04:06:45 +09:00
Richard Huang
a6a4813083 ruby 1.9 hash syntax for generated code
app/controllers/application_controller.rb
app/views/layouts/application.html.erb
config/application.rb
config/routes.rb
test/performance/browsing_test.rb
2012-06-23 20:19:21 +08:00
Rafael Mendonça França
39dec69712 Run the logger tests in isolation 2012-06-19 23:21:00 -03:00
Aaron Patterson
f945d157f7 run the notes tests in isolation 2012-06-19 19:08:13 -07:00
Aaron Patterson
265f13495f run railties tests in parallel, default to 2 cores 2012-06-19 17:08:23 -07:00
Aaron Patterson
7b6efb9cda join any extra args to the tmp path 2012-06-19 16:27:54 -07:00
Aaron Patterson
c445f0d61f expand the tmpdir to the realpath so tests on OS X pass 2012-06-19 15:41:52 -07:00
Aaron Patterson
7896f35be3 use system tmpdir rather than our own 2012-06-19 14:41:31 -07:00
kennyj
ee64abbf94 Don't read csv file during executing db:fixtures:load. 2012-06-17 02:42:53 +09:00
Aaron Patterson
8b35a239fb TestCase does not need to be loaded when loading the framework 2012-06-15 11:36:32 -07:00
Jon Leighton
ae3767c799 Fix observers with AR::Model 2012-06-15 19:15:37 +01:00
Jon Leighton
a205bf8780 Fix config.active_record.whitelist_attributes with AR::Model 2012-06-15 19:15:37 +01:00
Rafael Mendonça França
04a7426a2e Merge pull request #6690 from suginoy/fix-templates-copy
Fix: 'rake rails:templates:copy' doesn't work
2012-06-11 09:40:39 -07:00
kennyj
358c5e893a Added a testcase for #6690. 2012-06-12 00:29:45 +09:00
José Valim
03f2249153 Use . instead of :: for class methods, add CHANGELOG entries 2012-06-10 11:38:37 +02:00
José Valim
4845c0685a Merge pull request #6665 from schneems/schneems/raise-migration-error
Notify A User they Have Pending Migrations
2012-06-10 02:33:14 -07:00
schneems
d741a4c6f8 test errors for pending migrations
App should raise error on page_load
2012-06-09 13:31:11 -05:00
Piotr Sarnacki
066e6c66ce Fix tests, active_authorizer shouldn't include blank values
Fix for a test failing after: 00ff0a6776
2012-06-09 03:15:39 +02:00
Rafael Mendonça França
d1136e6ad0 Merge pull request #6681 from arunagw/plugin_gen_fix
Plugin gen fix
2012-06-08 10:25:29 -07:00
Piotr Sarnacki
523820f81b Don't add sqlite3 to gemspec with -O on rails plugin new
(closes #6672)
2012-06-08 19:09:18 +02:00
Arun Agrawal
5fa87281ec We should not include engine.rake file into rake
if we are passing -T which is skip_test_unit

See issue #6673 for more details.

I saw that we are not creating dummy app even if
we do skip_test_unit.

Fixes #6673
2012-06-08 22:39:14 +05:30
Arun Agrawal
cbfcabc9e9 Removed protected as we already doing it above. 2012-06-08 22:39:10 +05:30
Akira Matsuda
edee2c7b3b stop to_sing method names
Module#methods are Symbols in Ruby >= 1.9
2012-06-06 19:33:38 +09:00
Fred Wu
686966a186 Fixed the application_controller require_dependency path generated by the app generator 2012-06-06 19:02:11 +10:00
José Valim
9b742fd64d Merge pull request #6627 from Vanuan/tests_add_precompile_failure_assert
bundle exec rake assets:precompile shouldn't fail quietly.
2012-06-05 11:08:09 -07:00
John Yani
ebb906d23a bundle exec rake assets:precompile shouldn't fail quietly.
If JavaScript runtime is not installed, execjs fails with error quietly,
while tests continue to run. This should not happen since it causes tests
to fail for unknown reason (#6621).

This commit assures that if JavaScript runtime is not installed, an assertion
is raised.
2012-06-05 20:40:12 +03:00
Fred Wu
126586a5e6 Fixed the Gemfile when gemspec is skipped in the 'rails plugin new' command 2012-06-05 15:49:40 +10:00
Rafael Mendonça França
9a30d82d45 Set RACK_ENV to nil in the dbconsole test
This will fix the travis-ci build
2012-05-30 23:29:47 -03:00
Rafael Mendonça França
3015649783 Fix app_generator_test with the changes introduced at
f4d7af67ffc90f2542afa50c7579fc83ea4f45f2
2012-05-30 22:46:53 -03:00
Sam Oliver
dce0afd47f Remove support for rails server RAILS_ENV=env-name 2012-05-30 22:28:07 +01:00
Sam Oliver
cdd6d9b53a Fix various bugs with console arguments.
Allow hyphens in environment names again.
2012-05-30 22:23:04 +01:00
Arun Agrawal
397e47d807 Unused variable warning removed. 2012-05-30 14:46:17 +05:30
Arun Agrawal
05f88024de More assert_match warnings fixed. 2012-05-30 14:46:08 +05:30
Arun Agrawal
4646b2ecac Warnings removed for "assert_match /". 2012-05-30 14:35:55 +05:30
kennyj
f8e7904dc0 Add support runner hook. 2012-05-29 23:46:08 +09:00
kennyj
8d01c61129 Add a testcase for #5847. 2012-05-29 22:32:14 +09:00