gitlab-to-doap 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.gitlab-ci.yml +21 -0
- data/.solargraph.yml +4 -0
- data/.standard.yml +7 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +76 -0
- data/README.md +34 -0
- data/Rakefile +23 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/gitlab-to-doap +23 -0
- data/gitlab-to-doap.gemspec +39 -0
- data/lib/gitlab-to-doap.rb +16 -0
- data/lib/gitlab-to-doap/command.rb +62 -0
- data/lib/gitlab-to-doap/utilities.rb +28 -0
- data/lib/gitlab-to-doap/version.rb +5 -0
- data/lib/gitlab-to-doap/xml.rb +75 -0
- data/man/man1/gitlab-to-doap.1.md +23 -0
- metadata +165 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7b916d52f8ed0599d9977fdbcf7aad1f1be6bf980e9f92ea8736dd66a2941881
|
4
|
+
data.tar.gz: b280683eb6ef78bf39d350d3942e8e8eed38af1df7c48dc4a186095fcc63fa7e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bdf8256ba7f0342575984ae0bd7315d628fc7cbc92209aa6f269d7d78493644b9da484b63c6bb164292f15d6a9eddf8122bcb58778e09400bc6e8bbd87c5b8cb
|
7
|
+
data.tar.gz: c9de9ed8391285c8eab9a6bbab95732f65673f8a72c6a498997c345a45cbfe921771f92403296c28bbaea99b15334e4535ce1aedb1dd0e62e129350299bc6ae0
|
data/.gitignore
ADDED
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
include:
|
2
|
+
- template: Code-Quality.gitlab-ci.yml
|
3
|
+
|
4
|
+
image: ruby:2.7.2
|
5
|
+
|
6
|
+
stages:
|
7
|
+
- test
|
8
|
+
|
9
|
+
# Cache gems in between builds
|
10
|
+
cache:
|
11
|
+
paths:
|
12
|
+
- vendor/ruby
|
13
|
+
|
14
|
+
before_script:
|
15
|
+
- gem install bundler -v 2.2.0
|
16
|
+
- bundle install -j $(nproc) --path vendor
|
17
|
+
|
18
|
+
rake:
|
19
|
+
stage: test
|
20
|
+
script:
|
21
|
+
- bundle exec rake
|
data/.solargraph.yml
ADDED
data/.standard.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [0.1.0] - 2020-12-30
|
10
|
+
### Added
|
11
|
+
* Initial commit with basic functionality.
|
data/Gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in gitlab-to-doap.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 13.0"
|
9
|
+
|
10
|
+
group :test do
|
11
|
+
gem "minitest", "~> 5.0"
|
12
|
+
gem "standard", "~> 0.10"
|
13
|
+
end
|
14
|
+
|
15
|
+
group :development do
|
16
|
+
gem "pry"
|
17
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
gitlab-to-doap (0.1.0)
|
5
|
+
builder (~> 3.0)
|
6
|
+
gitlab (~> 4.0)
|
7
|
+
redcarpet (~> 3.5)
|
8
|
+
tty-option (~> 0.1)
|
9
|
+
tty-screen
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
ast (2.4.1)
|
15
|
+
builder (3.2.4)
|
16
|
+
coderay (1.1.3)
|
17
|
+
gitlab (4.17.0)
|
18
|
+
httparty (~> 0.18)
|
19
|
+
terminal-table (~> 1.5, >= 1.5.1)
|
20
|
+
httparty (0.18.1)
|
21
|
+
mime-types (~> 3.0)
|
22
|
+
multi_xml (>= 0.5.2)
|
23
|
+
method_source (1.0.0)
|
24
|
+
mime-types (3.3.1)
|
25
|
+
mime-types-data (~> 3.2015)
|
26
|
+
mime-types-data (3.2020.1104)
|
27
|
+
minitest (5.14.2)
|
28
|
+
multi_xml (0.6.0)
|
29
|
+
parallel (1.20.1)
|
30
|
+
parser (3.0.0.0)
|
31
|
+
ast (~> 2.4.1)
|
32
|
+
pry (0.13.1)
|
33
|
+
coderay (~> 1.1)
|
34
|
+
method_source (~> 1.0)
|
35
|
+
rainbow (3.0.0)
|
36
|
+
rake (13.0.3)
|
37
|
+
redcarpet (3.5.1)
|
38
|
+
regexp_parser (2.0.3)
|
39
|
+
rexml (3.2.4)
|
40
|
+
rubocop (1.4.2)
|
41
|
+
parallel (~> 1.10)
|
42
|
+
parser (>= 2.7.1.5)
|
43
|
+
rainbow (>= 2.2.2, < 4.0)
|
44
|
+
regexp_parser (>= 1.8)
|
45
|
+
rexml
|
46
|
+
rubocop-ast (>= 1.1.1)
|
47
|
+
ruby-progressbar (~> 1.7)
|
48
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
49
|
+
rubocop-ast (1.3.0)
|
50
|
+
parser (>= 2.7.1.5)
|
51
|
+
rubocop-performance (1.9.1)
|
52
|
+
rubocop (>= 0.90.0, < 2.0)
|
53
|
+
rubocop-ast (>= 0.4.0)
|
54
|
+
ruby-progressbar (1.11.0)
|
55
|
+
standard (0.10.2)
|
56
|
+
rubocop (= 1.4.2)
|
57
|
+
rubocop-performance (= 1.9.1)
|
58
|
+
terminal-table (1.8.0)
|
59
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
60
|
+
tty-option (0.1.0)
|
61
|
+
tty-screen (0.7.1)
|
62
|
+
unicode-display_width (1.7.0)
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
x86_64-linux
|
67
|
+
|
68
|
+
DEPENDENCIES
|
69
|
+
gitlab-to-doap!
|
70
|
+
minitest (~> 5.0)
|
71
|
+
pry
|
72
|
+
rake (~> 13.0)
|
73
|
+
standard (~> 0.10)
|
74
|
+
|
75
|
+
BUNDLED WITH
|
76
|
+
2.2.0
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# gitlab-to-doap
|
2
|
+
|
3
|
+
Given a [gitlab personal token][] and a gitlab project, produce a [DOAP][] XML
|
4
|
+
file.
|
5
|
+
|
6
|
+
[gitlab personal token]: https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html
|
7
|
+
[DOAP]: https://github.com/ewilderj/doap/wiki
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Install it yourself as:
|
12
|
+
|
13
|
+
$ gem install gitlab-to-doap
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
Pass the name of the project you want to produce a DOAP XML file for. It will be sent to `stdout`.
|
18
|
+
|
19
|
+
$ gitlab-to-doap nogweii/dotfiles
|
20
|
+
|
21
|
+
This requires two environment variables to be already defined:
|
22
|
+
|
23
|
+
* **FOO**:
|
24
|
+
* **FOO**:
|
25
|
+
|
26
|
+
## Development
|
27
|
+
|
28
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
29
|
+
|
30
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
31
|
+
|
32
|
+
## Contributing
|
33
|
+
|
34
|
+
Bug reports and pull requests are welcome! Email me or other contact methods at [my website](https://evaryont.me).
|
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "standard/rake"
|
4
|
+
require "bundler/gem_tasks"
|
5
|
+
require "rake/testtask"
|
6
|
+
|
7
|
+
Rake::TestTask.new(:test) do |t|
|
8
|
+
t.libs << "test"
|
9
|
+
t.libs << "lib"
|
10
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
11
|
+
end
|
12
|
+
|
13
|
+
task default: %i[test standard]
|
14
|
+
|
15
|
+
CLOBBER << "man/man1/gitlab-to-doap.1"
|
16
|
+
file "man/man1/gitlab-to-doap.1" => ["man/man1/gitlab-to-doap.1.md"] do
|
17
|
+
require "kramdown"
|
18
|
+
File.open("man/man1/gitlab-to-doap.1", "w") do |file|
|
19
|
+
file.write(Kramdown::Document.new(File.read("man/man1/gitlab-to-doap.1.md")).to_man)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
task build: "man/man1/gitlab-to-doap.1"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "gitlab-to-doap"
|
6
|
+
require "gitlab-to-doap/command"
|
7
|
+
|
8
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
9
|
+
# with your gem easier. You can also use a different console, if you like.
|
10
|
+
cmd = GitlabToDoap::Command.new
|
11
|
+
g2d = GitlabToDoap.new(ENV['GITLAB_API_ENDPOINT'], ENV['GITLAB_API_PRIVATE_TOKEN'])
|
12
|
+
|
13
|
+
require "pry"
|
14
|
+
binding.pry
|
data/bin/setup
ADDED
data/exe/gitlab-to-doap
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "gitlab-to-doap"
|
4
|
+
require "gitlab-to-doap/command"
|
5
|
+
require "tty-screen"
|
6
|
+
|
7
|
+
cmd = GitlabToDoap::Command.new
|
8
|
+
cmd.parse
|
9
|
+
|
10
|
+
if cmd.params[:help]
|
11
|
+
puts cmd.help(width: TTY::Screen.width)
|
12
|
+
exit 0
|
13
|
+
elsif cmd.params[:version]
|
14
|
+
puts GitlabToDoap::VERSION
|
15
|
+
exit 0
|
16
|
+
end
|
17
|
+
|
18
|
+
unless cmd.params.errors.empty?
|
19
|
+
puts cmd.params.errors.summary(width: TTY::Screen.width)
|
20
|
+
exit 1
|
21
|
+
end
|
22
|
+
|
23
|
+
cmd.run
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/gitlab-to-doap/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "gitlab-to-doap"
|
7
|
+
spec.version = GitlabToDoap::VERSION
|
8
|
+
spec.authors = ["Nogweii"]
|
9
|
+
spec.email = ["me@nogweii.net"]
|
10
|
+
|
11
|
+
spec.summary = "Given a gitlab personal token and a gitlab project, produce a DOAP XML file."
|
12
|
+
spec.description = File.read("README.md")
|
13
|
+
spec.homepage = "https://code.aether.earth/nogweii/gitlab-to-doap"
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = "https://code.aether.earth/nogweii/gitlab-to-doap"
|
18
|
+
spec.metadata["changelog_uri"] = "https://code.aether.earth/nogweii/gitlab-to-doap/TODO"
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|man/.*\.md)/}) } + Dir.glob("man/**/*.?")
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
# Uncomment to register a new dependency of your gem
|
31
|
+
spec.add_dependency "builder", "~> 3.0"
|
32
|
+
spec.add_dependency "gitlab", "~> 4.0"
|
33
|
+
spec.add_dependency "redcarpet", "~> 3.5"
|
34
|
+
spec.add_dependency "tty-option", "~> 0.1"
|
35
|
+
spec.add_dependency "tty-screen"
|
36
|
+
# spec.add_dependency "spdx", "~> 3.0"
|
37
|
+
|
38
|
+
spec.add_development_dependency "minitest"
|
39
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gitlab-to-doap/version"
|
4
|
+
require_relative "gitlab-to-doap/utilities"
|
5
|
+
require_relative "gitlab-to-doap/xml"
|
6
|
+
|
7
|
+
class GitlabToDoap
|
8
|
+
class Error < StandardError; end
|
9
|
+
include GitlabToDoap::Utilities
|
10
|
+
include GitlabToDoap::XML
|
11
|
+
|
12
|
+
def initialize(gitlab_endpoint, gitlab_token)
|
13
|
+
@gitlab_endpoint = gitlab_endpoint
|
14
|
+
@gitlab_api_token = gitlab_token
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tty/option"
|
4
|
+
require "gitlab-to-doap"
|
5
|
+
|
6
|
+
class GitlabToDoap::Command
|
7
|
+
include TTY::Option
|
8
|
+
|
9
|
+
usage do
|
10
|
+
program "gitlab-to-doap"
|
11
|
+
banner "Usage: #{program} [OPTIONS] user/project"
|
12
|
+
|
13
|
+
description "Print out a DOAP XML document of a given Gitlab project"
|
14
|
+
end
|
15
|
+
|
16
|
+
flag :help do
|
17
|
+
short "-h"
|
18
|
+
long "--help"
|
19
|
+
desc "Print usage"
|
20
|
+
end
|
21
|
+
|
22
|
+
flag :version do
|
23
|
+
short "-v"
|
24
|
+
long "--version"
|
25
|
+
desc "Print version"
|
26
|
+
end
|
27
|
+
|
28
|
+
argument :project
|
29
|
+
|
30
|
+
environment :gitlab_endpoint do
|
31
|
+
name "GITLAB_API_ENDPOINT"
|
32
|
+
# validate ->({ |v| URI.parse(v) && v.ends_with? "/api/v4" })
|
33
|
+
desc "Full URL to the Gitlab instance. Must end with /api/v4"
|
34
|
+
end
|
35
|
+
|
36
|
+
environment :gitlab_token do
|
37
|
+
name "GITLAB_API_PRIVATE_TOKEN"
|
38
|
+
desc "Your personal access token to the Gitlab instance."
|
39
|
+
end
|
40
|
+
|
41
|
+
option :file do
|
42
|
+
short "-f"
|
43
|
+
long "--file"
|
44
|
+
desc "Send the generated XML to a file, rather than STDOUT."
|
45
|
+
optional
|
46
|
+
end
|
47
|
+
|
48
|
+
def run
|
49
|
+
g2d = GitlabToDoap.new(params[:gitlab_endpoint], params[:gitlab_token])
|
50
|
+
project = g2d.gitlab_project(params[:project])
|
51
|
+
xml = g2d.doap_xml(project)
|
52
|
+
|
53
|
+
if params[:file]
|
54
|
+
# output_filename = project.path_with_namespace.gsub(/\W/, "-") + ".doap.xml"
|
55
|
+
File.open(params[:file], "w") do |f|
|
56
|
+
f.puts xml
|
57
|
+
end
|
58
|
+
else
|
59
|
+
puts xml
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "gitlab"
|
4
|
+
require "redcarpet"
|
5
|
+
require "redcarpet/render_strip"
|
6
|
+
|
7
|
+
module GitlabToDoap::Utilities
|
8
|
+
attr_reader :gitlab_endpoint
|
9
|
+
attr_reader :gitlab_api_token
|
10
|
+
|
11
|
+
# Given some markdown formatted plain text, remove all of the formatting
|
12
|
+
def strip_markdown(text)
|
13
|
+
markdown = Redcarpet::Markdown.new(Redcarpet::Render::StripDown)
|
14
|
+
markdown.render(text).strip
|
15
|
+
end
|
16
|
+
|
17
|
+
# Build a Gitlab API client, if one does not exist already
|
18
|
+
def gitlab
|
19
|
+
@gitlab ||= Gitlab.client(
|
20
|
+
endpoint: @gitlab_endpoint,
|
21
|
+
private_token: @gitlab_api_token
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def gitlab_project(project_id)
|
26
|
+
gitlab.get("/projects/#{gitlab.url_encode project_id}?license=true&statistics=true")
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "builder"
|
4
|
+
|
5
|
+
# This is the real meat and potatoes of the project.
|
6
|
+
module GitlabToDoap::XML
|
7
|
+
def doap_xml(project)
|
8
|
+
project_releases = gitlab.project_releases project["id"]
|
9
|
+
|
10
|
+
latest_release = project_releases[0]
|
11
|
+
languages = gitlab.get("/projects/#{project["id"]}/languages")
|
12
|
+
users = gitlab.get("/projects/#{gitlab.url_encode project["id"]}/users")
|
13
|
+
|
14
|
+
builder = Builder::XmlMarkup.new(indent: 2)
|
15
|
+
builder.instruct!
|
16
|
+
|
17
|
+
builder.Project(xmlns: "http://usefulinc.com/ns/doap#",
|
18
|
+
"xmlns:rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
19
|
+
"xmlns:foaf": "http://xmlns.com/foaf/0.1/") do |proj|
|
20
|
+
proj.name project.name
|
21
|
+
proj.shortdesc strip_markdown(project.description)
|
22
|
+
proj.homepage("rdf:resource": project.web_url)
|
23
|
+
proj.created DateTime.parse(project.created_at).strftime("%Y-%m-%d")
|
24
|
+
|
25
|
+
proj.repository do |repo|
|
26
|
+
repo.GitRepository do |git|
|
27
|
+
git.location("rdf:resource": project.http_url_to_repo)
|
28
|
+
git.browse("rdf:resource": project.web_url + "/-/tree/#{project.default_branch}")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
proj.tag! :"download-page", "rdf:resource": project.web_url
|
33
|
+
|
34
|
+
if project.issues_enabled
|
35
|
+
proj.tag! :"bug-database", "rdf:resource": "#{project.web_url}/-/issues"
|
36
|
+
end
|
37
|
+
|
38
|
+
languages.to_hash.each do |language, _percentage|
|
39
|
+
# XXX: filter based on percentage, only showing languages >10%?
|
40
|
+
proj.tag! :"programming-language", language
|
41
|
+
end
|
42
|
+
|
43
|
+
if project.wiki_enabled
|
44
|
+
proj.wiki("rdf:resource": project.web_url + "/-/wikis/home")
|
45
|
+
end
|
46
|
+
|
47
|
+
project.tag_list.each do |tag|
|
48
|
+
url = URI.parse(project.web_url)
|
49
|
+
url.path = "/explore/projects"
|
50
|
+
url.query = "tag=#{tag}"
|
51
|
+
proj.category("rdf:resource": url.to_s)
|
52
|
+
end
|
53
|
+
|
54
|
+
if project.license
|
55
|
+
proj.license("rdf:resource": project.license.source_url)
|
56
|
+
end
|
57
|
+
|
58
|
+
users.each do |proj_user|
|
59
|
+
proj.maintainer do |maintainer|
|
60
|
+
maintainer.foaf :Person do |person|
|
61
|
+
user = gitlab.user(proj_user.id)
|
62
|
+
person.foaf :name, user.name
|
63
|
+
if user.public_email != ""
|
64
|
+
person.foaf :mbox, "rdf:resource": "mailto:#{user.public_email}"
|
65
|
+
end
|
66
|
+
if user.website_url != ""
|
67
|
+
person.foaf :homepage, "rdf:resource": user.website_url
|
68
|
+
end
|
69
|
+
person.foaf :homepage, "rdf:resource": user.web_url
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
gitlab-to-doap(1) -- short description of command
|
2
|
+
|
3
|
+
## SYNOPSIS
|
4
|
+
|
5
|
+
`name` [`OPTIONS`] [*ARGUMENT*...]
|
6
|
+
|
7
|
+
## DESCRIPTION
|
8
|
+
|
9
|
+
All block elements like paragraphs, blockquotes, lists, ... work as they
|
10
|
+
do with normal kramdown documents.
|
11
|
+
|
12
|
+
Use code spans for `code`, `--options` and `user input`, emphasis for
|
13
|
+
*variables*, *argument names* and *file names*, and **strong emphasis**
|
14
|
+
for things that should stand out.
|
15
|
+
|
16
|
+
## OPTIONS
|
17
|
+
|
18
|
+
`-o`
|
19
|
+
`--option`
|
20
|
+
: Description of option
|
21
|
+
|
22
|
+
`--key`=*value*
|
23
|
+
: Another option with a *value*
|
metadata
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gitlab-to-doap
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nogweii
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-12-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: builder
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: gitlab
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: redcarpet
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.5'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: tty-option
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: tty-screen
|
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: minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: "# gitlab-to-doap\n\nGiven a [gitlab personal token][] and a gitlab project,
|
98
|
+
produce a [DOAP][] XML\nfile.\n\n[gitlab personal token]: https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html\n[DOAP]:
|
99
|
+
https://github.com/ewilderj/doap/wiki\n\n## Installation\n\nInstall it yourself
|
100
|
+
as:\n\n $ gem install gitlab-to-doap\n\n## Usage\n\nPass the name of the project
|
101
|
+
you want to produce a DOAP XML file for. It will be sent to `stdout`.\n\n $ gitlab-to-doap
|
102
|
+
nogweii/dotfiles\n\nThis requires two environment variables to be already defined:\n\n*
|
103
|
+
**FOO**: \n* **FOO**: \n\n## Development\n\nAfter checking out the repo, run `bin/setup`
|
104
|
+
to install dependencies. Then, run `rake test` to run the tests. You can also run
|
105
|
+
`bin/console` for an interactive prompt that will allow you to experiment.\n\nTo
|
106
|
+
install this gem onto your local machine, run `bundle exec rake install`. To release
|
107
|
+
a new version, update the version number in `version.rb`, and then run `bundle exec
|
108
|
+
rake release`, which will create a git tag for the version, push git commits and
|
109
|
+
the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n##
|
110
|
+
Contributing\n\nBug reports and pull requests are welcome! Email me or other contact
|
111
|
+
methods at [my website](https://evaryont.me).\n"
|
112
|
+
email:
|
113
|
+
- me@nogweii.net
|
114
|
+
executables:
|
115
|
+
- gitlab-to-doap
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".gitignore"
|
120
|
+
- ".gitlab-ci.yml"
|
121
|
+
- ".solargraph.yml"
|
122
|
+
- ".standard.yml"
|
123
|
+
- CHANGELOG.md
|
124
|
+
- Gemfile
|
125
|
+
- Gemfile.lock
|
126
|
+
- README.md
|
127
|
+
- Rakefile
|
128
|
+
- bin/console
|
129
|
+
- bin/setup
|
130
|
+
- exe/gitlab-to-doap
|
131
|
+
- gitlab-to-doap.gemspec
|
132
|
+
- lib/gitlab-to-doap.rb
|
133
|
+
- lib/gitlab-to-doap/command.rb
|
134
|
+
- lib/gitlab-to-doap/utilities.rb
|
135
|
+
- lib/gitlab-to-doap/version.rb
|
136
|
+
- lib/gitlab-to-doap/xml.rb
|
137
|
+
- man/man1/gitlab-to-doap.1
|
138
|
+
- man/man1/gitlab-to-doap.1.md
|
139
|
+
homepage: https://code.aether.earth/nogweii/gitlab-to-doap
|
140
|
+
licenses: []
|
141
|
+
metadata:
|
142
|
+
homepage_uri: https://code.aether.earth/nogweii/gitlab-to-doap
|
143
|
+
source_code_uri: https://code.aether.earth/nogweii/gitlab-to-doap
|
144
|
+
changelog_uri: https://code.aether.earth/nogweii/gitlab-to-doap/TODO
|
145
|
+
allowed_push_host: https://rubygems.org
|
146
|
+
post_install_message:
|
147
|
+
rdoc_options: []
|
148
|
+
require_paths:
|
149
|
+
- lib
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 2.7.0
|
155
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
requirements: []
|
161
|
+
rubygems_version: 3.1.4
|
162
|
+
signing_key:
|
163
|
+
specification_version: 4
|
164
|
+
summary: Given a gitlab personal token and a gitlab project, produce a DOAP XML file.
|
165
|
+
test_files: []
|