From 211f4f4c1210beccdf88f360995f441d542e01a5 Mon Sep 17 00:00:00 2001 From: Alexande B Date: Thu, 15 Jul 2021 17:00:41 +0200 Subject: [PATCH] Fix rubocop issues in metanorma, git_template.rb --- exe/metanorma | 6 ++++-- lib/metanorma/cli/git_template.rb | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/exe/metanorma b/exe/metanorma index 33468da..24b11b8 100755 --- a/exe/metanorma +++ b/exe/metanorma @@ -11,8 +11,10 @@ $:.unshift File.expand_path("../../lib", bin_file) # Fixes https://github.com/rubygems/rubygems/issues/1420 require "rubygems/specification" -class Gem::Specification - def this; self; end +module Gem + class Specification + def this; self; end + end end # start up the CLI diff --git a/lib/metanorma/cli/git_template.rb b/lib/metanorma/cli/git_template.rb index fec4e13..1114454 100644 --- a/lib/metanorma/cli/git_template.rb +++ b/lib/metanorma/cli/git_template.rb @@ -10,16 +10,15 @@ def initialize(name, options = {}) def remove! remove_template - return true + true end def download remove! clone_git_template(options[:repo]) - rescue Git::GitExecuteError UI.say("Invalid template reoository!") - return nil + nil end def find_or_download @@ -95,7 +94,7 @@ def git_repos iso: "https://github.com/metanorma/mn-templates-iso", iec: "https://github.com/metanorma/mn-templates-iec", itu: "https://github.com/metanorma/mn-templates-itu", - ietf: "https://github.com/metanorma/mn-templates-ietf" + ietf: "https://github.com/metanorma/mn-templates-ietf", } end