diff --git a/.rubocop.yml b/.rubocop.yml index 93ca7fa..f851cda 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 896ee3e..fd01f1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/spec/cyclonedx/cocoapods/license_spec.rb b/spec/cyclonedx/cocoapods/license_spec.rb index 0b0fdfa..0bbe984 100644 --- a/spec/cyclonedx/cocoapods/license_spec.rb +++ b/spec/cyclonedx/cocoapods/license_spec.rb @@ -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) diff --git a/spec/cyclonedx/cocoapods/podfile_analyzer_spec.rb b/spec/cyclonedx/cocoapods/podfile_analyzer_spec.rb index 42479fd..b79ec4b 100644 --- a/spec/cyclonedx/cocoapods/podfile_analyzer_spec.rb +++ b/spec/cyclonedx/cocoapods/podfile_analyzer_spec.rb @@ -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' }