instagram_connect 0.3.12 → 0.3.13

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
  SHA256:
3
- metadata.gz: 8e2491421a8ef87f13bdf5713bb30b07c92f12dc9abeffdf985ec8c4a2db04b5
4
- data.tar.gz: 13dc408e540367da45330ca0d17ee785cda564312e865752d4e9635c75cd1b27
3
+ metadata.gz: acad3028e8aecad50414e6bd980d896ca1b5c8245b28d517889b1cbfd5cca8ce
4
+ data.tar.gz: d7be5c7d2b2da1ba842cf1558a38de3d820557f4b982892c047c10d76b5b0744
5
5
  SHA512:
6
- metadata.gz: 331c2f1c32aac22c0270d59b17a0ce189bb3ceb96bd5cc389b7e4a0cb7c06e85ffbe9d14970a4362d8b0d7eaf0b07b609b14b5ae918ae0048a404743fcaf57cc
7
- data.tar.gz: 824e82804b90ae2bd9f887d109e1945ddffd549e1f1e92852a985465b1cd484a29993139fb9ce474f9a14195d895aafdf2e2a4fac0351857192078bebfb1ae58
6
+ metadata.gz: 00e7e104a3ac1cc0cfcca780868f4c046ff4d593ce37606862f6d81b20971dfc66edcbd070018a1775e60ae2143393f9ce42b00ecffb835504cd093579e04964
7
+ data.tar.gz: 95e0f2ee5b9462277e0f87156288a31314a7b73888a0a38aa411340f25f98a4c646e04d45989c638dc6f0664982bf9f11d85aed3e3ebaefbb151a3e4f143ed8e
data/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ All notable changes to this project are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.13] - 2026-07-28
10
+
11
+ ### Fixed
12
+
13
+ - **The readiness pass was the one path still shipping an unreadable token to Meta.** It builds its
14
+ own `Authorization` header rather than going through `Account#client`, so 0.3.12's guard never
15
+ covered it: Meta answered "Cannot parse access token" and the failure was recorded as if the
16
+ SUBSCRIPTION were broken. It now skips such an account with the real reason on `readiness_error`,
17
+ and the header builder itself refuses, so any future caller in that job is covered too.
18
+
19
+
9
20
  ## [0.3.12] - 2026-07-27
10
21
 
11
22
  ### Fixed
@@ -64,6 +64,18 @@ module InstagramConnect
64
64
  # completing without raising.
65
65
  account.update_columns(readiness_error: nil) if account.readiness_error.present?
66
66
 
67
+ # This job builds its own Authorization header rather than going
68
+ # through Account#client, so the guard there does not cover it — and
69
+ # an unreadable token would be shipped to Meta as a bearer string,
70
+ # answered with "Cannot parse access token", and recorded as if the
71
+ # SUBSCRIPTION were the problem. Say what is actually wrong instead.
72
+ unless account.token_readable?
73
+ account.update_columns(readiness_error: Account::TOKEN_UNREADABLE_MESSAGE.truncate(255))
74
+ logger.error("[InstagramConnect] readiness skipped for account=#{account.id}: " \
75
+ "#{Account::TOKEN_UNREADABLE_MESSAGE}")
76
+ next
77
+ end
78
+
67
79
  ensure_page_token(account)
68
80
  ensure_subscription(account)
69
81
  rescue StandardError => e
@@ -145,6 +157,10 @@ module InstagramConnect
145
157
  end
146
158
 
147
159
  def bearer(account)
160
+ unless account.token_readable?
161
+ raise InstagramConnect::TokenUnreadableError, Account::TOKEN_UNREADABLE_MESSAGE
162
+ end
163
+
148
164
  { "Authorization" => "Bearer #{account.api_token}" }
149
165
  end
150
166
 
@@ -1,3 +1,3 @@
1
1
  module InstagramConnect
2
- VERSION = "0.3.12"
2
+ VERSION = "0.3.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instagram_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kshitiz Sinha