notion_ruby_mapping 0.5.0 → 0.5.1

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: dfd02c2aeeed43efa6a45f35bcaf1173b0113e870e1432b8e39cbac8fdc2d6a4
4
- data.tar.gz: 73768acce904d567936bde1e524d47a25649b4f74e4f275a7de8a74b3753bf8f
3
+ metadata.gz: 68d4b404cfe0798695934594f05049482f5436f15e0f2eb7c82125031ce3f340
4
+ data.tar.gz: b179b7d3530ec7f323023f5ec3ada9057f7e402f87a87c65579482c015184c62
5
5
  SHA512:
6
- metadata.gz: 12c8db1f986e739ddea1d57440cdb4e422729c7aed54a1b94b3e65f71124de20cfb7be6bd276c7b143f82c8d2b627a98dfcaf6da087426cfada9c6e21c216f83
7
- data.tar.gz: 964763d2dc6449f51c2fb0d1edae7072aec875b8936c94d4826dcffb5334db0ee1094e7a01bbecd0035586844cce5532d4e8d291c50df321a535022218b0fc7d
6
+ metadata.gz: 35b3b4ec135b729ba8f93e5d583f0e717e75cb6f0bd75779433948ef671b4bfa9cf22346e1a222d473f506b90a1a24efaa4fca856cd533448d773a710160f421
7
+ data.tar.gz: 92ef1a7218a0551195dae18a9bbbb3f82f440ba6fd2b8af49bcb578c5f21bf9417644750bc5297133d0ddd789987123f5e6dbd024bb7cb8b5b19a3a4c0764758
data/README.md CHANGED
@@ -79,6 +79,7 @@ NotionCache.instance.create_client ENV["NOTION_API_TOKEN"] # from environment
79
79
 
80
80
  ## 3. ChangeLog
81
81
 
82
+ - 2022/6/5 [v0.5.1] bug fix for append_block_children. added synced_block_original to SyncedBlock
82
83
  - 2022/6/4 [v0.5.0] added subclasses of the block class and update_block API support
83
84
  - 2022/5/19 [v0.4.1] added delete_block
84
85
  - 2022/4/29 [v0.4.0] Change directory structure, TEST_IDs are moved from env.yml to TestConnection's constants, added retrieve_block spec, added append_block_children
@@ -96,7 +96,7 @@ module NotionRubyMapping
96
96
  response = @nc.append_block_children_request @id, json
97
97
  raise StandardError, response unless response["results"]
98
98
 
99
- answers = response["results"].map { |sub_json| Block.new json: sub_json }
99
+ answers = response["results"].map { |sub_json| Block.create_from_json sub_json }
100
100
  only_one ? answers.first : answers
101
101
  end
102
102
  end
@@ -28,12 +28,17 @@ module NotionRubyMapping
28
28
 
29
29
  # @return [Boolean] true if synced_block & block_id is nil
30
30
  def synced_block_original?
31
- @type == "synced_block" && @block_id.nil?
31
+ @block_id.nil?
32
+ end
33
+
34
+ # @return [NotionRubyMapping::SyncedBlock]
35
+ def synced_block_original
36
+ @block_id && Block.find(@block_id)
32
37
  end
33
38
 
34
39
  # @return [String, nil]
35
40
  def synced_block_original_id
36
- @type == "synced_block" && @block_id
41
+ @block_id
37
42
  end
38
43
 
39
44
  # @return [String (frozen)]
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NotionRubyMapping
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  NOTION_VERSION = "2022-02-22"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion_ruby_mapping
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki KOBAYASHI
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-04 00:00:00.000000000 Z
11
+ date: 2022-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday