facegroup 0.5.0 → 0.6.0

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: 7404cae36e93687ec2e15e450b1607e1f4f8ad63
4
- data.tar.gz: e1887cf067bafa506b5fb0b6544eec2ec0359f2c
3
+ metadata.gz: d7537a0bbdcaa7d0e21beae9e989f76073b807d0
4
+ data.tar.gz: 51d8739d6c268d01e6fbdc5b254efcff12f4df93
5
5
  SHA512:
6
- metadata.gz: 824809c4c070ff262264464f4db44086b1c7c028e8472eabcb93b18fea93a6ac903fd65e2698cb60ed251bfecb68a5e7c5e7d188cf735f674420d0ee167df206
7
- data.tar.gz: aa8fc368c04a8c5983b6f56f44ae4d82e1729da18f6a8a96a8fc42a45222c288efe6802bb3d7b0d7ae2e4b7ab0d1951e9148c765ba35fcc6eb6a61d58154fc22
6
+ metadata.gz: c92b2e587fa7748348d5df40559988b29947caad387113642a6ac041bb67a064b514d26595d6cda853e4c23eb69048b7106ad4361dd6a85e4610d6f14d1f4257
7
+ data.tar.gz: e8db6bee6dbf1f065e2439bfda37be9e6755d49f29d862fbf47504edd814c488ef58aca72e13fd2fda531548fdb4c24824ab470395686fd9f6eb91b78b4357a8
@@ -18,9 +18,8 @@ module FaceGroup
18
18
  group_data.include?('error') ? nil : new(group_data: group_data)
19
19
  end
20
20
 
21
- def latest_posting_time
22
- latest_postings = FbApi.newest_group_postings(id)
23
- Time.parse(latest_postings.first['updated_time'])
21
+ def latest_postings
22
+ FbApi.newest_group_postings(id)
24
23
  end
25
24
  end
26
25
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FaceGroup
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -54,12 +54,12 @@ describe 'FaceGroup specifications' do
54
54
  end
55
55
  end
56
56
 
57
- describe 'Checking Latest Post Time' do
58
- it '(HAPPY) should get the latest posting time from a group feed' do
57
+ describe 'Checking Latest Postings on Group Feed' do
58
+ it '(HAPPY) should get only the latest postings time from a group feed' do
59
59
  group = FaceGroup::Group.find(id: ENV['FB_GROUP_ID'])
60
- latest_time = group.latest_posting_time
61
- latest_time.must_be_instance_of Time
62
- latest_time.must_be :<, Time.now
60
+ latest_postings = group.latest_postings
61
+ latest_postings.count.must_be :>=, 10
62
+ latest_postings.count.must_be :<=, 25
63
63
  end
64
64
  end
65
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facegroup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soumya Ray