bolt 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bolt/cli.rb +32 -17
  3. data/lib/bolt/config.rb +12 -31
  4. data/lib/bolt/error.rb +18 -7
  5. data/lib/bolt/executor.rb +3 -3
  6. data/lib/bolt/inventory.rb +101 -0
  7. data/lib/bolt/inventory/group.rb +127 -0
  8. data/lib/bolt/node.rb +10 -9
  9. data/lib/bolt/node/ssh.rb +86 -69
  10. data/lib/bolt/node/winrm.rb +3 -3
  11. data/lib/bolt/outputter/human.rb +1 -1
  12. data/lib/bolt/pal.rb +17 -11
  13. data/lib/bolt/result.rb +9 -4
  14. data/lib/bolt/target.rb +26 -11
  15. data/lib/bolt/util.rb +54 -0
  16. data/lib/bolt/version.rb +1 -1
  17. data/modules/boltlib/lib/puppet/functions/fail_plan.rb +27 -0
  18. data/modules/boltlib/lib/puppet/functions/file_upload.rb +4 -4
  19. data/modules/boltlib/lib/puppet/functions/run_command.rb +3 -3
  20. data/modules/boltlib/lib/puppet/functions/run_plan.rb +18 -4
  21. data/modules/boltlib/lib/puppet/functions/run_script.rb +5 -2
  22. data/modules/boltlib/lib/puppet/functions/run_task.rb +3 -3
  23. data/vendored/puppet/lib/puppet/datatypes/error.rb +5 -3
  24. data/vendored/puppet/lib/puppet/datatypes/impl/error.rb +10 -12
  25. data/vendored/puppet/lib/puppet/defaults.rb +33 -25
  26. data/vendored/puppet/lib/puppet/etc.rb +2 -2
  27. data/vendored/puppet/lib/puppet/external/pson/pure/generator.rb +1 -1
  28. data/vendored/puppet/lib/puppet/external/pson/pure/parser.rb +1 -1
  29. data/vendored/puppet/lib/puppet/face/config.rb +45 -0
  30. data/vendored/puppet/lib/puppet/face/module/generate.rb +5 -0
  31. data/vendored/puppet/lib/puppet/functions/annotate.rb +1 -1
  32. data/vendored/puppet/lib/puppet/functions/any.rb +1 -1
  33. data/vendored/puppet/lib/puppet/generate/type.rb +1 -1
  34. data/vendored/puppet/lib/puppet/gettext/config.rb +2 -2
  35. data/vendored/puppet/lib/puppet/gettext/stubs.rb +1 -1
  36. data/vendored/puppet/lib/puppet/interface/action.rb +11 -0
  37. data/vendored/puppet/lib/puppet/interface/action_builder.rb +8 -0
  38. data/vendored/puppet/lib/puppet/network/authstore.rb +1 -1
  39. data/vendored/puppet/lib/puppet/network/http/connection.rb +1 -1
  40. data/vendored/puppet/lib/puppet/parameter/boolean.rb +1 -1
  41. data/vendored/puppet/lib/puppet/parser/ast/branch.rb +1 -1
  42. data/vendored/puppet/lib/puppet/parser/functions/new.rb +1 -1
  43. data/vendored/puppet/lib/puppet/parser/functions/reverse_each.rb +1 -1
  44. data/vendored/puppet/lib/puppet/pops/evaluator/compare_operator.rb +1 -1
  45. data/vendored/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb +3 -3
  46. data/vendored/puppet/lib/puppet/pops/evaluator/literal_evaluator.rb +1 -1
  47. data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_converter.rb +1 -1
  48. data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_support.rb +1 -1
  49. data/vendored/puppet/lib/puppet/pops/issues.rb +1 -1
  50. data/vendored/puppet/lib/puppet/pops/loader/loader.rb +1 -1
  51. data/vendored/puppet/lib/puppet/pops/loader/loader_paths.rb +1 -1
  52. data/vendored/puppet/lib/puppet/pops/loader/module_loaders.rb +3 -5
  53. data/vendored/puppet/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +1 -1
  54. data/vendored/puppet/lib/puppet/pops/loader/runtime3_type_loader.rb +1 -1
  55. data/vendored/puppet/lib/puppet/pops/loaders.rb +40 -1
  56. data/vendored/puppet/lib/puppet/pops/lookup/interpolation.rb +1 -1
  57. data/vendored/puppet/lib/puppet/pops/model/tree_dumper.rb +1 -1
  58. data/vendored/puppet/lib/puppet/pops/parser/epp_support.rb +1 -1
  59. data/vendored/puppet/lib/puppet/pops/parser/interpolation_support.rb +1 -1
  60. data/vendored/puppet/lib/puppet/pops/parser/lexer2.rb +1 -1
  61. data/vendored/puppet/lib/puppet/pops/parser/lexer_support.rb +2 -2
  62. data/vendored/puppet/lib/puppet/pops/parser/locatable.rb +1 -1
  63. data/vendored/puppet/lib/puppet/pops/parser/locator.rb +2 -6
  64. data/vendored/puppet/lib/puppet/pops/resource/param.rb +1 -1
  65. data/vendored/puppet/lib/puppet/pops/resource/resource_type_impl.rb +1 -1
  66. data/vendored/puppet/lib/puppet/pops/types/iterable.rb +1 -1
  67. data/vendored/puppet/lib/puppet/pops/types/tree_iterators.rb +5 -1
  68. data/vendored/puppet/lib/puppet/pops/types/type_acceptor.rb +1 -1
  69. data/vendored/puppet/lib/puppet/pops/types/type_calculator.rb +1 -1
  70. data/vendored/puppet/lib/puppet/pops/types/type_with_members.rb +1 -1
  71. data/vendored/puppet/lib/puppet/pops/types/types.rb +1 -1
  72. data/vendored/puppet/lib/puppet/provider/package/yum.rb +1 -1
  73. data/vendored/puppet/lib/puppet/provider/service/redhat.rb +3 -2
  74. data/vendored/puppet/lib/puppet/provider/service/systemd.rb +1 -1
  75. data/vendored/puppet/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
  76. data/vendored/puppet/lib/puppet/resource/type.rb +1 -1
  77. data/vendored/puppet/lib/puppet/settings/base_setting.rb +1 -1
  78. data/vendored/puppet/lib/puppet/settings/ini_file.rb +33 -12
  79. data/vendored/puppet/lib/puppet/ssl/certificate_request.rb +2 -2
  80. data/vendored/puppet/lib/puppet/transaction.rb +37 -14
  81. data/vendored/puppet/lib/puppet/type/cron.rb +1 -1
  82. data/vendored/puppet/lib/puppet/type/file/checksum.rb +6 -0
  83. data/vendored/puppet/lib/puppet/type/mount.rb +0 -9
  84. data/vendored/puppet/lib/puppet/util/character_encoding.rb +2 -2
  85. data/vendored/puppet/lib/puppet/util/network_device/cisco/device.rb +5 -5
  86. data/vendored/puppet/lib/puppet/util/rdoc/generators/puppet_generator.rb +1 -1
  87. data/vendored/puppet/lib/puppet/util/windows/process.rb +1 -1
  88. data/vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +18 -18
  89. data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +2 -2
  90. data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +5 -5
  91. metadata +20 -2
