Sha256: 0a7eacd5e5f61dfad09097cf9c695b9dcbdf7efc9aa47f2c81a40c2cf58d7043

Contents?: true

Size: 673 Bytes

Versions: 212

Compression:

Stored size: 673 Bytes

Contents

# encoding: utf-8
require "spec_helper"
require "i18n"

I18N_T_REGEX = Regexp.new('I18n.t.+?"(.+?)"')

describe I18n do
  context "when using en.yml" do
    glob_path = File.join(LogStash::Environment::LOGSTASH_HOME, "logstash-*", "lib", "**", "*.rb")

    Dir.glob(glob_path).each do |file_name|

      context "in file \"#{file_name}\"" do
        File.foreach(file_name) do |line|
          next unless (match = line.match(I18N_T_REGEX))
          line = $INPUT_LINE_NUMBER
          key = match[1]
          it "in line #{line} the \"#{key}\" key should exist" do
            expect(I18n.exists?(key)).to be_truthy
          end
        end
      end
    end
  end
end

Version data entries

212 entries across 206 versions & 15 rubygems

Version Path
logstash-core-5.2.0-java spec/static/i18n_spec.rb
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/logstash-core-5.1.1.1-java/spec/static/i18n_spec.rb
logstash-core-5.1.2-java spec/static/i18n_spec.rb
logstash-core-5.1.1.1-java spec/static/i18n_spec.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/logstash-core-2.4.1-java/spec/static/i18n_spec.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/spec/static/i18n_spec.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/spec/static/i18n_spec.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/logstash-core-2.4.1-java/spec/static/i18n_spec.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/logstash-core-2.4.1-java/spec/static/i18n_spec.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/spec/static/i18n_spec.rb
logstash-core-5.0.2-java spec/static/i18n_spec.rb
logstash-core-5.0.1-java spec/static/i18n_spec.rb
logstash-core-2.4.1-java spec/static/i18n_spec.rb
logstash-core-5.0.0-java spec/static/i18n_spec.rb
logstash-core-5.0.0.pre.rc1-java spec/static/i18n_spec.rb
logstash-core-5.0.0.pre.beta1-java spec/static/i18n_spec.rb
logstash-filter-delta-1.1.0 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-filter-delta-1.0.1 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-filter-base64-1.0.4 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/spec/static/i18n_spec.rb