r10k 3.11.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.mkd +9 -0
  3. data/doc/dynamic-environments/configuration.mkd +7 -3
  4. data/doc/dynamic-environments/usage.mkd +26 -0
  5. data/doc/puppetfile.mkd +3 -4
  6. data/integration/tests/basic_functionality/basic_deployment.rb +176 -0
  7. data/lib/r10k/action/deploy/environment.rb +8 -1
  8. data/lib/r10k/action/deploy/module.rb +11 -6
  9. data/lib/r10k/action/puppetfile/check.rb +7 -5
  10. data/lib/r10k/action/puppetfile/install.rb +22 -16
  11. data/lib/r10k/action/puppetfile/purge.rb +12 -9
  12. data/lib/r10k/cli/deploy.rb +1 -0
  13. data/lib/r10k/cli/puppetfile.rb +0 -1
  14. data/lib/r10k/content_synchronizer.rb +16 -4
  15. data/lib/r10k/environment/base.rb +64 -11
  16. data/lib/r10k/environment/with_modules.rb +6 -10
  17. data/lib/r10k/git/stateful_repository.rb +7 -0
  18. data/lib/r10k/initializers.rb +1 -7
  19. data/lib/r10k/module/base.rb +5 -1
  20. data/lib/r10k/module/definition.rb +64 -0
  21. data/lib/r10k/module/forge.rb +10 -2
  22. data/lib/r10k/module/git.rb +22 -1
  23. data/lib/r10k/module/local.rb +2 -3
  24. data/lib/r10k/module/svn.rb +10 -0
  25. data/lib/r10k/module.rb +20 -2
  26. data/lib/r10k/module_loader/puppetfile/dsl.rb +8 -3
  27. data/lib/r10k/module_loader/puppetfile.rb +95 -29
  28. data/lib/r10k/puppetfile.rb +1 -2
  29. data/lib/r10k/settings.rb +11 -0
  30. data/lib/r10k/version.rb +1 -1
  31. data/locales/r10k.pot +75 -47
  32. data/spec/fixtures/unit/puppetfile/forge-override/Puppetfile +8 -0
  33. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile +9 -0
  34. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile.new +9 -0
  35. data/spec/r10k-mocks/mock_env.rb +3 -0
  36. data/spec/r10k-mocks/mock_source.rb +7 -3
  37. data/spec/unit/action/deploy/environment_spec.rb +80 -30
  38. data/spec/unit/action/deploy/module_spec.rb +50 -62
  39. data/spec/unit/action/puppetfile/check_spec.rb +17 -5
  40. data/spec/unit/action/puppetfile/install_spec.rb +42 -36
  41. data/spec/unit/action/puppetfile/purge_spec.rb +15 -17
  42. data/spec/unit/action/runner_spec.rb +0 -8
  43. data/spec/unit/environment/base_spec.rb +30 -17
  44. data/spec/unit/environment/git_spec.rb +2 -2
  45. data/spec/unit/environment/svn_spec.rb +4 -3
  46. data/spec/unit/environment/with_modules_spec.rb +2 -1
  47. data/spec/unit/module/base_spec.rb +8 -8
  48. data/spec/unit/module/forge_spec.rb +32 -4
  49. data/spec/unit/module/git_spec.rb +51 -10
  50. data/spec/unit/module/svn_spec.rb +18 -6
  51. data/spec/unit/module_loader/puppetfile_spec.rb +90 -30
  52. data/spec/unit/puppetfile_spec.rb +2 -2
  53. data/spec/unit/settings_spec.rb +25 -2
  54. metadata +7 -2
@@ -13,6 +13,21 @@ class R10K::Module::Git < R10K::Module::Base
13
13
  false
14
14
  end
15
15
 
16
+ # Will be called if self.implement? above returns true. Will return
17
+ # the version info, if version is statically defined in the modules
18
+ # declaration.
19
+ def self.statically_defined_version(name, args)
20
+ if !args[:type] && (args[:ref] || args[:tag] || args[:commit])
21
+ if args[:ref] && args[:ref].to_s.match(/[0-9a-f]{40}/)
22
+ args[:ref]
23
+ else
24
+ args[:tag] || args[:commit]
25
+ end
26
+ elsif args[:type].to_s == 'git' && args[:version] && args[:version].to_s.match(/[0-9a-f]{40}/)
27
+ args[:version]
28
+ end
29
+ end
30
+
16
31
  # @!attribute [r] repo
