1. 11 May, 2016 12 commits
    • Robert Speicher's avatar
      Merge branch '17249-starred' into 'master' · 24f353ed
      Robert Speicher authored
      Restrict starred projects to viewable ones
      
      `User#starred_projects` doesn't perform any visibility checks. This has
      a couple of problems:
      
      1. It assumes a user can always view all of their starred projects in
         perpetuity (project not changed to private, access revoked, etc.).
      2. It assumes that we'll only ever allow a user to star a project they
         can view. This is currently the case, but bugs happen.
      
      Add `User#viewable_starred_projects` to filter the starred projects by
      those the user either has explicit access to, or are public or
      internal. Then use that in all places where we list the user's starred
      projects.
      
      Closes #17249.
      
      See merge request !4108
      24f353ed
    • Robert Speicher's avatar
      Merge branch '17270-only-generate-email-on-push-once-for-all-recipients' into 'master' · d526cda5
      Robert Speicher authored
      Only generate repository push email once
      
      The repository push email can be very expensive to generate, especially
      with syntax-highlighted diffs. Instead of generating the email for each
      recipient, generate one email object and reset the Message-Id and To
      headers for each recipient. (Cloning would also be expensive in the case
      of large emails, although probably not as bad as generating from
      scratch.)
      
      Closes #17270.
      
      See merge request !4070
      d526cda5
    • Yorick Peterse's avatar
      Merge branch 'update-changelog-874' into 'master' · e9706b2f
      Yorick Peterse authored
      Updated 8.7.4 CHANGELOG entries
      
      See merge request !4116
      e9706b2f
    • Yorick Peterse's avatar
      Updated 8.7.4 CHANGELOG entries · c446a865
      Yorick Peterse authored
      [ci skip]
      c446a865
    • Rémy Coutable's avatar
      Merge branch 'casecmp-cop' into 'master' · e77a9a34
      Rémy Coutable authored
      Enable Rubocop Casecmp Performance Cop.
      
      Also fixes the errors caused by enabling the cop.
      
      `casecmp` is more performant than `.downcase` and `==`.
      
      See also: https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/performance/casecmp.rb
      
      See merge request !3957
      e77a9a34
    • Rémy Coutable's avatar
      Merge branch 'string-replacement-cop' into 'master' · de5ae1bf
      Rémy Coutable authored
      Enable the StringReplacement cop.
      
      Also fix one use of `gsub` that would be faster as `delete`.
      
      Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
      
      See merge request !3960
      de5ae1bf
    • Sean McGivern's avatar
      Only generate repository push email once · 5f27e26b
      Sean McGivern authored
      The repository push email can be very expensive to generate, especially
      with syntax-highlighted diffs. Instead of generating the email for each
      recipient, generate one email object and reset the Message-Id and To
      headers for each recipient. (Cloning would also be expensive in the case
      of large emails, although probably not as bad as generating from
      scratch.)
      5f27e26b
    • Sean McGivern's avatar
      Tidy up user project specs · acd8930c
      Sean McGivern authored
      acd8930c
    • Jacob Schatz's avatar
      Merge branch 'jquery-scrollto' into 'master' · c24cd968
      Jacob Schatz authored
      Removes jquery-scrollto-rails.
      
      Instead the script is now included directly from the vendor directory.
      
      Resolves #17166. Working towards #14286 and merging !3775.
      
      The gem was on 1.4.3.1, here's the diff between that tag and 2.1.2 (the version I'm using in this MR): https://github.com/flesler/jquery.scrollTo/compare/1.4.3...2.1.2
      
      There aren't any notable breaking changes that I noticed, and I didn't see any JS errors after testing a bunch of pages.
      
      cc: @jschatz1 
      
      See merge request !4088
      c24cd968
    • Connor Shea's avatar
      Enable the StringReplacement cop. · 4995302d
      Connor Shea authored
      Also fix one use of `gsub` that would be faster as `delete`.
      
      Use `tr` instead of `gsub` when you are replacing the same number of
      characters. Use `delete` instead of `gsub` when you are deleting
      characters.
      4995302d
    • Connor Shea's avatar
      Removes jquery-scrollto-rails. · 976a7052
      Connor Shea authored
      Instead the script is now included directly from the vendor directory.
      
      Resolves #17166.
      976a7052
    • Connor Shea's avatar
      Enable Rubocop Casecmp Performance Cop. · 377583a3
      Connor Shea authored
      Also fixes the errors caused by enabling the cop. casecmp is more performant than `.downcase` and `==`.
      377583a3
  2. 10 May, 2016 28 commits