Skip to content

Commit

Permalink
Keep Rubocop happy about the string concatenation. Add a note to the …
Browse files Browse the repository at this point in the history
…CHANGELOG.md file.

Signed-off-by: Kyle Hammond <[email protected]>
  • Loading branch information
macblazer committed Oct 14, 2024
1 parent cf09a3b commit d39516b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ Metrics/MethodLength:
AllowedMethods: ['parse_options', 'add_to_bom', 'append_all_pod_dependencies']
Metrics/AbcSize:
AllowedMethods: ['parse_options', 'add_to_bom', 'source_for_pod']

# Configure StringConcatenation to allow Pathname string concatenation
Style/StringConcatenation:
Mode: conservative
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed
- Properly concatenate paths to Podfile and Podfile.lock (with unit tests!). ([Issue #71](https://github.com/CycloneDX/cyclonedx-cocoapods/issues/71)) [@macblazer](https://github.com/macblazer).

## [1.3.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion spec/cyclonedx/cocoapods/license_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
context 'with an identifier included in the SPDX license list (regardless of case)' do
it 'should create a license of type id' do
existing_license_id = described_class::SPDX_LICENSES.sample
mangled_case_id = existing_license_id.chars.map { |c| rand(2) == 0 ? c.upcase : c.downcase }.join
mangled_case_id = existing_license_id.chars.map { |c| rand(2).zero? ? c.upcase : c.downcase }.join

license = described_class.new(identifier: mangled_case_id)

Expand Down
1 change: 1 addition & 0 deletions spec/cyclonedx/cocoapods/podfile_analyzer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

require 'cyclonedx/cocoapods/podfile_analyzer'
require 'rspec'

RSpec.describe CycloneDX::CocoaPods::PodfileAnalyzer do
let(:fixtures) { Pathname.new(File.expand_path('../../fixtures', __dir__)) }
let(:empty_podfile) { 'EmptyPodfile/Podfile' }
Expand Down

0 comments on commit d39516b

Please sign in to comment.