gemtext 1.0.0 → 1.0.1

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: 1392d564c448b924956632750348b03f7804d62ab1e3b925c212b25d44f613bb
4
- data.tar.gz: 16d8245dda4b5356bf5adbd0d2070dbd6b28239c096de688c47126990656a0cc
3
+ metadata.gz: 23b95a65e73900a2a61be9eb700c46f491349ae5fcc0e5f85feccef0ac2107cd
4
+ data.tar.gz: b0908b00701aa647a2dedfa6e4f0d7c17700444b2e07d7fa0f47b6ad7da27a5c
5
5
  SHA512:
6
- metadata.gz: 98a51c3e848abcd5cc1d1d7840d56ed0e7cc916ce2546db688e06faf4b4920b35568f2d23c13404add1e2751cc9440fe1e266ddc2dd996fd71344a154b2925fd
7
- data.tar.gz: a39c9d52790e8cbf6481edd59d893a73e210742e8513eb7a823b511d81dbb2dd32b6caf26e1a465dca784fae353bd640e2437e53b5b3a75a485d5d30aaf07eb9
6
+ metadata.gz: 5ced53ccb6261662dfdea645c51c576fe6523ee10dae5e67d7dfc51e6a28bee7092977e7e385324b66adf2f18b4c825da96cdc613a1105e1aa3a7153d6c33cd9
7
+ data.tar.gz: 71ec1f78a0c008e01cd392643e099203edeb806c23af14b04dbd9af867f8d8ba8e874e3da0ee56e005b3ff37afd1608894ba35062f285e10dae5d4c56795171a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.0.1
4
+
5
+ - Added 'parse' method to top-level module, like how the README describes. Method can take a String, or a StringIO.
6
+ - Added tests for the top-level 'parse' method.
7
+
3
8
  ## v1.0.0
4
9
 
5
- * Parse a Gemtext::Document from a Ruby IO
10
+ - Parse a Gemtext::Document from a Ruby IO
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in gemtext.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake", "~> 12.0"
7
- gem "minitest", "~> 5.0"
6
+ gem 'minitest', '~> 5.0'
7
+ gem 'rake', '~> 12.0'
data/Gemfile.lock ADDED
@@ -0,0 +1,22 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gemtext (1.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.23.1)
10
+ rake (12.3.3)
11
+
12
+ PLATFORMS
13
+ arm64-darwin-23
14
+ ruby
15
+
16
+ DEPENDENCIES
17
+ gemtext!
18
+ minitest (~> 5.0)
19
+ rake (~> 12.0)
20
+
21
+ BUNDLED WITH
22
+ 2.5.6
data/README.md CHANGED
@@ -15,11 +15,11 @@ gem 'gemtext'
15
15
 
16
16
  And then execute:
17
17
 
18
- $ bundle install
18
+ bundle install
19
19
 
20
20
  Or install it yourself as:
21
21
 
22
- $ gem install gemtext
22
+ gem install gemtext
23
23
 
24
24
  ## Usage
25
25
 
@@ -36,8 +36,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
36
36
 
37
37
  ## Contributing
38
38
 
39
- Bug reports and pull requests are welcome on GitHub at https://github.com/exastencil/gemtext. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/exastencil/gemtext/blob/master/CODE_OF_CONDUCT.md).
40
-
39
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/exastencil/gemtext>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/exastencil/gemtext/blob/master/CODE_OF_CONDUCT.md).
41
40
 
42
41
  ## License
43
42
 
@@ -1,3 +1,3 @@
1
1
  module Gemtext
2
- VERSION = "1.0.0"
2
+ VERSION = '1.0.1'
3
3
  end
data/lib/gemtext.rb CHANGED
@@ -1,6 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'gemtext/version'
2
4
  require 'gemtext/parser'
5
+ require 'stringio'
3
6
 
4
7
  module Gemtext
5
8
  class Error < StandardError; end
9
+
10
+ def self.parse(data)
11
+ io = data
12
+ io = StringIO.new(data) if data.instance_of? String
13
+ parser = Parser.new(io)
14
+ parser.parse
15
+ end
6
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemtext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Exa Stencil
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-20 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Produces a Gemtext::Document of Gemtext::Nodes from a Ruby IO
14
14
  email:
@@ -22,6 +22,7 @@ files:
22
22
  - CHANGELOG.md
23
23
  - CODE_OF_CONDUCT.md
24
24
  - Gemfile
25
+ - Gemfile.lock
25
26
  - LICENSE.txt
26
27
  - README.md
27
28
  - Rakefile
@@ -49,7 +50,7 @@ metadata:
49
50
  homepage_uri: https://github.com/exastencil/gemtext
50
51
  source_code_uri: https://github.com/exastencil/gemtext
51
52
  changelog_uri: https://github.com/exastencil/gemtext/blob/main/CHANGELOG.md
52
- post_install_message:
53
+ post_install_message:
53
54
  rdoc_options: []
54
55
  require_paths:
55
56
  - lib
@@ -64,8 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  - !ruby/object:Gem::Version
65
66
  version: '0'
66
67
  requirements: []
67
- rubygems_version: 3.1.4
68
- signing_key:
68
+ rubygems_version: 3.5.6
69
+ signing_key:
69
70
  specification_version: 4
70
71
  summary: Gemtext parser for Ruby
71
72
  test_files: []