@@ -129,6 +129,8 @@ Puppet::Face.define(:module, '1.0.0') do
129
129
  puts _("Finished; module generated in %{path}.") % { path: path }
130
130
  result.join("\n")
131
131
  end
132
+
133
+ deprecate
132
134
  end
133
135
  end
134
136
 
@@ -136,6 +138,9 @@ module Puppet::ModuleTool::Generate
136
138
  module_function
137
139
 
138
140
  def generate(metadata, skip_interview = false)
141
+ #TRANSLATORS 'puppet module generate' is the name of the puppet command and 'Puppet Development Kit' is the name of the software package replacing this action and should not be translated.
142
+ Puppet.deprecation_warning _("`puppet module generate` is deprecated and will be removed in a future release. This action has been replaced by Puppet Development Kit. For more information visit https://puppet.com/docs/pdk/latest/pdk.html.")
143
+
139
144
  interview(metadata) unless skip_interview
140
145
  destination = duplicate_skeleton(metadata)
141
146
  all_files = destination.basename + '**/*'
@@ -37,7 +37,7 @@
37
37
  # ~~~
38
38
  #
39
39
  # With three arguments, an `Annotation` type, an object, and an the string `clear`, the function will
40
- # clear the annotatation of the given type in the given object. The old annotation is returned if
40
+ # clear the annotation of the given type in the given object. The old annotation is returned if
41
41
  # it existed.
42
42
  #
43
43
  # @example Using `annotate` with three arguments where third argument is the string 'clear'
@@ -27,7 +27,7 @@
27
27
  #
28
28
  # Would notice `true` if the looked up hash had a value that is neither `false` nor `undef` for at least
29
29
  # one of the keys. That is, it is equivalent to the expression
30
- # `$lookued_up[routers] || $looked_up[servers] || $looked_up[workstations]`.
30
+ # `$looked_up[routers] || $looked_up[servers] || $looked_up[workstations]`.
31
31
  #
32
32
  # When the first argument is a `Hash`, Puppet passes each key and value pair to the lambda
33
33
  # as an array in the form `[key, value]`.
@@ -5,7 +5,7 @@ require 'puppet/generate/models/type/type'
5
5
 
6
6
  module Puppet
7
7
  module Generate
8
- # Reponsible for generating type definitions in Puppet
8
+ # Responsible for generating type definitions in Puppet
9
9
  class Type
10
10
  # Represents an input to the type generator
11
11
  class Input
@@ -191,7 +191,7 @@ module Puppet::GettextConfig
191
191
  end
192
192
 
193
193
  # @api private
194
- # Attempt to load tranlstions for the given project.
194
+ # Attempt to load translations for the given project.
195
195
  # @param [String] project_name the project whose translations we want to load
196
196
  # @param [String] locale_dir the path to the directory containing translations
197
197
  # @param [Symbol] file_format translation file format to use, either :po or :mo
@@ -218,7 +218,7 @@ module Puppet::GettextConfig
218
218
  # chain for the currently selected text domain, if needed.
219
219
  # @param [String] project_name the name of the project for which to load translations
220
220
  # @param [String] locale_dir the path to the directory containing translations
221
- # @param [Symbol] file_format the fomat of the translations files, :po or :mo
221
+ # @param [Symbol] file_format the format of the translations files, :po or :mo
222
222
  def self.add_repository_to_domain(project_name, locale_dir, file_format, text_domain = FastGettext.text_domain)
223
223
  return if @gettext_disabled || !gettext_loaded?
224
224
 
@@ -1,4 +1,4 @@
1
- # These stub the translation methods noramlly brought in
1
+ # These stub the translation methods normally brought in
2
2
  # by FastGettext. Used when Gettext could not be properly
3
3
  # initialized.
4
4
  def _(msg)
@@ -149,6 +149,17 @@ class Puppet::Interface::Action
149
149
  @render_as = value.to_sym
150
150
  end
151
151
 
152
+ # @api private
153
+ # @return [void]
154
+ def deprecate
155
+ @deprecated = true
156
+ end
157
+
158
+ # @api private
159
+ # @return [Boolean]
160
+ def deprecated?
161
+ @deprecated
162
+ end
152
163
 
153
164
  ########################################################################
154
165
  # Initially, this was defined to allow the @action.invoke pattern, which is
@@ -17,6 +17,14 @@ class Puppet::Interface::ActionBuilder
17
17
  new(face, name, &block).action
18
18
  end
19
19
 
20
+ # Deprecates the action
21
+ # @return [void]
22
+ # @api private
23
+ # @dsl Faces
24
+ def deprecate
25
+ @action.deprecate
26
+ end
27
+
20
28
  # Ideally the method we're defining here would be added to the action, and a
21
29
  # method on the face would defer to it, but we can't get scope correct, so
22
30
  # we stick with this. --daniel 2011-03-24
@@ -16,7 +16,7 @@ module Puppet
16
16
  # is provided, then the authstore is considered local and defaults to "true".
17
17
  def allowed?(name, ip)
18
18
  if name or ip
19
- # This is probably unnecessary, and can cause some weirdnesses in
19
+ # This is probably unnecessary, and can cause some weirdness in
20
20
  # cases where we're operating over localhost but don't have a real
21
21
  # IP defined.
22
22
  raise Puppet::DevError, _("Name and IP must be passed to 'allowed?'") unless name and ip
@@ -209,7 +209,7 @@ module Puppet::Network::HTTP
209
209
  # it by sleeping for the indicated number of seconds. The response is
210
210
  # returned unmodified if no Retry-After header is present.
211
211
  #
212
- # @param response [Net::HTTPResponse] A response recieved from the
212
+ # @param response [Net::HTTPResponse] A response received from the
213
213
  # HTTP client.
214
214
  #
215
215
  # @return [nil] Sleeps and returns nil if the response contained a
@@ -1,7 +1,7 @@
1
1
  require 'puppet/coercion'
2
2
 
3
3
  # This specialized {Puppet::Parameter} handles Boolean options, accepting lots
4
- # of strings and symbols for both truthiness and falsehood.
4
+ # of strings and symbols for both truth and falsehood.
5
5
  #
6
6
  class Puppet::Parameter::Boolean < Puppet::Parameter
7
7
  def unsafe_munge(value)
@@ -1,7 +1,7 @@
1
1
  # The parent class of all AST objects that contain other AST objects.
2
2
  # Everything but the really simple objects descend from this. It is
3
3
  # important to note that Branch objects contain other AST objects only --
4
- # if you want to contain values, use a descendent of the AST::Leaf class.
4
+ # if you want to contain values, use a descendant of the AST::Leaf class.
5
5
  #
6
6
  # @api private
7
7
  class Puppet::Parser::AST::Branch < Puppet::Parser::AST
@@ -178,7 +178,7 @@ function Timespan.new(
178
178
  )
179
179
  ```
180
180
 
181
- #### Timespan from days, hours, mintues, seconds, and fractions of a second
181
+ #### Timespan from days, hours, minutes, seconds, and fractions of a second
182
182
 
183
183
  The arguments can be passed separately in which case the first four, days, hours, minutes, and seconds are mandatory and the rest are optional.
184
184
  All values may overflow and/or be negative. The internal 128-bit nano-second integer is calculated as:
@@ -40,7 +40,7 @@ $reverse_data = reverse_each($data)
40
40
  When no second argument is present, Puppet returns an `Iterable` that represents the reverse
41
41
  order of its first argument. This allows methods on `Iterable` to be chained.
42
42
 
43
- When a lamdba is given as the second argument, Puppet iterates the first argument in reverse
43
+ When a lambda is given as the second argument, Puppet iterates the first argument in reverse
44
44
  order and passes each value in turn to the lambda, then returns `undef`.
45
45
 
46
46
  **Example:** Using the `reverse_each` function with an array and a one-parameter lambda
@@ -133,7 +133,7 @@ class CompareOperator
133
133
  def include_String(a, b, scope)
134
134
  case b
135
135
  when String
136
- # subsstring search downcased
136
+ # substring search downcased
137
137
  a.downcase.include?(b.downcase)
138
138
  when Regexp
139
139
  matched = a.match(b) # nil, or MatchData
@@ -342,7 +342,7 @@ class EvaluatorImpl
342
342
  candidate
343
343
  when Hash
344
344
  candidate.to_a
345
- when Puppet::Pops::Types::Iterator
345
+ when Puppet::Pops::Types::Iterable
346
346
  candidate.to_a
347
347
  else
348
348
  # turns anything else into an array (so result can be unfolded)
@@ -703,7 +703,7 @@ class EvaluatorImpl
703
703
  end
704
704
 
705
705
  # Evaluates a CollectExpression by creating a collector transformer. The transformer
706
- # will evaulate the collection, create the appropriate collector, and hand it off
706
+ # will evaluate the collection, create the appropriate collector, and hand it off
707
707
  # to the compiler to collect the resources specified by the query.
708
708
  #
709
709
  def eval_CollectExpression o, scope
@@ -1194,7 +1194,7 @@ class EvaluatorImpl
1194
1194
  # Hash[a,1,b,2] => {a => 1, b => 2}
1195
1195
  # Hash[[a,1], [b,2]] => {[a,1] => [b,2]}
1196
1196
  # Hash[[[a,1], [b,2]]] => {a => 1, b => 2}
1197
- # Use type calcultor to determine if array is Array[Array[?]], and if so use second form
1197
+ # Use type calculator to determine if array is Array[Array[?]], and if so use second form
1198
1198
  # of call
1199
1199
  t = @@type_calculator.infer(y)
1200
1200
  if t.element_type.is_a? Types::PArrayType
@@ -9,7 +9,7 @@ module Evaluator
9
9
  # Hash
10
10
  # QualifiedName
11
11
  # Default (produced :default)
12
- # Regular Expression (produces ruby reqular expression)
12
+ # Regular Expression (produces ruby regular expression)
13
13
  #
14
14
  # Not considered literal
15
15
  # QualifiedReference # i.e. File, FooBar
@@ -166,7 +166,7 @@ end
166
166
  class Runtime3FunctionArgumentConverter < Runtime3Converter
167
167
 
168
168
  def convert_Regexp(o, scope, undef_value)
169
- # Puppet 3x cannot handle parameter values that are reqular expressions. Turn into regexp string in
169
+ # Puppet 3x cannot handle parameter values that are regular expressions. Turn into regexp string in
170
170
  # source form
171
171
  o.inspect
172
172
  end
@@ -374,7 +374,7 @@ module Runtime3Support
374
374
  evaluated_parameters = evaluated_parameters.flatten
375
375
  evaluated_resources.each do |r|
376
376
  unless r.is_a?(Types::PResourceType) && r.type_name != 'class'
377
- fail(Issues::ILLEGAL_OVERRIDEN_TYPE, o, {:actual => r} )
377
+ fail(Issues::ILLEGAL_OVERRIDDEN_TYPE, o, {:actual => r} )
378
378
  end
379
379
  t = Runtime3ResourceSupport.find_resource_type(scope, r.type_name)
380
380
  resource = Puppet::Parser::Resource.new(
@@ -617,7 +617,7 @@ module Issues
617
617
  _("Node inheritance is not supported in Puppet >= 4.0.0. See http://links.puppet.com/puppet-node-inheritance-deprecation")
618
618
  end
619
619
 
620
- ILLEGAL_OVERRIDEN_TYPE = issue :ILLEGAL_OVERRIDEN_TYPE, :actual do
620
+ ILLEGAL_OVERRIDDEN_TYPE = issue :ILLEGAL_OVERRIDDEN_TYPE, :actual do
621
621
  _("Resource Override can only operate on resources, got: %{actual}") % { actual: label.label(actual) }
622
622
  end
623
623
 
@@ -90,7 +90,7 @@ class Loader
90
90
  # of the given type/name.
91
91
  #
92
92
  # @param typed_name [TypedName] - the type, name combination to lookup
93
- # @param check_dependencies [Boolean] - if dependencies should be checked in additiona to here and parent
93
+ # @param check_dependencies [Boolean] - if dependencies should be checked in addition to here and parent
94
94
  # @return [NamedEntry, nil] the entry containing the loaded value, or nil if not found
95
95
  # @api public
96
96
  #
@@ -305,7 +305,7 @@ module LoaderPaths
305
305
  #
306
306
  def effective_path(typed_name, start_index_in_name)
307
307
  # Resource type to name does not skip the name-space
308
- # i.e. <module>/mymodule/resource_types/foo.pp is the reource type foo
308
+ # i.e. <module>/mymodule/resource_types/foo.pp is the resource type foo
309
309
  "#{File.join(generic_path, typed_name.name_parts)}.pp"
310
310
  end
311
311
  end
@@ -14,9 +14,7 @@ module Loader
14
14
  # modules" to determine which module loader to use for each individual module. (There could be differences in
15
15
  # internal layout etc.)
16
16
  #
17
- # A module loader is also not aware of the mapping of name to relative paths - this is performed by the
18
- # included module PathBasedInstantatorConfig which knows about the map from type/name to
19
- # relative path, and the logic that can instantiate what is expected to be found in the content of that path.
17
+ # A module loader is also not aware of the mapping of name to relative paths.
20
18
  #
21
19
  # @api private
22
20
  #
@@ -144,8 +142,8 @@ module ModuleLoaders
144
142
  err = Puppet::DataTypes::Error.new(
145
143
  Issues::LOADER_FAILURE.format(:type => type),
146
144
  'PUPPET_LOADER_FAILURE',
147
- Issues::LOADER_FAILURE.issue_code, nil,
148
- { 'original_error' => e.message })
145
+ { 'original_error' => e.message },
146
+ Issues::LOADER_FAILURE.issue_code)
149
147
  error_collector << err unless error_collector.include?(err)
150
148
  end
151
149
  end
@@ -8,7 +8,7 @@ class PuppetResourceTypeImplInstantiator
8
8
  # given puppet source does not produce such an instance when evaluated.
9
9
  #
10
10
  # @param loader [Loader] The loader the function is associated with
11
- # @param typed_name [TypedName] the type / name of the resoure type impl to load
11
+ # @param typed_name [TypedName] the type / name of the resource type impl to load
12
12
  # @param source_ref [URI, String] a reference to the source / origin of the puppet code to evaluate
13
13
  # @param pp_code_string [String] puppet code in a string
14
14
  #
@@ -88,7 +88,7 @@ class Runtime3TypeLoader < BaseLoader
88
88
  end
89
89
  private :find_impl
90
90
 
91
- # Allows shadowing since this loader is populalted with all loaded resource types at time
91
+ # Allows shadowing since this loader is populated with all loaded resource types at time
92
92
  # of loading. This loading will, for built in types override the aliases configured in the static
93
93
  # loader.
94
94
  #
@@ -453,6 +453,18 @@ class Loaders
453
453
  def resolved?
454
454
  !@private_loader.nil?
455
455
  end
456
+
457
+ def restrict_to_dependencies?
458
+ @puppet_module.has_metadata?
459
+ end
460
+
461
+ def unmet_dependencies?
462
+ @puppet_module.unmet_dependencies.any?
463
+ end
464
+
465
+ def dependency_names
466
+ @puppet_module.dependencies_as_modules.collect(&:name)
467
+ end
456
468
  end
457
469
 
458
470
  # Resolves module loaders - resolution of model dependencies is done by Puppet::Module
@@ -481,15 +493,42 @@ class Loaders
481
493
  if module_data.resolved?
482
494
  nil
483
495
  else
484
- module_data.private_loader = create_loader_with_all_modules_visible(module_data)
496
+ module_data.private_loader =
497
+ if module_data.restrict_to_dependencies? && !Puppet[:tasks]
498
+ create_loader_with_only_dependencies_visible(module_data)
499
+ else
500
+ create_loader_with_all_modules_visible(module_data)
501
+ end
485
502
  end
486
503
  end
487
504
 
488
505
  private
489
506
 
490
507
  def create_loader_with_all_modules_visible(from_module_data)
508
+ Puppet.debug{"ModuleLoader: module '#{from_module_data.name}' has unknown dependencies - it will have all other modules visible"}
509
+
491
510
  @loaders.add_loader_by_name(Loader::DependencyLoader.new(from_module_data.public_loader, "#{from_module_data.name} private", all_module_loaders()))
492
511
  end
512
+
513
+ def create_loader_with_only_dependencies_visible(from_module_data)
514
+ if from_module_data.unmet_dependencies?
515
+ if Puppet[:strict] != :off
516
+ msg = "ModuleLoader: module '#{from_module_data.name}' has unresolved dependencies" \
517
+ " - it will only see those that are resolved." \
518
+ " Use 'puppet module list --tree' to see information about modules"
519
+ case Puppet[:strict]
520
+ when :error
521
+ raise LoaderError.new(msg)
522
+ when :warning
523
+ Puppet.warn_once(:unresolved_module_dependencies,
524
+ "unresolved_dependencies_for_module_#{from_module_data.name}",
525
+ msg)
526
+ end
527
+ end
528
+ end
529
+ dependency_loaders = from_module_data.dependency_names.collect { |name| @index[name].public_loader }
530
+ @loaders.add_loader_by_name(Loader::DependencyLoader.new(from_module_data.public_loader, "#{from_module_data.name} private", dependency_loaders))
531
+ end
493
532
  end
494
533
  end
495
534
  end
@@ -125,7 +125,7 @@ module Interpolation
125
125
  interpolate_method
126
126
  end
127
127
 
128
- # Because the semanitcs of Puppet::Parser::Scope#include? differs from Hash#include?
128
+ # Because the semantics of Puppet::Parser::Scope#include? differs from Hash#include?
129
129
  def nil_in_scope?(scope, key)
130
130
  if scope.is_a?(Hash)
131
131
  scope.include?(key)
@@ -24,7 +24,7 @@ class Puppet::Pops::Model::TreeDumper
24
24
  parts = format_r(x)
25
25
  parts.each_index do |i|
26
26
  if i > 0
27
- # separate with space unless previous ends with whitepsace or (
27
+ # separate with space unless previous ends with whitespace or (
28
28
  result << ' ' if parts[i] != ")" && parts[i-1] !~ /.*(?:\s+|\()$/ && parts[i] !~ /^\s+/
29
29
  end
30
30
  result << parts[i].to_s
@@ -123,7 +123,7 @@ module EppSupport
123
123
  # The scanner supports
124
124
  # * scanning text until <%, <%-, <%=
125
125
  # * while scanning text:
126
- # * tokens <%% and %%> are translated to <% and %> respetively and is returned as text.
126
+ # * tokens <%% and %%> are translated to <% and %>, respectively, and is returned as text.
127
127
  # * tokens <%# and %> (or ending with -%>) and the enclosed text is a comment and is not included in the returned text
128
128
  # * text following a comment that ends with -%> gets trailing whitespace (up to and including a line break) trimmed
129
129
  # and this whitespace is not included in the returned text.
@@ -10,7 +10,7 @@ module Puppet::Pops::Parser::InterpolationSupport
10
10
 
11
11
  # This is the starting point for a double quoted string with possible interpolation
12
12
  # The structure mimics that of the grammar.
13
- # The logic is explicit (where the former implementation used parameters/strucures) given to a
13
+ # The logic is explicit (where the former implementation used parameters/structures) given to a
14
14
  # generic handler.
15
15
  # (This is both easier to understand and faster).
16
16
  #
@@ -1,4 +1,4 @@
1
- # The Lexer is responsbile for turning source text into tokens.
1
+ # The Lexer is responsible for turning source text into tokens.
2
2
  # This version is a performance enhanced lexer (in comparison to the 3.x and earlier "future parser" lexer.
3
3
  #
4
4
  # Old returns tokens [:KEY, value, { locator = }
@@ -135,7 +135,7 @@ module LexerSupport
135
135
  end
136
136
 
137
137
  def to_s
138
- # This format is very compact and is intended for debugging output from racc parsser in
138
+ # This format is very compact and is intended for debugging output from racc parser in
139
139
  # debug mode. If this is made more elaborate the output from a debug run becomes very hard to read.
140
140
  #
141
141
  "'#{self[:value]} #{@token_array[0]}'"
@@ -204,7 +204,7 @@ module LexerSupport
204
204
 
205
205
  def get_bom(content)
206
206
  # get 5 bytes as efficiently as possible (none of the string methods works since a bom consists of
207
- # illegal characters on most platforms, and there is no get_bytes(n). xplicit calls are faster than
207
+ # illegal characters on most platforms, and there is no get_bytes(n). Explicit calls are faster than
208
208
  # looping with a lambda. The get_byte returns nil if there are too few characters, and they
209
209
  # are changed to spaces
210
210
  MM.new(
@@ -1,4 +1,4 @@
1
- # Interface for something that is "locateable" (holds offset and length).
1
+ # Interface for something that is "locatable" (holds offset and length).
2
2
  class Puppet::Pops::Parser::Locatable
3
3
 
4
4
  # The offset in the locator's content