17
32
  # @api private
18
33
  # @return [R10K::Git::StatefulRepository]
@@ -83,10 +98,16 @@ class R10K::Module::Git < R10K::Module::Base
83
98
  end
84
99
 
85
100
  # @param [Hash] opts Deprecated
101
+ # @return [Boolean] true if the module was updated, false otherwise
86
102
  def sync(opts={})
87
103
  force = opts[:force] || @force
88
- @repo.sync(version, force) if should_sync?
104
+ if should_sync?
105
+ updated = @repo.sync(version, force)
106
+ else
107
+ updated = false
108
+ end
89
109
  maybe_delete_spec_dir
110
+ updated
90
111
  end
91
112
 
92
113
  def status
@@ -1,5 +1,4 @@
1
1
  require 'r10k/module'
2
- require 'r10k/logging'
3
2
 
4
3
  # A dummy module type that can be used to "protect" Puppet modules that exist
5
4
  # inside of the Puppetfile "moduledir" location. Local modules will not be
@@ -12,8 +11,6 @@ class R10K::Module::Local < R10K::Module::Base
12
11
  args.is_a?(Hash) && (args[:local] || args[:type].to_s == 'local')
13
12
  end
14
13
 
15
- include R10K::Logging
16
-
17
14
  def version
18
15
  "0.0.0"
19
16
  end
@@ -31,7 +28,9 @@ class R10K::Module::Local < R10K::Module::Base
31
28
  end
32
29
 
33
30
  # @param [Hash] opts Deprecated
31
+ # @return [Boolean] false, because local modules are always considered in-sync
34
32
  def sync(opts={})
35
33
  logger.debug1 _("Module %{title} is a local module, always indicating synced.") % {title: title}
34
+ false
36
35
  end
37
36
  end
@@ -10,6 +10,10 @@ class R10K::Module::SVN < R10K::Module::Base
10
10
  args.has_key?(:svn) || args[:type].to_s == 'svn'
11
11
  end
12
12
 
13
+ def self.statically_defined_version(name, args)
14
+ nil
15
+ end
16
+
13
17
  # @!attribute [r] expected_revision
14
18
  # @return [String] The SVN revision that the repo should have checked out
15
19
  attr_reader :expected_revision
@@ -70,18 +74,24 @@ class R10K::Module::SVN < R10K::Module::Base
70
74
  end
71
75
 
72
76
  # @param [Hash] opts Deprecated
77
+ # @return [Boolean] true if the module was updated, false otherwise
73
78
  def sync(opts={})
79
+ updated = false
74
80
  if should_sync?
75
81
  case status
76
82
  when :absent
77
83
  install
84
+ updated = true
78
85
  when :mismatched
79
86
  reinstall
87
+ updated = true
80
88
  when :outdated
81
89
  update
90
+ updated = true
82
91
  end
83
92
  maybe_delete_spec_dir
84
93
  end
94
+ updated
85
95
  end
86
96
 
87
97
  def exist?
data/lib/r10k/module.rb CHANGED
@@ -22,17 +22,35 @@ module R10K::Module
22
22
  #
23
23
  # @return [Object < R10K::Module] A member of the implementing subclass
24
24
  def self.new(name, basedir, args, environment=nil)
25
+ with_implementation(name, args) do |implementation|
26
+ implementation.new(name, basedir, args, environment)
27
+ end
28
+ end
29
+
30
+ # Takes the same signature as Module.new but returns an metadata module
31
+ def self.from_metadata(name, basedir, args, environment=nil)
32
+ with_implementation(name, args) do |implementation|
33
+ R10K::Module::Definition.new(name,
34
+ dirname: basedir,
35
+ args: args,
36
+ implementation: implementation,
37
+ environment: environment)
38
+ end
39
+ end
40
+
41
+ def self.with_implementation(name, args, &block)
25
42
  if implementation = @klasses.find { |klass| klass.implement?(name, args) }
26
- obj = implementation.new(name, basedir, args, environment)
27
- obj
43
+ block.call(implementation)
28
44
  else
29
45
  raise _("Module %{name} with args %{args} doesn't have an implementation. (Are you using the right arguments?)") % {name: name, args: args.inspect}
30
46
  end
31
47
  end
32
48
 
