diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-03 20:32:07 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-04 09:30:10 +0300 |
commit | 7199e882dba1f664ff2d5b889428c086dce7827d (patch) | |
tree | 6ca4728b9e40f47be98c3307929eefc54659efa3 | |
parent | a3af683045e0170d975eab2562a466f88d2692b8 (diff) |
Only require `simple_po_parser` in rake task that needs it
That way we don't need to install it in production, since it's really
not needed there.
-rw-r--r-- | lib/gitlab/i18n/po_linter.rb | 2 | ||||
-rw-r--r-- | lib/tasks/gettext.rake | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/i18n/po_linter_spec.rb | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/i18n/po_linter.rb b/lib/gitlab/i18n/po_linter.rb index 2e02787a4f4..7d3ff8c7f58 100644 --- a/lib/gitlab/i18n/po_linter.rb +++ b/lib/gitlab/i18n/po_linter.rb @@ -1,5 +1,3 @@ -require 'simple_po_parser' - module Gitlab module I18n class PoLinter diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake index e1491f29b5e..f7f2fa2f14c 100644 --- a/lib/tasks/gettext.rake +++ b/lib/tasks/gettext.rake @@ -1,4 +1,5 @@ require "gettext_i18n_rails/tasks" +require 'simple_po_parser' namespace :gettext do # Customize list of translatable files diff --git a/spec/lib/gitlab/i18n/po_linter_spec.rb b/spec/lib/gitlab/i18n/po_linter_spec.rb index cd5c2b99751..3a962ba7f22 100644 --- a/spec/lib/gitlab/i18n/po_linter_spec.rb +++ b/spec/lib/gitlab/i18n/po_linter_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require 'simple_po_parser' describe Gitlab::I18n::PoLinter do let(:linter) { described_class.new(po_path) } |