Skip to content

Commit 0979885

Browse files
authored
Merge pull request #26 from github/kpaulisse-frozen-string-literal
Frozen string literals
2 parents dedfdf3 + f476892 commit 0979885

212 files changed

Lines changed: 424 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/octocatalog-diff/bootstrap.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
require 'open3'
24
require 'shellwords'
35

lib/octocatalog-diff/catalog-diff/cli.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
require_relative 'cli/catalogs'
24
require_relative 'cli/diffs'
35
require_relative 'cli/options'

lib/octocatalog-diff/catalog-diff/cli/catalogs.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
require 'json'
24
require 'open3'
35
require 'yaml'

lib/octocatalog-diff/catalog-diff/cli/diffs.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
require_relative '../differ'
24

35
module OctocatalogDiff

lib/octocatalog-diff/catalog-diff/cli/helpers/fact_override.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'json'
24

35
module OctocatalogDiff
@@ -26,8 +28,7 @@ def initialize(input, key = nil)
2628
unless input.include?('=')
2729
raise ArgumentError, "Fact override '#{input}' is not in 'key=(data type)value' format"
2830
end
29-
input.strip!
30-
@key, raw_value = input.split('=', 2)
31+
@key, raw_value = input.strip.split('=', 2)
3132
@value = parsed_value(raw_value)
3233
elsif key.nil?
3334
message = "Define a key when the input is not a string (#{input.class} => #{input.inspect})"

lib/octocatalog-diff/catalog-diff/cli/options.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
require_relative '../cli'
24
require_relative '../../facts'
35
require_relative '../../version'

lib/octocatalog-diff/catalog-diff/cli/options/basedir.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
# Option to set the base checkout directory of puppet repository
24
# @param parser [OptionParser object] The OptionParser argument
35
# @param options [Hash] Options hash being constructed; this is modified in this method.

lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_current.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
# Option to bootstrap the current directory (by default, the bootstrap script is NOT
24
# run when the catalog builds in the current directory).
35
# @param parser [OptionParser object] The OptionParser argument

lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_environment.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
# Allow the bootstrap environment to be set up via the command line.
24
# @param parser [OptionParser object] The OptionParser argument
35
# @param options [Hash] Options hash being constructed; this is modified in this method.

lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_script.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
# Allow specification of a bootstrap script. This runs after checking out the directory, and before running
24
# puppet there. Good for running librarian to install modules, and anything else site-specific that needs
35
# to be done.

0 commit comments

Comments
 (0)