1. 24 6月, 2018 2 次提交
  2. 23 6月, 2018 1 次提交
  3. 19 6月, 2018 1 次提交
    • B
      Fix Ruby version in `.ruby-version` · 1aace5e2
      bogdanvlviv 提交于
      Since #30016 Rails generates `.ruby-version` file
      in order to help Ruby version manager tools like `rbenv`, `rvm`
      determine which Ruby version should be used for the current Rails
      project.
      
      Since #32649 Rails sets Ruby version to the file compatible with MRI/JRuby
      by default.
      
      Pull Request #31496 reports that `.ruby-version` doesn't match ruby version other
      than stable version and recommends to use `ENV["RBENV_VERSION"]`, and
      `ENV["rvm_ruby_string"]` in order to set correct Ruby version to the file
      that `rbenv` or `rvm` can understand.
      Also, there is another similar issue that reports the same case if use
      JRuby https://github.com/jruby/jruby/issues/5144.
      
      Closes #31496, https://github.com/jruby/jruby/issues/5144.
      1aace5e2
  4. 18 6月, 2018 1 次提交
  5. 09 6月, 2018 1 次提交
  6. 03 6月, 2018 1 次提交
  7. 24 5月, 2018 1 次提交
  8. 23 5月, 2018 1 次提交
  9. 21 5月, 2018 1 次提交
  10. 20 5月, 2018 1 次提交
  11. 19 5月, 2018 1 次提交
  12. 16 5月, 2018 1 次提交
  13. 13 5月, 2018 2 次提交
  14. 08 5月, 2018 1 次提交
  15. 07 5月, 2018 1 次提交
  16. 06 5月, 2018 1 次提交
    • X
      prefer File.write for bulk writes · be9a32b6
      Xavier Noria 提交于
      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.
      be9a32b6
  17. 05 5月, 2018 1 次提交
    • T
      Don't generate assets' initializer in `app:update` task if sprockets is skipped · 59c3d539
      Tsukuru Tanimichi 提交于
      Execute `rails new myapp -S` and then upgrade the app by using the `app:update` task, `bin/rails c` results in `NoMethodError`.
      
      ```
      $ bin/rails app:update
      
      $ bin/rails c
      Traceback (most recent call last):
          44: from bin/rails:4:in `<main>'
      (snip)
           1: from /Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/config/initializers/assets.rb:4:in `<top (required)>'
      /Users/tanimichi.tsukuru/ghq/github.com/moneyforward/moneyplus/vendor/bundle/ruby/2.5.0/gems/railties-5.2.0/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x00007fcb8d3697e0> (NoMethodError)
      Did you mean?  asset_host
      ```
      59c3d539
  18. 02 5月, 2018 1 次提交
  19. 29 4月, 2018 1 次提交
  20. 25 4月, 2018 2 次提交
  21. 24 4月, 2018 1 次提交
  22. 22 4月, 2018 4 次提交
  23. 21 4月, 2018 3 次提交
  24. 20 4月, 2018 5 次提交
  25. 19 4月, 2018 3 次提交
  26. 18 4月, 2018 1 次提交
    • J
      Use ImageProcessing gem for ActiveStorage variants · ca129685
      Janko Marohnić 提交于
      ImageProcessing gem is a wrapper around MiniMagick and ruby-vips, and
      implements an interface for common image resizing and processing. This
      is the canonical image processing gem recommended in [Shrine], and
      that's where it developed from. The initial implementation was extracted
      from Refile, which also implements on-the-fly transformations.
      
      Some features that ImageProcessing gem adds on top of MiniMagick:
      
        * resizing macros
          - #resize_to_limit
          - #resize_to_fit
          - #resize_to_fill
          - #resize_and_pad
        * automatic orientation
        * automatic thumbnail sharpening
        * avoids the complex and inefficient MiniMagick::Image class
        * will use "magick" instead of "convert" on ImageMagick 7
      
      However, the biggest feature of the ImageProcessing gem is that it has
      an alternative implementation that uses libvips. Libvips is an
      alternative to ImageMagick that can process images very rapidly (we've
      seen up 10x faster than ImageMagick).
      
      What's great is that the ImageProcessing gem provides the same interface
      for both implementations. The macros are named the same, and the libvips
      implementation does auto orientation and thumbnail sharpening as well;
      only the operations/options specific to ImageMagick/libvips differ. The
      integration provided by this PR should work for both implementations.
      
      The plan is to introduce the ImageProcessing backend in Rails 6.0 as the
      default backend and deprecate the MiniMagick backend, then in Rails 6.1
      remove the MiniMagick backend.
      ca129685