notion_to_md 0.2.0 → 0.2.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: d326983d99843871779f5331bab84d734bc01c21aa90b4da0cc76f1dd092c95e
4
- data.tar.gz: 4b6a34aebbe07df627d956e9918606385e5d3952c56522ee66f3e331f8522d24
3
+ metadata.gz: ce6b39ba9cc39e1428bc8a654532d16b9ea99054e3fbd96cf30edd56cbed28a8
4
+ data.tar.gz: 6e38131568bb150a9ca7904f383fd8ade5721ccc5affe2949672b597b948ffe3
5
5
  SHA512:
6
- metadata.gz: 5e4990d98adf9eaff1dafc48285430b788de0bf4088b95ecd5f6c970fc850e015e9f148c79f0603647902b96b26465b01f88e9d86133472cc154a581c6f2e907
7
- data.tar.gz: bb63c2a623265a153e7300ca9389bf1e75773373f8221eed41e4b7a11b33f801c26d8d033f3038ac93ead0586257e7874773c9a490de436a30ea79c4e5d5ca08
6
+ metadata.gz: 3ccfa65a6877fd1bcdc9a36f72094cc8374934a2713abfc10441b23348b919818539c286469afad699f69594dc854a12f884299d2c335ff6cd9bc17d920bbcb6
7
+ data.tar.gz: fd638c9a53e8c6f6cf644e2e471fc7ecf8150bb1ef371d9f6f41215e4d1bd953d1929113c25dc703dd66647165adf84bbf9f7bddcb6494d8b0bcea5bd06f2741
@@ -37,7 +37,9 @@ module NotionToMd
37
37
 
38
38
  def parse_frontmatter
39
39
  notion_page = Page.new(page: page)
40
- frontmatter = notion_page.props.to_a.map { |k, v| "#{k}: #{v}" }.join("\n")
40
+ frontmatter = notion_page.props.to_a.map do |k, v|
41
+ "#{k}: #{v}"
42
+ end.join("\n")
41
43
  <<~CONTENT
42
44
  ---
43
45
  #{frontmatter}
@@ -73,8 +73,7 @@ module NotionToMd
73
73
  class CustomProperty
74
74
  class << self
75
75
  def multi_select(prop)
76
- multi_select = prop.multi_select.map(&:name).join(', ')
77
- "[#{multi_select}]"
76
+ prop.multi_select.map(&:name)
78
77
  end
79
78
 
80
79
  def select(prop)
@@ -82,13 +81,11 @@ module NotionToMd
82
81
  end
83
82
 
84
83
  def people(prop)
85
- people = prop.people.map(&:name).join(', ')
86
- "[#{people}]"
84
+ prop.people.map(&:name)
87
85
  end
88
86
 
89
87
  def files(prop)
90
- files = prop.files.map { |f| "\"#{f.file.url}\"" }.join(', ')
91
- "[#{files}]"
88
+ prop.files.map { |f| f.file.url }
92
89
  end
93
90
 
94
91
  def phone_number(prop)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NotionToMd
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion_to_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrique Arias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport