From a01ead3403e4d215006185d7db4498ba4c4f5050 Mon Sep 17 00:00:00 2001 From: Pranay Singh Date: Fri, 3 Jun 2022 13:27:36 +0530 Subject: [PATCH 1/3] changing revision to parse default as main from master Signed-off-by: Pranay Singh --- lib/cookbook-omnifetch/git.rb | 2 +- spec/unit/git_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cookbook-omnifetch/git.rb b/lib/cookbook-omnifetch/git.rb index 37985d6..9be0db7 100644 --- a/lib/cookbook-omnifetch/git.rb +++ b/lib/cookbook-omnifetch/git.rb @@ -23,7 +23,7 @@ def initialize(dependency, options = {}) @rel = options[:rel] # The revision to parse - @rev_parse = options[:ref] || options[:branch] || options[:tag] || "master" + @rev_parse = options[:ref] || options[:branch] || options[:tag] || "main" end # @see BaseLoation#installed? diff --git a/spec/unit/git_spec.rb b/spec/unit/git_spec.rb index a80c0fb..3f9b520 100644 --- a/spec/unit/git_spec.rb +++ b/spec/unit/git_spec.rb @@ -69,9 +69,9 @@ def rev_parse(instance) expect(rev_parse(instance)).to eq("v1.2.3") end - it 'uses "master" when none is given' do + it 'uses "main" when none is given' do instance = described_class.new(dependency, git: "https://repo.com") - expect(rev_parse(instance)).to eq("master") + expect(rev_parse(instance)).to eq("main") end end end From cbf97c5ac6b4cd4214ffb1dce950010b2a7299a7 Mon Sep 17 00:00:00 2001 From: Pranay Singh Date: Fri, 3 Jun 2022 13:42:45 +0530 Subject: [PATCH 2/3] adding [pathname lib for failing uninitialized constant Pathnam while running rspec test Signed-off-by: Pranay Singh --- spec/unit/git_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/unit/git_spec.rb b/spec/unit/git_spec.rb index 3f9b520..f54dd39 100644 --- a/spec/unit/git_spec.rb +++ b/spec/unit/git_spec.rb @@ -1,5 +1,6 @@ require "spec_helper" require "cookbook-omnifetch/git" +require 'pathname' module CookbookOmnifetch describe GitLocation do From ff59d8d362dd554c2c068c885f60d31dbc171dc6 Mon Sep 17 00:00:00 2001 From: Pranay Singh Date: Mon, 6 Jun 2022 12:09:29 +0530 Subject: [PATCH 3/3] converting single quote to double quote Signed-off-by: Pranay Singh --- spec/unit/git_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/git_spec.rb b/spec/unit/git_spec.rb index f54dd39..9404e70 100644 --- a/spec/unit/git_spec.rb +++ b/spec/unit/git_spec.rb @@ -1,6 +1,6 @@ require "spec_helper" require "cookbook-omnifetch/git" -require 'pathname' +require "pathname" module CookbookOmnifetch describe GitLocation do