From 59b969bf64d7c473d711eef9e21934b5617e047f Mon Sep 17 00:00:00 2001 From: David Swan Date: Thu, 30 Aug 2018 13:50:28 +0100 Subject: [PATCH] (FM-7316) - Setup for i18n process --- .fixtures.yml | 2 ++ .rubocop.yml | 5 ++++- .sync.yml | 12 ++++++++++++ Gemfile | 1 + Rakefile | 1 + metadata.json | 4 ++++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.fixtures.yml b/.fixtures.yml index 0c221f0..b419b4d 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -2,5 +2,7 @@ fixtures: repositories: "stdlib": "repo": "git://github.com/puppetlabs/puppetlabs-stdlib.git" + "translate": + "repo": "https://github.com/puppetlabs/puppetlabs-translate" symlinks: "apt": "#{source_dir}" diff --git a/.rubocop.yml b/.rubocop.yml index 54d1597..ef3b9a5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,7 @@ --- -require: rubocop-rspec +require: +- rubocop-i18n +- rubocop-rspec AllCops: DisplayCopNames: true TargetRubyVersion: '2.1' @@ -66,6 +68,7 @@ Style/TrailingCommaInLiteral: Style/SymbolArray: Description: Using percent style obscures symbolic intent of array's contents. EnforcedStyle: brackets +inherit_from: ".rubocop_todo.yml" RSpec/MessageSpies: EnforcedStyle: receive Style/Documentation: diff --git a/.sync.yml b/.sync.yml index d4c7b22..ad63bcd 100644 --- a/.sync.yml +++ b/.sync.yml @@ -25,6 +25,18 @@ Gemfile: git: 'https://github.com/skywinder/github-changelog-generator' ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')" + - gem: puppet-lint-i18n + +.rubocop.yml: + default_configs: + inherit_from: .rubocop_todo.yml + require: + - rubocop-i18n + - rubocop-rspec + +Rakefile: + requires: + - puppet_pot_generator/rake_tasks appveyor.yml: delete: true diff --git a/Gemfile b/Gemfile index 05cb6e6..1aff7a8 100644 --- a/Gemfile +++ b/Gemfile @@ -34,6 +34,7 @@ group :development do gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2') + gem "puppet-lint-i18n", require: false end group :system_tests do gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby] diff --git a/Rakefile b/Rakefile index 204fb18..112dc42 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,7 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-syntax/tasks/puppet-syntax' require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any? +require 'puppet_pot_generator/rake_tasks' def changelog_user return unless Rake.application.top_level_tasks.include? "changelog" diff --git a/metadata.json b/metadata.json index d637afd..b8b9518 100644 --- a/metadata.json +++ b/metadata.json @@ -11,6 +11,10 @@ { "name": "puppetlabs/stdlib", "version_requirement": ">= 4.16.0 < 6.0.0" + }, + { + "name": "puppetlabs/translate", + "version_requirement": ">= 1.0.0 < 2.0.0" } ], "operatingsystem_support": [ -- 2.45.2