quill-api-client 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,7 +76,11 @@ class Quill::BaseModel
76
76
  # load user defined attributes. This is arbitrary data that the app
77
77
  # has stored for this record.
78
78
  self.class.attributes.each do |attr|
79
- attrs[attr] = YAML.load(object.data[attr]) if object.data[attr].present?
79
+ begin
80
+ attrs[attr] = YAML.load(object.data[attr]) if object.data[attr].present?
81
+ rescue Psych::SyntaxError
82
+ attrs[attr] = object.data[attr]
83
+ end
80
84
  end
81
85
 
82
86
  @data.reverse_merge!(attrs)
@@ -1,13 +1,17 @@
1
1
  module Quill
2
2
  module EndpointDefinitions
3
-
3
+
4
4
  def activities
5
- Client::Endpoint.new(self, "activities", {"attributes"=>{"data"=>{}, "name"=>nil, "description"=>nil}, "readonly_attributes"=>{"cid"=>nil}})
5
+ Client::Endpoint.new(self, "activities", {"attributes"=>{"data"=>{}, "name"=>nil, "description"=>nil}, "access"=>{"list"=>["all"], "read"=>["all"], "update"=>["owner", "admin"], "create"=>["admin"], "destroy"=>["owner", "admin"]}})
6
6
  end
7
-
7
+
8
8
  def activity_sessions
9
- Client::Endpoint.new(self, "activity_sessions", {"attributes"=>{"percentage"=>nil, "time_spent"=>nil, "state"=>nil, "completed_at"=>nil, "data"=>{}, "temporary"=>nil, "activity_uid"=>nil}, "readonly_attributes"=>{"anonymous"=>nil}})
9
+ Client::Endpoint.new(self, "activity_sessions", {"attributes"=>{"percentage"=>nil, "time_spent"=>nil, "state"=>nil, "completed_at"=>nil, "data"=>{}, "temporary"=>nil, "activity_uid"=>nil}, "readonly_attributes"=>{"anonymous"=>nil}, "access"=>{"list"=>["all"], "read"=>["all"], "update"=>["owner", "admin"], "create"=>["all"], "destroy"=>["owner", "admin"]}})
10
10
  end
11
-
11
+
12
+ def me
13
+ Client::Endpoint.new(self, "me", {"attributes"=>{"role"=>nil}, "options"=>{"singular"=>true}, "access"=>nil})
14
+ end
15
+
12
16
  end
13
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quill-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-10 00:00:00.000000000 Z
12
+ date: 2014-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2
16
- requirement: &70291084941520 !ruby/object:Gem::Requirement
16
+ requirement: &70250683214320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>'
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70291084941520
24
+ version_requirements: *70250683214320
25
25
  description: Wrapper to Quill API
26
26
  email: quinn@tastehoneyco.com
27
27
  executables: []
@@ -37,7 +37,7 @@ files:
37
37
  - lib/quill/oauth.rb
38
38
  - lib/quill-api-client.rb
39
39
  - lib/quill.rb
40
- homepage: https://github.com/empirical/quill-platform
40
+ homepage: https://github.com/empirical-org/quill-platform
41
41
  licenses: []
42
42
  post_install_message:
43
43
  rdoc_options: []