paru 0.2.4.5 → 0.2.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b681740521f95d8baa1e31caa9476e035ef65c72
4
- data.tar.gz: d9af38ecf31b7116af24fc46ae232c0fa7fdcf4e
3
+ metadata.gz: 76f86581e1e26603a9f55ae60486552c537f0714
4
+ data.tar.gz: e61570f118ec77fa9ebf544f6c22d41c6e2e1437
5
5
  SHA512:
6
- metadata.gz: 3763a3862f2d2cf6e45adf513dffea00f9888180d1a1d1fb42cd04776aba5fc0c567d73bc8a4a79ac3db5bfaad78bba37178bbb5232a7cd7e95d5f39b49a0548
7
- data.tar.gz: 4f1a09ecb5fd986cc205f7fbaa8d0e03ddbd493ade3d0bcacb5e52a446db2e4e2eee4d6185c22da19003c8feaa583f1e1d2ce729120756b644aa6c7fcebbef61
6
+ metadata.gz: ae430e95dadc46085b1fb56c3a1c8a44c06bf1da5bbfec0893b654e6c0e0e612df34cf0b0fd03b4c0cba32e794bf1558e148c014578fc1264f792e0762d2bbe5
7
+ data.tar.gz: 54a434f05bb8d027cdb91330075bdd776b8c5d0de3b692a548cbb282fae609113aa86ad5d57aa4f3917b7c3681abd16d5b84a79efc042ad9df3c3615bcd39add
@@ -38,7 +38,7 @@ module Paru
38
38
  end
39
39
 
40
40
  # Create an AST representation of this RawBlock node
41
- def to_ast()
41
+ def ast_contents()
42
42
  [
43
43
  @format,
44
44
  @string
@@ -49,53 +49,4 @@ module Paru
49
49
  yaml
50
50
  end
51
51
  end
52
-
53
- if __FILE__ == $0
54
- require 'optparse'
55
-
56
- parser = OptionParser.new do |opts|
57
- opts.banner = "pandoc2yaml.rb mines a pandoc markdown file for its YAML metadata"
58
- opts.banner << "\n\nUsage: pandoc2yaml.rb some-pandoc-markdownfile.md"
59
- opts.separator ""
60
- opts.separator "Common options"
61
-
62
- opts.on_tail("-h", "--help", "Show this message") do
63
- puts opts
64
- exit
65
- end
66
-
67
- opts.on("-v", "--version", "Show version") do
68
- puts "pandoc2yaml.rb is part of paru version 0.2.3"
69
- exit
70
- end
71
- end
72
-
73
- parser.parse! ARGV
74
-
75
- input_document = ARGV.pop
76
-
77
- if ARGV.size != 0 then
78
- warn "Expecting exactly one argument: the pandoc file to strip for metadata"
79
- puts ""
80
- puts parser
81
- exit
82
- end
83
-
84
- document = File.expand_path input_document
85
- if not File.exist? document
86
- warn "Cannot find file: #{input_document}"
87
- exit
88
- end
89
-
90
- if !File.readable? document
91
- warn "Cannot read file: #{input_document}"
92
- exit
93
- end
94
-
95
- yaml = Pandoc2Yaml.extract_metadata(document)
96
-
97
- yaml = "---\n..." if yaml.empty?
98
-
99
- puts yaml
100
- end
101
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.5
4
+ version: 0.2.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huub de Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-29 00:00:00.000000000 Z
11
+ date: 2017-05-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use Pandoc (http://www.pandoc.org) with ruby
14
14
  email: Huub@heerdebeer.org