49
+
33
50
  require 'r10k/module/base'
34
51
  require 'r10k/module/git'
35
52
  require 'r10k/module/svn'
36
53
  require 'r10k/module/local'
37
54
  require 'r10k/module/forge'
55
+ require 'r10k/module/definition'
38
56
  end
@@ -6,8 +6,9 @@ module R10K
6
6
  #
7
7
  # @api private
8
8
 
9
- def initialize(librarian)
10
- @librarian = librarian
9
+ def initialize(librarian, metadata_only: false)
10
+ @librarian = librarian
11
+ @metadata_only = metadata_only
11
12
  end
12
13
 
13
14
  def mod(name, args = nil)
@@ -17,7 +18,11 @@ module R10K
17
18
  opts = { version: args }
18
19
  end
19
20
 
20
- @librarian.add_module(name, opts)
21
+ if @metadata_only
22
+ @librarian.add_module_metadata(name, opts)
23
+ else
24
+ @librarian.add_module(name, opts)
25
+ end
21
26
  end
22
27
 
23
28
  def forge(location)
@@ -1,4 +1,5 @@
1
1
  require 'r10k/logging'
2
+ require 'r10k/module'
2
3
 
3
4
  module R10K
4
5
  module ModuleLoader
@@ -8,7 +9,6 @@ module R10K
8
9
 
9
10
  DEFAULT_MODULEDIR = 'modules'
10
11
  DEFAULT_PUPPETFILE_NAME = 'Puppetfile'
11
- DEFAULT_FORGE_API = 'forgeapi.puppetlabs.com'
12
12
 
13
13
  attr_accessor :default_branch_override, :environment
14
14
  attr_reader :modules, :moduledir, :puppetfile_path,
@@ -28,34 +28,40 @@ module R10K
28
28
  def initialize(basedir:,
29
29
  moduledir: DEFAULT_MODULEDIR,
30
30
  puppetfile: DEFAULT_PUPPETFILE_NAME,
31
- forge: DEFAULT_FORGE_API,
32
31
  overrides: {},
33
32
  environment: nil)
34
33
 
35
34
  @basedir = cleanpath(basedir)
36
35
  @moduledir = resolve_path(@basedir, moduledir)
37
36
  @puppetfile_path = resolve_path(@basedir, puppetfile)
38
- @forge = forge
39
37
  @overrides = overrides
40
38
  @environment = environment
41
39
  @default_branch_override = @overrides.dig(:environments, :default_branch_override)
40
+ @allow_puppetfile_forge = @overrides.dig(:forge, :allow_puppetfile_override)
42
41
 
42
+ @existing_module_metadata = []
43
+ @existing_module_versions_by_name = {}
43
44
  @modules = []
44
45
 
45
46
  @managed_directories = []
46
47
  @desired_contents = []
47
48
  @purge_exclusions = []
49
+ end
50
+
51
+ def load
52
+ with_readable_puppetfile(@puppetfile_path) do
53
+ self.load!
54
+ end
55
+ end
48
56
 
57
+ def load!
49
58
  logger.info _("Using Puppetfile '%{puppetfile}'") % {puppetfile: @puppetfile_path}
50
59
  logger.debug _("Using moduledir '%{moduledir}'") % {moduledir: @moduledir}
51
- end
52
60
 
53
- def load
54
61
  dsl = R10K::ModuleLoader::Puppetfile::DSL.new(self)
55
62
  dsl.instance_eval(puppetfile_content(@puppetfile_path), @puppetfile_path)
56
63
 
57
64
  validate_no_duplicate_names(@modules)
58
- @modules
59
65
 
60
66
  managed_content = @modules.group_by(&:dirname)
61
67
 
@@ -74,6 +80,30 @@ module R10K
74
80
  raise R10K::Error.wrap(e, _("Failed to evaluate %{path}") % {path: @puppetfile_path})
75
81
  end
76
82
 
