Class: Tapjoy::AutoscalingBootstrap::Audit
- Inherits:
-
Object
- Object
- Tapjoy::AutoscalingBootstrap::Audit
- Defined in:
- lib/tapjoy/autoscaling_bootstrap/audit.rb
Overview
This class handles the comparison of local configs against upstream
Instance Method Summary collapse
-
#initialize(config) ⇒ Audit
constructor
A new instance of Audit.
Constructor Details
#initialize(config) ⇒ Audit
Returns a new instance of Audit.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tapjoy/autoscaling_bootstrap/audit.rb', line 5 def initialize(config) local_config = Hash(**clean_local_hash(config)) remote_launch_config = Tapjoy::AutoscalingBootstrap::AWS::Autoscaling::LaunchConfig.describe(Tapjoy::AutoscalingBootstrap.config_name).to_h remote_group_config = Tapjoy::AutoscalingBootstrap::AWS::Autoscaling::Group.describe.to_h # Combine launch config and group config into a single hash remote_config = remote_launch_config.merge!(remote_group_config) clean_remote_hash(remote_config) puts "\n\n\n" HashDiff.diff(local_config, remote_config).each do |op, key, value| puts "%s %s %-60s" % [op, key, value] end end |