Skip to content

Commit a76d361

Browse files
committed
(MAINT) Rubocop: Add frozen_string_literal comment
1 parent 70143f0 commit a76d361

File tree

107 files changed

+214
-0
lines changed

Some content is hidden

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

107 files changed

+214
-0
lines changed

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ require: rubocop-performance
22
inherit_from: .rubocop_todo.yml
33

44
AllCops:
5+
TargetRubyVersion: 2.3
56
Exclude:
67
# Ignore HTML related things
78
- '**/*.erb'
@@ -10,6 +11,7 @@ AllCops:
1011
- spec/fixtures/modules/**/*
1112
- spec/fixtures/ruby/**/*
1213

14+
1315
# DISABLED - not useful
1416
Bundler/OrderedGems:
1517
Enabled: false

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 ENV['GEM_SOURCE'] || "https://rubygems.org"
24

35
gemspec

Rakefile

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
if Bundler.rubygems.find_name('puppet_litmus').any?
24
require 'puppet_litmus/rake_tasks'
35

lib/puppet-strings.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
# The root module for Puppet Strings.
24
module PuppetStrings
35
# The glob patterns used to search for files to document.

lib/puppet-strings/describe.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 'puppet-strings/json'
35

lib/puppet-strings/json.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

35
# The module for JSON related functionality.

lib/puppet-strings/markdown.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 'puppet-strings/json'
24

35
# module for parsing Yard Registries and generating markdown

lib/puppet-strings/markdown/base.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 'puppet-strings'
24
require 'puppet-strings/json'
35
require 'puppet-strings/yard'

lib/puppet-strings/markdown/data_type.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/data_types.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 'data_type'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/defined_type.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/defined_types.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 'defined_type'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/function.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/functions.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 'function'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/puppet_class.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/puppet_classes.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 'puppet_class'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/puppet_plan.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/puppet_plans.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 'puppet_plan'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/puppet_task.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/puppet_tasks.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 'puppet_task'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/resource_type.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 'puppet-strings/markdown/base'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/resource_types.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 'resource_type'
24

35
module PuppetStrings::Markdown

lib/puppet-strings/markdown/table_of_contents.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 PuppetStrings::Markdown
24
module TableOfContents
35
def self.render

lib/puppet-strings/monkey_patches/display_object_command.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
# Monkey patch URL decoding in object displays. Usually :: is interpreted as a
24
# namespace, but this is disabled in our base object, and so instead gets
35
# URL-encoded.

lib/puppet-strings/tasks.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 'rake'
24
require 'rake/tasklib'
35

lib/puppet-strings/tasks/generate.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 'puppet-strings'
24

35
# Implements the strings:generate task.

lib/puppet-strings/tasks/gh_pages.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 'puppet-strings/tasks'
24

35
namespace :strings do

lib/puppet-strings/version.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 PuppetStrings
24
VERSION = '2.5.0'.freeze
35
end

lib/puppet-strings/yard.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 'yard'
24

35
# Module for YARD related functionality.

lib/puppet-strings/yard/code_objects.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
# The module for custom YARD code objects.
24
module PuppetStrings::Yard::CodeObjects
35
require 'puppet-strings/yard/code_objects/class'

lib/puppet-strings/yard/code_objects/base.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
# Implements the base code object.
24
class PuppetStrings::Yard::CodeObjects::Base < YARD::CodeObjects::NamespaceObject
35
# Allocates a new code object.

lib/puppet-strings/yard/code_objects/class.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 'puppet-strings/yard/code_objects/group'
24

35
# Implements the group for Puppet classes.

lib/puppet-strings/yard/code_objects/data_type.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 'puppet-strings/yard/code_objects/group'
24
require 'puppet-strings/yard/util'
35

lib/puppet-strings/yard/code_objects/data_type_alias.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 'puppet-strings/yard/code_objects/group'
24
require 'puppet-strings/yard/util'
35

lib/puppet-strings/yard/code_objects/defined_type.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 'puppet-strings/yard/code_objects/group'
24

35
# Implements the group for Puppet defined types.

lib/puppet-strings/yard/code_objects/function.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 'puppet-strings/yard/code_objects/group'
24

35
# Implements the group for Puppet functions.

lib/puppet-strings/yard/code_objects/group.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 'puppet-strings/yard/code_objects/base'
24

35
# Implements the base class for "groups".

lib/puppet-strings/yard/code_objects/plan.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 'puppet-strings/yard/code_objects/group'
24

35
class PuppetStrings::Yard::CodeObjects::Plans < PuppetStrings::Yard::CodeObjects::Group

lib/puppet-strings/yard/code_objects/provider.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 'puppet-strings/yard/code_objects/group'
24

35
# Implements the group for Puppet providers.

lib/puppet-strings/yard/code_objects/task.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 'puppet-strings/yard/code_objects/group'
24

35
# Implements the group for Puppet tasks.

lib/puppet-strings/yard/code_objects/type.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 'puppet-strings/yard/code_objects/group'
24
require 'puppet-strings/yard/util'
35

lib/puppet-strings/yard/handlers.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
# The module for custom YARD handlers.
24
module PuppetStrings::Yard::Handlers
35
# The module for custom Ruby YARD handlers.

lib/puppet-strings/yard/handlers/helpers.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 PuppetStrings::Yard::Handlers::Helpers
24
# Logs a warning if a summary tag has more than 140 characters
35
def self.validate_summary_tag(object)

lib/puppet-strings/yard/handlers/json/base.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
class PuppetStrings::Yard::Handlers::JSON::Base < YARD::Handlers::Base
24
def self.handles?(statement)
35
handlers.any? {|handler| statement.is_a?(handler)}

lib/puppet-strings/yard/handlers/json/task_handler.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 'puppet-strings/yard/handlers/json/base'
24
require 'puppet-strings/yard/parsers'
35
require 'puppet-strings/yard/parsers/json/parser'

lib/puppet-strings/yard/handlers/puppet/base.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
# Implements the base handler for Puppet language handlers.
24
class PuppetStrings::Yard::Handlers::Puppet::Base < YARD::Handlers::Base
35
# Determine sif the handler handles the given statement.

lib/puppet-strings/yard/handlers/puppet/class_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/puppet/base'
35
require 'puppet-strings/yard/parsers'

lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/puppet/base'
35
require 'puppet-strings/yard/parsers'

lib/puppet-strings/yard/handlers/puppet/defined_type_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/puppet/base'
35
require 'puppet-strings/yard/parsers'

lib/puppet-strings/yard/handlers/puppet/function_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/puppet/base'
35
require 'puppet-strings/yard/parsers'

lib/puppet-strings/yard/handlers/puppet/plan_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/puppet/base'
35
require 'puppet-strings/yard/parsers'

lib/puppet-strings/yard/handlers/ruby/base.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 'ripper'
24

35
# Implements the base handler for Ruby language handlers.

lib/puppet-strings/yard/handlers/ruby/data_type_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/ruby/base'
35
require 'puppet-strings/yard/code_objects'

lib/puppet-strings/yard/handlers/ruby/function_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/ruby/base'
35
require 'puppet-strings/yard/code_objects'

lib/puppet-strings/yard/handlers/ruby/provider_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/ruby/base'
35
require 'puppet-strings/yard/code_objects'

lib/puppet-strings/yard/handlers/ruby/rsapi_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/ruby/base'
35
require 'puppet-strings/yard/code_objects'

lib/puppet-strings/yard/handlers/ruby/type_base.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 'puppet-strings/yard/handlers/ruby/base'
24

35
class PuppetStrings::Yard::Handlers::Ruby::TypeBase < PuppetStrings::Yard::Handlers::Ruby::Base

lib/puppet-strings/yard/handlers/ruby/type_extras_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/ruby/type_base'
35
require 'puppet-strings/yard/code_objects'

lib/puppet-strings/yard/handlers/ruby/type_handler.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 'puppet-strings/yard/handlers/helpers'
24
require 'puppet-strings/yard/handlers/ruby/type_base'
35
require 'puppet-strings/yard/code_objects'

lib/puppet-strings/yard/parsers.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
# The module for custom YARD parsers.
24
module PuppetStrings::Yard::Parsers
35
# The module for custom YARD parsers for JSON.

lib/puppet-strings/yard/parsers/json/parser.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 'puppet-strings/yard/parsers/json/task_statement'
24

35
class PuppetStrings::Yard::Parsers::JSON::Parser < YARD::Parser::Base

lib/puppet-strings/yard/parsers/json/task_statement.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 PuppetStrings::Yard::Parsers::JSON
24
# Represents the Puppet Task statement.
35
class TaskStatement

lib/puppet-strings/yard/parsers/puppet/parser.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 'puppet'
24
require 'puppet/pops'
35
require 'puppet-strings/yard/parsers/puppet/statement'

lib/puppet-strings/yard/parsers/puppet/statement.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 'puppet'
24
require 'puppet/pops'
35

lib/puppet-strings/yard/tags.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
# The module for custom YARD tags.
24
module PuppetStrings::Yard::Tags
35
require 'puppet-strings/yard/tags/factory'

0 commit comments

Comments
 (0)