Skip to content
Snippets Groups Projects
  1. Feb 17, 2020
  2. Feb 14, 2020
  3. Feb 13, 2020
  4. Feb 04, 2020
  5. Jan 29, 2020
  6. Jan 15, 2020
  7. Dec 19, 2019
  8. Dec 04, 2019
  9. Dec 01, 2019
  10. Nov 28, 2019
  11. Nov 07, 2019
  12. Oct 16, 2019
  13. Sep 13, 2019
  14. Sep 10, 2019
  15. Aug 28, 2019
    • Vitali Tatarintev's avatar
      Add Rubocop check to avoid using `be_success` · 4f2ac516
      Vitali Tatarintev authored
      Prevent using `be_success` call in controller specs to avoid
      getting following deprecation warning:
      
      ```
      DEPRECATION WARNING: The success? predicate is deprecated and
      will be removed in Rails 6.0.
      Please use successful? as provided by Rack::Response::Helpers.
      ```
      4f2ac516
  16. Aug 23, 2019
  17. Aug 01, 2019
    • Sean McGivern's avatar
      Add RSpec/TopLevelDescribePath cop · ab0a6455
      Sean McGivern authored
      The RSpec/FilePath cop checks that a spec file's path is correct, but
      only if the file describes a constant. We want to check, for any file
      with a top-level `describe`, whether the file path ends in
      `_spec.rb`. We don't care what comes before that; just that it will be
      executed by RSpec at all.
      ab0a6455
  18. Jul 10, 2019
  19. Jun 21, 2019
  20. May 05, 2019
  21. Apr 29, 2019
  22. Apr 15, 2019
  23. Dec 13, 2018
    • Yorick Peterse's avatar
      Added Cop for injecting EE modules · 7c580556
      Yorick Peterse authored
      This Cop enforces the rule that injecting EE modules (using prepend,
      include, or extend) is done by placing the injection on the last line of
      a file, instead of somewhere in the middle. By placing these lines at
      the very end, merge conflicts will not happen.
      Verified
      7c580556
  24. Nov 22, 2018
  25. Oct 15, 2018
  26. Sep 24, 2018
  27. Sep 21, 2018
  28. Sep 17, 2018
    • Yorick Peterse's avatar
      Added FromUnion to easily select from a UNION · 8a72f5c4
      Yorick Peterse authored
      This commit adds the module `FromUnion`, which provides the class method
      `from_union`. This simplifies the process of selecting data from the
      result of a UNION, and reduces the likelihood of making mistakes. As a
      result, instead of this:
      
          union = Gitlab::SQL::Union.new([foo, bar])
      
          Foo.from("(#{union.to_sql}) #{Foo.table_name}")
      
      We can now write this instead:
      
          Foo.from_union([foo, bar])
      
      This commit also includes some changes to make this new setup work
      properly. For example, a bug in Rails 4
      (https://github.com/rails/rails/issues/24193) would break the use of
      `from("sub-query-here").includes(:relation)` in certain cases. There was
      also a CI query which appeared to repeat a lot of conditions from an
      outer query on an inner query, which isn't necessary.
      
      Finally, we include a RuboCop cop to ensure developers use this new
      module, instead of using Gitlab::SQL::Union directly.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
      Verified
      8a72f5c4
  29. Sep 11, 2018
  30. Aug 29, 2018
  31. Aug 25, 2018
    • Bob Van Landuyt's avatar
      Reject ruby interpolation in externalized strings · 08c0a1b8
      Bob Van Landuyt authored
      When using ruby interpolation in externalized strings, they can't be
      detected. Which means they will never be presented to be translated.
      
      To mix variables into translations we need to use `sprintf`
      instead.
      
      Instead of:
      
          _("Hello #{subject}")
      
      Use:
      
          _("Hello %{subject}) % { subject: 'world' }
      08c0a1b8
  32. Aug 16, 2018
  33. Aug 08, 2018
  34. Jun 20, 2018
    • Bob Van Landuyt's avatar
      Add a cop for `FinderMethods` · f3f1df14
      Bob Van Landuyt authored
      This notifies developers when calling `find(_by!)` chained on
      `execute`. And suggests using the methods from `FinderMethods`. These
      will perform the correct authorization checks on the resource when it
      is found.
      f3f1df14
  35. Apr 18, 2018
  36. Apr 09, 2018
  37. Apr 06, 2018
  38. Mar 21, 2018
Loading