blue_factory 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 41390cf32bc0c614a9cec3414ce6b5f4c2b325d81c59655089efe4e732356bd0
4
- data.tar.gz: 24f49ed933396117be07381b43ae1878022a687b5a88d3b1e0dd1feb0582b972
3
+ metadata.gz: c1a078159ccaad626c030e20a9ad18e1a408cc8897c27cddb9773c1bd1a6295c
4
+ data.tar.gz: b7c45df10d3419f21745b760b586fe21e1eb262e9a12c72a5282e3ca0616eace
5
5
  SHA512:
6
- metadata.gz: 94accb55c086ea2302e479f6f7e5f5cf83631c47a165d429349207dbeb654c48970a78b095fe6b2f9a3686674869f7fbfe382841d49bad84dd67b391585d05f5
7
- data.tar.gz: c2b1d4590f546ee2c1c8d98b4c7a776974ca2c9dd1a94cce517a7021cb9e9f295d39b4f986fc41dd058bee00af1942113ab770d91cadbc135bc7ca4c9e27cfcb
6
+ metadata.gz: 3347004aff37324480e13d2c1a21b85f737a9ab8898d874ecf26dad6f1b8f74ffa621ca24d4d76098be1479e145c08745d8c86a5cfcab68e66c8148bd6f76a8c
7
+ data.tar.gz: 15fd3de8b85ecb2175c3d3ede61b73257bac08e849935ad42aad6b428d70c1fbe1fbec970887db354a6fea8f36fa93851f2909452497cc33f50419bff4cd1bea
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.3] - 2023-07-27
2
+
3
+ - fixed incorrect response when reaching the end of the feed
4
+
1
5
  ## [0.1.2] - 2023-06-15
2
6
 
3
7
  - added validation for feed rkey
@@ -69,10 +69,11 @@ module BlueFactory
69
69
  response = feed.get_posts(params.slice(:feed, :cursor, :limit))
70
70
  validate_response(response) if config.validate_responses
71
71
 
72
- return json({
73
- cursor: response[:cursor],
74
- feed: response[:posts].map { |s| { post: s }}
75
- })
72
+ output = {}
73
+ output[:feed] = response[:posts].map { |s| { post: s }}
74
+ output[:cursor] = response[:cursor] if response[:cursor]
75
+
76
+ return json(output)
76
77
  rescue InvalidRequestError => e
77
78
  return json_error(e.error_type || "InvalidRequest", e.message)
78
79
  rescue InvalidResponseError => e
@@ -1,3 +1,3 @@
1
1
  module BlueFactory
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blue_factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuba Suder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra