notion_to_html 1.1.3 → 1.1.5

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: 2bb5384177410067721ce9fda929edadb1999137f41b7f31824b87eddd91fc6c
4
- data.tar.gz: d52f39a1f258255077e6c6a33516429886ec18dcee0dfbc01b64c50f402232c4
3
+ metadata.gz: e0a725c2b4c8edf857d22bd6d5a36dac0070315fcc06d904eaf912872b4f0190
4
+ data.tar.gz: 75c02f3ce2e0ee02c3eba90d1a5700f5c94f4ebec3c767c5b6cea7b83c835d95
5
5
  SHA512:
6
- metadata.gz: ec68e95cc07829842e3b8d4c7a99df80b05da4ce60cab3f7ed31ac3c03cdd08af914d588d020e33ceab4af1777bba08e572ccb4c776af05a359507b2449c463a
7
- data.tar.gz: f0b4e39a13fae034448df686d262acd7d6ebbc96d85a6d50effb64af2a3ae9457525dd674a841160cc1d1bb76f6a063d2bb10dca7cac4013e67a855dbd7200fe
6
+ metadata.gz: 49f654328d48672b453f175608bef664193c96e76e246c20c68b4c4cacabe09a50e5ecbca8702556793b32de7ed6cc5a67bf228ebb8c90fdd7d1dac995861e37
7
+ data.tar.gz: 9ed524bf834093884e7bba25a4d7b4e8ef3fd76701595e1b26246f685c6862f61beb9cdba21b33995dc8ab88fffdbf0b5a57487f2e2a39a356ffd0b26fe4e1f8
@@ -87,7 +87,7 @@ module NotionToHtml
87
87
  def process_properties
88
88
  @tags = @properties['tags']
89
89
  @title = @properties.dig('name', 'title')
90
- @slug = @properties['slug']
90
+ @slug = @properties.dig('slug', 'rich_text').first['plain_text']
91
91
  @published_at = @properties.dig('published', 'date', 'start')
92
92
  @description = @properties.dig('description', 'rich_text')
93
93
  end
@@ -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.5'
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,13 @@
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.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Aguirre
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-03 00:00:00.000000000 Z
10
+ date: 2024-12-30 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: actionview
@@ -100,7 +99,6 @@ licenses:
100
99
  metadata:
101
100
  homepage_uri: https://github.com/guillermoap/notion_to_html
102
101
  source_code_uri: https://github.com/guillermoap/notion_to_html
103
- post_install_message:
104
102
  rdoc_options: []
105
103
  require_paths:
106
104
  - lib
@@ -115,8 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
113
  - !ruby/object:Gem::Version
116
114
  version: '0'
117
115
  requirements: []
118
- rubygems_version: 3.5.16
119
- signing_key:
116
+ rubygems_version: 3.6.2
120
117
  specification_version: 4
121
118
  summary: Notion HTML renderer for Ruby
122
119
  test_files: []