mikoshi 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66bb151aeed8702ad507aa84126eff3bda7fbf90
4
- data.tar.gz: 8085cc9bf14cc57ad151282ac13b5d35785be054
3
+ metadata.gz: a78590a8807358c4ba28fae1dc1368ad7abc5738
4
+ data.tar.gz: e621c2727414da2e6068c2655bb9c5dc35a9e927
5
5
  SHA512:
6
- metadata.gz: 6817c50c328ae791ead793aea49a4bab1972166cff09c07fe88b7166378e2c35bf9fa2ed9f435f9a0115794007254ec1a97100b94e8083cc0eed5c96ce58c4bf
7
- data.tar.gz: 9f3278475c0c6d9e05450aabfdc93ece6b57a10d9397de67e56cb557f1cb9a9018706dcf266bf5528b177c6f436fd98bac5fd01313f09cf8bd24e1c8b1ab25c7
6
+ metadata.gz: 408dfd6af42bab61164d4d593162880bcfc946b08585867cfda89599a0fb27ab397d374726228f059259f3d9c2c6dccb8041fb2ad5fb5b7821b9ecf63ddce288
7
+ data.tar.gz: c08270d8c4c0a5a25e36195321bb50850a35afc6e2e9076c518502f33a6e232fa5782b60a1fa4a396fb9ff975715a3e11c29ec5c1ff9a493803d5ed6b9ac9287
data/lib/mikoshi/plan.rb CHANGED
@@ -5,6 +5,8 @@ require 'erb'
5
5
  require 'yaml'
6
6
 
7
7
  module Mikoshi
8
+ HookExecutionError = Class.new(StandardError)
9
+
8
10
  class Plan
9
11
  class Base
10
12
  attr_reader :data, :client
@@ -19,7 +21,7 @@ module Mikoshi
19
21
 
20
22
  def invoke_hooks(hooks)
21
23
  hooks.each do |hook|
22
- system hook
24
+ raise(HookExecutionError, hook) unless system(hook)
23
25
  end
24
26
  end
25
27
  end
@@ -27,7 +27,7 @@ module Mikoshi
27
27
  def update_service
28
28
  invoke_before_update_hooks
29
29
 
30
- @client.update_service(@data[:service].except(:service_name))
30
+ @client.update_service(@data[:service].except(:service_name, :placement_strategy, :placement_constraints))
31
31
  end
32
32
 
33
33
  def deploy_service(message: false)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mikoshi
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mikoshi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2017-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport