collavre_notion 0.1.4 → 0.1.6
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 +4 -4
- data/app/controllers/collavre_notion/creatives/notion_integrations_controller.rb +1 -3
- data/app/jobs/collavre_notion/notion_sync_job.rb +1 -1
- data/app/services/collavre_notion/notion_creative_exporter.rb +2 -2
- data/app/services/collavre_notion/notion_service.rb +2 -2
- data/lib/collavre_notion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 729f52c6ae7b749fd53d2a7e90027fc1bd9f32c509da40576565c1b1f6e45ced
|
|
4
|
+
data.tar.gz: d8a845888c97101aac2aeb1991da0bb722794c9a2f3992dd882dde1300d166d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9636f417c31438ac581cedac956e77ba11cc0d9559bf7b4505f9010153f994137896febb72805bc190462007eab9e0ef0ca321670889fdeaa3b9ebd7b07d3bb6
|
|
7
|
+
data.tar.gz: 331e6f434472987110ebc5bc585776abf47cb328041f261565b447aabd936d14637843af962a26c001e541ec577a507f44236a27ee43c7f0c6f2c67387774972
|
|
@@ -16,7 +16,7 @@ module CollavreNotion
|
|
|
16
16
|
|
|
17
17
|
render json: {
|
|
18
18
|
connected: account.present?,
|
|
19
|
-
creative_title:
|
|
19
|
+
creative_title: Collavre::HtmlText.label(@creative.effective_origin.description).presence || "Untitled Creative",
|
|
20
20
|
account: account && {
|
|
21
21
|
workspace_name: account.workspace_name,
|
|
22
22
|
workspace_id: account.workspace_id,
|
|
@@ -41,8 +41,6 @@ module CollavreNotion
|
|
|
41
41
|
return
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
Rails.logger.info("Notion Integration Update: Full params = #{params.to_unsafe_h}")
|
|
45
|
-
|
|
46
44
|
integration_attributes = integration_params
|
|
47
45
|
Rails.logger.info("Notion Integration Update: integration_params = #{integration_attributes}")
|
|
48
46
|
|
|
@@ -19,7 +19,7 @@ module CollavreNotion
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# Update the existing Notion page with children as blocks
|
|
22
|
-
title =
|
|
22
|
+
title = Collavre::HtmlText.label(creative.description).presence || "Untitled Creative"
|
|
23
23
|
children = creative.children.to_a
|
|
24
24
|
Rails.logger.info("NotionSyncJob: Syncing creative #{creative.id} as page title with #{children.count} children as blocks")
|
|
25
25
|
blocks = children.any? ? NotionCreativeExporter.new(creative).export_tree_blocks(children, 1, 0) : []
|
|
@@ -185,8 +185,8 @@ module CollavreNotion
|
|
|
185
185
|
end
|
|
186
186
|
|
|
187
187
|
def extract_text_content(html)
|
|
188
|
-
# Remove HTML tags and
|
|
189
|
-
|
|
188
|
+
# Remove HTML tags and decode character references
|
|
189
|
+
Collavre::HtmlText.plain(html).strip
|
|
190
190
|
end
|
|
191
191
|
|
|
192
192
|
def create_heading_block(text, level)
|
|
@@ -92,7 +92,7 @@ module CollavreNotion
|
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
def create_creative_page(creative, notion_link, parent_page_id)
|
|
95
|
-
title =
|
|
95
|
+
title = Collavre::HtmlText.label(creative.description).presence || "Untitled Creative"
|
|
96
96
|
|
|
97
97
|
# Export only the children - the page title serves as the root creative
|
|
98
98
|
children = creative.children.to_a
|
|
@@ -123,7 +123,7 @@ module CollavreNotion
|
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
def update_creative_page(creative, notion_link)
|
|
126
|
-
title =
|
|
126
|
+
title = Collavre::HtmlText.label(creative.description).presence || "Untitled Creative"
|
|
127
127
|
|
|
128
128
|
# Update with only the children - page title serves as the root creative
|
|
129
129
|
children = creative.children.to_a
|