gitlab-to-doap 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/Rakefile +19 -0
- data/gitlab-to-doap.gemspec +10 -4
- data/lib/gitlab-to-doap/version.rb +1 -1
- metadata +10 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d511ef2c2347429973b6b2adb6ff5a61aa600f589818914e0f36f917616733c
|
4
|
+
data.tar.gz: 953eb005fad056c2285ab0995f41e29bf64c2003bea2a7fc7af2451595e2f188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faa24d18862f9a5c9770377ab9b0f373c90f8b4224ebcb5fee960d7785c9906abde7b3269abb8295b203d5ff6d23ef5b5aebfccc0845f4dcf0353cf1a2a3398c
|
7
|
+
data.tar.gz: d2ce63059c54761066d1d0a23cc52ce09ea9b18f9e4e0c2b69607ba875b02edf9bf4b188f764e554d49457aef4b2196e1cc03c7cb904ad8a9aa88730e1f293ca
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -20,8 +20,8 @@ Pass the name of the project you want to produce a DOAP XML file for. It will be
|
|
20
20
|
|
21
21
|
This requires two environment variables to be already defined:
|
22
22
|
|
23
|
-
* **
|
24
|
-
* **
|
23
|
+
* **GITLAB_API_ENDPOINT**: Full URL to the Gitlab instance. Must end with `/api/v4`.
|
24
|
+
* **GITLAB_API_PRIVATE_TOKEN**: Your personal access token to the Gitlab instance.
|
25
25
|
|
26
26
|
## Development
|
27
27
|
|
data/Rakefile
CHANGED
@@ -20,4 +20,23 @@ file "man/man1/gitlab-to-doap.1" => ["man/man1/gitlab-to-doap.1.md"] do
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
CLOBBER << "DESCRIPTION"
|
24
|
+
file "DESCRIPTION" => ["README.md"] do
|
25
|
+
# Pull the lines between the first H1 and first H2 out of the readme as
|
26
|
+
# the project description
|
27
|
+
require_relative "lib/gitlab-to-doap"
|
28
|
+
readme_lines = File.readlines("README.md")
|
29
|
+
first = readme_lines.index(readme_lines.grep(/^# /)[0]) + 1
|
30
|
+
last = readme_lines.index(readme_lines.grep(/^## /)[0])
|
31
|
+
description_lines = readme_lines[first...last]
|
32
|
+
m = GitlabToDoap::Utilities.instance_method(:strip_markdown).bind(binding)
|
33
|
+
description = m.call(description_lines.join.strip)
|
34
|
+
description = description.split("\n").join(" ")
|
35
|
+
|
36
|
+
File.open("DESCRIPTION", "w") do |file|
|
37
|
+
file.puts description
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
23
41
|
task build: "man/man1/gitlab-to-doap.1"
|
42
|
+
task build: "DESCRIPTION"
|
data/gitlab-to-doap.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "lib/gitlab-to-doap
|
3
|
+
require_relative "lib/gitlab-to-doap"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "gitlab-to-doap"
|
@@ -8,8 +8,14 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Nogweii"]
|
9
9
|
spec.email = ["me@nogweii.net"]
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
begin
|
12
|
+
description = File.read("DESCRIPTION")
|
13
|
+
rescue Errno::ENOENT
|
14
|
+
description = nil
|
15
|
+
end
|
16
|
+
|
17
|
+
spec.summary = description
|
18
|
+
spec.description = description
|
13
19
|
spec.homepage = "https://code.aether.earth/nogweii/gitlab-to-doap"
|
14
20
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
15
21
|
|
@@ -21,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
21
27
|
# Specify which files should be added to the gem when it is released.
|
22
28
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
29
|
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/**/*.?")
|
30
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|man/.*\.md)/}) } + Dir.glob("man/**/*.?") + ["DESCRIPTION"]
|
25
31
|
end
|
26
32
|
spec.bindir = "exe"
|
27
33
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-to-doap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nogweii
|
@@ -94,21 +94,11 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
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"
|
97
|
+
description: 'Given a gitlab personal token (https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html)
|
98
|
+
and a gitlab project, produce a DOAP (https://github.com/ewilderj/doap/wiki) XML
|
99
|
+
file.
|
100
|
+
|
101
|
+
'
|
112
102
|
email:
|
113
103
|
- me@nogweii.net
|
114
104
|
executables:
|
@@ -121,6 +111,7 @@ files:
|
|
121
111
|
- ".solargraph.yml"
|
122
112
|
- ".standard.yml"
|
123
113
|
- CHANGELOG.md
|
114
|
+
- DESCRIPTION
|
124
115
|
- Gemfile
|
125
116
|
- Gemfile.lock
|
126
117
|
- README.md
|
@@ -161,5 +152,7 @@ requirements: []
|
|
161
152
|
rubygems_version: 3.1.4
|
162
153
|
signing_key:
|
163
154
|
specification_version: 4
|
164
|
-
summary: Given a gitlab personal token
|
155
|
+
summary: Given a gitlab personal token (https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html)
|
156
|
+
and a gitlab project, produce a DOAP (https://github.com/ewilderj/doap/wiki) XML
|
157
|
+
file.
|
165
158
|
test_files: []
|