aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/info.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json"Kasper Timm Hansen2019-01-081-4/+0
| | | | | | | | | | | We had a discussion on the Core team and we don't want to expose this information as a JSON endpoint and not by default. It doesn't make sense to expose this JSON locally and this controller is only accessible in dev, so the proposed access from a production app seems off. This reverts commit 8eaffe7e89719ac62ff29c2e4208cfbeb1cd1c38, reversing changes made to 133e0ba33db5887b047c9ac8233e5b414657bca5.
* http://localhost:3000/rails/info/properties shows more details for ease of ↵ujihisa2018-12-141-1/+1
| | | | | | bug reporting Hand-merging @ujihisa's ancient patch at https://lighthouseapp.com/projects/8994/tickets/3644
* Add JSON support to rails properties route (`/rails/info/properties`).Yoshiyuki Hirano2018-11-071-0/+4
| | | | | | | | | | | | | | | | | Added json format, like this: { "Rails version": "6.0.0.alpha", "Ruby version": "2.5.1-p57 (x86_64-darwin17)", "RubyGems version": "2.7.6", "Rack version": "2.0.6", "JavaScript Runtime": "Node.js (V8)", "Middleware": ["Rack::Sendfile", "ActionDispatch::Static", "ActionDispatch::Executor", "ActiveSupport::Cache::Strategy::LocalCache::Middleware", "Rack::Runtime", "Rack::MethodOverride", "ActionDispatch::RequestId", "ActionDispatch::RemoteIp", "Sprockets::Rails::QuietAssets", "Rails::Rack::Logger", "ActionDispatch::ShowExceptions", "WebConsole::Middleware", "ActionDispatch::DebugExceptions", "ActionDispatch::Reloader", "ActionDispatch::Callbacks", "ActiveRecord::Migration::CheckPending", "ActionDispatch::Cookies", "ActionDispatch::Session::CookieStore", "ActionDispatch::Flash", "ActionDispatch::ContentSecurityPolicy::Middleware", "Rack::Head", "Rack::ConditionalGet", "Rack::ETag", "Rack::TempfileReaper"], "Application root": "/path/to/app", "Environment": "development", "Database adapter": "sqlite3", "Database schema version": 0 }
* Enable `Performance/UnfreezeString` copyuuji.yaginuma2018-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Ruby 2.3 or later, `String#+@` is available and `+@` is faster than `dup`. ```ruby # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "benchmark-ips" end Benchmark.ips do |x| x.report('+@') { +"" } x.report('dup') { "".dup } x.compare! end ``` ``` $ ruby -v benchmark.rb ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] Warming up -------------------------------------- +@ 282.289k i/100ms dup 187.638k i/100ms Calculating ------------------------------------- +@ 6.775M (± 3.6%) i/s - 33.875M in 5.006253s dup 3.320M (± 2.2%) i/s - 16.700M in 5.032125s Comparison: +@: 6775299.3 i/s dup: 3320400.7 i/s - 2.04x slower ```
* Refactor migration to move migrations paths to connectioneileencodes2018-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails has some support for multiple databases but it can be hard to handle migrations with those. The easiest way to implement multiple databases is to contain migrations into their own folder ("db/migrate" for the primary db and "db/seconddb_migrate" for the second db). Without this you would need to write code that allowed you to switch connections in migrations. I can tell you from experience that is not a fun way to implement multiple databases. This refactoring is a pre-requisite for implementing other features related to parallel testing and improved handling for multiple databases. The refactoring here moves the class methods from the `Migrator` class into it's own new class `MigrationContext`. The goal was to move the `migrations_paths` method off of the `Migrator` class and onto the connection. This allows users to do the following in their `database.yml`: ``` development: adapter: mysql2 username: root password: development_seconddb: adapter: mysql2 username: root password: migrations_paths: "db/second_db_migrate" ``` Migrations for the `seconddb` can now be store in the `db/second_db_migrate` directory. Migrations for the primary database are stored in `db/migrate`". The refactoring here drastically reduces the internal API for migrations since we don't need to pass `migrations_paths` around to every single method. Additionally this change does not require any Rails applications to make changes unless they want to use the new public API. All of the class methods from the `Migrator` class were `nodoc`'d except for the `migrations_paths` and `migrations_path` getter/setters respectively.
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Railties updates for frozen string literals.Pat Allan2017-08-141-1/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Use mattr_accessor default: option throughout the projectGenadi Samokovarov2017-06-031-2/+3
|
* Small grammar fixes in `Rails::Info`Jon Moss2016-12-201-3/+3
| | | | [ci skip]
* revises most Lint/EndAlignment offensesXavier Noria2016-08-071-3/+3
| | | | Some case expressions remain, need to think about those ones.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-13/+13
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-2/+2
|
* Documenting Rails::Info module [ci skip]Zachary Scott2014-11-081-0/+3
|
* Remove unused codeRafael Mendonça França2014-09-251-11/+0
|
* Improve welcome page css and table cell aignments.buddhamagnet2014-09-251-13/+5
|
* Adding active_model in Rails::InfoAnkit Gupta2014-03-231-1/+1
|
* Added action_view in Rails::InfoArun Agrawal2013-08-021-1/+1
|
* Fix ruby patch level example in rails docs regarding info page [ci skip]Carlos Antonio da Silva2013-07-031-1/+1
| | | | Thanks @egilburg.
* Add patch level to Ruby version informationTyler Brock2013-07-031-2/+4
| | | | | Given the recent security related patches to ruby and rails it is more important than ever to know what patch level you are running.
* remove references to *::VERSION, replace with *.versionCharlie Somerville2013-03-211-2/+2
|
* use tap with block parameterAkira Matsuda2013-01-181-1/+1
|
* Remove Active Resource source files from the repositoryPrem Sichanugrist2012-03-131-2/+2
| | | | | | | | | | Dear Active Resource, It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository. I will miss you, @sikachu.
* Add JavaScript Runtime name to the Rails Info properties (thanks Sam Ruby)David Heinemeier Hansson2011-06-271-0/+4
|
* Remove useless cgiDenis Odorcic2010-11-101-1/+0
| | | | | | [#5943 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Fix deprecation message on info screenDavid Heinemeier Hansson2010-07-261-1/+1
|
* Object#returning removedSantiago Pastorino2010-07-251-1/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Takes out stale methods relating to edge_rails_versionRizwan Reza2010-05-161-33/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move railties/builtin into libJoshua Peek2010-03-201-0/+147