ronin-repos 0.1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.github/workflows/ruby.yml +27 -0
- data/.gitignore +13 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/.yardopts +1 -0
- data/COPYING.txt +165 -0
- data/ChangeLog.md +7 -0
- data/Gemfile +32 -0
- data/README.md +159 -0
- data/Rakefile +34 -0
- data/bin/ronin-repos +35 -0
- data/data/templates/repo/README.md.erb +11 -0
- data/gemspec.yml +36 -0
- data/lib/ronin/repos/cache_dir.rb +267 -0
- data/lib/ronin/repos/class_dir.rb +150 -0
- data/lib/ronin/repos/cli/command.rb +63 -0
- data/lib/ronin/repos/cli/commands/install.rb +71 -0
- data/lib/ronin/repos/cli/commands/list.rb +80 -0
- data/lib/ronin/repos/cli/commands/new.rb +83 -0
- data/lib/ronin/repos/cli/commands/purge.rb +39 -0
- data/lib/ronin/repos/cli/commands/remove.rb +71 -0
- data/lib/ronin/repos/cli/commands/update.rb +91 -0
- data/lib/ronin/repos/cli.rb +45 -0
- data/lib/ronin/repos/exceptions.rb +33 -0
- data/lib/ronin/repos/repository.rb +343 -0
- data/lib/ronin/repos/root.rb +26 -0
- data/lib/ronin/repos/version.rb +24 -0
- data/lib/ronin/repos.rb +81 -0
- data/man/ronin-repos-install.1 +64 -0
- data/man/ronin-repos-install.1.md +49 -0
- data/man/ronin-repos-list.1 +54 -0
- data/man/ronin-repos-list.1.md +41 -0
- data/man/ronin-repos-new.1 +37 -0
- data/man/ronin-repos-purge.1 +54 -0
- data/man/ronin-repos-purge.1.md +41 -0
- data/man/ronin-repos-remove.1 +60 -0
- data/man/ronin-repos-remove.1.md +46 -0
- data/man/ronin-repos-update.1 +64 -0
- data/man/ronin-repos-update.1.md +49 -0
- data/man/ronin-repos.1 +49 -0
- data/man/ronin-repos.1.md +37 -0
- data/ronin-repos.gemspec +62 -0
- data/spec/cache_dir_spec.rb +272 -0
- data/spec/class_dir_spec.rb +97 -0
- data/spec/fixtures/cache/repo1/dir/file1.txt +0 -0
- data/spec/fixtures/cache/repo1/file1.txt +0 -0
- data/spec/fixtures/cache/repo1/file2.txt +0 -0
- data/spec/fixtures/cache/repo2/dir/file1.txt +0 -0
- data/spec/fixtures/cache/repo2/dir/file2.txt +0 -0
- data/spec/fixtures/cache/repo2/file1.txt +0 -0
- data/spec/fixtures/cache/repo2/file2.txt +0 -0
- data/spec/fixtures/cache/repo2/only-exists-in-repo2.txt +0 -0
- data/spec/fixtures/class_dir/file1.rb +0 -0
- data/spec/fixtures/class_dir/file2.rb +0 -0
- data/spec/fixtures/class_dir/only_in_class_dir.rb +0 -0
- data/spec/repos_spec.rb +67 -0
- data/spec/repository_spec.rb +415 -0
- data/spec/spec_helper.rb +6 -0
- metadata +143 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1cdb6ec92ec228ed94c0dffd11a4bf18deed273cc583d2f004a14def0350d1cf
|
4
|
+
data.tar.gz: 654d9319ac2ef706f48ae1b857578869e966a182c2f714123bc860fd2a33c0d8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a5620e26ab2f1bbcda24a33859191a75217e07c8ff7666597ec0278147f26988cc15c569efd4eec3dabf954821e3d2dc8cf2f06b90a38223683a66e6ac4b2159
|
7
|
+
data.tar.gz: d4660c329f3674884c038bae87529d3e89f39e0c675f6584802cf504d83feb476dc5485e4619123a4bd7c05d9e4ed71a420ba87a1356da7aea0e9678d369bb88
|
data/.document
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [ push, pull_request ]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
tests:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby:
|
12
|
+
- '3.0'
|
13
|
+
- '3.1'
|
14
|
+
- '3.2'
|
15
|
+
- jruby
|
16
|
+
- truffleruby
|
17
|
+
name: Ruby ${{ matrix.ruby }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
24
|
+
- name: Install dependencies
|
25
|
+
run: bundle install --jobs 4 --retry 3
|
26
|
+
- name: Run tests
|
27
|
+
run: bundle exec rake test
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour --format documentation
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-3.1
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--markup markdown --title 'Ronin Repos Documentation' --protected
|
data/COPYING.txt
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
data/ChangeLog.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
platform :jruby do
|
6
|
+
gem 'jruby-openssl', '~> 0.7'
|
7
|
+
end
|
8
|
+
|
9
|
+
# Ronin dependencies:
|
10
|
+
# gem 'ronin-core', '~> 0.1', github: "ronin-rb/ronin-core",
|
11
|
+
# branch: 'main'
|
12
|
+
|
13
|
+
# gem 'command_kit', '~> 0.4', github: 'postmodern/command_kit.rb',
|
14
|
+
# branch: 'main'
|
15
|
+
|
16
|
+
group :development do
|
17
|
+
gem 'rake'
|
18
|
+
gem 'rubygems-tasks', '~> 0.1'
|
19
|
+
gem 'rspec', '~> 3.0'
|
20
|
+
gem 'simplecov', '~> 0.20'
|
21
|
+
|
22
|
+
gem 'kramdown', '~> 2.0'
|
23
|
+
gem 'kramdown-man', '~> 0.1'
|
24
|
+
|
25
|
+
gem 'redcarpet', platform: :mri
|
26
|
+
gem 'yard', '~> 0.9'
|
27
|
+
gem 'yard-spellcheck', require: false
|
28
|
+
|
29
|
+
gem 'dead_end', require: false
|
30
|
+
gem 'sord', require: false, platforms: :mri
|
31
|
+
gem 'stackprof', require: false, platforms: :mri
|
32
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
# ronin-repos
|
2
|
+
|
3
|
+
[![CI](https://github.com/ronin-rb/ronin-repos/actions/workflows/ruby.yml/badge.svg)](https://github.com/ronin-rb/ronin-repos/actions/workflows/ruby.yml)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/ronin-rb/ronin-repos.svg)](https://codeclimate.com/github/ronin-rb/ronin-repos)
|
5
|
+
|
6
|
+
* [Website](https://ronin-rb.dev)
|
7
|
+
* [Source](https://github.com/ronin-rb/ronin-repos)
|
8
|
+
* [Issues](https://github.com/ronin-rb/ronin-repos/issues)
|
9
|
+
* [Documentation](https://ronin-rb.dev/docs/ronin-repos/frames)
|
10
|
+
* [Discord](https://discord.gg/6WAb3PsVX9) |
|
11
|
+
[Twitter](https://twitter.com/ronin_rb) |
|
12
|
+
[Mastodon](https://infosec.exchange/@ronin_rb)
|
13
|
+
|
14
|
+
## Description
|
15
|
+
|
16
|
+
ronin-repos provides a repository system for installing, managing, and accessing
|
17
|
+
third-party git repositories, which can contain code or other data.
|
18
|
+
|
19
|
+
ronin-repos is part of the [ronin-rb] project, a toolkit for security research
|
20
|
+
and development.
|
21
|
+
|
22
|
+
## Features
|
23
|
+
|
24
|
+
* Supports installing any [Git][git] repository.
|
25
|
+
* Manages installed repositories.
|
26
|
+
* Has 85% documentation coverage.
|
27
|
+
* Has 100% test coverage.
|
28
|
+
|
29
|
+
## Synopsis
|
30
|
+
|
31
|
+
```
|
32
|
+
Usage: ronin-repos [options] [COMMAND [ARGS...]]
|
33
|
+
|
34
|
+
Options:
|
35
|
+
-h, --help Print help information
|
36
|
+
|
37
|
+
Arguments:
|
38
|
+
[COMMAND] The command name to run
|
39
|
+
[ARGS ...] Additional arguments for the command
|
40
|
+
|
41
|
+
Commands:
|
42
|
+
help
|
43
|
+
install
|
44
|
+
list, ls
|
45
|
+
new
|
46
|
+
purge
|
47
|
+
remove, rm
|
48
|
+
update, up
|
49
|
+
```
|
50
|
+
|
51
|
+
Install a repository:
|
52
|
+
|
53
|
+
```shell
|
54
|
+
$ ronin-repos install https://github.com/...
|
55
|
+
```
|
56
|
+
|
57
|
+
List installed Repositories:
|
58
|
+
|
59
|
+
```shell
|
60
|
+
$ ronin-repos ls
|
61
|
+
```
|
62
|
+
|
63
|
+
Update all installed Repositories:
|
64
|
+
|
65
|
+
```shell
|
66
|
+
$ ronin-repos update
|
67
|
+
```
|
68
|
+
|
69
|
+
Update a specific Repositories:
|
70
|
+
|
71
|
+
```shell
|
72
|
+
$ ronin-repos update NAME
|
73
|
+
```
|
74
|
+
|
75
|
+
Uninstall a specific Repositories:
|
76
|
+
|
77
|
+
```shell
|
78
|
+
$ ronin-repos rm repo-name
|
79
|
+
```
|
80
|
+
|
81
|
+
Delete all repositories:
|
82
|
+
|
83
|
+
```shell
|
84
|
+
$ ronin-repos purge
|
85
|
+
```
|
86
|
+
|
87
|
+
Generate your own repo:
|
88
|
+
|
89
|
+
```shell
|
90
|
+
$ ronin-repos new my-repo
|
91
|
+
$ git remote add origin git@github.com:user/my-repo.git
|
92
|
+
$ git push -u origin main
|
93
|
+
```
|
94
|
+
|
95
|
+
## Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'ronin/repos'
|
99
|
+
|
100
|
+
Ronin::Repos.find_file('wordlists/wordlist.txt')
|
101
|
+
# => "/home/user/.cache/ronin-repos/foo-repo/wordlists/wordlist.txt"
|
102
|
+
|
103
|
+
Rnnin::Repos.glob("wordlists/*.txt")
|
104
|
+
# => ["/home/user/.cache/ronin-repos/foo-repo/wordlists/cities.txt",
|
105
|
+
# "/home/user/.cache/ronin-repos/foo-repo/wordlists/states.txt",
|
106
|
+
# "/home/user/.cache/ronin-repos/bar-repo/wordlists/bands.txt",
|
107
|
+
# "/home/user/.cache/ronin-repos/bar-repo/wordlists/beers.txt"]
|
108
|
+
```
|
109
|
+
|
110
|
+
## Requirements
|
111
|
+
|
112
|
+
* [Ruby] >= 3.0.0
|
113
|
+
* [ronin-core] ~> 0.1
|
114
|
+
|
115
|
+
## Install
|
116
|
+
|
117
|
+
```shell
|
118
|
+
$ gem install ronin-repos
|
119
|
+
```
|
120
|
+
|
121
|
+
### Gemfile
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
gem 'ronin-repos', '~> 0.1'
|
125
|
+
```
|
126
|
+
|
127
|
+
## Development
|
128
|
+
|
129
|
+
1. [Fork It!](https://github.com/ronin-rb/ronin-repos/fork)
|
130
|
+
2. Clone It!
|
131
|
+
3. `cd ronin-repos`
|
132
|
+
4. `bundle install`
|
133
|
+
5. `git checkout -b my_feature`
|
134
|
+
6. Code It!
|
135
|
+
7. `bundle exec rake spec`
|
136
|
+
8. `git push origin my_feature`
|
137
|
+
|
138
|
+
## License
|
139
|
+
|
140
|
+
Copyright (c) 2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
141
|
+
|
142
|
+
ronin-repos is free software: you can redistribute it and/or modify
|
143
|
+
it under the terms of the GNU Lesser General Public License as published
|
144
|
+
by the Free Software Foundation, either version 3 of the License, or
|
145
|
+
(at your option) any later version.
|
146
|
+
|
147
|
+
ronin-repos is distributed in the hope that it will be useful,
|
148
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
149
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
150
|
+
GNU Lesser General Public License for more details.
|
151
|
+
|
152
|
+
You should have received a copy of the GNU Lesser General Public License
|
153
|
+
along with ronin-repos. If not, see <https://www.gnu.org/licenses/>.
|
154
|
+
|
155
|
+
[ronin-rb]: https://ronin-rb.dev/
|
156
|
+
|
157
|
+
[Ruby]: https://www.ruby-lang.org
|
158
|
+
[git]: https://git-scm.com/
|
159
|
+
[ronin-core]: https://github.com/ronin-rb/ronin-core#readme
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'bundler'
|
5
|
+
rescue LoadError => e
|
6
|
+
warn e.message
|
7
|
+
warn "Run `gem install bundler` to install Bundler"
|
8
|
+
exit -1
|
9
|
+
end
|
10
|
+
|
11
|
+
begin
|
12
|
+
Bundler.setup(:development)
|
13
|
+
rescue Bundler::BundlerError => e
|
14
|
+
warn e.message
|
15
|
+
warn "Run `bundle install` to install missing gems"
|
16
|
+
exit e.status_code
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake'
|
20
|
+
|
21
|
+
require 'rubygems/tasks'
|
22
|
+
Gem::Tasks.new(sign: {checksum: true, pgp: true})
|
23
|
+
|
24
|
+
require 'rspec/core/rake_task'
|
25
|
+
RSpec::Core::RakeTask.new
|
26
|
+
task :test => :spec
|
27
|
+
task :default => :spec
|
28
|
+
|
29
|
+
require 'yard'
|
30
|
+
YARD::Rake::YardocTask.new
|
31
|
+
task :docs => :yard
|
32
|
+
|
33
|
+
require 'kramdown/man/task'
|
34
|
+
Kramdown::Man::Task.new
|
data/bin/ronin-repos
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (c) 2021 Hal Brodigan (postmodern.mod3 at gmail.com)
|
4
|
+
#
|
5
|
+
# This file is part of ronin-repos.
|
6
|
+
#
|
7
|
+
# ronin-repos is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published
|
9
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# ronin-repos is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Lesser General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
18
|
+
# along with ronin-repos. If not, see <https://www.gnu.org/licenses/>.
|
19
|
+
#
|
20
|
+
|
21
|
+
root = File.expand_path(File.join(__dir__,'..'))
|
22
|
+
if File.file?(File.join(root,'Gemfile.lock'))
|
23
|
+
Dir.chdir(root) do
|
24
|
+
begin
|
25
|
+
require 'bundler/setup'
|
26
|
+
rescue LoadError => e
|
27
|
+
warn e.message
|
28
|
+
warn "Run `gem install bundler` to install Bundler"
|
29
|
+
exit -1
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
require 'ronin/repos/cli'
|
35
|
+
Ronin::Repos::CLI.start
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# <%= @name %>
|
2
|
+
|
3
|
+
## Install
|
4
|
+
|
5
|
+
This git repository can be installed by the [ronin-repos] command:
|
6
|
+
|
7
|
+
```shell
|
8
|
+
ronin-repos download https://github.com/<%= @github_user %>/<%= @name %>.git
|
9
|
+
```
|
10
|
+
|
11
|
+
[ronin-repos]: https://github.com/ronin-rb/ronin-repos#readme
|
data/gemspec.yml
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
name: ronin-repos
|
2
|
+
summary: Third-party git repository support for ronin.
|
3
|
+
description:
|
4
|
+
ronin-repos provides a repository system for installing, managing, and
|
5
|
+
accessing third-party git repositories, which can contain code or other data.
|
6
|
+
|
7
|
+
license: LGPL-3.0
|
8
|
+
authors: Postmodern
|
9
|
+
email: postmodern.mod3@gmail.com
|
10
|
+
homepage: https://ronin-rb.dev
|
11
|
+
has_yard: true
|
12
|
+
|
13
|
+
metadata:
|
14
|
+
documentation_uri: https://rubydoc.info/gems/ronin-repos
|
15
|
+
source_code_uri: https://github.com/ronin-rb/ronin-repos
|
16
|
+
bug_tracker_uri: https://github.com/ronin-rb/ronin-repos/issues
|
17
|
+
changelog_uri: https://github.com/ronin-rb/ronin-repos/blob/main/ChangeLog.md
|
18
|
+
rubygems_mfa_required: 'true'
|
19
|
+
|
20
|
+
generated_files:
|
21
|
+
- man/ronin-repos.1
|
22
|
+
- man/ronin-repos-install.1
|
23
|
+
- man/ronin-repos-list.1
|
24
|
+
- man/ronin-repos-new.1
|
25
|
+
- man/ronin-repos-remove.1
|
26
|
+
- man/ronin-repos-update.1
|
27
|
+
- man/ronin-repos-purge.1
|
28
|
+
|
29
|
+
required_ruby_version: ">= 3.0.0"
|
30
|
+
|
31
|
+
dependencies:
|
32
|
+
# Library dependencies:
|
33
|
+
ronin-core: ~> 0.1.0.beta1
|
34
|
+
|
35
|
+
development_dependencies:
|
36
|
+
bundler: ~> 2.0
|