helium-ruby 0.15.0 → 0.16.0
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 +4 -4
- data/lib/helium/organization.rb +4 -0
- data/lib/helium/resource.rb +8 -3
- data/lib/helium/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: 0eed59513eb33f3f129f9cba51fb02fcc6bd97db
|
4
|
+
data.tar.gz: a4538235aae9daaad2fc0638aa14ffdf9e5e701d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fa1c5f2581b813d6a62402fe8949be94a9644a80f728beba923b3b2cf28efd9ca5f2de589e12d380c43dae778c77480ef5a66c628e3d70287d0d2138375e0a0
|
7
|
+
data.tar.gz: 2d5559f31298fd6c550a7d0d0a0ded5abdeb4b5295fa88cbc54543377493287cfc59aaeb6315f87e29bda9f488727c5144ace1fcea207c780ffa773f525a1ab5
|
data/lib/helium/organization.rb
CHANGED
data/lib/helium/resource.rb
CHANGED
@@ -80,12 +80,17 @@ module Helium
|
|
80
80
|
end
|
81
81
|
end # << self
|
82
82
|
|
83
|
+
# Returns a path identifying the current resource. Can be overridden
|
84
|
+
# in child classes to handle non-standard resources (e.g. Organization)
|
85
|
+
# @return [String] path to resource
|
86
|
+
def resource_path
|
87
|
+
"/#{resource_name}/#{self.id}"
|
88
|
+
end
|
89
|
+
|
83
90
|
# Updates a Resource
|
84
91
|
# @param attributes [Hash] The attributes to update
|
85
92
|
# @return [Resource] The updated resource
|
86
93
|
def update(attributes)
|
87
|
-
path = "/#{resource_name}/#{self.id}"
|
88
|
-
|
89
94
|
body = {
|
90
95
|
data: {
|
91
96
|
attributes: attributes,
|
@@ -94,7 +99,7 @@ module Helium
|
|
94
99
|
}
|
95
100
|
}
|
96
101
|
|
97
|
-
response = @client.patch(
|
102
|
+
response = @client.patch(resource_path, body: body)
|
98
103
|
resource_data = JSON.parse(response.body)["data"]
|
99
104
|
|
100
105
|
return self.class.new(client: self, params: resource_data)
|
data/lib/helium/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helium-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Allen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|