itamae 1.1.4 → 1.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e17e5ca4eb90605e7660c10bab7152f1b1c40fae
4
- data.tar.gz: 9ba2677697b9610862c323834f028661b67a30ed
3
+ metadata.gz: b6ccc990f309bf5b3c26f88b954efe855cb4ba76
4
+ data.tar.gz: 4893d034791a81b09e8e700351d133d1c5b85a9a
5
5
  SHA512:
6
- metadata.gz: bcea99f0bc34f4d530c8814cd2ca303f01cdb6e674fb523c4588149396263d8d4022ef825456e4713e7b8be16a1860ac6fd5f3a5a083e9a793cece558c13e884
7
- data.tar.gz: d27ecf655f55ad1ee201cbe87213e6197aa19de9d3ba27013456bb0b32ef12b94b9db69d2364d4396b9367d259d3b0c39647262a89e25949b529c98c7260563a
6
+ metadata.gz: 7ccc76eb4868ff6033695faed5c6ebf0362b4cdc26a1c09d1c87138840f13c430cbc8e054fa24c50ad9bf80073a045d6c5391cf7a27d789c5e1c1029470e2658
7
+ data.tar.gz: a404d77ea0fe586ebb8071f3748ffad10283f8a9df79fdd94ba143c70df08c65e5a651134b7dae56fe42a7dbc03bd6e6641c7fe55c8b39cd81d39702e7593bb3
@@ -90,7 +90,7 @@ module Itamae
90
90
  attr_reader :updated
91
91
 
92
92
  def initialize(recipe, resource_name, &block)
93
- @current_attributes = Hashie::Mash.new
93
+ clear_current_attributes
94
94
  @recipe = recipe
95
95
  @resource_name = resource_name
96
96
  @updated = false
@@ -123,8 +123,6 @@ module Itamae
123
123
  run_action(action, options)
124
124
  end
125
125
 
126
- updated! if different?
127
-
128
126
  notify(options) if updated?
129
127
  end
130
128
  rescue Backend::CommandExecutionError
@@ -155,6 +153,8 @@ module Itamae
155
153
  def run_action(action, options)
156
154
  @current_action = action
157
155
 
156
+ clear_current_attributes
157
+
158
158
  Logger.info "action: #{action}"
159
159
 
160
160
  return if action == :nothing
@@ -172,11 +172,17 @@ module Itamae
172
172
  unless options[:dry_run]
173
173
  public_send("action_#{action}".to_sym, options)
174
174
  end
175
+
176
+ updated! if different?
175
177
  end
176
178
 
177
179
  @current_action = nil
178
180
  end
179
181
 
182
+ def clear_current_attributes
183
+ @current_attributes = Hashie::Mash.new
184
+ end
185
+
180
186
  def pre_action
181
187
  # do nothing
182
188
  end
@@ -1 +1 @@
1
- 1.1.4
1
+ 1.1.5
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor