meducation_sdk 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83920a89f6e778e97606d2fea10d5e349d1cd1ea
4
- data.tar.gz: 6f5c37065377079f371d5fbcb7bf9a98e853b771
3
+ metadata.gz: 60aa1b12d04a90102dd4ea718c9202f64c1d2f7b
4
+ data.tar.gz: 9d4260c4f4cdcd4fb6acd8ef3ea0341df8456322
5
5
  SHA512:
6
- metadata.gz: 35f174b2368c5d580e3329cb74e3dff397962ebf1599c8ba4be38b5418c124cc1d769b5bb1305e618cc2bee341af86b489c304119f58e61af8b0ef84c546a012
7
- data.tar.gz: a3a9c6d87b349d93c1860d6c01c6c0ea96827aa30b3f5b8a30fc5f9ae82eef4b926e255a33534c2f1e2bec3b70c1f23577b1d9f700d4b9cc2c2ad99eae355b29
6
+ metadata.gz: 037fa70797656a9bd5cb57a24516cc01eec72583cfe17c38418e070d69eacff4e50587e8e9549955d9e9c1ebda4ca97ae455a0db65d4dca9a7cd279324848433
7
+ data.tar.gz: 9db02f2fff960e427bee085a96a71b04df75c95c95788b9d05804d08bdfa0ac6bcc667004c001a56a8b92408a0cb006d125535fba6c2c2a26ad0834f06eefb89
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 2.0.1 / 2014-03-31
2
+ * [FEATURE] Added Contribution
3
+
1
4
  # 2.0.0 / 2014-03-25
2
5
  * [FEATURE] Sub in UserFollow and UserConnection for Friendship
3
6
  * [FEATURE] Sub in FollowerBadge for BefrienderBadge
@@ -41,6 +41,7 @@ RESOURCES = %w{
41
41
  comment
42
42
  community
43
43
  community_membership
44
+ contribution
44
45
  dashboard_item
45
46
  ecommerce_subscription
46
47
  external_resource
@@ -0,0 +1,22 @@
1
+ module MeducationSDK
2
+ class Contribution < Resource
3
+ self.path = "/contributions"
4
+ self.spi_type = "Item::Contribution"
5
+
6
+ def item
7
+ @item ||= sdk_class_for(item_type).find(item_id)
8
+ end
9
+
10
+ end
11
+
12
+ class ContributionMock < Contribution
13
+ extend Loquor::ResourceMock
14
+
15
+ self.attributes = {
16
+ id: 1,
17
+ item_id: 5,
18
+ item_type: "MediaFile"
19
+ }
20
+ end
21
+ end
22
+
@@ -1,3 +1,3 @@
1
1
  module MeducationSDK
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -0,0 +1,17 @@
1
+ require_relative '../test_helper'
2
+ require_relative '../resource_test'
3
+
4
+ module MeducationSDK
5
+ class ContributionTest < ResourceTest
6
+ test_resource(Contribution, '/contributions')
7
+
8
+ def test_item_calls_sdk
9
+ contribution = Contribution.new(item_id: 2, item_type: "MediaFile")
10
+ MeducationSDK::MediaFile.expects(:find).with(2)
11
+ contribution.item
12
+ end
13
+
14
+ end
15
+ end
16
+
17
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meducation_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-27 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -153,6 +153,7 @@ files:
153
153
  - lib/meducation_sdk/resources/comment.rb
154
154
  - lib/meducation_sdk/resources/community.rb
155
155
  - lib/meducation_sdk/resources/community_membership.rb
156
+ - lib/meducation_sdk/resources/contribution.rb
156
157
  - lib/meducation_sdk/resources/dashboard_item.rb
157
158
  - lib/meducation_sdk/resources/ecommerce_subscription.rb
158
159
  - lib/meducation_sdk/resources/external_resource.rb
@@ -212,6 +213,7 @@ files:
212
213
  - test/resources/comment_test.rb
213
214
  - test/resources/community_membership_test.rb
214
215
  - test/resources/community_test.rb
216
+ - test/resources/contribution_test.rb
215
217
  - test/resources/dashboard_item_test.rb
216
218
  - test/resources/ecommerce_subscription_test.rb
217
219
  - test/resources/external_resource_test.rb
@@ -295,6 +297,7 @@ test_files:
295
297
  - test/resources/comment_test.rb
296
298
  - test/resources/community_membership_test.rb
297
299
  - test/resources/community_test.rb
300
+ - test/resources/contribution_test.rb
298
301
  - test/resources/dashboard_item_test.rb
299
302
  - test/resources/ecommerce_subscription_test.rb
300
303
  - test/resources/external_resource_test.rb