Sha256: 58a1da00903333bf0cdbfe2fbaa744f5d9e54f38145c532d3b0113e97770da8f

Contents?: true

Size: 698 Bytes

Versions: 30

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

namespace :decidim do
  desc "Allows a decidim installation to check whether its locales are complete"
  task check_locales: :environment do
    FileUtils.remove_dir("tmp/decidim_repo", true)

    branch = ENV["TARGET_BRANCH"] || "master"
    status = system("git clone --depth=1 --single-branch --branch #{branch} https://github.com/decidim/decidim tmp/decidim_repo")
    return unless status

    Dir.chdir("tmp/decidim_repo") do
      env = { "ENFORCED_LOCALES" => Decidim.available_locales.join(",") }

      Bundler.with_original_env do
        system(env, "bundle install")
        system(env, "bundle exec rspec spec/i18n_spec.rb")
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
decidim-dev-0.18.1 lib/tasks/locale_checker.rake
decidim-dev-0.17.2 lib/tasks/locale_checker.rake
decidim-dev-0.18.0 lib/tasks/locale_checker.rake
decidim-dev-0.17.1 lib/tasks/locale_checker.rake
decidim-dev-0.16.1 lib/tasks/locale_checker.rake
decidim-dev-0.17.0 lib/tasks/locale_checker.rake
decidim-dev-0.16.0 lib/tasks/locale_checker.rake
decidim-dev-0.15.2 lib/tasks/locale_checker.rake
decidim-dev-0.15.1 lib/tasks/locale_checker.rake
decidim-dev-0.15.0 lib/tasks/locale_checker.rake
decidim-dev-0.14.4 lib/tasks/locale_checker.rake
decidim-dev-0.14.3 lib/tasks/locale_checker.rake
decidim-dev-0.14.2 lib/tasks/locale_checker.rake
decidim-dev-0.14.1 lib/tasks/locale_checker.rake
decidim-dev-0.13.1 lib/tasks/locale_checker.rake
decidim-dev-0.12.2 lib/tasks/locale_checker.rake
decidim-dev-0.13.0 lib/tasks/locale_checker.rake
decidim-dev-0.12.1 lib/tasks/locale_checker.rake
decidim-dev-0.13.0.pre1 lib/tasks/locale_checker.rake
decidim-dev-0.12.0 lib/tasks/locale_checker.rake