packethost 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/packet/client/devices.rb +22 -0
- data/lib/packet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e54b47c7216bd8556fa0215a865f9b0feacf2e9d
|
4
|
+
data.tar.gz: 41aaa27fac205a0ffeb3b426fbff1d6b55675106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ec38f6188ad1e3b3be42f556f3f7c511d22091e120a34fe45980838afd1157ba9260a26ff0ff3c9d7cd501ab002a1580ab0590ae5c3f9ac0c8906d1fe115715
|
7
|
+
data.tar.gz: 509bb18f8a4aab9c6d261b81f84ae6165439181ea0a97fc13a1579e74fbc125b8ebe0c6f96b16d56f167b785376807b1d6a9f8f7127c00ab2bc934d6215507d8
|
data/CHANGELOG.md
CHANGED
@@ -21,6 +21,22 @@ module Packet
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
def reboot_device(device)
|
25
|
+
action(device, 'reboot')
|
26
|
+
end
|
27
|
+
|
28
|
+
def rescue_device(device)
|
29
|
+
action(device, 'rescue')
|
30
|
+
end
|
31
|
+
|
32
|
+
def power_on_device(device)
|
33
|
+
action(device, 'power_on')
|
34
|
+
end
|
35
|
+
|
36
|
+
def power_off_device(device)
|
37
|
+
action(device, 'power_off')
|
38
|
+
end
|
39
|
+
|
24
40
|
def delete_device(device_or_id)
|
25
41
|
id = if device_or_id.is_a?(Packet::Device)
|
26
42
|
device_or_id.id
|
@@ -29,6 +45,12 @@ module Packet
|
|
29
45
|
end
|
30
46
|
delete("devices/#{id}")
|
31
47
|
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def action(device, action_type)
|
52
|
+
post("devices/#{device.id}/actions", type: action_type).success?
|
53
|
+
end
|
32
54
|
end
|
33
55
|
end
|
34
56
|
end
|
data/lib/packet/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packethost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Bell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-05-
|
13
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|