packethost 0.0.5 → 0.0.6
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/device.rb +1 -1
- data/lib/packet/entity/serialization.rb +11 -1
- data/lib/packet/facility.rb +2 -0
- data/lib/packet/operating_system.rb +2 -0
- data/lib/packet/plan.rb +2 -0
- data/lib/packet/project.rb +4 -0
- data/lib/packet/ssh_key.rb +2 -0
- data/lib/packet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4af7994c743b41680d9c33fff01f92970d4dda6f
|
4
|
+
data.tar.gz: fca57312b2494d3525d941a81f6a25c49e989660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5079c86b48f40a3b392d3b0560c24faf9c2e759644140ef5dd49eb6c25bcee42f56db0edee4546af7bd70f136e7896748596a1161fab6c10b7ed39db40fb6560
|
7
|
+
data.tar.gz: 27979e3a9907f9ce8ed30b75d47b4750943bacba85ebb155dfae325e5d57241daec3c4374baa8f286acb5383d9b601e0893a17fe58d0f768779798ed9d00c597
|
data/CHANGELOG.md
CHANGED
data/lib/packet/device.rb
CHANGED
@@ -4,7 +4,7 @@ module Packet
|
|
4
4
|
class Device
|
5
5
|
include Entity
|
6
6
|
|
7
|
-
attr_accessor :hostname, :iqn, :ip_addresses, :state, :tags, :userdata
|
7
|
+
attr_accessor :hostname, :iqn, :ip_addresses, :state, :tags, :userdata, :project_id
|
8
8
|
has_one :operating_system
|
9
9
|
has_one :plan
|
10
10
|
has_one :facility
|
@@ -5,11 +5,21 @@ module Packet
|
|
5
5
|
module Serialization
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
|
+
class_methods do
|
9
|
+
def serializer_key(value)
|
10
|
+
define_method :to_value do
|
11
|
+
instance_variable_get "@#{value}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
8
16
|
def to_hash
|
9
17
|
instance_variables.reject { |ivar| [:@client].include?(ivar) }.map do |ivar|
|
10
|
-
|
18
|
+
ival = instance_variable_get(ivar)
|
19
|
+
[ivar.to_s.tr('@', ''), ival.respond_to?(:to_value) ? ival.to_value : instance_variable_get(ivar)]
|
11
20
|
end.to_h
|
12
21
|
end
|
22
|
+
|
13
23
|
alias to_h to_hash
|
14
24
|
end
|
15
25
|
end
|
data/lib/packet/facility.rb
CHANGED
data/lib/packet/plan.rb
CHANGED
data/lib/packet/project.rb
CHANGED
data/lib/packet/ssh_key.rb
CHANGED
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.6
|
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-
|
13
|
+
date: 2016-05-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
248
|
rubyforge_project:
|
249
|
-
rubygems_version: 2.
|
249
|
+
rubygems_version: 2.2.2
|
250
250
|
signing_key:
|
251
251
|
specification_version: 4
|
252
252
|
summary: Ruby client for the Packet API
|