83
+ def load_metadata
84
+ with_readable_puppetfile(@puppetfile_path) do
85
+ self.load_metadata!
86
+ end
87
+ end
88
+
89
+ def load_metadata!
90
+ dsl = R10K::ModuleLoader::Puppetfile::DSL.new(self, metadata_only: true)
91
+ dsl.instance_eval(puppetfile_content(@puppetfile_path), @puppetfile_path)
92
+
93
+ @existing_module_versions_by_name = @existing_module_metadata.map {|mod| [ mod.name, mod.version ] }.to_h
94
+ empty_load_output.merge(modules: @existing_module_metadata)
95
+
96
+ rescue SyntaxError, LoadError, ArgumentError, NameError => e
97
+ logger.warn _("Unable to preload Puppetfile because of %{msg}" % { msg: e.message })
98
+ end
99
+
100
+ def add_module_metadata(name, info)
101
+ install_path, metadata_info, _ = parse_module_definition(name, info)
102
+
103
+ mod = R10K::Module.from_metadata(name, install_path, metadata_info, @environment)
104
+
105
+ @existing_module_metadata << mod
106
+ end
77
107
 
78
108
  ##
79
109
  ## set_forge, set_moduledir, and add_module are used directly by the DSL class
@@ -81,7 +111,12 @@ module R10K
81
111
 
82
112
  # @param [String] forge
83
113
  def set_forge(forge)
84
- @forge = forge
114
+ if @allow_puppetfile_forge
115
+ logger.debug _("Using Forge from Puppetfile: %{forge}") % { forge: forge }
116
+ PuppetForge.host = forge
117
+ else
118
+ logger.debug _("Ignoring Forge declaration in Puppetfile, using value from settings: %{forge}.") % { forge: PuppetForge.host }
119
+ end
85
120
  end
86
121
 
87
122
  # @param [String] moduledir
@@ -90,7 +125,7 @@ module R10K
90
125
  end
91
126
 
92
127
  # @param [String] name
93
- # @param [Hash, String, Symbol, nil] module_info Calling with
128
+ # @param [Hash, String, Symbol, nil] info Calling with
94
129
  # anything but a Hash is deprecated. The DSL will now convert
95
130
  # String and Symbol versions to Hashes of the shape
96
131
  # { version: <String or Symbol> }
@@ -103,28 +138,10 @@ module R10K
103
138
  # DSL class, not the Puppetfile author) to do this conversion
104
139
  # itself.
105
140
  #
106
- def add_module(name, module_info)
107
- if !module_info.is_a?(Hash)
108
- module_info = { version: module_info }
109
- end
110
-
111
- module_info[:overrides] = @overrides
112
-
113
- spec_deletable = false
114
-
115
- if install_path = module_info.delete(:install_path)
116
- install_path = resolve_path(@basedir, install_path)
117
- validate_install_path(install_path, name)
118
- else
119
- install_path = @moduledir
120
- spec_deletable = true
121
- end
122
-
123
- if @default_branch_override
124
- module_info[:default_branch_override] = @default_branch_override
125
- end
141
+ def add_module(name, info)
142
+ install_path, metadata_info, spec_deletable = parse_module_definition(name, info)
126
143
 
127
- mod = R10K::Module.new(name, install_path, module_info, @environment)
144
+ mod = R10K::Module.from_metadata(name, install_path, metadata_info, @environment)
128
145
  mod.origin = :puppetfile
129
146
  mod.spec_deletable = spec_deletable
130
147
 
@@ -134,11 +151,60 @@ module R10K
134
151
  return @modules
135
152
  end
136
153
 
154
+ # If this module's metadata has a static version and that version
155
+ # matches the existing module declaration use it, otherwise create
156
+ # a regular module to sync.
157
+ unless mod.version && (mod.version == @existing_module_versions_by_name[mod.name])
158
+ mod = mod.to_implementation
159
+ end
160
+
137
161
  @modules << mod
138
162
  end
139
163
 
140
164
  private
141
165
 
166
+ def empty_load_output
167
+ {
168
+ modules: [],
169
+ managed_directories: [],
170
+ desired_contents: [],
171
+ purge_exclusions: []
172
+ }
173
+ end
174
+
175
+ def with_readable_puppetfile(puppetfile_path, &block)
176
+ if File.readable?(puppetfile_path)
177
+ block.call
178
+ else
179
+ logger.debug _("Puppetfile %{path} missing or unreadable") % {path: puppetfile_path.inspect}
180
+
181
+ empty_load_output
182
+ end
183
+ end
184
+
185
+ def parse_module_definition(name, info)
186
+ if !info.is_a?(Hash)
187
+ info = { version: info }
188
+ end
189
+
190
+ info[:overrides] = @overrides
191
+
192
+ if @default_branch_override
193
+ info[:default_branch_override] = @default_branch_override
194
+ end
195
+
196
+ spec_deletable = false
197
+ if install_path = info.delete(:install_path)
198
+ install_path = resolve_path(@basedir, install_path)
199
+ validate_install_path(install_path, name)
200
+ else
201
+ install_path = @moduledir
202
+ spec_deletable = true
203
+ end
204
+
205
+ return [ install_path, info, spec_deletable ]
206
+ end
207
+
142
208
  # @param [Array<R10K::Module>] modules
143
209
  def validate_no_duplicate_names(modules)
144
210
  dupes = modules
@@ -78,7 +78,6 @@ class Puppetfile
78
78
  basedir: @basedir,
79
79
  moduledir: @moduledir,
80
80
  puppetfile: @puppetfile,
81
- forge: @forge,
82
81
  overrides: @overrides,
83
82
  environment: @environment
84
83
  )
@@ -120,7 +119,7 @@ class Puppetfile
120
119
  @loader.default_branch_override = default_branch_override
121
120
  end
122
121
 
123
- @loaded_content = @loader.load
122
+ @loaded_content = @loader.load!
124
123
  @loaded = true
125
124
 
126
125
  @loaded_content
data/lib/r10k/settings.rb CHANGED
@@ -126,8 +126,19 @@ module R10K
126
126
  URIDefinition.new(:baseurl, {
127
127
  :desc => "The URL to the Puppet Forge to use for downloading modules."
128
128
  }),
129
+
129
130
  Definition.new(:authorization_token, {
130
131
  :desc => "The token for Puppet Forge authorization. Leave blank for unauthorized or license-based connections."
132
+ }),
133
+
134
+ Definition.new(:allow_puppetfile_override, {
135
+ :desc => "Whether to use `forge` declarations in the Puppetfile as an override of `baseurl`.",
136
+ :default => false,
137
+ :validate => lambda do |value|
138
+ unless !!value == value
139
+ raise ArgumentError, "`allow_puppetfile_override` can only be a boolean value, not '#{value}'"
140
+ end
141
+ end
131
142
  })
132
143
  ])
133
144
  end
data/lib/r10k/version.rb CHANGED
@@ -2,5 +2,5 @@ module R10K
2
2
  # When updating to a new major (X) or minor (Y) version, include `#major` or
3
3
  # `#minor` (respectively) in your commit message to trigger the appropriate
4
4
  # release. Otherwise, a new patch (Z) version will be released.
5
- VERSION = '3.11.0'
5
+ VERSION = '3.12.0'
6
6
  end
data/locales/r10k.pot CHANGED
@@ -6,11 +6,11 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: r10k 3.9.3-75-ge9bdb69\n"
9
+ "Project-Id-Version: r10k 3.9.3-110-gfe65c736\n"
10
10
  "\n"
11
11
  "Report-Msgid-Bugs-To: docs@puppetlabs.com\n"
12
- "POT-Creation-Date: 2021-08-13 23:48+0000\n"
13
- "PO-Revision-Date: 2021-08-13 23:48+0000\n"
12
+ "POT-Creation-Date: 2021-09-15 21:23+0000\n"
13
+ "PO-Revision-Date: 2021-09-15 21:23+0000\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -31,35 +31,47 @@ msgstr ""
31
31
  msgid "Reason: %{write_lock}"
32
32
  msgstr ""
33
33
 
34
- #: ../lib/r10k/action/deploy/environment.rb:113
34
+ #: ../lib/r10k/action/deploy/environment.rb:118
35
35
  msgid "Environment(s) \\'%{environments}\\' cannot be found in any source and will not be deployed."
36
36
  msgstr ""
37
37
 
38
- #: ../lib/r10k/action/deploy/environment.rb:146
38
+ #: ../lib/r10k/action/deploy/environment.rb:138
39
+ msgid "Executing postrun command."
40
+ msgstr ""
41
+
42
+ #: ../lib/r10k/action/deploy/environment.rb:152
39
43
  msgid "Environment %{env_dir} does not match environment name filter, skipping"
40
44
  msgstr ""
41
45
 
42
- #: ../lib/r10k/action/deploy/environment.rb:154
46
+ #: ../lib/r10k/action/deploy/environment.rb:160
43
47
  msgid "Deploying environment %{env_path}"
44
48
  msgstr ""
45
49
 
46
- #: ../lib/r10k/action/deploy/environment.rb:157
50
+ #: ../lib/r10k/action/deploy/environment.rb:163
47
51
  msgid "Environment %{env_dir} is now at %{env_signature}"
48
52
  msgstr ""
49
53
 
50
- #: ../lib/r10k/action/deploy/environment.rb:161
54
+ #: ../lib/r10k/action/deploy/environment.rb:167
51
55
  msgid "Environment %{env_dir} is new, updating all modules"
52
56
  msgstr ""
53
57
 
54
- #: ../lib/r10k/action/deploy/module.rb:98
58
+ #: ../lib/r10k/action/deploy/module.rb:82
59
+ msgid "Running postrun command for environments: %{envs_to_run}."
60
+ msgstr ""
61
+
62
+ #: ../lib/r10k/action/deploy/module.rb:92
63
+ msgid "No environments were modified, not executing postrun command."
64
+ msgstr ""
65
+
66
+ #: ../lib/r10k/action/deploy/module.rb:104
55
67
  msgid "Only updating modules in environment(s) %{opt_env} skipping environment %{env_path}"
56
68
  msgstr ""
57
69
 
58
- #: ../lib/r10k/action/deploy/module.rb:100
70
+ #: ../lib/r10k/action/deploy/module.rb:106
59
71
  msgid "Updating modules %{modules} in environment %{env_path}"
60
72
  msgstr ""
61
73
 
62
- #: ../lib/r10k/action/puppetfile/check.rb:16
74
+ #: ../lib/r10k/action/puppetfile/check.rb:18
63
75
  msgid "Syntax OK"
64
76
  msgstr ""
65
77
 
@@ -75,15 +87,15 @@ msgstr ""
75
87
  msgid "No config file explicitly given and no default config file could be found, default settings will be used."
76
88
  msgstr ""
77
89
 
78
- #: ../lib/r10k/content_synchronizer.rb:27
90
+ #: ../lib/r10k/content_synchronizer.rb:33
79
91
  msgid "Updating modules with %{pool_size} threads"
80
92
  msgstr ""
81
93
 
82
- #: ../lib/r10k/content_synchronizer.rb:37
94
+ #: ../lib/r10k/content_synchronizer.rb:46
83
95
  msgid "Error during concurrent deploy of a module: %{message}"
84
96
  msgstr ""
85
97
 
86
- #: ../lib/r10k/content_synchronizer.rb:75
98
+ #: ../lib/r10k/content_synchronizer.rb:87
87
99
  msgid "Module thread %{id} exiting: %{message}"
88
100
  msgstr ""
89
101
 
@@ -95,7 +107,7 @@ msgstr ""
95
107
  msgid "Unable to load sources; the supplied configuration does not define the 'sources' key"
96
108
  msgstr ""
97
109
 
98
- #: ../lib/r10k/environment/base.rb:68 ../lib/r10k/environment/base.rb:84 ../lib/r10k/environment/base.rb:93 ../lib/r10k/source/base.rb:83
110
+ #: ../lib/r10k/environment/base.rb:89 ../lib/r10k/environment/base.rb:105 ../lib/r10k/environment/base.rb:114 ../lib/r10k/source/base.rb:83
99
111
  msgid "%{class} has not implemented method %{method}"
100
112
  msgstr ""
101
113
 
@@ -103,15 +115,15 @@ msgstr ""
103
115
  msgid "Improper configuration value given for strip_component setting in %{src} source. Value must be a string, a /regex/, false, or omitted. Got \"%{val}\" (%{type})"
104
116
  msgstr ""
105
117
 
106
- #: ../lib/r10k/environment/with_modules.rb:57
118
+ #: ../lib/r10k/environment/with_modules.rb:60
107
119
  msgid "Environment and %{src} both define the \"%{name}\" module"
108
120
  msgstr ""
109
121
 
110
- #: ../lib/r10k/environment/with_modules.rb:58
122
+ #: ../lib/r10k/environment/with_modules.rb:61
111
123
  msgid "#{msg_error}. The %{src} definition will be ignored"
112
124
  msgstr ""
113
125
 
114
- #: ../lib/r10k/environment/with_modules.rb:68
126
+ #: ../lib/r10k/environment/with_modules.rb:71
115
127
  msgid "Unexpected value for `module_conflicts` setting in %{env} environment: %{val}"
116
128
  msgstr ""
117
129
 
@@ -323,31 +335,31 @@ msgstr ""
323
335
  msgid "Found local modifications in %{file_path}"
324
336
  msgstr ""
325
337
 
326
- #: ../lib/r10k/git/stateful_repository.rb:44
338
+ #: ../lib/r10k/git/stateful_repository.rb:45
327
339
  msgid "Unable to sync repo to unresolvable ref '%{ref}'"
328
340
  msgstr ""
329
341
 
330
- #: ../lib/r10k/git/stateful_repository.rb:51
342
+ #: ../lib/r10k/git/stateful_repository.rb:53
331
343
  msgid "Cloning %{repo_path} and checking out %{ref}"
332
344
  msgstr ""
333
345
 
334
- #: ../lib/r10k/git/stateful_repository.rb:54
346
+ #: ../lib/r10k/git/stateful_repository.rb:56
335
347
  msgid "Replacing %{repo_path} and checking out %{ref}"
336
348
  msgstr ""
337
349
 
338
- #: ../lib/r10k/git/stateful_repository.rb:58 ../lib/r10k/git/stateful_repository.rb:63
350
+ #: ../lib/r10k/git/stateful_repository.rb:60 ../lib/r10k/git/stateful_repository.rb:65
339
351
  msgid "Updating %{repo_path} to %{ref}"
340
352
  msgstr ""
341
353
 
342
- #: ../lib/r10k/git/stateful_repository.rb:62
354
+ #: ../lib/r10k/git/stateful_repository.rb:64
343
355
  msgid "Overwriting local modifications to %{repo_path}"
344
356
  msgstr ""
345
357
 
346
- #: ../lib/r10k/git/stateful_repository.rb:66
358
+ #: ../lib/r10k/git/stateful_repository.rb:68
347
359
  msgid "Skipping %{repo_path} due to local modifications"
348
360
  msgstr ""
349
361
 
350
- #: ../lib/r10k/git/stateful_repository.rb:69
362
+ #: ../lib/r10k/git/stateful_repository.rb:72
351
363
  msgid "%{repo_path} is already at Git ref %{ref}"
352
364
  msgstr ""
353
365
 
@@ -367,51 +379,55 @@ msgstr ""
367
379
  msgid "Invalid log level '%{val}'. Valid levels are %{log_levels}"
368
380
  msgstr ""
369
381
 
370
- #: ../lib/r10k/module.rb:29
382
+ #: ../lib/r10k/module.rb:45
371
383
  msgid "Module %{name} with args %{args} doesn't have an implementation. (Are you using the right arguments?)"
372
384
  msgstr ""
373
385
 
374
- #: ../lib/r10k/module/base.rb:80
386
+ #: ../lib/r10k/module/base.rb:83
375
387
  msgid "Spec dir for #{@title} will not be deleted because it is not in the moduledir"
376
388
  msgstr ""
377
389
 
378
- #: ../lib/r10k/module/base.rb:92
390
+ #: ../lib/r10k/module/base.rb:95
379
391
  msgid "Deleting spec data at #{spec_path}"
380
392
  msgstr ""
381
393
 
382
- #: ../lib/r10k/module/base.rb:100
394
+ #: ../lib/r10k/module/base.rb:103
383
395
  msgid "No spec dir detected at #{spec_path}, skipping deletion"
384
396
  msgstr ""
385
397
 
386
- #: ../lib/r10k/module/base.rb:112
398
+ #: ../lib/r10k/module/base.rb:116
387
399
  msgid "Deploying module to %{path}"
388
400
  msgstr ""
389
401
 
390
- #: ../lib/r10k/module/base.rb:115
402
+ #: ../lib/r10k/module/base.rb:119
391
403
  msgid "Only updating modules %{modules}, skipping module %{name}"
392
404
  msgstr ""
393
405
 
394
- #: ../lib/r10k/module/base.rb:171
406
+ #: ../lib/r10k/module/base.rb:175
395
407
  msgid "Module name (%{title}) must match either 'modulename' or 'owner/modulename'"
396
408
  msgstr ""
397
409
 
398
- #: ../lib/r10k/module/forge.rb:90
410
+ #: ../lib/r10k/module/definition.rb:28
411
+ msgid "Not updating module %{name}, assuming content unchanged"
412
+ msgstr ""
413
+
414
+ #: ../lib/r10k/module/forge.rb:98
399
415
  msgid "The module %{title} does not appear to have any published releases, cannot determine latest version."
400
416
  msgstr ""
401
417
 
402
- #: ../lib/r10k/module/forge.rb:93 ../lib/r10k/module/forge.rb:122
418
+ #: ../lib/r10k/module/forge.rb:101 ../lib/r10k/module/forge.rb:130
403
419
  msgid "The module %{title} does not exist on %{url}."
404
420
  msgstr ""
405
421
 
406
- #: ../lib/r10k/module/forge.rb:197
422
+ #: ../lib/r10k/module/forge.rb:205
407
423
  msgid "Forge module names must match 'owner/modulename', instead got #{title}"
408
424
  msgstr ""
409
425
 
410
- #: ../lib/r10k/module/git.rb:66
426
+ #: ../lib/r10k/module/git.rb:81
411
427
  msgid "Cannot track control repo branch for content '%{name}' when not part of a git-backed environment, will use default if available."
412
428
  msgstr ""
413
429
 
414
- #: ../lib/r10k/module/local.rb:35
430
+ #: ../lib/r10k/module/local.rb:33
415
431
  msgid "Module %{title} is a local module, always indicating synced."
416
432
  msgstr ""
417
433
 
@@ -419,34 +435,46 @@ msgstr ""
419
435
  msgid "Could not read metadata.json"
420
436
  msgstr ""
421
437
 
422
- #: ../lib/r10k/module_loader/puppetfile.rb:49
438
+ #: ../lib/r10k/module_loader/puppetfile.rb:58
423
439
  msgid "Using Puppetfile '%{puppetfile}'"
424
440
  msgstr ""
425
441
 
426
- #: ../lib/r10k/module_loader/puppetfile.rb:50
442
+ #: ../lib/r10k/module_loader/puppetfile.rb:59
427
443
  msgid "Using moduledir '%{moduledir}'"
428
444
  msgstr ""
429
445
 
430
- #: ../lib/r10k/module_loader/puppetfile.rb:74
446
+ #: ../lib/r10k/module_loader/puppetfile.rb:80
431
447
  msgid "Failed to evaluate %{path}"
432
448
  msgstr ""
433
449
 
434
- #: ../lib/r10k/module_loader/puppetfile.rb:149
435
- msgid "Puppetfiles cannot contain duplicate module names."
450
+ #: ../lib/r10k/module_loader/puppetfile.rb:97
451
+ msgid "Unable to preload Puppetfile because of %{msg}"
436
452
  msgstr ""
437
453
 
438
- #: ../lib/r10k/module_loader/puppetfile.rb:151
439
- msgid "Remove the duplicates of the following modules: %{dupes}"
454
+ #: ../lib/r10k/module_loader/puppetfile.rb:115
455
+ msgid "Using Forge from Puppetfile: %{forge}"
440
456
  msgstr ""
441
457
 
442
- #: ../lib/r10k/module_loader/puppetfile/dsl.rb:32
443
- msgid "unrecognized declaration '%{method}'"
458
+ #: ../lib/r10k/module_loader/puppetfile.rb:118
459
+ msgid "Ignoring Forge declaration in Puppetfile, using value from settings: %{forge}."
444
460
  msgstr ""
445
461
 
446
- #: ../lib/r10k/puppetfile.rb:105
462
+ #: ../lib/r10k/module_loader/puppetfile.rb:179 ../lib/r10k/puppetfile.rb:104
447
463
  msgid "Puppetfile %{path} missing or unreadable"
448
464
  msgstr ""
449
465
 
466
+ #: ../lib/r10k/module_loader/puppetfile.rb:215
467
+ msgid "Puppetfiles cannot contain duplicate module names."
468
+ msgstr ""
469
+
470
+ #: ../lib/r10k/module_loader/puppetfile.rb:217
471
+ msgid "Remove the duplicates of the following modules: %{dupes}"
472
+ msgstr ""
473
+
474
+ #: ../lib/r10k/module_loader/puppetfile/dsl.rb:37
475
+ msgid "unrecognized declaration '%{method}'"
476
+ msgstr ""
477
+
450
478
  #: ../lib/r10k/settings/collection.rb:77
451
479
  msgid "Validation failed for '%{name}' settings group"
452
480
  msgstr ""