Permalink
Commits on Nov 16, 2017
  1. End with newline created config/initializers/paper_trail.rb (#1009)

    Yuki-Inoue committed with jaredbeck Nov 16, 2017
    * End with newline created config/initializers/paper_trail.rb
    
    Currently, config/initializers/paper_trail.rb file created by
        rails generate paper_trail:install
    does not end with newline.
    Such text files may result in trouble because in unix text files
    generally should end with newline.
    
    So, make it put newline at the end.
    
    * Update CHANGELOG.md
    
    * Remove None
Commits on Oct 27, 2017
  1. Merge pull request #1007 from airblade/update_dev_deps_2017-10-27

    jaredbeck committed Oct 27, 2017
    Various: 2017-10-27
  2. Delete LegacyActiveRecordShim 🎉

    jaredbeck committed Oct 27, 2017
    We no longer support rails < 4.2
  3. Lint: Fix RSpec/NamedSubject

    jaredbeck committed Oct 27, 2017
  4. Thoughts on rubocop todo items

    jaredbeck committed Oct 27, 2017
  5. rubocop 0.51.0

    jaredbeck committed Oct 27, 2017
Commits on Oct 25, 2017
  1. Release 8.0.1

    jaredbeck committed Oct 25, 2017
  2. Merge pull request #1006 from airblade/warn_when_pt_cannot_load

    jaredbeck committed Oct 25, 2017
    Print warning when PT cannot be loaded ..
  3. Print warning when PT cannot be loaded ..

    WojtekKruszewski committed with jaredbeck Oct 19, 2017
    .. because rails is not loaded yet.
    
    In some situations, when loading PT, `::Rails` has been defined,
    perhaps by a library like rails-html-sanitizer, but rails itself
    has not been loaded yet.
Commits on Oct 23, 2017
  1. Deprecate where_object_changes reading YAML from text column

    sergey-alekseev committed with jaredbeck Oct 23, 2017
    * clarify the issue with `where_object_changes` for numeric values
    
    History
    ---
    [The first problem mention](1ad7838).
    [The major issue](#803) with relevant discussions.
    
    Details
    ---
    I see the problem only with one specific case – when the method is `where_object_changes` and the serializer is YAML. Which is a default configuration.
    
    I see there are 6 types of queries with a numeric value for `where_object_changes` and `where_object` (grabbed from `version_spec.rb`):
    ```
    .where_object_changes
    N1
    SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = 1 AND "versions"."item_type" = 'Widget' AND (object_changes @> '{"an_integer":[1]}')  ORDER BY "versions"."created_at" ASC, "versions"."id" ASC
    
    N1
    SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = 1 AND "versions"."item_type" = 'Widget' AND ("versions"."object_changes" ILIKE '%
    an_integer:
    - 1
    %' OR "versions"."object_changes" ILIKE '%
    an_integer:
    -%
    - 1
    %')  ORDER BY "versions"."created_at" ASC, "versions"."id" ASC
    
    N3
    SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = 1 AND "versions"."item_type" = 'Widget' AND (((object_changes->>'an_integer' ILIKE '[1,%') OR (object_changes->>'an_integer' ILIKE '[%,1]%')))  ORDER BY "versions"."created_at" ASC, "versions"."id" ASC
    
    .where_object
    N4
    SELECT "versions".* FROM "versions" WHERE (object @> '{"an_integer":1}')
    
    N5
    SELECT "versions".* FROM "versions" WHERE (object->>'an_integer' = '1')
    
    N6
    SELECT "versions".* FROM "versions" WHERE ("versions"."object" ILIKE '%
    an_integer: 1
    %')
    ```
    
    The only problematic one is N2. It incorrectly matches `object_changes` like
    ```
    ---
    name:
    -
    - Kimberli
    an_integer:
    -
    - 0
    created_at:
    -
    - 2017-09-28 18:30:13.369889000 Z
    updated_at:
    -
    - 2017-09-28 18:30:13.369889000 Z
    id:
    -
    - 1
    ---
    name:
    - foobar
    - Hayes
    an_integer:
    - 77
    - 1
    updated_at:
    - 2017-09-28 18:30:13.383966000 Z
    - 2017-09-28 18:30:13.395539000 Z
    ```
  2. Merge pull request #1005 from airblade/load_activesupport_earlier

    jaredbeck committed Oct 23, 2017
    Load activesupport early so we can squish big strings
  3. Load activesupport early so we can squish big strings

    jaredbeck committed Oct 23, 2017
    PT usually loads AS, unless something goes really wrong;
    we're just loading it earlier.
    
    This is not a new dependency.
Commits on Oct 19, 2017
  1. Merge pull request #1001 from seanlinsley/patch-1

    jaredbeck committed Oct 19, 2017
    Fix callback to only run before update
  2. call before_save instead

    seanlinsley committed Oct 19, 2017
Commits on Oct 18, 2017
  1. Merge pull request #1002 from airblade/various_2017-10-18

    jaredbeck committed Oct 18, 2017
    Various: 2017-10-18
  2. Delete dead code (for AR < 4.2)

    jaredbeck committed Oct 18, 2017
    We don't support AR < 4.2.
  3. rspec-rails 3.7.1 (was 3.6.1)

    jaredbeck committed Oct 18, 2017
  4. Fix callback to only run before update

    seanlinsley committed Oct 18, 2017
    `before_save` doesn't accept `:on` as an argument, so this callback was actually running on all save events, not just on update.
    
    rails/rails#17622
    
    Depending on what `reset_timestamp_attrs_for_update_if_needed` does, this might need to be backported to older versions.
    
    I've submitted a PR to Rails to raise an exception when unexpected arguments are passed... unsure if an exception is the right way to go when there might be quite a few gems with this bug.
    
    rails/rails#30919
  5. Merge pull request #1000 from airblade/various_2017-10-17

    jaredbeck committed Oct 18, 2017
    Various: 2017-10-17
Commits on Oct 17, 2017
  1. Lint: Fix RSpec/FilePath

    jaredbeck committed Oct 17, 2017
  2. Lint: Fix RSpec/MessageSpies

    jaredbeck committed Oct 17, 2017
  3. Rename MIT-LICENSE -> LICENSE

    jaredbeck committed Oct 17, 2017
  4. Alphabetize dev. dependencies

    jaredbeck committed Oct 17, 2017
  5. Fix StatementInvalid error in schema.rb

    jaredbeck committed Oct 17, 2017
    ```
    ActiveRecord::StatementInvalid: SQLite3::SQLException:
    object name reserved for internal use:
    sqlite_autoindex_custom_primary_key_records_1:
    CREATE UNIQUE INDEX "sqlite_autoindex_custom_primary_key_records_1"
    ON "custom_primary_key_records" ("uuid")
    ```
Commits on Oct 5, 2017
  1. Merge pull request #998 from airblade/testing_2017-10-04

    jaredbeck committed Oct 5, 2017
    Testing 2017-10-04
  2. Update the patch levels of the three rails we test

    jaredbeck committed Oct 5, 2017
    From bundle exec appraisal update
  3. pg 0.21.0 (was 0.19.0)

    jaredbeck committed Oct 5, 2017