notion_to_html 1.1.3 → 1.1.4

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: 2bb5384177410067721ce9fda929edadb1999137f41b7f31824b87eddd91fc6c
4
- data.tar.gz: d52f39a1f258255077e6c6a33516429886ec18dcee0dfbc01b64c50f402232c4
3
+ metadata.gz: 96198f047bc37e0468c3d63f267848c31343ae68df890de63ff37b451ca89d5b
4
+ data.tar.gz: 80324f4a691905d5889c1e168fcb4e311f430f42fd9fa97fb5543e3c0c60e8eb
5
5
  SHA512:
6
- metadata.gz: ec68e95cc07829842e3b8d4c7a99df80b05da4ce60cab3f7ed31ac3c03cdd08af914d588d020e33ceab4af1777bba08e572ccb4c776af05a359507b2449c463a
7
- data.tar.gz: f0b4e39a13fae034448df686d262acd7d6ebbc96d85a6d50effb64af2a3ae9457525dd674a841160cc1d1bb76f6a063d2bb10dca7cac4013e67a855dbd7200fe
6
+ metadata.gz: 394c077b1b48db452fdcdc832641fb042412542e729b893c5f4086bf5d86ef790427d8a571bf1d5104f98620d1753e083a9fed23e303c929b7e4256043511215
7
+ data.tar.gz: 30962b4fda49771160d1fceaf9855a37901d3d79952cec636bfdfaa5b28a63ba7774d966eed117c0d48fd88587349c430c3873bb8b466c669b70a673bead392a
@@ -149,7 +149,13 @@ module NotionToHtml
149
149
  # Accessor for the client
150
150
  # @return [Notion::Client] The client instance used to interact with the Notion API
151
151
  def client
152
- @client ||= Notion::Client.new(token: NotionToHtml.config.notion_api_token)
152
+ @client ||= Notion::Client.new(
153
+ token: NotionToHtml.config.notion_api_token,
154
+ timeout: NotionToHtml.config.notion_timeout,
155
+ default_page_size: NotionToHtml.config.notion_default_page_size,
156
+ default_max_retries: NotionToHtml.config.notion_default_max_retries,
157
+ default_retry_after: NotionToHtml.config.notion_default_retry_after
158
+ )
153
159
  end
154
160
 
155
161
  # Retrieves pages from Notion using the client
@@ -2,5 +2,5 @@
2
2
 
3
3
  module NotionToHtml
4
4
  # The current version of the NotionToHtml gem.
5
- VERSION = '1.1.3'
5
+ VERSION = '1.1.4'
6
6
  end
@@ -19,6 +19,30 @@ module NotionToHtml
19
19
  # @return [String] The database ID in Notion that the module will interact with.
20
20
  setting :notion_database_id
21
21
 
22
+ # @!attribute [rw] notion_timeout
23
+ # @return [Integer] The number of seconds to wait for a response from the Notion API before timing out.
24
+ # @example
25
+ # config.notion_timeout = 60 # Wait up to 60 seconds for API responses
26
+ setting :notion_timeout, default: 30
27
+
28
+ # @!attribute [rw] notion_default_page_size
29
+ # @return [Integer] The default number of records to return per page when making paginated requests.
30
+ # @example
31
+ # config.notion_default_page_size = 50 # Return 50 records per page
32
+ setting :notion_default_page_size, default: 100
33
+
34
+ # @!attribute [rw] notion_default_max_retries
35
+ # @return [Integer] The maximum number of times to retry failed API requests.
36
+ # @example
37
+ # config.notion_default_max_retries = 3 # Retry failed requests up to 3 times
38
+ setting :notion_default_max_retries, default: 5
39
+
40
+ # @!attribute [rw] notion_default_retry_after
41
+ # @return [Integer] The number of seconds to wait between retry attempts for failed API requests.
42
+ # @example
43
+ # config.notion_default_retry_after = 5 # Wait 5 seconds between retries
44
+ setting :notion_default_retry_after, default: 10
45
+
22
46
  # @!attribute [rw] cache_store
23
47
  # @return [ActiveSupport::Cache::Store] The cache store used to cache responses from the Notion API.
24
48
  # @default ActiveSupport::Cache::MemoryStore.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion_to_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Aguirre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-03 00:00:00.000000000 Z
11
+ date: 2024-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.5.16
118
+ rubygems_version: 3.5.22
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Notion HTML renderer for Ruby