1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties
Xavier Noria be9a32b65f prefer File.write for bulk writes
I saw these ones while working on #32362.

File.write was introduced in Ruby 1.9.3 and it is the most concise way
to perform bulk writes (as File.read is for bulk reading).

The existing flags enabled binmode, but we are dumping text here.
The portable way to dump text is text mode. The only difference is
newlines, and portable code should in particular emit portable newlines.

Please note the hard-coded \ns are still correct. In languages with C
semantics for newlines like Ruby, Python, Perl, and others, "\n" is a
portable newline. Both when writing and when reading. On Windows, the
I/O layer is responsible for prepending a CR before each LF on writing,
and removing CRs followed by LFs on reading. On Unix, binmode is a
no-op.
2018-05-05 19:38:38 +02:00
..
bin Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
exe Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
lib Merge pull request #32780 from ttanimichi/tmp 2018-05-05 14:02:08 +09:00
test prefer File.write for bulk writes 2018-05-05 19:38:38 +02:00
.gitignore Clean up and consolidate .gitignores 2018-02-17 14:26:19 -08:00
CHANGELOG.md Don't generate assets' initializer in app:update task if sprockets is skipped 2018-05-05 13:27:55 +09:00
MIT-LICENSE Bump license years for 2018 2017-12-31 22:36:55 +09:00
railties.gemspec Rails 6 requires Ruby 2.4.1+ 2018-02-17 15:34:57 -08:00
Rakefile Run in-app rails commands via fork+load where possible 2017-09-04 20:19:39 +09:30
RDOC_MAIN.rdoc [ci skip] Restore of links in RDOC_MAIN after an update of the file (#32644) 2018-04-19 15:23:02 -04:00
README.rdoc Update MIT licenses link [ci skip] 2017-08-22 08:46:02 +09:00

= Railties -- Gluing the Engine to the Rails

Railties is responsible for gluing all frameworks together. Overall, it:

* handles the bootstrapping process for a Rails application;

* manages the +rails+ command line interface;

* and provides the Rails generators core.


== Download

The latest version of Railties can be installed with RubyGems:

* gem install railties

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/railties

== License

Railties is released under the MIT license:

* https://opensource.org/licenses/MIT

== Support

API documentation is at

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core