metanorma 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 947d211469e9b00b6d6826c47a94719b2f7beb9d
4
+ data.tar.gz: de2ca04366db38eb1289e9ddf99697cac7f11526
5
+ SHA512:
6
+ metadata.gz: 644aa91a35ad74386701aea7d3291fb7ff075027c26c37a4a31bfd71213d571173063da81fba417f3eee719ff8ed9681bd7f048e5bae6ba341619926d3fb445f
7
+ data.tar.gz: 59ebf97fec4aaadc2ef7323d66475f2422c25eab5d40aa9f5ba7fbffc3176ce523496a163bbdf27406ed44e131ae72811dc63ee4913725f52345b806f0a65c4b
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.3
5
+ before_install: gem install bundler -v 1.16.1
data/CHANGELOG.adoc ADDED
@@ -0,0 +1,4 @@
1
+ == Changelog
2
+
3
+ === 0.1.0 [05-12-2018]
4
+ * Initial push
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at ronald.tse@ribose.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in metanorma.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Ribose Inc.
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.adoc ADDED
@@ -0,0 +1,67 @@
1
+ = Metanorma: the standard for standards
2
+
3
+ Metanorma is dedicated to harmonizing standard documents
4
+ produced by different standard-setting bodies in a manner that
5
+ maintains correct semantics while allowing each standard publisher to
6
+ define appropriate semantic extensions.
7
+
8
+ Simply put, it allows standards bodies or any other organization
9
+ to create their own standard or specification document in a best
10
+ practices manner.
11
+
12
+ Metanorma is composed of a number of specifications and software
13
+ implementations. The Metanorma document model is based on the SecureDoc
14
+ document model.
15
+
16
+ Metanorma includes the following sub-projects:
17
+
18
+ * The https://github.com/riboseinc/standoc-models[Metanorma document model (previously called StanDoc)]
19
+ * IETF Internet-Drafts and RFCs: the https://datatracker.ietf.org/doc/draft-ribose-asciirfc/[AsciiRFC syntax], the https://github.com/riboseinc/asciidoctor-rfc/[asciidoctor-rfc RFC XML v2 and v3 implementations]
20
+ * ISO Standards: the AsciiISO syntax, the https://github.com/riboseinc/isodoc-models/[IsoDoc Models], the https://github.com/riboseinc/asciidoctor-iso/[asciidoctor-iso IsoDoc implementation]
21
+ * CalConnect Standard Documents (CSD): the AsciiCSD syntax, https://github.com/riboseinc/csd[CSD Models], the https://github.com/riboseinc/asciidoctor-csd/[asciidoctor-csd implementation]
22
+ * Chinese GuoBiao (GB) Standards: the AsciiGB syntax, https://github.com/riboseinc/gbdoc[GbDoc Models], the https://github.com/riboseinc/asciidoctor-gb/[asciidoctor-gb implementation]
23
+ //* Ribose Specification Documents (RSD): AsciiRSD, RSD XML schema, and the https://github.com/riboseinc/asciidoctor-rsd[asciidoctor-rsd implementation]
24
+
25
+
26
+ == Installation
27
+
28
+ The Metanorma workflow can be utilized via the `metanorma` Ruby gem.
29
+
30
+ [source,sh]
31
+ ----
32
+ gem install metanorma
33
+ ----
34
+
35
+
36
+ == Usage
37
+
38
+ [source,sh]
39
+ ----
40
+ metanorma --type <chosen-type> [--format input-format] iso-my-standard-document.adoc
41
+ ----
42
+
43
+ Options:
44
+
45
+ //, `rsd`
46
+ `type`:: (specified via `--type` or `-t`) takes one of the following types:
47
+ `rfc2`, `rfc3`, `iso`, `gb`, `csd`
48
+
49
+ `format`:: (specified via `--format` or `-f`) only accepts `asciidoc` for now
50
+
51
+
52
+ As the `--format` argument is (currently) optional, so:
53
+
54
+ [source,sh]
55
+ ----
56
+ metanorma --type iso iso-my-standard-document.adoc
57
+ ----
58
+
59
+
60
+ == Origin of name
61
+
62
+ *Meta-* is a prefix of Greek origin ("μετα") for "`with`" or simply
63
+ "`of`", and *norma* is Latin for "`rule`" and "`standard`". The
64
+ Metanorma project is for setting a standard for standard documents
65
+ created by standards-setting organizations, and therefore is given this
66
+ rather fitting name.
67
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "metanorma"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/metanorma ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "optparse"
4
+ require "asciidoctor/cli"
5
+ require "asciidoctor/rfc/v2/converter"
6
+ require "asciidoctor/rfc/v3/converter"
7
+ require "asciidoctor/iso/converter"
8
+ require "asciidoctor/gb/converter"
9
+ require "asciidoctor/csd/converter"
10
+
11
+ options = {}
12
+ OptionParser.new do |opts|
13
+ opts.banner = "Usage: metanorma --type XXX --format FORMAT file"
14
+
15
+ opts.on('-t', '--type TYPE', 'Type of standard to generate: rfc2, rfc3, iso, gb, csd') { |v| options[:type] = v }
16
+ opts.on('-f', '--format FORMAT', 'Format of source file: asciidoc (current default, only format supported)') { |v| options[:format] = v }
17
+
18
+ end.parse!
19
+
20
+ unless options[:type]
21
+ puts "You must specify a standard type (metanorma --type XXX file)"
22
+ exit 0
23
+ end
24
+ options[:format] = "asciidoc" unless options[:format]
25
+
26
+ unless %w{rfc2 rfc3 iso gb csd}.include? options[:type]
27
+ puts "#{options[:type]} is not a supported standard type"
28
+ exit 0
29
+ end
30
+ unless options[:format] == "asciidoc"
31
+ puts "Only source file format currently supported is asciidoc"
32
+ exit 0
33
+ end
34
+
35
+ asciidoc_options = Asciidoctor::Cli::Options.new backend: options[:type], header_footer: true
36
+ exit 0 if asciidoc_options.parse!(ARGV) == 0
37
+
38
+ invoker = Asciidoctor::Cli::Invoker.new asciidoc_options
39
+ GC.start
40
+ invoker.invoke!
41
+ exit invoker.code
42
+
data/lib/metanorma.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "metanorma/version"
2
+
3
+ module Metanorma
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,3 @@
1
+ module Metanorma
2
+ VERSION = "0.1.0"
3
+ end
data/metanorma.gemspec ADDED
@@ -0,0 +1,35 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "metanorma/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "metanorma"
8
+ spec.version = Metanorma::VERSION
9
+ spec.authors = ['Ribose Inc.']
10
+ spec.email = ['open.source@ribose.com']
11
+
12
+ spec.summary = %q{Metanorma is the standard of standards; the metanorma gem allows you to create any standard document type supported by Metanorma.}
13
+ spec.description = %q{Metanorma is the standard of standards; the metanorma gem allows you to create any standard document type supported by Metanorma.}
14
+ spec.homepage = "https://github.com/riboseinc/metanorma"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.extra_rdoc_files = %w[README.adoc CHANGELOG.adoc LICENSE.txt]
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.required_ruby_version = '>= 2.3.0'
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.16"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rspec", "~> 3.0"
29
+
30
+ spec.add_runtime_dependency 'asciidoctor-iso'
31
+ spec.add_runtime_dependency 'asciidoctor-rfc'
32
+ spec.add_runtime_dependency 'asciidoctor-gb'
33
+ spec.add_runtime_dependency 'asciidoctor-csd'
34
+ # spec.add_runtime_dependency 'asciidoctor-rsd'
35
+ end
metadata ADDED
@@ -0,0 +1,162 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: metanorma
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ribose Inc.
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-05-12 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.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.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.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: asciidoctor-iso
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: asciidoctor-rfc
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: asciidoctor-gb
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: asciidoctor-csd
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Metanorma is the standard of standards; the metanorma gem allows you
112
+ to create any standard document type supported by Metanorma.
113
+ email:
114
+ - open.source@ribose.com
115
+ executables:
116
+ - metanorma
117
+ extensions: []
118
+ extra_rdoc_files:
119
+ - README.adoc
120
+ - CHANGELOG.adoc
121
+ - LICENSE.txt
122
+ files:
123
+ - ".gitignore"
124
+ - ".rspec"
125
+ - ".travis.yml"
126
+ - CHANGELOG.adoc
127
+ - CODE_OF_CONDUCT.md
128
+ - Gemfile
129
+ - LICENSE.txt
130
+ - README.adoc
131
+ - Rakefile
132
+ - bin/console
133
+ - bin/setup
134
+ - exe/metanorma
135
+ - lib/metanorma.rb
136
+ - lib/metanorma/version.rb
137
+ - metanorma.gemspec
138
+ homepage: https://github.com/riboseinc/metanorma
139
+ licenses: []
140
+ metadata: {}
141
+ post_install_message:
142
+ rdoc_options: []
143
+ require_paths:
144
+ - lib
145
+ required_ruby_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: 2.3.0
150
+ required_rubygems_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ requirements: []
156
+ rubyforge_project:
157
+ rubygems_version: 2.6.14
158
+ signing_key:
159
+ specification_version: 4
160
+ summary: Metanorma is the standard of standards; the metanorma gem allows you to create
161
+ any standard document type supported by Metanorma.
162
+ test_files: []