diff --git a/.rubocop.yml b/.rubocop.yml index d4f980a..92c673d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -29,6 +29,8 @@ Metrics/MethodLength: Max: 50 Metrics/ClassLength: Max: 200 + Exclude: + - "test/test_*.rb" Metrics/AbcSize: Max: 60 Metrics/BlockLength: diff --git a/objects/git_repo.rb b/objects/git_repo.rb index ae96eed..d576568 100644 --- a/objects/git_repo.rb +++ b/objects/git_repo.rb @@ -37,7 +37,6 @@ class GitRepo def initialize( uri:, name:, - target: 'master', master: 'master', head_commit_hash: '', **options @@ -50,7 +49,7 @@ def initialize( @id_rsa = options[:id_rsa] || '' @master = master @head_commit_hash = head_commit_hash - @target = target + @target = options[:target] || 'master' end def lock diff --git a/objects/vcs/github.rb b/objects/vcs/github.rb index b8309bd..412cf09 100644 --- a/objects/vcs/github.rb +++ b/objects/vcs/github.rb @@ -147,8 +147,8 @@ def git_repo(json, config) GitRepo.new( uri: uri, name: name, - target: target, id_rsa: config['id_rsa'], + target: target, master: default_branch, head_commit_hash: head_commit_hash )