1. 22 3月, 2019 9 次提交
    • A
      Update CHANGELOG and docs · aaf89cde
      Ali Ibrahim 提交于
      with change to ActiveSupport::Notifications::Instrumenter#instrument
      aaf89cde
    • A
      Update AS::Notifications::Instrumenter#instrument · 1b7ef40d
      Ali Ibrahim 提交于
        * Update #instrument to make passing a block optional. This will let users
          leverage #instrument for messaging in addition to instrumentation.
      1b7ef40d
    • E
      Merge pull request #35617 from mattyoho/add-annotation-support-to-relations · f4086080
      Eileen M. Uchitelle 提交于
      Add support for annotating queries generated by ActiveRecord::Relation with SQL comments
      f4086080
    • R
      Merge pull request #35695 from jhawthorn/render_template · 0a0f1150
      Rafael França 提交于
      Prefer render template: over render file: in tests
      0a0f1150
    • R
      Fix announce script · c9fe12fe
      Rafael Mendonça França 提交于
      c9fe12fe
    • R
      Fix release template · 7f69ef7a
      Rafael Mendonça França 提交于
      7f69ef7a
    • M
      Add Relation#annotate for SQL commenting · f4182580
      Matt Yoho 提交于
      This patch has two main portions:
      
      1. Add SQL comment support to Arel via Arel::Nodes::Comment.
      2. Implement a Relation#annotate method on top of that.
      
      == Adding SQL comment support
      
      Adds a new Arel::Nodes::Comment node that represents an optional SQL
      comment and teachers the relevant visitors how to handle it.
      
      Comment nodes may be added to the basic CRUD statement nodes and set
      through any of the four (Select|Insert|Update|Delete)Manager objects.
      
      For example:
      
          manager = Arel::UpdateManager.new
          manager.table table
          manager.comment("annotation")
          manager.to_sql # UPDATE "users" /* annotation */
      
      This new node type will be used by ActiveRecord::Relation to enable
      query annotation via SQL comments.
      
      == Implementing the Relation#annotate method
      
      Implements `ActiveRecord::Relation#annotate`, which accepts a comment
      string that will be appeneded to any queries generated by the relation.
      
      Some examples:
      
          relation = Post.where(id: 123).annotate("metadata string")
          relation.first
          # SELECT "posts".* FROM "posts" WHERE "posts"."id" = 123
          # LIMIT 1 /* metadata string */
      
          class Tag < ActiveRecord::Base
            scope :foo_annotated, -> { annotate("foo") }
          end
          Tag.foo_annotated.annotate("bar").first
          # SELECT "tags".* FROM "tags" LIMIT 1 /* foo */ /* bar */
      
      Also wires up the plumbing so this works with `#update_all` and
      `#delete_all` as well.
      
      This feature is useful for instrumentation and general analysis of
      queries generated at runtime.
      f4182580
    • Y
      Fix server restart test on Puma 3.12.1 · efb706da
      yuuji.yaginuma 提交于
      Since https://github.com/puma/puma/pull/1700, the default host is
      correctly used. So `localhost` is used instead of `0.0.0.0`.
      
      As a result, the log output on restart is changed, and the restart test
      fails on Puma 3.12.1.
      https://travis-ci.org/rails/rails/jobs/509239592#L2303-L2305
      
      Specify binding explicitly to avoid being affected by Puma changes.
      efb706da
    • J
      Prefer render template: in tests · f35631d4
      John Hawthorn 提交于
      Many tests were using `render file:`, but were only testing the
      behaviour of `render template:` (file: just allows more paths/ is less
      secure then template:).
      
      The reason for so many `render file:` is probably that they were the old
      default.
      
      This commit replaces `render file:` with `render template:` anywhere the
      test wasn't specifically interested in using `render file:`.
      f35631d4
  2. 21 3月, 2019 5 次提交
  3. 20 3月, 2019 21 次提交
  4. 19 3月, 2019 5 次提交