meducation_sdk 1.5.5 → 1.5.6

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: a6e343c43721ce0479ee1887db2e39a8dd4f3fb2
4
- data.tar.gz: 58e46682ea58c80837c73811234dbb3b403eb608
3
+ metadata.gz: 05ce98cbc7f4cce33f387c36ed20ee38d909fad2
4
+ data.tar.gz: 4598c47944ae3626379907d1a7435ca460110487
5
5
  SHA512:
6
- metadata.gz: 552bc6f39ffc04e61834c9742d93c92bdd4d63284049dfed39d1b719e01d70b7fd46dd1232e90b55b1611af6fa829683954f104277fe0d13baecc3296d8697b2
7
- data.tar.gz: 2edfd6203765b8acf5233b5849b6d5490b1649aca0d21bd8c997063ad20891f3757780e56a7749c739dc94f64ed3935554b435a160d8bdb9140823899da1cc18
6
+ metadata.gz: a226634588319ef4cd4b0311b284dae241559c71493484bd70d25ea91eaae5261df9f434952b2598e3c8f3cd1cfc617ff5ecb34eb66c35a57cec79c4b4b6b787
7
+ data.tar.gz: 64c7488b21d52be76c9fcad25b97048b37c95713c08489ef7cb6f839d6e42682c0bd8cb60be5c2aef704459e93c439b569dd1f7e8e3d6f937c212bad44eb9819
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.5.6 / 2014-02-27
2
+ * [FEATURE] Add comments to blog posts
3
+
1
4
  # 1.5.5 / 2014-02-25
2
5
  * [BUGFIX] Renamed board follower to board follow
3
6
 
@@ -17,6 +17,7 @@ module MeducationSDK
17
17
  config.endpoint = "http://www.meducation.net/system"
18
18
  config.substitute_values[true] = ":__true__"
19
19
  config.substitute_values[false] = ":__false__"
20
+ config.retry_404s = true
20
21
  end
21
22
  end
22
23
 
@@ -10,6 +10,9 @@ module MeducationSDK
10
10
  @blogger ||= Blogger.find(blogger_id)
11
11
  end
12
12
 
13
+ def comments
14
+ @comments ||= Comment.where(item_id: id, item_type: "BlogPost")
15
+ end
13
16
  end
14
17
 
15
18
  class BlogPostMock < BlogPost
@@ -1,3 +1,3 @@
1
1
  module MeducationSDK
2
- VERSION = "1.5.5"
2
+ VERSION = "1.5.6"
3
3
  end
@@ -25,6 +25,11 @@ module MeducationSDK
25
25
  assert_equal "http://www.meducation.net/system", Loquor.config.endpoint
26
26
  end
27
27
 
28
+ def test_endpoint_is_set_correctly
29
+ Configuration.new
30
+ assert_equal true, Loquor.config.retry_404s
31
+ end
32
+
28
33
  def test_access_id_proxies_to_loquor
29
34
  access_id = "test-access-id"
30
35
  MeducationSDK.config.access_id = access_id
@@ -16,6 +16,12 @@ module MeducationSDK
16
16
  MeducationSDK::Blogger.expects(:find).with(8)
17
17
  blog_post.blogger
18
18
  end
19
+
20
+ def test_comments_calls_sdk
21
+ blog_post = BlogPost.new(id: 5)
22
+ MeducationSDK::Comment.expects(:where).with(item_id: blog_post.id, item_type: "BlogPost")
23
+ blog_post.comments
24
+ end
19
25
  end
20
26
  end
21
27
 
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.5.5
4
+ version: 1.5.6
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-02-25 00:00:00.000000000 Z
11
+ date: 2014-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport