Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Using middleware name to show proper name in the info #3405

Merged
merged 1 commit into from

4 participants

@arunagw
Collaborator

Inspect was showing

<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007fc5edba6480

But if we use name then it will show simply

ActiveSupport::Cache::Strategy::LocalCache
@vijaydev
Collaborator

I would rather change the middleware stack inspect to return the name instead of calling to_s.

@fxn @josevalim Thoughts?

@vijaydev vijaydev referenced this pull request
Closed

Add missing middleware #3406

@tenderlove tenderlove merged commit c330905 into rails:master
@tenderlove tenderlove referenced this pull request from a commit
@tenderlove tenderlove Revert "Merge pull request #3405 from arunagw/middleware_name"
This reverts commit c330905, reversing
changes made to 1c1c3fc.
259741a
@arunagw
Collaborator

Any other solution in mind to fix this? Need to change inspect for ActiveSupport::Cache::Strategy::LocalCache ??

@fxn
Owner

Need to check the room log, but since Rack middleware have no convention to print themselves, and we can have arbitrary middleware in the stack, for reporting purposes we are probably going to print name if class, self.class.name otherwise (modulus I've not cheched how it looks).

Also, the middleware rake task should be consistent with this.

@georgeG georgeG referenced this pull request from a commit in georgeG/rails
@georgeG georgeG Merge remote-tracking branch 'upstream/master'
* upstream/master: (91 commits)
  Responders now return 204 No Content for API requests without a response body (as in the new scaffold)
  Scaffold returns 204 No Content for API requests without content. This makes scaffold work with jQuery out of the box.
  Fix failing tests.
  properly handle lists of lists. Thanks @adrianpike for reporting!
  Fix that changing a store should mark the store attribute as changed
  Clean up .gitignore and make a note about using global ignores
  Revert "Ignore .rbx directories (rbx compiled bytecode files)"
  Revert "Merge pull request #3395 from bdurand/fix_file_store_cleanup"
  Fix deprecation warnings in action pack test suite due to passing template formats in the template name.
  safeguard against configs missing environment or the database key
  Remove needless to_param in scaffold functional test
  Unused variable removed
  minor revision to some new code in databases.rake
  registers PR #2419 in the CHANGELOG
  ActionPack test fix for RBX
  Ignore .rbx directories (rbx compiled bytecode files)
  edge doesnt provide turn gem in the gemfile anymore
  Remove Turn from default Gemfile.
  Revert "Merge pull request #3405 from arunagw/middleware_name"
  minor fixes in the composed_of doc
  ...

Conflicts:
	.gitignore
79123aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 22, 2011
  1. @arunagw
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/info.rb
View
2  railties/lib/rails/info.rb
@@ -91,7 +91,7 @@ def to_html
end
property 'Middleware' do
- Rails.configuration.middleware.map(&:inspect)
+ Rails.configuration.middleware.map(&:name)
end
# The application's location on the filesystem.
Something went wrong with that request. Please try again.