quill-api-client 0.1.4 → 0.1.5

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.
@@ -7,7 +7,7 @@ module Quill
7
7
  autoload :Client, 'quill/client'
8
8
  autoload :Configuration, 'quill/configuration'
9
9
  autoload :EndpointDefinitions, 'quill/endpoint_definitions'
10
- autoload :Oauth, 'quill/oauth'
10
+ autoload :Oauth, 'quill/oauth'
11
11
 
12
12
  Configuration.namespace :quill
13
13
  Configuration.keys :api_url, :client_id, :client_secret, :access_token, :site_url
@@ -77,7 +77,11 @@ class Quill::BaseModel
77
77
  # has stored for this record.
78
78
  self.class.attributes.each do |attr|
79
79
  begin
80
- attrs[attr] = YAML.load(object.data[attr]) if object.data[attr].present?
80
+ if object.data[attr].to_s[0..2] == '---'
81
+ attrs[attr] = YAML.load(object.data[attr])
82
+ else
83
+ attrs[attr] = object.data[attr]
84
+ end
81
85
  rescue Psych::SyntaxError
82
86
  attrs[attr] = object.data[attr]
83
87
  end
@@ -2,11 +2,11 @@ module Quill
2
2
  module EndpointDefinitions
3
3
 
4
4
  def activities
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"]}})
5
+ Client::Endpoint.new(self, "activities", {"attributes"=>{"data"=>{}, "name"=>nil, "description"=>nil}, "access"=>{"list"=>["all"], "read"=>["all"], "update"=>["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, "anonymous"=>nil}, "access"=>{"list"=>["all"], "read"=>["all"], "update"=>["owner", "admin"], "create"=>["all"], "destroy"=>["owner", "admin"]}})
9
+ Client::Endpoint.new(self, "activity_sessions", {"attributes"=>{"percentage"=>nil, "time_spent"=>nil, "state"=>nil, "completed_at"=>nil, "data"=>{}, "temporary"=>nil, "activity_uid"=>nil, "anonymous"=>nil}, "access"=>{"list"=>["all"], "read"=>["owner"], "update"=>["owner", "admin"], "create"=>["all"], "destroy"=>["owner", "admin"]}})
10
10
  end
11
11
 
12
12
  def me
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.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-27 00:00:00.000000000 Z
12
+ date: 2014-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2
16
- requirement: &70201592454540 !ruby/object:Gem::Requirement
16
+ requirement: &70182730883920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70201592454540
24
+ version_requirements: *70182730883920
25
25
  description: Wrapper to Quill API
26
26
  email: quinn@tastehoneyco.com
27
27
  executables: []