ey-core 3.2.5 → 3.2.6

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: d0f3833d05cac75ec11d7fe518652eb51ea835aa
4
- data.tar.gz: 5ad5a49994ddcedc0f6ca9ad50d8640e0d6dbedc
3
+ metadata.gz: 86743788ba30d4b49ebd3fb3a78dfe948cd45118
4
+ data.tar.gz: 09c133f4592f7a8d3d0f724d7df6722308dd1d28
5
5
  SHA512:
6
- metadata.gz: 21953fe50f30dcd32c333ca2af941e6daa9dd357bb8a660b51335a2344aa55106a91df8424e83edd6ac262861328558e29b14f863d5b01fb0837fb27dd9428cc
7
- data.tar.gz: 889858ed3b518c9957135562f7c0d567930f2d882b511919a15f69f9b2b0ca0aebf6570b5afff316f06ff2cbea634f2fefbb12d57a5becdb5eb5f27357465f0d
6
+ metadata.gz: 49882dd05a18313f82f66da5c1064b1601c1cb6b7a6248d558fa87be81f128243a9b008293f2395c7d2389f686c4acbe30989dd4e56cc1520837a9b186e5656e
7
+ data.tar.gz: b83cf5cdb1bb7b71380403f019bbc61ae48af70de174d129a13044974cf94814b0b0c320471599dff90a478adbdae4e74539466e968adc2f7e6e0b862e236242
@@ -131,15 +131,19 @@ class Ey::Core::Client::Server < Ey::Core::Model
131
131
  end
132
132
  end
133
133
 
134
- def destroy!
134
+ def destroy!(skip_snapshot="false")
135
135
  if environment.servers.count == 1
136
136
  raise Ey::Core::Client::NotPermitted, "Terminating the last server in an environment is not allowed. You must deprovision or destroy the environment instead."
137
137
  end
138
138
 
139
139
  requires :identity
140
140
 
141
+ params = {
142
+ :skip_snapshot => skip_snapshot
143
+ }
144
+
141
145
  connection.requests.new(
142
- self.connection.destroy_server(self.identity).body["request"]
146
+ self.connection.destroy_server(self.identity, params).body["request"]
143
147
  )
144
148
  end
145
149
  end
@@ -1,15 +1,17 @@
1
1
  class Ey::Core::Client
2
2
  class Real
3
- def destroy_server(id)
3
+ def destroy_server(id,options={})
4
+
4
5
  request(
5
6
  :method => :delete,
6
- :path => "/servers/#{id}"
7
+ :path => "/servers/#{id}",
8
+ :query => options
7
9
  )
8
10
  end
9
11
  end
10
12
 
11
13
  class Mock
12
- def destroy_server(id)
14
+ def destroy_server(id,options={})
13
15
  deprovision_procedure = lambda do |_|
14
16
  server = self.data[:servers][id]
15
17
 
@@ -1,5 +1,5 @@
1
1
  module Ey
2
2
  module Core
3
- VERSION = "3.2.5"
3
+ VERSION = "3.2.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable