r10k 3.11.0 → 3.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docker.yml +1 -1
  3. data/.github/workflows/rspec_tests.yml +2 -2
  4. data/.travis.yml +1 -1
  5. data/CHANGELOG.mkd +34 -0
  6. data/doc/dynamic-environments/configuration.mkd +35 -7
  7. data/doc/dynamic-environments/usage.mkd +26 -0
  8. data/doc/puppetfile.mkd +16 -4
  9. data/integration/tests/basic_functionality/basic_deployment.rb +176 -0
  10. data/lib/r10k/action/base.rb +1 -1
  11. data/lib/r10k/action/deploy/deploy_helpers.rb +4 -0
  12. data/lib/r10k/action/deploy/display.rb +1 -1
  13. data/lib/r10k/action/deploy/environment.rb +13 -8
  14. data/lib/r10k/action/deploy/module.rb +14 -10
  15. data/lib/r10k/action/puppetfile/check.rb +7 -5
  16. data/lib/r10k/action/puppetfile/install.rb +22 -16
  17. data/lib/r10k/action/puppetfile/purge.rb +12 -9
  18. data/lib/r10k/action/runner.rb +6 -0
  19. data/lib/r10k/action/visitor.rb +3 -0
  20. data/lib/r10k/cli/deploy.rb +1 -0
  21. data/lib/r10k/cli/puppetfile.rb +0 -1
  22. data/lib/r10k/content_synchronizer.rb +16 -4
  23. data/lib/r10k/environment/bare.rb +4 -7
  24. data/lib/r10k/environment/base.rb +64 -11
  25. data/lib/r10k/environment/name.rb +14 -9
  26. data/lib/r10k/environment/plain.rb +16 -0
  27. data/lib/r10k/environment/tarball.rb +78 -0
  28. data/lib/r10k/environment/with_modules.rb +6 -10
  29. data/lib/r10k/environment.rb +2 -0
  30. data/lib/r10k/errors.rb +5 -0
  31. data/lib/r10k/forge/module_release.rb +2 -1
  32. data/lib/r10k/git/cache.rb +4 -13
  33. data/lib/r10k/git/rugged/base_repository.rb +12 -1
  34. data/lib/r10k/git/rugged/cache.rb +8 -0
  35. data/lib/r10k/git/stateful_repository.rb +9 -0
  36. data/lib/r10k/initializers.rb +21 -7
  37. data/lib/r10k/logging.rb +78 -1
  38. data/lib/r10k/module/base.rb +5 -1
  39. data/lib/r10k/module/definition.rb +64 -0
  40. data/lib/r10k/module/forge.rb +10 -2
  41. data/lib/r10k/module/git.rb +22 -1
  42. data/lib/r10k/module/local.rb +6 -3
  43. data/lib/r10k/module/svn.rb +10 -0
  44. data/lib/r10k/module/tarball.rb +101 -0
  45. data/lib/r10k/module.rb +21 -2
  46. data/lib/r10k/module_loader/puppetfile/dsl.rb +8 -3
  47. data/lib/r10k/module_loader/puppetfile.rb +109 -30
  48. data/lib/r10k/puppetfile.rb +1 -2
  49. data/lib/r10k/settings.rb +46 -0
  50. data/lib/r10k/source/git.rb +18 -18
  51. data/lib/r10k/source/yaml.rb +1 -1
  52. data/lib/r10k/tarball.rb +183 -0
  53. data/lib/r10k/util/cacheable.rb +31 -0
  54. data/lib/r10k/util/downloader.rb +134 -0
  55. data/lib/r10k/util/purgeable.rb +6 -2
  56. data/lib/r10k/util/setopts.rb +2 -0
  57. data/lib/r10k/util/subprocess.rb +1 -0
  58. data/lib/r10k/version.rb +1 -1
  59. data/locales/r10k.pot +119 -71
  60. data/r10k.gemspec +2 -2
  61. data/r10k.yaml.example +28 -0
  62. data/spec/fixtures/tarball/tarball.tar.gz +0 -0
  63. data/spec/fixtures/unit/action/r10k_logging.yaml +12 -0
  64. data/spec/fixtures/unit/puppetfile/forge-override/Puppetfile +8 -0
  65. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile +10 -0
  66. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile.new +10 -0
  67. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/managed_symlink_file +1 -0
  68. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/{managed_subdir_2 → subdir_allowlisted_2}/ignored_1 +0 -0
  69. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/unmanaged_symlink_dir +1 -0
  70. data/spec/fixtures/unit/util/purgeable/managed_one/managed_symlink_dir +1 -0
  71. data/spec/fixtures/unit/util/purgeable/managed_one/unmanaged_symlink_file +1 -0
  72. data/spec/integration/git/rugged/cache_spec.rb +33 -0
  73. data/spec/integration/util/purageable_spec.rb +41 -0
  74. data/spec/r10k-mocks/mock_env.rb +3 -0
  75. data/spec/r10k-mocks/mock_source.rb +7 -3
  76. data/spec/shared-contexts/tarball.rb +32 -0
  77. data/spec/spec_helper.rb +1 -0
  78. data/spec/unit/action/deploy/environment_spec.rb +80 -30
  79. data/spec/unit/action/deploy/module_spec.rb +52 -64
  80. data/spec/unit/action/puppetfile/check_spec.rb +17 -5
  81. data/spec/unit/action/puppetfile/install_spec.rb +42 -36
  82. data/spec/unit/action/puppetfile/purge_spec.rb +15 -17
  83. data/spec/unit/action/runner_spec.rb +52 -9
  84. data/spec/unit/environment/bare_spec.rb +13 -0
  85. data/spec/unit/environment/base_spec.rb +30 -17
  86. data/spec/unit/environment/git_spec.rb +2 -2
  87. data/spec/unit/environment/name_spec.rb +18 -0
  88. data/spec/unit/environment/plain_spec.rb +8 -0
  89. data/spec/unit/environment/svn_spec.rb +4 -3
  90. data/spec/unit/environment/tarball_spec.rb +45 -0
  91. data/spec/unit/environment/with_modules_spec.rb +3 -2
  92. data/spec/unit/git/cache_spec.rb +2 -15
  93. data/spec/unit/git/rugged/cache_spec.rb +19 -0
  94. data/spec/unit/module/base_spec.rb +8 -8
  95. data/spec/unit/module/forge_spec.rb +32 -4
  96. data/spec/unit/module/git_spec.rb +51 -10
  97. data/spec/unit/module/svn_spec.rb +18 -6
  98. data/spec/unit/module/tarball_spec.rb +70 -0
  99. data/spec/unit/module_loader/puppetfile_spec.rb +96 -31
  100. data/spec/unit/puppetfile_spec.rb +2 -2
  101. data/spec/unit/settings_spec.rb +25 -2
  102. data/spec/unit/tarball_spec.rb +57 -0
  103. data/spec/unit/util/cacheable_spec.rb +23 -0
  104. data/spec/unit/util/downloader_spec.rb +98 -0
  105. data/spec/unit/util/purgeable_spec.rb +22 -11
  106. metadata +44 -17
@@ -0,0 +1,134 @@
1
+ require 'digest'
2
+ require 'net/http'
3
+
4
+ module R10K
5
+ module Util
6
+
7
+ # Utility mixin for classes that need to download files
8
+ module Downloader
9
+
10
+ # Downloader objects need to checksum downloaded or saved content. The
11
+ # algorithm used to perform this checksumming (and therefore the kinds of
12
+ # checksums returned by various methods) is reported by this method.
13
+ #
14
+ # @return [Symbol] The checksum algorithm the downloader uses
15
+ def checksum_algorithm
16
+ @checksum_algorithm ||= :SHA256
17
+ end
18
+
19
+ private
20
+
21
+ # Set the checksum algorithm the downloader should use. It should be a
22
+ # symbol, and a valid Ruby 'digest' library algorithm. The default is
23
+ # :SHA256.
24
+ #
25
+ # @param algorithm [Symbol] The checksum algorithm the downloader should use
26
+ def checksum_algorithm=(algorithm)
27
+ @checksum_algorithm = algorithm
28
+ end
29
+
30
+ CHUNK_SIZE = 64 * 1024 # 64 kb
31
+
32
+ # @param src_uri [URI] The URI to download from
33
+ # @param dst_file [String] The file or path to save to
34
+ # @return [String] The downloaded file's hex digest
35
+ def download(src_uri, dst_file)
36
+ digest = Digest(checksum_algorithm).new
37
+ http_get(src_uri) do |resp|
38
+ File.open(dst_file, 'wb') do |output_stream|
39
+ resp.read_body do |chunk|
40
+ output_stream.write(chunk)
41
+ digest.update(chunk)
42
+ end
43
+ end
44
+ end
45
+
46
+ digest.hexdigest
47
+ end
48
+
49
+ # @param src_file The file or path to copy from
50
+ # @param dst_file The file or path to copy to
51
+ # @return [String] The copied file's sha256 hex digest
52
+ def copy(src_file, dst_file)
53
+ digest = Digest(checksum_algorithm).new
54
+ File.open(src_file, 'rb') do |input_stream|
55
+ File.open(dst_file, 'wb') do |output_stream|
56
+ until input_stream.eof?
57
+ chunk = input_stream.read(CHUNK_SIZE)
58
+ output_stream.write(chunk)
59
+ digest.update(chunk)
60
+ end
61
+ end
62
+ end
63
+
64
+ digest.hexdigest
65
+ end
66
+
67
+ # Start a Net::HTTP::Get connection, then yield the Net::HTTPSuccess object
68
+ # to the caller's block. Follow redirects if Net::HTTPRedirection responses
69
+ # are encountered, and use a proxy if directed.
70
+ #
71
+ # @param uri [URI] The URI to download the file from
72
+ # @param redirect_limit [Integer] How many redirects to permit before failing
73
+ # @param proxy [URI, String] The URI to use as a proxy
74
+ def http_get(uri, redirect_limit: 10, proxy: nil, &block)
75
+ raise "HTTP redirect too deep" if redirect_limit.zero?
76
+
77
+ session = Net::HTTP.new(uri.host, uri.port, *proxy_to_array(proxy))
78
+ session.use_ssl = true if uri.scheme == 'https'
79
+ session.start
80
+
81
+ begin
82
+ session.request_get(uri) do |response|
83
+ case response
84
+ when Net::HTTPRedirection
85
+ redirect = response['location']
86
+ session.finish
87
+ return http_get(URI.parse(redirect), redirect_limit: redirect_limit - 1, proxy: proxy, &block)
88
+ when Net::HTTPSuccess
89
+ yield response
90
+ else
91
+ raise "Unexpected response code #{response.code}: #{response}"
92
+ end
93
+ end
94
+ ensure
95
+ session.finish if session.active?
96
+ end
97
+ end
98
+
99
+ # Helper method to translate a proxy URI to array arguments for
100
+ # Net::HTTP#new. A nil argument returns nil array elements.
101
+ def proxy_to_array(proxy_uri)
102
+ if proxy_uri
103
+ px = proxy_uri.is_a?(URI) ? proxy_uri : URI.parse(proxy_uri)
104
+ [px.host, px.port, px.user, px.password]
105
+ else
106
+ [nil, nil, nil, nil]
107
+ end
108
+ end
109
+
110
+ # Return the sha256 digest of the file at the given path
111
+ #
112
+ # @param path [String] The path to the file
113
+ # @return [String] The file's sha256 hex digest
114
+ def file_digest(path)
115
+ File.open(path) do |file|
116
+ reader_digest(file)
117
+ end
118
+ end
119
+
120
+ # Return the sha256 digest of the readable data
121
+ #
122
+ # @param reader [String] An object that responds to #read
123
+ # @return [String] The read data's sha256 hex digest
124
+ def reader_digest(reader)
125
+ digest = Digest(checksum_algorithm).new
126
+ while chunk = reader.read(CHUNK_SIZE)
127
+ digest.update(chunk)
128
+ end
129
+
130
+ digest.hexdigest
131
+ end
132
+ end
133
+ end
134
+ end
@@ -1,3 +1,5 @@
1
+ require 'r10k/logging'
2
+
1
3
  require 'fileutils'
2
4
 
3
5
  module R10K
@@ -9,6 +11,8 @@ module R10K
9
11
  # {#desired_contents}
10
12
  module Purgeable
11
13
 
14
+ include R10K::Logging
15
+
12
16
  HIDDEN_FILE = /\.[^.]+/
13
17
 
14
18
  FN_MATCH_OPTS = File::FNM_PATHNAME | File::FNM_DOTMATCH
@@ -95,8 +99,8 @@ module R10K
95
99
  end
96
100
 
97
101
  children.flat_map do |child|
98
- if File.directory?(child) && recurse
99
- potentially_purgeable(child, exclusion_globs, allowed_globs, desireds_not_to_recurse_into, recurse)
102
+ if File.directory?(child) && !File.symlink?(child) && recurse
103
+ potentially_purgeable(child, exclusion_globs, allowed_globs, desireds_not_to_recurse_into, recurse) << child.to_s
100
104
  else
101
105
  child.to_s
102
106
  end
@@ -1,3 +1,5 @@
1
+ require 'r10k/logging'
2
+
1
3
  module R10K
2
4
  module Util
3
5
 
@@ -1,3 +1,4 @@
1
+ require 'r10k/logging'
1
2
  require 'r10k/util/platform'
2
3
 
3
4
  module R10K
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.14.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-170-g8cb36435\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-11-16 21:43+0000\n"
13
+ "PO-Revision-Date: 2021-11-16 21:43+0000\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -19,71 +19,83 @@ msgstr ""
19
19
  "Content-Transfer-Encoding: 8bit\n"
20
20
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
21
21
 
22
- #: ../lib/r10k/action/deploy/deploy_helpers.rb:12 ../lib/r10k/settings/loader.rb:63
22
+ #: ../lib/r10k/action/deploy/deploy_helpers.rb:16 ../lib/r10k/settings/loader.rb:63
23
23
  msgid "No configuration file given, no config file found in current directory, and no global config present"
24
24
  msgstr ""
25
25
 
26
- #: ../lib/r10k/action/deploy/deploy_helpers.rb:26
26
+ #: ../lib/r10k/action/deploy/deploy_helpers.rb:30
27
27
  msgid "Making changes to deployed environments has been administratively disabled."
28
28
  msgstr ""
29
29
 
30
- #: ../lib/r10k/action/deploy/deploy_helpers.rb:27
30
+ #: ../lib/r10k/action/deploy/deploy_helpers.rb:31
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:116
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:136
39
+ msgid "Executing postrun command."
40
+ msgstr ""
41
+
42
+ #: ../lib/r10k/action/deploy/environment.rb:150
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:158
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:161
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:165
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:81
59
+ msgid "Running postrun command for environments: %{envs_to_run}."
60
+ msgstr ""
61
+
62
+ #: ../lib/r10k/action/deploy/module.rb:91
63
+ msgid "No environments were modified, not executing postrun command."
64
+ msgstr ""
65
+
66
+ #: ../lib/r10k/action/deploy/module.rb:103
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:105
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
 
66
- #: ../lib/r10k/action/runner.rb:57 ../lib/r10k/deployment/config.rb:42
78
+ #: ../lib/r10k/action/runner.rb:63 ../lib/r10k/deployment/config.rb:42
67
79
  msgid "Overriding config file setting '%{key}': '%{old_val}' -> '%{new_val}'"
68
80
  msgstr ""
69
81
 
70
- #: ../lib/r10k/action/runner.rb:99
82
+ #: ../lib/r10k/action/runner.rb:105
71
83
  msgid "Reading configuration from %{config_path}"
72
84
  msgstr ""
73
85
 
74
- #: ../lib/r10k/action/runner.rb:102
86
+ #: ../lib/r10k/action/runner.rb:108
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,11 @@ 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/bare.rb:6
111
+ msgid "\"bare\" environment type is deprecated; please use \"plain\" instead (environment: %{name})"
112
+ msgstr ""
113
+
114
+ #: ../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
115
  msgid "%{class} has not implemented method %{method}"
100
116
  msgstr ""
101
117
 
@@ -103,15 +119,15 @@ msgstr ""
103
119
  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
120
  msgstr ""
105
121
 
106
- #: ../lib/r10k/environment/with_modules.rb:57
122
+ #: ../lib/r10k/environment/with_modules.rb:60
107
123
  msgid "Environment and %{src} both define the \"%{name}\" module"
108
124
  msgstr ""
109
125
 
110
- #: ../lib/r10k/environment/with_modules.rb:58
126
+ #: ../lib/r10k/environment/with_modules.rb:61
111
127
  msgid "#{msg_error}. The %{src} definition will be ignored"
