Skip to content

Commit

Permalink
chore: update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
3v0k4 committed Jul 7, 2023
1 parent 9e53fde commit 8837064
Show file tree
Hide file tree
Showing 5 changed files with 247 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

### 5.2.0

* Send authors to the API

https://github.com/KnapsackPro/knapsack_pro-ruby/pull/208

https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.1.2...v5.2.0

### 5.1.2

* Fix broken RSpec split by test examples feature when `SPEC_OPTS` is set in Queue Mode. Ignore `SPEC_OPTS` when generating test examples report for slow test files.
Expand Down
4 changes: 4 additions & 0 deletions lib/knapsack_pro/repository_adapters/git_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ def authors
.map do |commits, author|
{ commits: commits.to_i, author: KnapsackPro::MaskString.call(author) }
end
rescue Exception
[{ commits: 0, author: "no git <no.git@example.com>" }]
end

def author
KnapsackPro::MaskString.call(git_author.strip)
rescue Exception
"no git <no.git@example.com>"
end

private
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 106 additions & 0 deletions spec/fixtures/vcr_cassettes/api/v1/build_subsets/create/timeout.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@

expect(subject.author).to eq 'Jo** Do* <jo**.do*@ex*****.co*>'
end

context "when git_author raises an exception" do
it "returns the the no git author" do
allow_any_instance_of(KnapsackPro::RepositoryAdapters::GitAdapter).to receive(:git_author).and_raise(Exception)

subject = KnapsackPro::RepositoryAdapters::GitAdapter.new

expect(subject.author).to eq 'no git <no.git@example.com>'
end
end
end

describe '#authors' do
Expand All @@ -62,5 +72,15 @@
{ commits: 3, author: "sh**** <sh***.re***@gm***.co*>" },
]
end

context "when git_authors raises an exception" do
it "returns the the no git author" do
allow_any_instance_of(KnapsackPro::RepositoryAdapters::GitAdapter).to receive(:git_authors).and_raise(Exception)

subject = KnapsackPro::RepositoryAdapters::GitAdapter.new

expect(subject.authors).to eq [{ commits: 0, author: "no git <no.git@example.com>" }]
end
end
end
end

0 comments on commit 8837064

Please sign in to comment.