1. 24 Sep, 2018 1 commit
  2. 21 Sep, 2018 1 commit
  3. 19 Sep, 2018 1 commit
    • Bob Van Landuyt's avatar
      Remove unused constant · 23d55015
      Bob Van Landuyt authored
      This removes an unused constant from the
      `RubyInterpolationInTranslation`. The constant was used in a first
      implementation of this class.
      23d55015
  4. 17 Sep, 2018 1 commit
    • 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
      8a72f5c4
  5. 11 Sep, 2018 1 commit
  6. 05 Sep, 2018 1 commit
  7. 29 Aug, 2018 5 commits
  8. 25 Aug, 2018 1 commit
    • 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
  9. 16 Aug, 2018 1 commit
  10. 08 Aug, 2018 1 commit
  11. 09 Jul, 2018 1 commit
  12. 22 Jun, 2018 1 commit
  13. 20 Jun, 2018 1 commit
    • 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
  14. 19 Jun, 2018 1 commit
    • Sean McGivern's avatar
      Disallow methods that copy data on large tables · eb086a4b
      Sean McGivern authored
      {change_column_type,rename_column}_concurrently both copy data from one column
      to another during a migration, which should not be done on GitLab.com. Instead,
      we should use background migrations.
      eb086a4b
  15. 29 May, 2018 1 commit
  16. 23 Apr, 2018 1 commit
  17. 18 Apr, 2018 2 commits
  18. 09 Apr, 2018 1 commit
  19. 06 Apr, 2018 1 commit
  20. 21 Mar, 2018 1 commit
  21. 08 Mar, 2018 1 commit
  22. 31 Jan, 2018 1 commit
  23. 12 Jan, 2018 1 commit
  24. 11 Jan, 2018 1 commit
  25. 26 Dec, 2017 1 commit
  26. 22 Dec, 2017 1 commit
  27. 13 Dec, 2017 1 commit
  28. 11 Dec, 2017 1 commit
    • Sean McGivern's avatar
      Add cop for use of remove_column · 1ab33b15
      Sean McGivern authored
      remove_column should only be used in the up (or change) step of a migration if
      it's a post-deployment migration. Otherwise there will be downtime due to the
      ActiveRecord column cache, which we can avoid by using the IgnorableColumn
      concern in combination with a post-deployment migration.
      1ab33b15
  29. 22 Nov, 2017 2 commits
  30. 21 Nov, 2017 1 commit
  31. 17 Nov, 2017 3 commits
  32. 16 Nov, 2017 1 commit