legato 0.0.8 → 0.0.9
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.
|
@@ -13,13 +13,16 @@ module Legato
|
|
|
13
13
|
self.class.default_path + "/" + id.to_s
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
attr_accessor :id, :name, :web_property_id, :user
|
|
16
|
+
attr_accessor :id, :name, :web_property_id, :user, :attributes
|
|
17
17
|
|
|
18
18
|
def initialize(attributes, user)
|
|
19
19
|
self.user = user
|
|
20
20
|
self.id = attributes['id']
|
|
21
21
|
self.name = attributes['name']
|
|
22
22
|
self.web_property_id = attributes['webPropertyId']
|
|
23
|
+
|
|
24
|
+
['id', 'name', 'webPropertyId'].each { |key| attributes.delete(key) }
|
|
25
|
+
self.attributes = attributes
|
|
23
26
|
end
|
|
24
27
|
|
|
25
28
|
def self.for_account(account)
|
data/lib/legato/version.rb
CHANGED
|
@@ -10,11 +10,14 @@ describe Legato::Management::Profile do
|
|
|
10
10
|
|
|
11
11
|
it 'creates a new profile instance from a hash of attributes' do
|
|
12
12
|
user = stub
|
|
13
|
-
profile = Legato::Management::Profile.new({"id" => 12345, "name" => "Profile 1", "webPropertyId" => "WebProperty 7"}, user)
|
|
13
|
+
profile = Legato::Management::Profile.new({"id" => 12345, "name" => "Profile 1", "webPropertyId" => "WebProperty 7", "timezone" => "America/Edmonton"}, user)
|
|
14
14
|
profile.user.should == user
|
|
15
15
|
profile.id.should == 12345
|
|
16
16
|
profile.name.should == "Profile 1"
|
|
17
17
|
profile.web_property_id.should == "WebProperty 7"
|
|
18
|
+
|
|
19
|
+
profile.attributes["timezone"].should == "America/Edmonton"
|
|
20
|
+
profile.attributes.has_key?("id").should be_false
|
|
18
21
|
end
|
|
19
22
|
|
|
20
23
|
it 'returns an array of all profiles available to a user under an account' do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: legato
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-04-
|
|
12
|
+
date: 2013-04-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -240,3 +240,4 @@ test_files:
|
|
|
240
240
|
- spec/spec_helper.rb
|
|
241
241
|
- spec/support/examples/management_finder.rb
|
|
242
242
|
- spec/support/macros/oauth.rb
|
|
243
|
+
has_rdoc:
|