Skip to content

Commit c91de22

Browse files
committed
⚡️ Frozen Strings (performance benefit)
Signed-off-by: Peter H. Boling <[email protected]>
1 parent 378f62e commit c91de22

File tree

16 files changed

+32
-1
lines changed

16 files changed

+32
-1
lines changed

.simplecov

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copied from https://github.com/cucumber/aruba/blob/3b1a6cea6e3ba55370c3396eef0a955aeb40f287/.simplecov
24
# Licensed under MIT - https://github.com/cucumber/aruba/blob/3b1a6cea6e3ba55370c3396eef0a955aeb40f287/LICENSE
35

features/fixtures/simple/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
gem 'activesupport', '7.0.4.3'

features/step_definitions/json_bom_matching.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Then('the generated Json BOM file {string} matches {string}') do |generated_file, expected_file|
24
generated_file_contents = File.read(expand_path(generated_file))
35
expected_file_contents = File.read(expand_path(expected_file))

features/step_definitions/xml_bom_matching.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Then('the generated XML BOM file {string} matches {string}') do |generated_file, expected_file|
24
generated_file_contents = File.read(expand_path(generated_file))
35
expected_file_contents = File.read(expand_path(expected_file))

features/support/env.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Based on https://github.com/cucumber/aruba/blob/3b1a6cea6e3ba55370c3396eef0a955aeb40f287/features/support/env.rb
24
# Licensed under MIT - https://github.com/cucumber/aruba/blob/3b1a6cea6e3ba55370c3396eef0a955aeb40f287/LICENSE
35

features/support/simplecov_support.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copied from https://github.com/cucumber/aruba/blob/3b1a6cea6e3ba55370c3396eef0a955aeb40f287/features/support/simplecov_setup.rb
24
# Licensed under MIT - https://github.com/cucumber/aruba/blob/3b1a6cea6e3ba55370c3396eef0a955aeb40f287/LICENSE
35

lib/bom_builder.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# This file is part of CycloneDX Ruby Gem.
24
#
35
# Licensed to the Apache Software Foundation (ASF) under one

lib/bom_component.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# frozen_string_literal: true
2+
13
require_relative "cyclonedx/ruby"
24
require_relative "cyclonedx_deprecated"

lib/bom_helpers.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# This file is part of CycloneDX Ruby Gem.
24
#
35
# Licensed to the Apache Software Foundation (ASF) under one
@@ -20,7 +22,6 @@
2022
# SPDX-License-Identifier: Apache-2.0
2123
# Copyright (c) OWASP Foundation. All Rights Reserved.
2224
#
23-
# frozen_string_literal: true
2425

2526
require_relative "cyclonedx/ruby"
2627
require_relative "cyclonedx_deprecated"

lib/cyclonedx/bom_builder.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Cyclonedx
24
class BomBuilder
35
SUPPORTED_BOM_FORMATS = %w[xml json]

0 commit comments

Comments
 (0)