meducation_sdk 1.1.2 → 1.2.0

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: 20f54526b93f92599b9585e0b6209aa5db2de128
4
- data.tar.gz: d9de733fd9a241c03a9ed06ea6bdc70757d06f75
3
+ metadata.gz: 3523ab619c1fb3b18096f1801ff62f8a61e51906
4
+ data.tar.gz: 879201230b70991fe95f6e7a9aa1466f78455187
5
5
  SHA512:
6
- metadata.gz: 90bf295b0a47fe7b2fc4811b83a2319c9f909045b811c0dc70738c08cd919d3ca899b5c7d645ea3a4ce86c57c1174c48b3d5c49b496d91a677997b64af0b1583
7
- data.tar.gz: bf45ba0c68f139b55bba6c79636ee323a878056e632f62c1fe23ce2d48b4251cc2b4b94d13124ea2319af557d2922cde292430c54c45925622a3b49c31166589
6
+ metadata.gz: ed849a56f7f10ba5fbd7edcd3a542211f7790310e715710a6f642dc21bfa72a040a9f08436dcbece3b15c5925bc53350af4709340fa42c0321d2bdc8ad1f7bb0
7
+ data.tar.gz: 1b1c94547e6187f986f92efed77f6757ebd4cd5dd3a72cf471b584551c5fb9b43ec9930445ee0cbb2adf16fe687080b8c8e72affcd390b9358784c13a6df7d91
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- #1.1.2 / 2014-01-29
1
+ # 1.2.0 / 2014-02-01
2
+ * [FEATURE] Add support for Collection Topics
3
+ * [FEATURE] Remove support for Premium Tutorials
4
+
5
+ # 1.1.2 / 2014-01-29
2
6
  * [FEATURE] Adds views_in_last_30_days, views_in_last_60_days and usefulness to output
3
7
 
4
8
  # 1.1.1 / 2014-01-24
@@ -6,6 +6,7 @@ require "meducation_sdk/configuration"
6
6
  require "meducation_sdk/mocker"
7
7
 
8
8
  RESOURCES = %w{
9
+ collection_topic
9
10
  comment
10
11
  community
11
12
  community_membership
@@ -26,7 +27,6 @@ RESOURCES = %w{
26
27
  mnemonic
27
28
  notification
28
29
  partner
29
- premium_tutorial
30
30
  syllabus_item
31
31
  user
32
32
  user_settings
@@ -1,6 +1,6 @@
1
1
  module MeducationSDK
2
- class PremiumTutorial < Loquor::Resource
3
- self.path = "/premium_tutorials"
2
+ class CollectionTopic < Loquor::Resource
3
+ self.path = "/collection_topics"
4
4
 
5
5
  def user
6
6
  @user ||= User.find(user_id)
@@ -11,14 +11,16 @@ module MeducationSDK
11
11
  end
12
12
  end
13
13
 
14
- class PremiumTutorialMock < PremiumTutorial
14
+ class CollectionTopicMock < CollectionTopic
15
15
  extend Loquor::ResourceMock
16
16
 
17
17
  self.attributes = {
18
18
  id: 1,
19
19
  title: "Al's Medicine Tutorial",
20
- user_id: 5,
21
- comment_ids: [4,5,6]
20
+ comment_ids: [4,5,6],
21
+ rating: 10,
22
+ views_in_last_30_days: 30,
23
+ views_in_last_60_days: 60
22
24
  }
23
25
  end
24
26
  end
@@ -1,3 +1,3 @@
1
1
  module MeducationSDK
2
- VERSION = "1.1.2"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -0,0 +1,15 @@
1
+ require File.expand_path('../../test_helper', __FILE__)
2
+ require File.expand_path('../../resource_test', __FILE__)
3
+
4
+ module MeducationSDK
5
+ class CollectionTopicTest < ResourceTest
6
+ test_resource(CollectionTopic, '/collection_topics')
7
+
8
+ def test_comments_calls_sdk
9
+ topic = CollectionTopic.new(comment_ids: [7,8,9])
10
+ MeducationSDK::Comment.expects(:where).with(id: [7,8,9])
11
+ topic.comments
12
+ end
13
+ end
14
+ end
15
+
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: 1.1.2
4
+ version: 1.2.0
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-01-29 00:00:00.000000000 Z
11
+ date: 2014-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -112,6 +112,7 @@ files:
112
112
  - lib/meducation_sdk.rb
113
113
  - lib/meducation_sdk/configuration.rb
114
114
  - lib/meducation_sdk/mocker.rb
115
+ - lib/meducation_sdk/resources/collection_topic.rb
115
116
  - lib/meducation_sdk/resources/comment.rb
116
117
  - lib/meducation_sdk/resources/community.rb
117
118
  - lib/meducation_sdk/resources/community_membership.rb
@@ -132,7 +133,6 @@ files:
132
133
  - lib/meducation_sdk/resources/mnemonic.rb
133
134
  - lib/meducation_sdk/resources/notification.rb
134
135
  - lib/meducation_sdk/resources/partner.rb
135
- - lib/meducation_sdk/resources/premium_tutorial.rb
136
136
  - lib/meducation_sdk/resources/syllabus_item.rb
137
137
  - lib/meducation_sdk/resources/user.rb
138
138
  - lib/meducation_sdk/resources/user_settings.rb
@@ -142,6 +142,7 @@ files:
142
142
  - test/configuration_test.rb
143
143
  - test/mocker_test.rb
144
144
  - test/resource_test.rb
145
+ - test/resources/collection_topic_test.rb
145
146
  - test/resources/comment_test.rb
146
147
  - test/resources/community_membership_test.rb
147
148
  - test/resources/community_test.rb
@@ -162,7 +163,6 @@ files:
162
163
  - test/resources/mnemonic_test.rb
163
164
  - test/resources/notification_test.rb
164
165
  - test/resources/partner_test.rb
165
- - test/resources/premium_tutorial_test.rb
166
166
  - test/resources/syllabus_item_test.rb
167
167
  - test/resources/user_settings_test.rb
168
168
  - test/resources/user_test.rb
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  version: '0'
188
188
  requirements: []
189
189
  rubyforge_project:
190
- rubygems_version: 2.2.0
190
+ rubygems_version: 2.1.9
191
191
  signing_key:
192
192
  specification_version: 4
193
193
  summary: The SDK for Meducation
@@ -196,6 +196,7 @@ test_files:
196
196
  - test/configuration_test.rb
197
197
  - test/mocker_test.rb
198
198
  - test/resource_test.rb
199
+ - test/resources/collection_topic_test.rb
199
200
  - test/resources/comment_test.rb
200
201
  - test/resources/community_membership_test.rb
201
202
  - test/resources/community_test.rb
@@ -216,8 +217,8 @@ test_files:
216
217
  - test/resources/mnemonic_test.rb
217
218
  - test/resources/notification_test.rb
218
219
  - test/resources/partner_test.rb
219
- - test/resources/premium_tutorial_test.rb
220
220
  - test/resources/syllabus_item_test.rb
221
221
  - test/resources/user_settings_test.rb
222
222
  - test/resources/user_test.rb
223
223
  - test/test_helper.rb
224
+ has_rdoc:
@@ -1,21 +0,0 @@
1
- require File.expand_path('../../test_helper', __FILE__)
2
- require File.expand_path('../../resource_test', __FILE__)
3
-
4
- module MeducationSDK
5
- class PremiumTutorialTest < ResourceTest
6
- test_resource(PremiumTutorial, '/premium_tutorials')
7
-
8
- def test_user_calls_sdk
9
- tutorial = PremiumTutorial.new(id: 2, user_id: 5)
10
- MeducationSDK::User.expects(:find).with(5)
11
- tutorial.user
12
- end
13
-
14
- def test_comments_calls_sdk
15
- tutorial = PremiumTutorial.new(comment_ids: [7,8,9])
16
- MeducationSDK::Comment.expects(:where).with(id: [7,8,9])
17
- tutorial.comments
18
- end
19
- end
20
- end
21
-