asciidoctor-rfc 0.1.0
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 +7 -0
- data/.gitignore +12 -0
- data/.hound.yml +3 -0
- data/.rspec +1 -0
- data/.rubocop.yml +1076 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +84 -0
- data/REQUIREMENTS.adoc +36 -0
- data/Rakefile +6 -0
- data/asciidoctor-rfc.gemspec +24 -0
- data/bin/rspec +18 -0
- data/bin/setup +8 -0
- data/lib/asciidoctor/rfc.rb +7 -0
- data/lib/asciidoctor/rfc/version.rb +5 -0
- data/spec/asciidoctor-rfc/.keep +0 -0
- data/spec/spec_helper.rb +11 -0
- metadata +103 -0
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 Ribose
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# AsciiDoctor-RFC
|
2
|
+
|
3
|
+
[](https://travis-ci.org/riboseinc/asciidoctor-rfc)
|
5
|
+
|
6
|
+
TODO: Delete this and the text above, and describe your gem
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem "asciidoctor-rfc"
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
```sh
|
19
|
+
$ bundle
|
20
|
+
```
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
```sh
|
25
|
+
$ gem install asciidoctor-rfc
|
26
|
+
```
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
TODO: Write usage instructions here
|
31
|
+
|
32
|
+
|
33
|
+
## Development
|
34
|
+
|
35
|
+
We are following Sandi Metz's Rules for this gem, you can read the
|
36
|
+
[description of the rules here][sandi-metz] All new code should follow these
|
37
|
+
rules. If you make changes in a pre-existing file that violates these rules you
|
38
|
+
should fix the violations as part of your contribution.
|
39
|
+
|
40
|
+
### Setup
|
41
|
+
|
42
|
+
Clone the repository.
|
43
|
+
|
44
|
+
```sh
|
45
|
+
git clone https://github.com/riboseinc/asciidoctor-rfc
|
46
|
+
```
|
47
|
+
|
48
|
+
Setup your environment.
|
49
|
+
|
50
|
+
```sh
|
51
|
+
bin/setup
|
52
|
+
```
|
53
|
+
|
54
|
+
Run the test suite
|
55
|
+
|
56
|
+
```sh
|
57
|
+
bin/rspec
|
58
|
+
```
|
59
|
+
|
60
|
+
## Contributing
|
61
|
+
|
62
|
+
First, thank you for contributing! We love pull requests from everyone. By
|
63
|
+
participating in this project, you hereby grant [Ribose Inc.][riboseinc] the
|
64
|
+
right to grant or transfer an unlimited number of non exclusive licenses or
|
65
|
+
sub-licenses to third parties, under the copyright covering the contribution
|
66
|
+
to use the contribution by all means.
|
67
|
+
|
68
|
+
Here are a few technical guidelines to follow:
|
69
|
+
|
70
|
+
1. Open an [issue][issues] to discuss a new feature.
|
71
|
+
1. Write tests to support your new feature.
|
72
|
+
1. Make sure the entire test suite passes locally and on CI.
|
73
|
+
1. Open a Pull Request.
|
74
|
+
1. [Squash your commits][squash] after receiving feedback.
|
75
|
+
1. Party!
|
76
|
+
|
77
|
+
## Credits
|
78
|
+
|
79
|
+
This gem is developed, maintained and funded by [Ribose Inc.][riboseinc]
|
80
|
+
|
81
|
+
[riboseinc]: https://www.ribose.com
|
82
|
+
[issues]: https://github.com/riboseinc/ribose-ruby/issues
|
83
|
+
[squash]: https://github.com/thoughtbot/guides/tree/master/protocol/git#write-a-feature
|
84
|
+
[sandi-metz]: http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers
|
data/REQUIREMENTS.adoc
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
= Requirements
|
2
|
+
|
3
|
+
The aim is to create a new Ruby gem called asciidoctor-rfc that outputs an RFC XML document, as an asciidoctor backend.
|
4
|
+
|
5
|
+
RFC XML is defined in these two documents:
|
6
|
+
|
7
|
+
* https://tools.ietf.org/html/rfc7749[RFC 7749]
|
8
|
+
* https://tools.ietf.org/html/rfc7991[RFC 7991]
|
9
|
+
|
10
|
+
This new gem should allow the following work flow:
|
11
|
+
|
12
|
+
1. RFC-XML-enabled AsciiDoc (we can call this "`AsciiDoc-RFC`")
|
13
|
+
2. Converts to RFC XML via asciidoctor-rfc
|
14
|
+
3. RFC XML can convert to TXT or HTML via the tool https://xml2rfc.tools.ietf.org/[`xml2rfc` (v2)]
|
15
|
+
4. Round-tripping:
|
16
|
+
** from AsciiDoc-RFC to RFC XML, then back to AsciiDoc using https://github.com/riboseinc/rfc2md[`rfc2adoc`]
|
17
|
+
|
18
|
+
There are other tools that create XML RFCs, such as https://github.com/miekg/mmark[MMark] which uses Markdown
|
19
|
+
(conversely https://github.com/riboseinc/rfc2md[`rfc2md`]).
|
20
|
+
|
21
|
+
You will need to define and implement some new asciidoctor commands specifically pertaining to the RFC XML format, such as to support the header fields (author, license, etc.), RFC / Internet Draft citations, etc.
|
22
|
+
|
23
|
+
Work needed:
|
24
|
+
|
25
|
+
1. Creation of the asciidoctor-rfc gem:
|
26
|
+
|
27
|
+
** contains necessary commands to create the RFC XML in v2 and v3 formats
|
28
|
+
** output must be acceptable to the `xml2rfc` tool to create TXT and HTML from there
|
29
|
+
|
30
|
+
2 Recreate RFC 6350 and RFC 5545 in the new AsciiDoc format
|
31
|
+
|
32
|
+
** that can be generated into the same RFC through AsciiDoc-RFC -> RFC XML -> RFC HTML
|
33
|
+
|
34
|
+
3. Any bugfixes or minor enhancements on asciidoctor and asciidoctor-pdf:
|
35
|
+
|
36
|
+
** Should be done through our GitHub account, submit PR to main repo, follow-up and ensure acceptance to the mainline. Code and PR must be attributed to Ribose Inc.
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "asciidoctor/rfc/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "asciidoctor-rfc"
|
8
|
+
spec.version = Asciidoctor::Rfc::VERSION
|
9
|
+
spec.authors = ["Ribose Inc."]
|
10
|
+
spec.email = ["open.source@ribose.com"]
|
11
|
+
spec.summary = %q{todo: AsciiDoctorRFC description.}
|
12
|
+
spec.homepage = "https://github.com/riboseinc/asciidoctor-rfc"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.bindir = "bin"
|
16
|
+
spec.require_paths = ["lib"]
|
17
|
+
spec.files = `git ls-files`.split("\n")
|
18
|
+
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
19
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.1.9")
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
22
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
23
|
+
spec.add_development_dependency "rspec", "~> 3.6"
|
24
|
+
end
|
data/bin/rspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# This file was generated by Bundler.
|
5
|
+
#
|
6
|
+
# The application 'rspec' is installed as part of a gem, and
|
7
|
+
# this file is here to facilitate running it.
|
8
|
+
#
|
9
|
+
|
10
|
+
require "pathname"
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
|
12
|
+
"../../Gemfile", Pathname.new(__FILE__).realpath
|
13
|
+
)
|
14
|
+
|
15
|
+
require "rubygems"
|
16
|
+
require "bundler/setup"
|
17
|
+
|
18
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/setup
ADDED
File without changes
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "asciidoctor/rfc"
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Enable flags like --only-failures and --next-failure
|
6
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
+
|
8
|
+
config.expect_with :rspec do |c|
|
9
|
+
c.syntax = :expect
|
10
|
+
end
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: asciidoctor-rfc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ribose Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '12.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.6'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- open.source@ribose.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".hound.yml"
|
64
|
+
- ".rspec"
|
65
|
+
- ".rubocop.yml"
|
66
|
+
- ".travis.yml"
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE
|
69
|
+
- README.md
|
70
|
+
- REQUIREMENTS.adoc
|
71
|
+
- Rakefile
|
72
|
+
- asciidoctor-rfc.gemspec
|
73
|
+
- bin/rspec
|
74
|
+
- bin/setup
|
75
|
+
- lib/asciidoctor/rfc.rb
|
76
|
+
- lib/asciidoctor/rfc/version.rb
|
77
|
+
- spec/asciidoctor-rfc/.keep
|
78
|
+
- spec/spec_helper.rb
|
79
|
+
homepage: https://github.com/riboseinc/asciidoctor-rfc
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 2.1.9
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.5.2
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: 'todo: AsciiDoctorRFC description.'
|
103
|
+
test_files: []
|