clc-promote 0.4.0.dev.14 → 0.4.0.dev.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/promote/versioner.rb +6 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d39a6bb7de7331a4cff9b370f5d1fc075790e9c8
4
- data.tar.gz: d0308a8c23b9ec284577778c28d12072e632ee64
3
+ metadata.gz: 4fbec88c6ee783cfda0c4dde10e77efe5158cdd4
4
+ data.tar.gz: e409cf9cf81cd1a632e41755f355398d9e8f9d89
5
5
  SHA512:
6
- metadata.gz: 7a4752f2f6d2a809b6442e2c38d31d5b4e818e4349e3f6c4d5c2dad549c853d6935df108f73925218a62533968e49f9e3718b0cffd1bf467861927816f462fa3
7
- data.tar.gz: 7efbf9c9d5ef061f7f924628a640303fa33b1a791a2b7e0d0fbe3c7f6bd1930fb1fd1c4908afa197471a45a25e56568100de088d66cd45e1556a3ba78f98b124
6
+ metadata.gz: ae4afb75ef882b373ebd7e8614dde5bfbd9acf6544902518533ce5ea4dc469c80622b4c999733cf18b48d37007f036393f3ee81014523e5a22eb6e563a7aec24
7
+ data.tar.gz: c157119d21822944b319a74cbefdfd9aa7d4b657e8235f8a938b65e8ca1c6060f06df006f61d6b7292f60c1c354a8fa7894d15299e13829031ab73f9c5736f07
@@ -83,16 +83,12 @@ module Promote
83
83
  dependencies
84
84
  end
85
85
 
86
- def is_dirty(environment_name, cookbook_name, environment_cookbook)
87
- dependencies = environment_dependencies(environment_cookbook)
88
- cb_dependency = (dependencies.select { |dep| dep.name == cookbook_name })[0]
89
-
90
- env_file = EnvironmentFile.new(environment_name, config)
91
- if env_file.cookbook_versions.has_key?(cookbook_name)
92
- return cb_dependency.locked_version.to_s != env_file.cookbook_versions[cookbook_name]
93
- else
94
- return true
95
- end
86
+ def is_dirty(source_environment, target_environment, cookbook_name)
87
+ target_env_file = EnvironmentFile.new(target_environment, config)
88
+ return true unless target_env_file.cookbook_versions.has_key?(cookbook_name)
89
+
90
+ source_env_file = EnvironmentFile.new(source_environment, config)
91
+ return source_env_file.cookbook_versions[cookbook_name] != target_env_file.cookbook_versions[cookbook_name]
96
92
  end
97
93
 
98
94
  attr_accessor :config
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clc-promote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.dev.14
4
+ version: 0.4.0.dev.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-12 00:00:00.000000000 Z
11
+ date: 2014-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef