Sha256: 0e459e81ba51ac5c99ccfd9cc9789ac52bb8da56b9beb00342379dfa8036dbce

Contents?: true

Size: 695 Bytes

Versions: 28

Compression:

Stored size: 695 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_clean_env do
        system(env, "bundle install")
        system(env, "bundle exec rspec spec/i18n_spec.rb")
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
decidim-dev-0.6.3 lib/tasks/locale_checker.rake
decidim-0.6.3 decidim-dev/lib/tasks/locale_checker.rake
decidim-dev-0.6.2 lib/tasks/locale_checker.rake
decidim-0.6.2 decidim-dev/lib/tasks/locale_checker.rake
decidim-dev-0.6.1 lib/tasks/locale_checker.rake
decidim-0.6.1 decidim-dev/lib/tasks/locale_checker.rake
decidim-dev-0.6.0 lib/tasks/locale_checker.rake
decidim-0.6.0 decidim-dev/lib/tasks/locale_checker.rake