112
128
  msgstr ""
113
129
 
114
- #: ../lib/r10k/environment/with_modules.rb:68
130
+ #: ../lib/r10k/environment/with_modules.rb:71
115
131
  msgid "Unexpected value for `module_conflicts` setting in %{env} environment: %{val}"
116
132
  msgstr ""
117
133
 
@@ -139,19 +155,19 @@ msgstr ""
139
155
  msgid "Proc %{block} for feature %{name} returned %{output}"
140
156
  msgstr ""
141
157
 
142
- #: ../lib/r10k/forge/module_release.rb:196
158
+ #: ../lib/r10k/forge/module_release.rb:197
143
159
  msgid "Unpacking %{tarball_cache_path} to %{target_dir} (with tmpdir %{tmp_path})"
144
160
  msgstr ""
145
161
 
146
- #: ../lib/r10k/forge/module_release.rb:198
162
+ #: ../lib/r10k/forge/module_release.rb:199
147
163
  msgid "Valid files unpacked: %{valid_files}"
148
164
  msgstr ""
149
165
 
150
- #: ../lib/r10k/forge/module_release.rb:200
166
+ #: ../lib/r10k/forge/module_release.rb:201
151
167
  msgid "These files existed in the module's tar file, but are invalid filetypes and were not unpacked: %{invalid_files}"
152
168
  msgstr ""
153
169
 
154
- #: ../lib/r10k/forge/module_release.rb:203
170
+ #: ../lib/r10k/forge/module_release.rb:204
155
171
  msgid "Symlinks are unsupported and were not unpacked from the module tarball. %{release_slug} contained these ignored symlinks: %{symlinks}"
156
172
  msgstr ""
157
173
 
@@ -187,11 +203,11 @@ msgstr ""
187
203
  msgid "Cannot write %{file}; parent directory does not exist"
188
204
  msgstr ""
189
205
 
190
- #: ../lib/r10k/git/cache.rb:65
206
+ #: ../lib/r10k/git/cache.rb:57
191
207
  msgid "%{class}#path is deprecated; use #git_dir"
192
208
  msgstr ""
193
209
 
194
- #: ../lib/r10k/git/cache.rb:94
210
+ #: ../lib/r10k/git/cache.rb:86
195
211
  msgid "Creating new git cache for %{remote}"
196
212
  msgstr ""
197
213
 
@@ -207,6 +223,14 @@ msgstr ""
207
223
  msgid "Rugged versions prior to 0.24.0 do not support pruning stale branches during fetch, please upgrade your \\'rugged\\' gem. (Current version is: %{version})"
208
224
  msgstr ""
209
225
 
226
+ #: ../lib/r10k/git/rugged/base_repository.rb:24
227
+ msgid "Unable to resolve %{pattern}: %{e} "
228
+ msgstr ""
229
+
230
+ #: ../lib/r10k/git/rugged/base_repository.rb:69
231
+ msgid "Remote URL is different from cache, updating %{orig} to %{update}"
232
+ msgstr ""
233
+
210
234
  #: ../lib/r10k/git/rugged/credentials.rb:28
211
235
  msgid "Authentication failed for Git remote %{url}."
212
236
  msgstr ""
@@ -323,35 +347,35 @@ msgstr ""
323
347
  msgid "Found local modifications in %{file_path}"
324
348
  msgstr ""
325
349
 
326
- #: ../lib/r10k/git/stateful_repository.rb:44
350
+ #: ../lib/r10k/git/stateful_repository.rb:45
327
351
  msgid "Unable to sync repo to unresolvable ref '%{ref}'"
328
352
  msgstr ""
329
353
 
330
- #: ../lib/r10k/git/stateful_repository.rb:51
354
+ #: ../lib/r10k/git/stateful_repository.rb:53
331
355
  msgid "Cloning %{repo_path} and checking out %{ref}"
332
356
  msgstr ""
333
357
 
334
- #: ../lib/r10k/git/stateful_repository.rb:54
358
+ #: ../lib/r10k/git/stateful_repository.rb:56
335
359
  msgid "Replacing %{repo_path} and checking out %{ref}"
336
360
  msgstr ""
337
361
 
338
- #: ../lib/r10k/git/stateful_repository.rb:58 ../lib/r10k/git/stateful_repository.rb:63
362
+ #: ../lib/r10k/git/stateful_repository.rb:60 ../lib/r10k/git/stateful_repository.rb:65
339
363
  msgid "Updating %{repo_path} to %{ref}"
340
364
  msgstr ""
341
365
 
342
- #: ../lib/r10k/git/stateful_repository.rb:62
366
+ #: ../lib/r10k/git/stateful_repository.rb:64
343
367
  msgid "Overwriting local modifications to %{repo_path}"
344
368
  msgstr ""
345
369
 
346
- #: ../lib/r10k/git/stateful_repository.rb:66
370
+ #: ../lib/r10k/git/stateful_repository.rb:68
347
371
  msgid "Skipping %{repo_path} due to local modifications"
348
372
  msgstr ""
349
373
 
350
- #: ../lib/r10k/git/stateful_repository.rb:69
374
+ #: ../lib/r10k/git/stateful_repository.rb:72
351
375
  msgid "%{repo_path} is already at Git ref %{ref}"
352
376
  msgstr ""
353
377
 
354
- #: ../lib/r10k/initializers.rb:30
378
+ #: ../lib/r10k/initializers.rb:31
355
379
  msgid "the purgedirs key in r10k.yaml is deprecated. it is currently ignored."
356
380
  msgstr ""
357
381
 
@@ -363,55 +387,59 @@ msgstr ""
363
387
  msgid "No class registered for %{key}"
364
388
  msgstr ""
365
389
 
366
- #: ../lib/r10k/logging.rb:60
390
+ #: ../lib/r10k/logging.rb:73 ../lib/r10k/logging.rb:100 ../lib/r10k/logging.rb:109
367
391
  msgid "Invalid log level '%{val}'. Valid levels are %{log_levels}"
368
392
  msgstr ""
369
393
 
370
- #: ../lib/r10k/module.rb:29
394
+ #: ../lib/r10k/module.rb:45
371
395
  msgid "Module %{name} with args %{args} doesn't have an implementation. (Are you using the right arguments?)"
372
396
  msgstr ""
373
397
 
374
- #: ../lib/r10k/module/base.rb:80
398
+ #: ../lib/r10k/module/base.rb:83
375
399
  msgid "Spec dir for #{@title} will not be deleted because it is not in the moduledir"
376
400
  msgstr ""
377
401
 
378
- #: ../lib/r10k/module/base.rb:92
402
+ #: ../lib/r10k/module/base.rb:95
379
403
  msgid "Deleting spec data at #{spec_path}"
380
404
  msgstr ""
381
405
 
382
- #: ../lib/r10k/module/base.rb:100
406
+ #: ../lib/r10k/module/base.rb:103
383
407
  msgid "No spec dir detected at #{spec_path}, skipping deletion"
384
408
  msgstr ""
385
409
 
386
- #: ../lib/r10k/module/base.rb:112
410
+ #: ../lib/r10k/module/base.rb:116
387
411
  msgid "Deploying module to %{path}"
388
412
  msgstr ""
389
413
 
390
- #: ../lib/r10k/module/base.rb:115
414
+ #: ../lib/r10k/module/base.rb:119
391
415
  msgid "Only updating modules %{modules}, skipping module %{name}"
392
416
  msgstr ""
393
417
 
394
- #: ../lib/r10k/module/base.rb:171
418
+ #: ../lib/r10k/module/base.rb:175
395
419
  msgid "Module name (%{title}) must match either 'modulename' or 'owner/modulename'"
396
420
  msgstr ""
397
421
 
398
- #: ../lib/r10k/module/forge.rb:90
422
+ #: ../lib/r10k/module/definition.rb:28
423
+ msgid "Not updating module %{name}, assuming content unchanged"
424
+ msgstr ""
425
+
426
+ #: ../lib/r10k/module/forge.rb:98
399
427
  msgid "The module %{title} does not appear to have any published releases, cannot determine latest version."
400
428
  msgstr ""
401
429
 
402
- #: ../lib/r10k/module/forge.rb:93 ../lib/r10k/module/forge.rb:122
430
+ #: ../lib/r10k/module/forge.rb:101 ../lib/r10k/module/forge.rb:130
403
431
  msgid "The module %{title} does not exist on %{url}."
404
432
  msgstr ""
405
433
 
406
- #: ../lib/r10k/module/forge.rb:197
434
+ #: ../lib/r10k/module/forge.rb:205
407
435
  msgid "Forge module names must match 'owner/modulename', instead got #{title}"
408
436
  msgstr ""
409
437
 
410
- #: ../lib/r10k/module/git.rb:66
438
+ #: ../lib/r10k/module/git.rb:81
411
439
  msgid "Cannot track control repo branch for content '%{name}' when not part of a git-backed environment, will use default if available."
412
440
  msgstr ""
413
441
 
414
- #: ../lib/r10k/module/local.rb:35
442
+ #: ../lib/r10k/module/local.rb:37
415
443
  msgid "Module %{title} is a local module, always indicating synced."
416
444
  msgstr ""
417
445
 
@@ -419,34 +447,50 @@ msgstr ""
419
447
  msgid "Could not read metadata.json"
420
448
  msgstr ""
421
449
 
422
- #: ../lib/r10k/module_loader/puppetfile.rb:49
450
+ #: ../lib/r10k/module_loader/puppetfile.rb:64
423
451
  msgid "Using Puppetfile '%{puppetfile}'"
424
452
  msgstr ""
425
453
 
426
- #: ../lib/r10k/module_loader/puppetfile.rb:50
454
+ #: ../lib/r10k/module_loader/puppetfile.rb:65
427
455
  msgid "Using moduledir '%{moduledir}'"
428
456
  msgstr ""
429
457
 
430
- #: ../lib/r10k/module_loader/puppetfile.rb:74
458
+ #: ../lib/r10k/module_loader/puppetfile.rb:86
431
459
  msgid "Failed to evaluate %{path}"
432
460
  msgstr ""
433
461
 
434
- #: ../lib/r10k/module_loader/puppetfile.rb:149
435
- msgid "Puppetfiles cannot contain duplicate module names."
462
+ #: ../lib/r10k/module_loader/puppetfile.rb:103
463
+ msgid "Unable to preload Puppetfile because of %{msg}"
436
464
  msgstr ""
437
465
 
438
- #: ../lib/r10k/module_loader/puppetfile.rb:151
439
- msgid "Remove the duplicates of the following modules: %{dupes}"
466
+ #: ../lib/r10k/module_loader/puppetfile.rb:121
467
+ msgid "Using Forge from Puppetfile: %{forge}"
440
468
  msgstr ""
441
469
 
442
- #: ../lib/r10k/module_loader/puppetfile/dsl.rb:32
443
- msgid "unrecognized declaration '%{method}'"
470
+ #: ../lib/r10k/module_loader/puppetfile.rb:124
471
+ msgid "Ignoring Forge declaration in Puppetfile, using value from settings: %{forge}."
472
+ msgstr ""
473
+
474
+ #: ../lib/r10k/module_loader/puppetfile.rb:173
475
+ msgid "\"basedir\" is deprecated. Please use \"environment_name\" instead. \"basedir\" will be removed in a future version."
444
476
  msgstr ""
445
477
 
446
- #: ../lib/r10k/puppetfile.rb:105
478
+ #: ../lib/r10k/module_loader/puppetfile.rb:192 ../lib/r10k/puppetfile.rb:104
447
479
  msgid "Puppetfile %{path} missing or unreadable"
448
480
  msgstr ""
449
481
 
482
+ #: ../lib/r10k/module_loader/puppetfile.rb:228
483
+ msgid "Puppetfiles cannot contain duplicate module names."
484
+ msgstr ""
485
+
486
+ #: ../lib/r10k/module_loader/puppetfile.rb:230
487
+ msgid "Remove the duplicates of the following modules: %{dupes}"
488
+ msgstr ""
489
+
490
+ #: ../lib/r10k/module_loader/puppetfile/dsl.rb:37
491
+ msgid "unrecognized declaration '%{method}'"
492
+ msgstr ""
493
+
450
494
  #: ../lib/r10k/settings/collection.rb:77
451
495
  msgid "Validation failed for '%{name}' settings group"
452
496
  msgstr ""
@@ -570,6 +614,10 @@ msgstr ""
570
614
  msgid "Both username and password must be specified"
571
615
  msgstr ""
572
616
 
617
+ #: ../lib/r10k/tarball.rb:167
618
+ msgid "Cache not present at %{path}"
619
+ msgstr ""
620
+
573
621
  #: ../lib/r10k/util/basedir.rb:34
574
622
  msgid "Expected Array<#desired_contents>, got R10K::Deployment"
575
623
  msgstr ""
@@ -590,45 +638,45 @@ msgstr ""
590
638
  msgid "pe_license feature is not available, PE only Puppet modules will not be downloadable."
591
639
  msgstr ""
592
640
 
593
- #: ../lib/r10k/util/purgeable.rb:87
641
+ #: ../lib/r10k/util/purgeable.rb:91
594
642
  msgid "Not purging %{path} due to internal exclusion match: %{exclusion_match}"
595
643
  msgstr ""
596
644
 
597
- #: ../lib/r10k/util/purgeable.rb:89
645
+ #: ../lib/r10k/util/purgeable.rb:93
598
646
  msgid "Not purging %{path} due to whitelist match: %{allowlist_match}"
599
647
  msgstr ""
600
648
 
601
- #: ../lib/r10k/util/purgeable.rb:133
649
+ #: ../lib/r10k/util/purgeable.rb:137
602
650
  msgid "No unmanaged contents in %{managed_dirs}, nothing to purge"
603
651
  msgstr ""
604
652
 
605
- #: ../lib/r10k/util/purgeable.rb:138
653
+ #: ../lib/r10k/util/purgeable.rb:142
606
654
  msgid "Removing unmanaged path %{path}"
607
655
  msgstr ""
608
656
 
609
- #: ../lib/r10k/util/purgeable.rb:143
657
+ #: ../lib/r10k/util/purgeable.rb:147
610
658
  msgid "Unable to remove unmanaged path: %{path}"
611
659
  msgstr ""
612
660
 
613
- #: ../lib/r10k/util/setopts.rb:58
661
+ #: ../lib/r10k/util/setopts.rb:60
614
662
  msgid "%{class_name} parameters '%{a}' and '%{b}' conflict. Specify one or the other, but not both"
615
663
  msgstr ""
616
664
 
617
- #: ../lib/r10k/util/setopts.rb:65
665
+ #: ../lib/r10k/util/setopts.rb:67
618
666
  msgid "%{class_name} cannot handle option '%{key}'"
619
667
  msgstr ""
620
668
 
621
- #: ../lib/r10k/util/subprocess.rb:69
669
+ #: ../lib/r10k/util/subprocess.rb:70
622
670
  msgid "Starting process: %{args}"
623
671
  msgstr ""
624
672
 
625
- #: ../lib/r10k/util/subprocess.rb:74
673
+ #: ../lib/r10k/util/subprocess.rb:75
626
674
  msgid ""
627
675
  "Finished process:\n"
628
676
  "%{result}"
629
677
  msgstr ""
630
678
 
631
- #: ../lib/r10k/util/subprocess.rb:77
679
+ #: ../lib/r10k/util/subprocess.rb:78
632
680
  msgid "Command exited with non-zero exit code"
633
681
  msgstr ""
634
682
 
data/r10k.gemspec CHANGED
@@ -32,18 +32,18 @@ Gem::Specification.new do |s|
32
32
 
33
33
  s.add_dependency 'gettext-setup', '~>0.24'
34
34
  # These two pins narrow what is allowed by gettext-setup,
35
- # to preserver compatability with Ruby 2.4
35
+ # to preserve compatability with Ruby 2.4
36
36
  s.add_dependency 'fast_gettext', '~> 1.1.0'
37
37
  s.add_dependency 'gettext', ['>= 3.0.2', '< 3.3.0']
38
38
 
39
39
  s.add_dependency 'jwt', '~> 2.2.3'
40
+ s.add_dependency 'minitar', '~> 0.9.0'
40
41
 
41
42
  s.add_development_dependency 'rspec', '~> 3.1'
42
43
 
43
44
  s.add_development_dependency 'rake'
44
45
 
45
46
  s.add_development_dependency 'yard', '~> 0.9.11'
46
- s.add_development_dependency 'minitar', '~> 0.9.0'
47
47
 
48
48
  s.files = %x[git ls-files].split($/)
49
49
  s.require_path = 'lib'