360_services 0.0.5 → 0.0.6
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.
- data/360_services.gemspec +1 -1
- data/HOW_TO_BUILD.txt +3 -1
- data/Rakefile +1 -1
- data/lib/sorenson/services/group.rb +11 -0
- metadata +1 -1
data/360_services.gemspec
CHANGED
data/HOW_TO_BUILD.txt
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
(MAKE SURE YOU INCREMENT THE VERSION NUMBER in the Rakefile)
|
2
|
+
|
1
3
|
1. GET INTO THIS DIRECTORY
|
2
4
|
cd 360_services_gem
|
3
5
|
|
@@ -18,7 +20,7 @@ cd pkg
|
|
18
20
|
|
19
21
|
7. PUSH GEM TO GEMCUTTER (MAKE SURE GEMCUTTER GEM IS INSTALLED)
|
20
22
|
gem install gemcutter (IF NEEDED)
|
21
|
-
gem push 360_services-0.0.
|
23
|
+
gem push 360_services-0.0.5.gem (MAKE SURE YOU INCREMENTED THE VERSION NUMBER in the Rakefile!!!)
|
22
24
|
|
23
25
|
8. INSTALL THE FINISHED GEM LOCALLY
|
24
26
|
gem install 360_services
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'cucumber'
|
|
3
3
|
require 'cucumber/rake/task'
|
4
4
|
require 'echoe'
|
5
5
|
|
6
|
-
Echoe.new('360_services', '0.0.
|
6
|
+
Echoe.new('360_services', '0.0.6') do |p|
|
7
7
|
p.description = "Ruby bindings for Sorenson 360"
|
8
8
|
p.url = "http://github.com/sorenson/360_services"
|
9
9
|
p.author = "Sorenson Media"
|
@@ -3,11 +3,22 @@ module Sorenson
|
|
3
3
|
class Group < Base
|
4
4
|
attr_accessor :name, :description, :account_id, :id, :guid
|
5
5
|
|
6
|
+
def self.presets(group_id)
|
7
|
+
get_from("/groups/#{group_id}/presets")
|
8
|
+
end
|
9
|
+
|
6
10
|
def self.create(name, attributes={})
|
7
11
|
data = post_to("/groups", :group => attributes.merge(:name => name))
|
8
12
|
new(data['group'])
|
9
13
|
end
|
10
14
|
|
15
|
+
def self.update(name, attributes={})
|
16
|
+
attributes[:preset_ids] = attributes[:preset_ids].join(",")
|
17
|
+
guid = attributes.delete(:group_id)
|
18
|
+
data = put_to("/groups/#{guid}", :group => attributes.merge({:name => name, :id => guid}))
|
19
|
+
new(data['group'])
|
20
|
+
end
|
21
|
+
|
11
22
|
def self.all
|
12
23
|
collection = Base.get_from("/groups")
|
13
24
|
collection.collect { |data| new(data['group'])}
|