minitar 0.9 → 0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Contributing.md +48 -47
- data/History.md +158 -127
- data/Manifest.txt +1 -0
- data/README.rdoc +1 -6
- data/Rakefile +53 -33
- data/lib/archive/tar/minitar/input.rb +18 -18
- data/lib/archive/tar/minitar/output.rb +6 -6
- data/lib/archive/tar/minitar/posix_header.rb +36 -34
- data/lib/archive/tar/minitar/reader.rb +47 -33
- data/lib/archive/tar/minitar/writer.rb +64 -35
- data/lib/archive/tar/minitar.rb +45 -44
- data/lib/archive-tar-minitar.rb +1 -1
- data/lib/minitar.rb +1 -1
- data/support/hoe/deprecated_gem.rb +64 -0
- data/test/minitest_helper.rb +7 -6
- data/test/support/tar_test_helpers.rb +45 -41
- data/test/test_tar_header.rb +30 -31
- data/test/test_tar_input.rb +31 -31
- data/test/test_tar_output.rb +12 -12
- data/test/test_tar_reader.rb +23 -23
- data/test/test_tar_writer.rb +119 -69
- metadata +70 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1599b7ba095a509ecf3e4cb540bc364307275322f7794cc57a08cfe338bf410c
|
4
|
+
data.tar.gz: e2772f9012f50c7fef8ae5b8c8f30a7ac6e43946ceff776cd53ad9d8f5749eb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d2fd6dfbfeb28f40ad1bc0654fc1dc2cb2ca9743006009bd6af0f38f1de164a47043c0f8f45db64c668617d8f62154efe73d1c211227f52fa4a45060b218053
|
7
|
+
data.tar.gz: 7227d0e1ee873ca7cea9bef8709b3144f3d218391fc5655c86fba83716dbf78733b3632fac0980d7ce64f258c64004416263d1d2d30f5137bcd11bfe31f28214
|
data/Contributing.md
CHANGED
@@ -4,21 +4,21 @@ I value any contribution to minitar you can provide: a bug report, a feature
|
|
4
4
|
request, or code contributions. There are a few guidelines for contributing to
|
5
5
|
minitar:
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
- Code changes _will not_ be accepted without tests. The test suite is
|
8
|
+
written with [Minitest][].
|
9
|
+
- Match my coding style.
|
10
|
+
- Use a thoughtfully-named topic branch that contains your change. Rebase
|
11
|
+
your commits into logical chunks as necessary.
|
12
|
+
- Use [quality commit messages][].
|
13
|
+
- Do not change the version number; when your patch is accepted and a release
|
14
|
+
is made, the version will be updated at that point.
|
15
|
+
- Submit a GitHub pull request with your changes.
|
16
|
+
- New or changed behaviours require appropriate documentation.
|
17
17
|
|
18
18
|
### Test Dependencies
|
19
19
|
|
20
|
-
minitar uses Ryan Davis’s [Hoe][] to manage the release process, and it adds
|
21
|
-
number of rake tasks. You will mostly be interested in:
|
20
|
+
minitar uses Ryan Davis’s [Hoe][] to manage the release process, and it adds
|
21
|
+
a number of rake tasks. You will mostly be interested in:
|
22
22
|
|
23
23
|
$ rake
|
24
24
|
|
@@ -29,14 +29,14 @@ which runs the tests the same way that:
|
|
29
29
|
|
30
30
|
will do.
|
31
31
|
|
32
|
-
To assist with the installation of the development dependencies for minitar,
|
33
|
-
have provided the simplest possible Gemfile pointing to the (generated)
|
32
|
+
To assist with the installation of the development dependencies for minitar,
|
33
|
+
I have provided the simplest possible Gemfile pointing to the (generated)
|
34
34
|
`minitar.gemspec` file. This will permit you to do:
|
35
35
|
|
36
36
|
$ bundle install
|
37
37
|
|
38
|
-
to get the development dependencies. If you aleady have `hoe` installed, you
|
39
|
-
|
38
|
+
to get the development dependencies. If you aleady have `hoe` installed, you can
|
39
|
+
accomplish the same thing with:
|
40
40
|
|
41
41
|
$ rake newb
|
42
42
|
|
@@ -51,41 +51,42 @@ You can run tests with code coverage analysis by running:
|
|
51
51
|
|
52
52
|
Here's the most direct way to get your work merged into the project:
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
change does and the why you think it should be merged.
|
54
|
+
- Fork the project.
|
55
|
+
- Clone down your fork (`git clone git://github.com/<username>/minitar.git`).
|
56
|
+
- Create a topic branch to contain your change (`git checkout -b my_awesome_feature`).
|
57
|
+
- Hack away, add tests. Not necessarily in that order.
|
58
|
+
- Make sure everything still passes by running `rake`.
|
59
|
+
- If necessary, rebase your commits into logical chunks, without errors.
|
60
|
+
- Push the branch up (`git push origin my_awesome_feature`).
|
61
|
+
- Create a pull request against halostatue/minitar and describe what your
|
62
|
+
change does and the why you think it should be merged.
|
64
63
|
|
65
64
|
### Contributors
|
66
65
|
|
67
|
-
|
68
|
-
|
66
|
+
- Austin Ziegler created minitar, based on work originally written by
|
67
|
+
Mauricio Fernández for rpa-base.
|
69
68
|
|
70
69
|
Thanks to everyone who has contributed to minitar:
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
71
|
+
- Akinori MUSHA (knu)
|
72
|
+
- Antoine Toulme
|
73
|
+
- Curtis Sampson
|
74
|
+
- Daniel J. Berger
|
75
|
+
- dearblue
|
76
|
+
- inkstak
|
77
|
+
- Jorie Tappa
|
78
|
+
- Kazuyoshi Kato
|
79
|
+
- Kevin McDermott
|
80
|
+
- Matthew Kent
|
81
|
+
- Merten Falk
|
82
|
+
- Michal Suchanek
|
83
|
+
- Mike Furr
|
84
|
+
- ooooooo_q
|
85
|
+
- Pete Fritchman
|
86
|
+
- Vijay (bv-vijay)
|
87
|
+
- Yamamoto Kōhei
|
88
|
+
- Zach Dennis
|
89
|
+
|
90
|
+
[minitest]: https://github.com/seattlerb/minitest
|
90
91
|
[quality commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
91
|
-
[
|
92
|
+
[hoe]: https://github.com/seattlerb/hoe
|
data/History.md
CHANGED
@@ -1,170 +1,201 @@
|
|
1
|
+
# History
|
2
|
+
|
3
|
+
## 0.12 / 2024-08-DD
|
4
|
+
|
5
|
+
- Properly handle very long GNU filenames, resolving [#46][].
|
6
|
+
- Handle very long GNU filenames that are 512 or more bytes, resolving [#45][].
|
7
|
+
Originally implemented in [#47][] by Vijay, but accidentally closed.
|
8
|
+
|
9
|
+
## 0.11 / 2022-12-31
|
10
|
+
|
11
|
+
- symlink support is complete. Merged as PR [#42][], rebased and built on top of
|
12
|
+
PR [#12][] by fetep.
|
13
|
+
|
14
|
+
- kymmt90 fixed a documentation error on Minitar.pack in PR [#43][].
|
15
|
+
|
16
|
+
- This version is a soft-deprecation of all versions before Ruby 2.7, as they
|
17
|
+
will no longer be tested in CI.
|
18
|
+
|
19
|
+
## 0.10 / 2022-03-26
|
20
|
+
|
21
|
+
- nevesenin fixed an issue with long filename handling. Merged as PR [#40][].
|
22
|
+
|
1
23
|
## 0.9 / 2019-09-04
|
2
24
|
|
3
|
-
|
4
|
-
|
5
|
-
|
25
|
+
- jtappa added the ability to skip fsync with a new option to Minitar.unpack
|
26
|
+
and Minitar::Input#extract_entry. Provide `:fsync => false` as the last
|
27
|
+
parameter to enable. Merged from a modified version of PR [#37][].
|
6
28
|
|
7
29
|
## 0.8 / 2019-01-05
|
8
30
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
31
|
+
- inkstak resolved an issue introduced in the fix for [#31][] by allowing
|
32
|
+
spaces to be considered valid characters in strict octal handling. Octal
|
33
|
+
conversion ignores leading spaces. Merged from a slightly modified version
|
34
|
+
of PR [#35][].
|
13
35
|
|
14
|
-
|
15
|
-
|
16
|
-
|
36
|
+
- dearblue contributed PR [#32][] providing an explicit call to #bytesize for
|
37
|
+
strings that include multibyte characters. The PR has been modified to be
|
38
|
+
compatible with older versions of Ruby and extend tests.
|
17
39
|
|
18
|
-
|
19
|
-
|
20
|
-
|
40
|
+
- Akinori MUSHA (knu) contributed PR [#36][] that treats certain badly
|
41
|
+
encoded regular files (with names ending in `/`) as if they were
|
42
|
+
directories on decode.
|
21
43
|
|
22
44
|
## 0.7 / 2018-02-19
|
23
45
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
46
|
+
- Fixed issue [#28][] with a modified version of PR [#29][] covering the
|
47
|
+
security policy and position for Minitar. Thanks so much to ooooooo_q for
|
48
|
+
the report and an initial patch. Additional information was added as
|
49
|
+
[#30][].
|
28
50
|
|
29
|
-
|
30
|
-
|
51
|
+
- dearblue contributed PR [#33][] providing a fix for Minitar::Reader when
|
52
|
+
the IO-like object does not have a `#pos` method.
|
31
53
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
54
|
+
- Kevin McDermott contributed PR [#34][] so that an InvalidTarStream is
|
55
|
+
raised if the tar header is not valid, preventing incorrect streaming of
|
56
|
+
files from a non-tarfile. This is a minor breaking change, so the version
|
57
|
+
has been bumped accordingly.
|
36
58
|
|
37
|
-
|
38
|
-
|
59
|
+
- Kazuyoshi Kato contributed PR [#26][] providing support for the GNU tar
|
60
|
+
long filename extension.
|
39
61
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
62
|
+
- Addressed a potential DOS with negative size fields in tar headers
|
63
|
+
([#31][]). This has been handled in two ways: the size field in a tar
|
64
|
+
header is interpreted as a strict octal value and the Minitar reader will
|
65
|
+
raise an InvalidTarStream if the size ends up being negative anyway.
|
44
66
|
|
45
67
|
## 0.6.1 / 2017-02-07
|
46
68
|
|
47
|
-
|
48
|
-
|
69
|
+
- Fixed issue [#24][] where streams were being improperly closed immediately
|
70
|
+
on open unless there was a block provided.
|
49
71
|
|
50
|
-
|
51
|
-
|
72
|
+
- Hopefully fixes issue [#23][] by releasing archive-tar-minitar after
|
73
|
+
minitar-cli is available.
|
52
74
|
|
53
75
|
## 0.6 / 2017-02-07
|
54
76
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
77
|
+
- Breaking Changes:
|
78
|
+
|
79
|
+
- Extracted `bin/minitar` into a new gem, `minitar-cli`. No, I am _not_
|
80
|
+
going to bump the major version for this. As far as I can tell, few
|
81
|
+
people use the command-line utility anyway. (Installing
|
82
|
+
`archive-tar-minitar` will install both `minitar` and `minitar-cli`, at
|
83
|
+
least until version 1.0.)
|
84
|
+
|
85
|
+
- Minitar extraction before 0.6 traverses directories if the tarball
|
86
|
+
includes a relative directory reference, as reported in [#16][] by
|
87
|
+
@ecneladis. This has been disallowed entirely and will throw a
|
88
|
+
SecureRelativePathError when found. Additionally, if the final
|
89
|
+
destination of an entry is an already-existing symbolic link, the
|
90
|
+
existing symbolic link will be removed and the file will be written
|
91
|
+
correctly (on platforms that support symblic links).
|
92
|
+
|
93
|
+
- Enhancements:
|
94
|
+
|
95
|
+
- Licence change. After speaking with Mauricio Fernández, we have changed
|
96
|
+
the licensing of this library to Ruby and Simplified BSD and have
|
97
|
+
dropped the GNU GPL license. This takes effect from the 0.6 release.
|
98
|
+
- Printing a deprecation warning for including Archive::Tar to put
|
99
|
+
Minitar in the top-level namespace.
|
100
|
+
- Printing a deprecation warning for including Archive::Tar::Minitar into
|
101
|
+
a class (Minitar will be a class for version 1.0).
|
102
|
+
- Moved Archive::Tar::PosixHeader to Archive::Tar::Minitar::PosixHeader
|
103
|
+
with a deprecation warning. Do not depend on
|
104
|
+
Archive::Tar::Minitar::PosixHeader, as it will be moving to
|
105
|
+
::Minitar::PosixHeader in a future release.
|
106
|
+
- Added an alias, ::Minitar, for Archive::Tar::Minitar, opted in with
|
107
|
+
`require 'minitar'`. In future releases, this alias will be enabled by
|
108
|
+
default, and the Archive::Tar namespace will be removed entirely for
|
109
|
+
version 1.0.
|
110
|
+
- Modified the handling of `mtime` in PosixHeader to do an integer
|
111
|
+
conversion (#to_i) so that a Time object can be used instead of the
|
112
|
+
integer value of the time object.
|
113
|
+
- Writer::RestrictedStream was renamed to Writer::WriteOnlyStream for
|
114
|
+
clarity. No alias or deprecation warning was provided for this as it is
|
115
|
+
an internal implementation detail.
|
116
|
+
- Writer::BoundedStream was renamed to Writer::BoundedWriteStream for
|
117
|
+
clarity. A deprecation warning is provided on first use because a
|
118
|
+
BoundedWriteStream may raise a BoundedWriteStream::FileOverflow
|
119
|
+
exception.
|
120
|
+
- Writer::BoundedWriteStream::FileOverflow has been renamed to
|
121
|
+
Writer::WriteBoundaryOverflow and inherits from StandardError instead
|
122
|
+
of RuntimeError. Note that for Ruby 2.0 or higher, an error will be
|
123
|
+
raised when specifying Writer::BoundedWriteStream::FileOverflow because
|
124
|
+
Writer::BoundedWriteStream has been declared a private constant.
|
125
|
+
- Modified Writer#add_file_simple to accept the data for a
|
126
|
+
file in `opts[:data]`. When `opts[:data]` is provided, a stream block
|
127
|
+
must not be provided. Improved the documentation for this method.
|
128
|
+
- Modified Writer#add_file to accept `opts[:data]` and transparently call
|
129
|
+
Writer#add_file_simple in this case.
|
130
|
+
- Methods that require blocks are no longer required, so the
|
131
|
+
Archive::Tar::Minitar::BlockRequired exception has been removed with a
|
132
|
+
warning (this may not work on Ruby 1.8).
|
133
|
+
- Dramatically reduced the number of strings created when creating a
|
134
|
+
POSIX tarball header.
|
135
|
+
- Added a helper, Input.each_entry that iterates over each entry in an
|
136
|
+
opened entry object.
|
137
|
+
|
138
|
+
- Bugs:
|
139
|
+
|
140
|
+
- Fix [#2][] to handle IO streams that are not seekable, such as pipes,
|
141
|
+
STDIN, or STDOUT.
|
142
|
+
- Fix [#3][] to make the test timezone resilient.
|
143
|
+
- Fix [#4][] for supporting the reading of tar files with filenames in
|
144
|
+
the GNU long filename extension format. Ported from @atoulme’s fork,
|
145
|
+
originally provided by Curtis Sampson.
|
146
|
+
- Fix [#6][] by making it raise the correct error for a long filename
|
147
|
+
with no path components.
|
148
|
+
- Fix [#13][] provided by @fetep fixes an off-by-one error on filename
|
149
|
+
splitting.
|
150
|
+
- Fix [#14][] provided by @kzys should fix Windows detection issues.
|
151
|
+
- Fix [#16][] as specified above.
|
152
|
+
- Fix an issue where Minitar.pack would not include Unix hidden files
|
153
|
+
when creating a tarball.
|
154
|
+
|
155
|
+
- Development:
|
156
|
+
|
157
|
+
- Modernized minitar tooling around Hoe.
|
158
|
+
- Added travis and coveralls.
|
137
159
|
|
138
160
|
## 0.5.2 / 2008-02-26
|
139
161
|
|
140
|
-
|
141
|
-
|
162
|
+
- Bugs:
|
163
|
+
- Fixed a Ruby 1.9 compatibility error.
|
142
164
|
|
143
165
|
## 0.5.1 / 2004-09-27
|
144
166
|
|
145
|
-
|
146
|
-
|
167
|
+
- Bugs:
|
168
|
+
- Fixed a variable name error.
|
147
169
|
|
148
170
|
## 0.5.0
|
149
171
|
|
150
|
-
|
172
|
+
- Initial release. Does files and directories. Command does create, extract,
|
151
173
|
and list.
|
152
174
|
|
153
175
|
[#2]: https://github.com/halostatue/minitar/issues/2
|
154
176
|
[#3]: https://github.com/halostatue/minitar/issues/3
|
155
177
|
[#4]: https://github.com/halostatue/minitar/issues/4
|
156
178
|
[#6]: https://github.com/halostatue/minitar/issues/6
|
179
|
+
[#12]: https://github.com/halostatue/minitar/pull/12
|
157
180
|
[#13]: https://github.com/halostatue/minitar/issues/13
|
158
181
|
[#14]: https://github.com/halostatue/minitar/issues/14
|
159
182
|
[#16]: https://github.com/halostatue/minitar/issues/16
|
160
183
|
[#23]: https://github.com/halostatue/minitar/issues/23
|
161
184
|
[#24]: https://github.com/halostatue/minitar/issues/24
|
162
|
-
[#26]: https://github.com/halostatue/minitar/issues/
|
185
|
+
[#26]: https://github.com/halostatue/minitar/issues/27
|
163
186
|
[#28]: https://github.com/halostatue/minitar/issues/28
|
164
|
-
[#29]: https://github.com/halostatue/minitar/
|
187
|
+
[#29]: https://github.com/halostatue/minitar/pull/29
|
165
188
|
[#30]: https://github.com/halostatue/minitar/issues/30
|
166
|
-
[#
|
167
|
-
[#
|
168
|
-
[#
|
169
|
-
[#
|
170
|
-
[#
|
189
|
+
[#31]: https://github.com/halostatue/minitar/issues/31
|
190
|
+
[#32]: https://github.com/halostatue/minitar/pull/32
|
191
|
+
[#33]: https://github.com/halostatue/minitar/pull/33
|
192
|
+
[#34]: https://github.com/halostatue/minitar/pull/34
|
193
|
+
[#35]: https://github.com/halostatue/minitar/pull/35
|
194
|
+
[#36]: https://github.com/halostatue/minitar/pull/36
|
195
|
+
[#37]: https://github.com/halostatue/minitar/pull/37
|
196
|
+
[#40]: https://github.com/halostatue/minitar/pull/40
|
197
|
+
[#42]: https://github.com/halostatue/minitar/pull/42
|
198
|
+
[#43]: https://github.com/halostatue/minitar/pull/43
|
199
|
+
[#45]: https://github.com/halostatue/minitar/issues/45
|
200
|
+
[#46]: https://github.com/halostatue/minitar/issues/46
|
201
|
+
[#47]: https://github.com/halostatue/minitar/pull/47
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -5,18 +5,13 @@ code :: https://github.com/halostatue/minitar/
|
|
5
5
|
bugs :: https://github.com/halostatue/minitar/issues
|
6
6
|
rdoc :: http://rdoc.info/gems/minitar/
|
7
7
|
cli :: https://github.com/halostatue/minitar-cli
|
8
|
-
travis :: {<img src="https://travis-ci.org/halostatue/minitar.svg" />}[https://travis-ci.org/halostatue/minitar]
|
9
|
-
appveyor :: {<img src="https://ci.appveyor.com/api/projects/status/bj4gqn3gp3gu45sa?svg=true" />}[https://ci.appveyor.com/project/halostatue/minitar]
|
10
|
-
coveralls :: {<img src="https://coveralls.io/repos/halostatue/minitar/badge.svg" alt="Coverage Status" />}[https://coveralls.io/r/halostatue/minitar]
|
11
8
|
|
12
9
|
== Description
|
13
10
|
|
14
11
|
The minitar library is a pure-Ruby library that provides the ability to deal
|
15
12
|
with POSIX tar(1) archive files.
|
16
13
|
|
17
|
-
This is release 0.
|
18
|
-
Minitar::Input#extract_entry that when <tt>:fsync => false</tt> is provided,
|
19
|
-
fsync will be skipped.
|
14
|
+
This is release 0.12. This is likely the last revision before 1.0.
|
20
15
|
|
21
16
|
minitar (previously called Archive::Tar::Minitar) is based heavily on code
|
22
17
|
originally written by Mauricio Julio Fernández Pradier for the rpa-base
|
data/Rakefile
CHANGED
@@ -1,52 +1,72 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
require "rake/clean"
|
6
6
|
|
7
|
-
$LOAD_PATH.unshift(
|
7
|
+
$LOAD_PATH.unshift("support")
|
8
8
|
|
9
9
|
Hoe.plugin :doofus
|
10
10
|
Hoe.plugin :gemspec2
|
11
|
-
Hoe.plugin :
|
11
|
+
Hoe.plugin :git2
|
12
12
|
Hoe.plugin :minitest
|
13
|
-
Hoe.plugin :
|
13
|
+
Hoe.plugin :rubygems
|
14
14
|
Hoe.plugin :deprecated_gem
|
15
|
-
Hoe.plugin :
|
15
|
+
Hoe.plugin :cov
|
16
16
|
|
17
|
-
|
18
|
-
developer(
|
17
|
+
Hoe.spec "minitar" do
|
18
|
+
developer("Austin Ziegler", "halostatue@gmail.com")
|
19
19
|
|
20
|
-
|
20
|
+
self.history_file = "History.md"
|
21
|
+
self.readme_file = "README.rdoc"
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
require_ruby_version ">= 1.8"
|
24
|
+
|
25
|
+
# This is a hack because of an issue with Hoe 3.26, but I'm not sure which
|
26
|
+
# hoe version introduced this issue or if it's a JRuby issue. This issue is
|
27
|
+
# demonstrable in lib/hoe.rb at line 676, which is (reformatted for space):
|
28
|
+
#
|
29
|
+
# ```ruby
|
30
|
+
# readme =
|
31
|
+
# input
|
32
|
+
# .lines
|
33
|
+
# .chunk { |l| l[/^(?:=+|#+)/] || "" } # # chunk is different somehow
|
34
|
+
# .map(&:last) # <-- HERE: "#" does not respond to #last
|
35
|
+
# .each_slice(2)
|
36
|
+
# .map { |k, v|
|
37
|
+
# kp = k.join
|
38
|
+
# kp = kp.strip.chomp(":").split.last.downcase if k.size == 1
|
39
|
+
# [kp, v.join.strip]
|
40
|
+
# }
|
41
|
+
# .to_h
|
42
|
+
# ```
|
43
|
+
#
|
44
|
+
# We don't *ship* with JRuby, but use it in CI only, so this is here at least
|
45
|
+
# temporarily.
|
46
|
+
if RUBY_PLATFORM.match?(/java/)
|
47
|
+
self.summary = self.description = "Description for testing"
|
48
|
+
self.homepage = "https://github.com/KineticCafe/app-identity/tree/main/ruby/"
|
49
|
+
end
|
50
|
+
|
51
|
+
self.licenses = ["Ruby", "BSD-2-Clause"]
|
25
52
|
|
26
53
|
self.post_install_message = <<-EOS
|
27
54
|
The `minitar` executable is no longer bundled with `minitar`. If you are
|
28
55
|
expecting this executable, make sure you also install `minitar-cli`.
|
29
56
|
EOS
|
30
57
|
|
31
|
-
|
32
|
-
extra_dev_deps << ['hoe-gemspec2', '~> 1.1']
|
33
|
-
extra_dev_deps << ['hoe-git', '~> 1.6']
|
34
|
-
extra_dev_deps << ['hoe-rubygems', '~> 1.0']
|
35
|
-
extra_dev_deps << ['hoe-travis', '~> 1.2']
|
36
|
-
extra_dev_deps << ['minitest', '~> 5.3']
|
37
|
-
extra_dev_deps << ['minitest-autotest', ['>= 1.0', '<2']]
|
38
|
-
extra_dev_deps << ['rake', '>= 10.0', '< 12']
|
39
|
-
extra_dev_deps << ['rdoc', '>= 0.0']
|
40
|
-
end
|
41
|
-
|
42
|
-
if RUBY_VERSION >= '2.0' && RUBY_ENGINE == 'ruby'
|
43
|
-
namespace :test do
|
44
|
-
desc 'Run test coverage'
|
45
|
-
task :coverage do
|
46
|
-
spec.test_prelude = 'load ".simplecov-prelude.rb"'
|
47
|
-
Rake::Task['test'].execute
|
48
|
-
end
|
49
|
-
end
|
58
|
+
spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
|
50
59
|
|
51
|
-
|
60
|
+
extra_dev_deps << ["base64", "~> 0.2"]
|
61
|
+
extra_dev_deps << ["hoe", "~> 4.0"]
|
62
|
+
extra_dev_deps << ["hoe-doofus", "~> 1.0"]
|
63
|
+
extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
|
64
|
+
extra_dev_deps << ["hoe-git2", "~> 1.7"]
|
65
|
+
extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
|
66
|
+
extra_dev_deps << ["minitest", "~> 5.16"]
|
67
|
+
extra_dev_deps << ["minitest-autotest", "~> 1.0"]
|
68
|
+
extra_dev_deps << ["minitest-focus", "~> 1.0"]
|
69
|
+
extra_dev_deps << ["rake", ">= 10.0", "< 14"]
|
70
|
+
extra_dev_deps << ["rdoc", ">= 0.0"]
|
71
|
+
extra_dev_deps << ["standard", "~> 1.0"]
|
52
72
|
end
|