atrium-ruby 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38e033562f3b5bd5c2cb0dc6b7e6f96ef5620493
4
- data.tar.gz: a641e28a4086ef3be8c07701947844d02968cae6
3
+ metadata.gz: 45306e8a45e180bc2337f97043c8dbec94f147a1
4
+ data.tar.gz: 432664c114ffec49beadacdf3bd46be8c204161a
5
5
  SHA512:
6
- metadata.gz: bf2b724e1f327c56c0b6420c3f6f2b40328883a8afde6c35e278c318c49f919fb9ad5189e35aa17b55bdcaea3e67dc8c77b82eafbc6a6e09961d11350216b9f3
7
- data.tar.gz: 38cee369dad1399513f5000a86aed9b284dcc4c84da71d219bfcbd85baabcd8916de31dda0f0692131375ed308e703be32719a988edb4a277c03a27497d45b9f
6
+ metadata.gz: 01e66665badb1c893bf91d565961924405c4cddc8334d9bd93dfc4b2139f268e03e737b2e512aac82dcc9395197447df4346c7eb3c41debf849fe92aa102bffb
7
+ data.tar.gz: 52e54d9e538e036f511a166ca0603ffad044ec5a47fc1db57ff8248ccb48c848b7752abcfe1196840f7ef0972697e867f2899690f043e7ba92a93a820cea92e6
@@ -9,7 +9,5 @@ module Atrium
9
9
  attribute :type
10
10
  attribute :image_data
11
11
  attribute :options
12
- attribute :member_guid
13
-
14
12
  end
15
- end
13
+ end
@@ -75,14 +75,15 @@ module Atrium
75
75
 
76
76
  def challenges
77
77
  endpoint = "/users/#{self.user_guid}/members/#{self.guid}/challenges"
78
- member_response = ::Atrium.client.make_request(:get, endpoint)
78
+ challenge_response = ::Atrium.client.make_request(:get, endpoint)
79
+
80
+ return nil if challenge_response.nil?
81
+
82
+ challenge_params = challenge_response["challenges"]
79
83
 
80
- member_params = member_response["challenges"]
81
- challenges = member_params.map do |challenge|
82
- challenge[:member_guid] = self.guid
84
+ challenge_params.map do |challenge|
83
85
  ::Atrium::Challenge.new(challenge)
84
86
  end
85
- challenges
86
87
  end
87
88
 
88
89
  def delete
@@ -1,3 +1,3 @@
1
1
  module Atrium
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atrium-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Carstens, Dan Jones, Zach Toolson