r10k 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTRiMTQ2ZTY4M2U0YjFkNmU0NTJjMDgzMmQxOTY0NjkxODA4ZGU5ZQ==
5
+ data.tar.gz: !binary |-
6
+ NDlmZmRjZjljZDUzMzI2YTc5ODVlMThmODY0ZTY2YjEyZTVlNGY4Zg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MWU3YTljOWYwYjljZDYzMzY3OGQyMzg2YzRmN2ZmNDM3NDM2M2E1MmI1MDA5
10
+ MmNlMTM1OGNlYTk4Y2E0NWIyNmY4MWE5Yzk4ZjE4MTQ1YWY4NDFkMWYzNGIx
11
+ YTNhOWIzZTU5YzNkYWFmYzY3OWJlMGNmN2QxOTg0NjI4ZGM3ZjM=
12
+ data.tar.gz: !binary |-
13
+ YmRmY2IyOGY0ZGVkZTFiZjVhNzY4M2U2NjdlY2U5MTMwNTliNjE0ZjAxMTIx
14
+ NDM5ZjY5ZTg2ZDlkY2I4MmI0N2RmYjA3MjQzNTJmY2Y3YWEwMTg2ZDQyZjhj
15
+ MDU2YmVlZWZjNmU1OGY1M2IxYTBiOWE3YTQzYTI0MTI0ODQ5ZmY=
data/CHANGELOG CHANGED
@@ -1,6 +1,27 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 1.1.4
5
+ -----
6
+
7
+ 2014-02-24
8
+
9
+ This is a backwards compatible bugfix release.
10
+
11
+ ### Notes
12
+
13
+ * (GH-90) Multiple environments with the same name but with different sources
14
+ were previously colliding and some environments were being ignored. This has
15
+ been fixed and all environments should be deployed when updates are run.
16
+
17
+ ### Thanks
18
+
19
+ Thanks to the following contributors for their their extraordinary patience and
20
+ help in for chasing down GH-90:
21
+
22
+ * Andreas Ntaflos (antaflos)
23
+ * Igor Galić (igalic)
24
+
4
25
  1.1.3
5
26
  -----
6
27
 
@@ -11,33 +11,40 @@ module Deployment
11
11
 
12
12
  private
13
13
 
14
- def load_environments!
15
- @environments = @deployment.environments.inject({}) do |hash, env|
16
- hash[env.dirname] = env
17
- hash
18
- end
19
- end
14
+ def active_environments(names)
20
15
 
21
- # @param [Array<String>] names The list of environments to deploy.
22
- #
23
- def with_environments(names = [], &block)
24
- load_environments!
16
+ active = []
25
17
 
26
- # If an explicit list of environments were not given, deploy everything
27
- if names.size > 0
28
- to_deploy = names
18
+ all_environments = @deployment.environments
19
+ if names.empty?
20
+ active = all_environments
29
21
  else
30
- to_deploy = @environments.keys
31
- end
22
+ # This has average case O(N^2) but N should remain relatively small, so
23
+ # while this should be optimized that optimization can wait a while.
24
+ names.each do |env_name|
25
+
26
+ matching = all_environments.select do |env|
27
+ env.dirname == env_name
28
+ end
32
29
 
33
- to_deploy.each do |env_name|
34
- if (env = @environments[env_name])
35
- yield env
36
- else
37
- logger.warn "Environment #{env_name} not found in any source"
38
- task_runner.succeeded = false
30
+ if matching.empty?
31
+ logger.warn "Environment #{env_name} not found in any source"
32
+ task_runner.succeeded = false
33
+ else
34
+ active.concat(matching)
35
+ end
39
36
  end
40
37
  end
38
+
39
+ active
40
+ end
41
+
42
+ # @param [Array<String>] names The list of environments to deploy.
43
+ #
44
+ def with_environments(names = [])
45
+ active_environments(names).each do |env|
46
+ yield env
47
+ end
41
48
  end
42
49
  end
43
50
 
@@ -1,3 +1,3 @@
1
1
  module R10K
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
5
- prerelease:
4
+ version: 1.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Adrien Thebo
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-27 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: colored
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: cri
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: systemu
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: log4r
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: json_pure
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ! '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ! '>='
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rspec
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -184,6 +171,7 @@ files:
184
171
  homepage: http://github.com/adrienthebo/r10k
185
172
  licenses:
186
173
  - Apache 2.0
174
+ metadata: {}
187
175
  post_install_message: ! 'NOTICE
188
176
 
189
177
  ======
@@ -223,22 +211,20 @@ rdoc_options: []
223
211
  require_paths:
224
212
  - lib
225
213
  required_ruby_version: !ruby/object:Gem::Requirement
226
- none: false
227
214
  requirements:
228
215
  - - ! '>='
229
216
  - !ruby/object:Gem::Version
230
217
  version: '0'
231
218
  required_rubygems_version: !ruby/object:Gem::Requirement
232
- none: false
233
219
  requirements:
234
220
  - - ! '>='
235
221
  - !ruby/object:Gem::Version
236
222
  version: '0'
237
223
  requirements: []
238
224
  rubyforge_project:
239
- rubygems_version: 1.8.23
225
+ rubygems_version: 2.2.1
240
226
  signing_key:
241
- specification_version: 3
227
+ specification_version: 4
242
228
  summary: Puppet environment and module deployment
243
229
  test_files:
244
230
  - spec/unit/registry_spec.rb