Merge pull request #26 from github/kpaulisse-frozen-string-literal
Frozen string literals
This commit is contained in:
Коммит
09798854b0
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'open3'
|
||||
require 'shellwords'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'cli/catalogs'
|
||||
require_relative 'cli/diffs'
|
||||
require_relative 'cli/options'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'open3'
|
||||
require 'yaml'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../differ'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
@ -26,8 +28,7 @@ module OctocatalogDiff
|
|||
unless input.include?('=')
|
||||
raise ArgumentError, "Fact override '#{input}' is not in 'key=(data type)value' format"
|
||||
end
|
||||
input.strip!
|
||||
@key, raw_value = input.split('=', 2)
|
||||
@key, raw_value = input.strip.split('=', 2)
|
||||
@value = parsed_value(raw_value)
|
||||
elsif key.nil?
|
||||
message = "Define a key when the input is not a string (#{input.class} => #{input.inspect})"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../cli'
|
||||
require_relative '../../facts'
|
||||
require_relative '../../version'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Option to set the base checkout directory of puppet repository
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Option to bootstrap the current directory (by default, the bootstrap script is NOT
|
||||
# run when the catalog builds in the current directory).
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Allow the bootstrap environment to be set up via the command line.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Allow specification of a bootstrap script. This runs after checking out the directory, and before running
|
||||
# puppet there. Good for running librarian to install modules, and anything else site-specific that needs
|
||||
# to be done.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Option to bootstrap directories and then exit
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Allow (or create) directories that are already bootstrapped. Handy to allow "bootstrap once, build many"
|
||||
# to save time when diffing multiple catalogs on this system.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Cache a bootstrapped checkout of 'master' and use that for time-saving when the SHA
|
||||
# has not changed.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# When set, --catalog-only will only compile the catalog for the 'to' branch, and skip any
|
||||
# diffing activity. The catalog will be printed to STDOUT or written to the output file.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Color printing option
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# When a file is specified with `source => 'puppet:///modules/something/foo.txt'`, remove
|
||||
# the 'source' attribute and populate the 'content' attribute with the text of the file.
|
||||
# This allows for a diff of the content, rather than a diff of the location, which is
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Debugging option
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Option to print debugging output for the bootstrap script in addition to the normal
|
||||
# debugging output. Note that `--debug` must also be enabled for this option to have
|
||||
# any effect.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Toggle on or off the display of data type changes when the string representation
|
||||
# is the same. For example with this enabled, '42' (the string) and 42 (the integer)
|
||||
# will be displayed as a difference. With this disabled, this is not displayed as a
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Provide ability to display details of 'added' resources in the output.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Display source filename and line number for diffs
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Path to external node classifier, relative to the base directory of the checkout.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
|
||||
# If pre-compiled catalogs are available, these can be used to short-circuit the build process.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Allow an existing fact file to be provided, to avoid pulling facts from PuppetDB.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog,
|
||||
# or for both. There is some attempt to handle data types here (since all items on the command line are strings)
|
||||
# by permitting a data type specification as well.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Get the facts terminus. Generally this is 'yaml' and a fact file will be loaded from PuppetDB or
|
||||
# elsewhere in the environment. However it can be set to 'facter' which will run facter on the host
|
||||
# on which this is running.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Set --from-puppetdb to pull most recent catalog from PuppetDB instead of compiling
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Provide ability to set custom header or to display no header at all
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify a relative path to the Hiera yaml file
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
|
||||
# Puppet control repo template, the value of this should be 'hieradata', which is the default.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the path to strip off the datadir to munge hiera.yaml file
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Set hostname, which is used to look up facts in PuppetDB, and in the header of diff display.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Options used when comparing catalogs - set ignored changes.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify attributes to ignore
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Provide ability to set one or more tags, which will cause catalog-diff
|
||||
# to ignore any changes for any defined type where this tag is set.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Options used when comparing catalogs - tags are generally ignored; you can un-ignore them.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Allow override of the branch that is cached. This defaults to 'origin/master'.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Output file option
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Output format option
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Disable or enable parallel processing of catalogs.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Enable future parser for both branches or for just one
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# One or more environment variables that should be made available to the Puppet binary when parsing
|
||||
# the catalog. For example, --pass-env-vars FOO,BAR will make the FOO and BAR environment variables
|
||||
# available. Setting these variables is your responsibility outside of octocatalog-diff.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the CA certificate for the Puppet Enterprise ENC. If specified, this will enable SSL verification
|
||||
# that the certificate being presented has been signed by this CA, and that the common name
|
||||
# matches the name you are using to connecting.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the client certificate for connecting to the Puppet Enterprise ENC. This must be specified along with
|
||||
# --pe-enc-ssl-client-key in order to work.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the client key for connecting to Puppet Enterprise ENC. This must be specified along with
|
||||
# --pe-enc-ssl-client-cert in order to work.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the access token to access the Puppet Enterprise ENC. Refer to
|
||||
# https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for
|
||||
# details on generating and obtaining a token. Use this option to specify the text
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the access token to access the Puppet Enterprise ENC. Refer to
|
||||
# https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for
|
||||
# details on generating and obtaining a token. Use this option if the token is stored
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'uri'
|
||||
|
||||
# Specify the URL to the Puppet Enterprise ENC API. By default, the node classifier service
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Set --puppet-binary, --to-puppet-binary, --from-puppet-binary
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the hostname, or hostname:port, for the Puppet Master.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the API version to use for the Puppet Master. This makes it possible to authenticate to a
|
||||
# version 3.x PuppetMaster by specifying the API version as 2, or for a version 4.x PuppetMaster by
|
||||
# specifying API version as 3.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the CA certificate for Puppet Master. If specified, this will enable SSL verification
|
||||
# that the certificate being presented has been signed by this CA, and that the common name
|
||||
# matches the name you are using to connecting.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the SSL client certificate for Puppet Master. This makes it possible to authenticate with a
|
||||
# client certificate keypair to the Puppet Master.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the SSL client key for Puppet Master. This makes it possible to authenticate with a
|
||||
# client certificate keypair to the Puppet Master.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the CA certificate for PuppetDB. If specified, this will enable SSL verification
|
||||
# that the certificate being presented has been signed by this CA, and that the common name
|
||||
# matches the name you are using to connecting.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the client certificate for connecting to PuppetDB. This must be specified along with
|
||||
# --puppetdb-ssl-client-key in order to work.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the client key for connecting to PuppetDB. This must be specified along with
|
||||
# --puppetdb-ssl-client-cert in order to work.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the password for a PEM or PKCS12 private key on the command line.
|
||||
# Note that `--puppetdb-ssl-client-password-file` is slightly more secure because
|
||||
# the text of the password won't appear in the process list.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Specify the password for a PEM or PKCS12 private key, by reading it from a file.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'uri'
|
||||
|
||||
# Specify the base URL for PuppetDB. This will generally look like https://puppetdb.yourdomain.com:8081
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Quiet option
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Transient errors can cause catalog compilation problems. This adds an option to retry
|
||||
# a failed catalog multiple times before kicking out an error message.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# By specifying a directory path here, you are explicitly giving permission to the program
|
||||
# to delete it if it believes it needs to be created (e.g., if the SHA has changed of the
|
||||
# cached directory).
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Set storeconfigs (integration with PuppetDB for collected resources)
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
# @param options [Hash] Options hash being constructed; this is modified in this method.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# If enabled, this option will suppress changes to certain attributes of a file, if the
|
||||
# file is specified to be 'absent' in the target catalog. Suppressed changes in this case
|
||||
# include user, group, mode, and content, because a removed file has none of those.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Set the 'from' and 'to' branches, which is used to compile catalogs. A branch of '.' means to use
|
||||
# the current contents of the base code directory without any git checkouts.
|
||||
# @param parser [OptionParser object] The OptionParser argument
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../display'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'diffy'
|
||||
require 'hashdiff'
|
||||
require 'json'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'differ'
|
||||
require_relative 'display/json'
|
||||
require_relative 'display/text'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../display'
|
||||
|
||||
require 'json'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../display'
|
||||
require_relative '../../util/colored.rb'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../bootstrap'
|
||||
require_relative '../util/parallel'
|
||||
require_relative 'git'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'yaml'
|
||||
|
||||
require_relative '../facts'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'bootstrap'
|
||||
require_relative 'git'
|
||||
require_relative '../catalog-diff/cli/catalogs'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fileutils'
|
||||
require 'open3'
|
||||
require 'shellwords'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'enc/noop'
|
||||
require_relative 'enc/pe'
|
||||
require_relative 'enc/script'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module OctocatalogDiff
|
||||
module CatalogUtil
|
||||
class ENC
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'pe/v1'
|
||||
require_relative '../../util/httparty'
|
||||
require_relative '../facts'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'uri'
|
||||
require 'yaml'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fileutils'
|
||||
require 'open3'
|
||||
require 'shellwords'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../facts'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'digest'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fileutils'
|
||||
require 'open3'
|
||||
require 'rugged'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'stringio'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'fileutils'
|
||||
require 'json'
|
||||
require 'open3'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
|
||||
module OctocatalogDiff
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'stringio'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../catalog-util/facts'
|
||||
require_relative '../external/pson/pure'
|
||||
require_relative '../util/httparty'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'facts/json'
|
||||
require_relative 'facts/yaml'
|
||||
require_relative 'facts/puppetdb'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../facts'
|
||||
|
||||
require 'json'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../facts'
|
||||
require_relative '../puppetdb'
|
||||
require 'yaml'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../facts'
|
||||
require 'yaml'
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'util/httparty'
|
||||
|
||||
require 'uri'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Create colorizing methods in the 'String' class, but only if 'colors_enabled'
|
||||
# has been set.
|
||||
class String
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'httparty'
|
||||
require 'json'
|
||||
require_relative '../external/pson/pure'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Helper to use the 'parallel' gem to perform tasks
|
||||
|
||||
require 'parallel'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Helper to determine the version of Puppet
|
||||
|
||||
require 'fileutils'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module OctocatalogDiff
|
||||
# Determine the version of octocatalog-diff
|
||||
class Version
|
||||
|
|
|
@ -24,6 +24,7 @@ module OctocatalogDiff
|
|||
comments = []
|
||||
IO.readlines(filename).each do |line|
|
||||
next if line =~ /^#\s*@/
|
||||
next if line.strip == '# frozen_string_literal: true'
|
||||
if line =~ /^#(.+)/
|
||||
comments << Regexp.last_match(1).strip
|
||||
elsif line =~ /^OctocatalogDiff::/
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче