driftrock-service 0.4.20 → 0.4.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Driftrock::Service::DriftrockModel
2
2
  class User
3
3
  include Driftrock::Service::DriftrockModel
4
4
  set_api_path "/dashboard_api/user"
5
- attr_reader :id, :session_id, :first_name, :last_name, :email, :invites
5
+ attr_reader :id, :session_id, :first_name, :last_name, :email, :created_at, :invites
6
6
 
7
7
  def initialize(object_hash)
8
8
  super(object_hash)
@@ -27,7 +27,7 @@ module Driftrock::Service::DriftrockModel
27
27
  end
28
28
 
29
29
  def user_admin?
30
- response = get_from_api_method.call("/#{session_id}/is_admin")
30
+ response = get_from_api_method.call("/#{session_id}/is_admin")
31
31
  response['is_admin'] =~ /true/
32
32
  end
33
33
 
@@ -39,7 +39,7 @@ module Driftrock::Service::DriftrockModel
39
39
  def accept_invitation(company_id)
40
40
  post_to_api_method.call("/invitation/#{company_id}/accept")
41
41
  end
42
-
42
+
43
43
  def reject_invitation(company_id)
44
44
  post_to_api_method.call("/invitation/#{company_id}/reject")
45
45
  end
@@ -51,13 +51,13 @@ module Driftrock::Service::DriftrockModel
51
51
  end
52
52
 
53
53
  def company(company_id)
54
- company_hsh = get_from_api_method.call("/company/#{company_id}",
54
+ company_hsh = get_from_api_method.call("/company/#{company_id}",
55
55
  {user_id: session_id})
56
56
  Company.new(company_hsh)
57
57
  end
58
-
58
+
59
59
  def companies
60
- company_arr = get_from_api_method.call("/companies",
60
+ company_arr = get_from_api_method.call("/companies",
61
61
  {user_id: session_id})
62
62
  company_arr.map do |company_hash|
63
63
  Company.new(company_hash)
@@ -65,4 +65,4 @@ module Driftrock::Service::DriftrockModel
65
65
  end
66
66
 
67
67
  end
68
- end
68
+ end
@@ -1,5 +1,5 @@
1
1
  module Driftrock
2
2
  module Service
3
- VERSION = "0.4.20"
3
+ VERSION = "0.4.21"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: driftrock-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.20
4
+ version: 0.4.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -101,12 +101,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
101
  - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
+ segments:
105
+ - 0
106
+ hash: -1176526130883633860
104
107
  required_rubygems_version: !ruby/object:Gem::Requirement
105
108
  none: false
106
109
  requirements:
107
110
  - - ! '>='
108
111
  - !ruby/object:Gem::Version
109
112
  version: '0'
113
+ segments:
114
+ - 0
115
+ hash: -1176526130883633860
110
116
  requirements: []
111
117
  rubyforge_project:
112
118
  rubygems_version: 1.8.25