mast 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY.rdoc +23 -3
- data/LICENSE +199 -17
- data/README.rdoc +41 -25
- data/lib/mast.rb +1 -4
- data/lib/mast/cli.rb +90 -198
- data/lib/mast/manifest.rb +31 -13
- data/lib/mast/meta/data.rb +25 -0
- data/lib/mast/meta/package +8 -0
- data/lib/mast/meta/profile +21 -0
- data/lib/plugins/syckle/mast.rb +19 -10
- data/man/man1/mast.1 +97 -0
- data/meta/data.rb +25 -0
- data/meta/package +8 -0
- data/meta/profile +21 -0
- data/qed/cli/applique/env.rb +60 -0
- data/qed/cli/overview.rdoc +133 -0
- data/ronn/index.txt +1 -0
- data/ronn/mast.1.ronn +89 -0
- metadata +58 -30
- data/meta/authors +0 -1
- data/meta/contact +0 -1
- data/meta/description +0 -4
- data/meta/download +0 -1
- data/meta/homepage +0 -1
- data/meta/name +0 -1
- data/meta/repository +0 -1
- data/meta/ruby +0 -3
- data/meta/sitemap +0 -1
- data/meta/suite +0 -1
- data/meta/summary +0 -1
- data/meta/version +0 -1
- data/meta/wiki +0 -1
@@ -0,0 +1,133 @@
|
|
1
|
+
= Overview of Mast Command
|
2
|
+
|
3
|
+
Mast in a manifest and digest generator.
|
4
|
+
|
5
|
+
Let say we have a directory containing a set of files as follows:
|
6
|
+
|
7
|
+
README.txt
|
8
|
+
lib/foo.rb
|
9
|
+
lib/bar.rb
|
10
|
+
|
11
|
+
When we invoke the `mast` command from within that directory, we
|
12
|
+
will get a complete file listing:
|
13
|
+
|
14
|
+
$ mast
|
15
|
+
#!mast *
|
16
|
+
README.txt
|
17
|
+
lib/bar.rb
|
18
|
+
lib/foo.rb
|
19
|
+
|
20
|
+
By default directories are not listed. Using the `-d`/`--dir` option will add
|
21
|
+
them:
|
22
|
+
|
23
|
+
$ mast -d
|
24
|
+
#!mast -d *
|
25
|
+
README.txt
|
26
|
+
lib
|
27
|
+
lib/bar.rb
|
28
|
+
lib/foo.rb
|
29
|
+
|
30
|
+
Mast can also be used to generate a file digest with the `-g`/`--digest` option.
|
31
|
+
For example:
|
32
|
+
|
33
|
+
$ mast -g sha1
|
34
|
+
#!mast -g sha1 *
|
35
|
+
fda3484edf8db0684440157ce0b110d784d42704 README.txt
|
36
|
+
a65255d9e627f654a86f4fd6dfc253566b650b7e lib/bar.rb
|
37
|
+
0d6b06bd4b8b334ac3cde825d155795e3ae951cf lib/foo.rb
|
38
|
+
|
39
|
+
Without arguments `mast` will include all files in the current directory
|
40
|
+
and subdirectories. To limit the manifest to specific files, we can supply
|
41
|
+
them as arguments on the command line. For example:
|
42
|
+
|
43
|
+
$ mast lib
|
44
|
+
#!mast lib
|
45
|
+
lib/bar.rb
|
46
|
+
lib/foo.rb
|
47
|
+
|
48
|
+
As with any normal shell command we can use file globs:
|
49
|
+
|
50
|
+
$ mast lib/*.rb
|
51
|
+
#!mast lib/bar.rb lib/foo.rb
|
52
|
+
lib/bar.rb
|
53
|
+
lib/foo.rb
|
54
|
+
|
55
|
+
But notice this expands the blob on to the bang line. To keep the glob intact
|
56
|
+
put it in quotes:
|
57
|
+
|
58
|
+
$ mast 'lib/*.rb'
|
59
|
+
#!mast lib/*.rb
|
60
|
+
lib/bar.rb
|
61
|
+
lib/foo.rb
|
62
|
+
|
63
|
+
To exclude files or directories that might be picked up a file glob,
|
64
|
+
use the `-x`/`--exclude` option:
|
65
|
+
|
66
|
+
$ mast -x README.txt
|
67
|
+
#!mast -x README.txt *
|
68
|
+
lib/bar.rb
|
69
|
+
lib/foo.rb
|
70
|
+
|
71
|
+
Whereas exclusion elminates exact file and directory matches, `-i`/`--ignore`
|
72
|
+
can be used to match an file or directory basename:
|
73
|
+
|
74
|
+
$ mast -i foo.rb
|
75
|
+
#!mast -i foo.rb *
|
76
|
+
README.txt
|
77
|
+
lib/bar.rb
|
78
|
+
|
79
|
+
If we would like to save a manifest, we can simply redirect stdout to
|
80
|
+
a file name:
|
81
|
+
|
82
|
+
$ mast > MANIFEST.txt
|
83
|
+
|
84
|
+
Once saved, `mast` has an update mode via the `-u` option:
|
85
|
+
|
86
|
+
$ mast -u
|
87
|
+
MANIFEST.txt updated.
|
88
|
+
|
89
|
+
By default this works for any manifest file with a name matching "manifest{,.*}",
|
90
|
+
case insensitvive. An alternate file name can be supplied using the `-f` option.
|
91
|
+
|
92
|
+
Mast can also be used to compare a manifest file to the current directory. A simple
|
93
|
+
verification that a manifest file matches the current contents of the directory
|
94
|
+
can be had via the `-v`/`--verify` option:
|
95
|
+
|
96
|
+
$ mast -v
|
97
|
+
Manifest is good.
|
98
|
+
|
99
|
+
To see what files are new, that is to say added to the the directory but not
|
100
|
+
listed in the manifest file, use the `-n/--new` option. For instance, let's
|
101
|
+
say we have a new file:
|
102
|
+
|
103
|
+
lib/baz.rb
|
104
|
+
|
105
|
+
Then using the `-n` option, `lib/baz.rb` will be listed:
|
106
|
+
|
107
|
+
$ mast -n
|
108
|
+
lib/baz.rb
|
109
|
+
|
110
|
+
To see what files are _old_, i.e. files listed in the manifest but no longer
|
111
|
+
in the in the directory, use `-o`/`--old` option. In this case let's remove
|
112
|
+
a file:
|
113
|
+
|
114
|
+
lib/foo.rb
|
115
|
+
|
116
|
+
And then the `-o` option will list `lib/foo.rb`:
|
117
|
+
|
118
|
+
$ mast -o
|
119
|
+
lib/foo.rb
|
120
|
+
|
121
|
+
Using `--diff` will pass the content of a manifest file and the current
|
122
|
+
manifest of the directory to `diff` command. We won't show it here becuase
|
123
|
+
`diff` produces absolute paths.
|
124
|
+
|
125
|
+
A new manifest can be generated to stdout that uses the options supplied
|
126
|
+
on the bang line of a manifest file via the `-b`/`--bang` option:
|
127
|
+
|
128
|
+
$ mast -b
|
129
|
+
#!mast *
|
130
|
+
README.txt
|
131
|
+
lib/bar.rb
|
132
|
+
lib/baz.rb
|
133
|
+
|
data/ronn/index.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
mast(1) mast.1.html
|
data/ronn/mast.1.ronn
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
mast(1) - manifest generator
|
2
|
+
============================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`mast [<command>] [<options>...]`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
The manifest listing tool is used to list, create or update a
|
11
|
+
manifest for a directory (eg. to define a "package"), or compare
|
12
|
+
a manifest to actual directory contents. Mast is part of the
|
13
|
+
ProUtils set of tools.
|
14
|
+
|
15
|
+
When no command is given, a manifest is dumped to standard out.
|
16
|
+
If --file is specified, it will generate to that file instead.
|
17
|
+
|
18
|
+
## COMMANDS
|
19
|
+
|
20
|
+
* `-c`, `--create`:
|
21
|
+
Generate a new manifest. (default)
|
22
|
+
|
23
|
+
* `-u`, `--update`:
|
24
|
+
Update an existing manifest.
|
25
|
+
|
26
|
+
* `-l`, `--list`:
|
27
|
+
List the files given in the manifest file. (Use -f to specify an alternate file.)
|
28
|
+
|
29
|
+
* `-D`, `--diff`:
|
30
|
+
Diff manifest file against actual.
|
31
|
+
|
32
|
+
* `-n`, `--new`:
|
33
|
+
List existant files that are not given in the manifest.
|
34
|
+
|
35
|
+
* `-o`, `--old`:
|
36
|
+
List files given in the manifest but are non-existent.
|
37
|
+
|
38
|
+
* `-v`, `--verify`:
|
39
|
+
Verify that a manifest matches actual.
|
40
|
+
|
41
|
+
* `--clean`:
|
42
|
+
Remove non-manifest files. (Will ask for confirmation first.)
|
43
|
+
|
44
|
+
* `-h`, `--help`:
|
45
|
+
Display this help message.
|
46
|
+
|
47
|
+
## OPTIONS
|
48
|
+
|
49
|
+
* `-a`, `--all`:
|
50
|
+
Include all files. This deactivates deafult exclusions
|
51
|
+
so it is possible to make complete list of all contents.
|
52
|
+
|
53
|
+
* `-d`, `--dir`:
|
54
|
+
When creating a list include directory paths; by default
|
55
|
+
only files are listed.
|
56
|
+
|
57
|
+
* `-b`, `--bang`:
|
58
|
+
Generate manifest using the options from the bang line of the manifest file.
|
59
|
+
|
60
|
+
* `-f`, `--file PATH`:
|
61
|
+
Path to manifest file. This applies to comparison commands.
|
62
|
+
If not given then the file matching 'MANIFEST', case-insensitive
|
63
|
+
and with an optional '.txt' extension, in the current directory
|
64
|
+
is used. If the path of the manifest file is anything else then
|
65
|
+
the --file option must be specified.
|
66
|
+
|
67
|
+
* `-g`, `--digest TYPE`:
|
68
|
+
Include crytographic signiture. Type can be either
|
69
|
+
md5, sha1, sha128, sha256, or sha512.
|
70
|
+
|
71
|
+
* `-x`, `--exclude PATH`:
|
72
|
+
Exclude a file or dir from the manifest matching against
|
73
|
+
full pathname. You can use --exclude repeatedly.
|
74
|
+
|
75
|
+
* `-i`, `--ignore PATH`:
|
76
|
+
Exclude a file or dir from the manifest matching against
|
77
|
+
an entries basename. You can use --ignore repeatedly.
|
78
|
+
|
79
|
+
* `-q`, `--quiet`:
|
80
|
+
Suppress any extraneous output.
|
81
|
+
|
82
|
+
## EXAMPLES
|
83
|
+
|
84
|
+
`mast`<br>
|
85
|
+
`mast -u -f PUBLISH`
|
86
|
+
|
87
|
+
## SEE ALSO
|
88
|
+
|
89
|
+
ls(1)
|
metadata
CHANGED
@@ -1,86 +1,114 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 1
|
7
|
-
-
|
8
|
+
- 3
|
8
9
|
- 0
|
9
|
-
version: 1.
|
10
|
+
version: 1.3.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
|
-
-
|
13
|
+
- Thomas Sawyer
|
13
14
|
autorequire:
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-11-20 00:00:00 -05:00
|
18
19
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: syckle
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: qed
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
description: Mast is a command line tool for generating manifests and digests. Mast makes it easy to compare a manifest to a current directory structure, and to update the manifest with a simple command by storing the command option it the manifest file itself.
|
50
|
+
email: proutils@googlegroups.com
|
27
51
|
executables:
|
28
52
|
- mast
|
29
53
|
extensions: []
|
30
54
|
|
31
|
-
extra_rdoc_files:
|
32
|
-
|
55
|
+
extra_rdoc_files:
|
56
|
+
- README.rdoc
|
33
57
|
files:
|
34
58
|
- bin/mast
|
35
59
|
- lib/mast/cli.rb
|
36
60
|
- lib/mast/core_ext.rb
|
37
61
|
- lib/mast/manifest.rb
|
62
|
+
- lib/mast/meta/data.rb
|
63
|
+
- lib/mast/meta/package
|
64
|
+
- lib/mast/meta/profile
|
38
65
|
- lib/mast.rb
|
39
66
|
- lib/plugins/syckle/mast.rb
|
40
|
-
-
|
41
|
-
- meta/
|
42
|
-
- meta/
|
43
|
-
- meta/
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
- meta/sitemap
|
49
|
-
- meta/suite
|
50
|
-
- meta/summary
|
51
|
-
- meta/version
|
52
|
-
- meta/wiki
|
67
|
+
- man/man1/mast.1
|
68
|
+
- meta/data.rb
|
69
|
+
- meta/package
|
70
|
+
- meta/profile
|
71
|
+
- qed/cli/applique/env.rb
|
72
|
+
- qed/cli/overview.rdoc
|
73
|
+
- ronn/index.txt
|
74
|
+
- ronn/mast.1.ronn
|
53
75
|
- HISTORY.rdoc
|
54
76
|
- LICENSE
|
55
77
|
- README.rdoc
|
56
78
|
has_rdoc: true
|
57
79
|
homepage: http://proutils.github.com/mast
|
58
|
-
licenses:
|
59
|
-
|
80
|
+
licenses:
|
81
|
+
- ""
|
60
82
|
post_install_message:
|
61
83
|
rdoc_options:
|
62
84
|
- --title
|
63
85
|
- Mast API
|
86
|
+
- --main
|
87
|
+
- README.rdoc
|
64
88
|
require_paths:
|
65
89
|
- lib
|
66
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
67
92
|
requirements:
|
68
93
|
- - ">="
|
69
94
|
- !ruby/object:Gem::Version
|
95
|
+
hash: 3
|
70
96
|
segments:
|
71
97
|
- 0
|
72
98
|
version: "0"
|
73
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
74
101
|
requirements:
|
75
102
|
- - ">="
|
76
103
|
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
77
105
|
segments:
|
78
106
|
- 0
|
79
107
|
version: "0"
|
80
108
|
requirements: []
|
81
109
|
|
82
110
|
rubyforge_project: mast
|
83
|
-
rubygems_version: 1.3.
|
111
|
+
rubygems_version: 1.3.7
|
84
112
|
signing_key:
|
85
113
|
specification_version: 3
|
86
114
|
summary: Mast is a command line tool for generating manifests and digests.
|
data/meta/authors
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
- Thomas Sawyer <transfire@gmail.com>
|
data/meta/contact
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
proutils@googlegroups.com
|
data/meta/description
DELETED
data/meta/download
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
http://github.com/proutils/mast/downloads
|
data/meta/homepage
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
http://proutils.github.com/mast
|
data/meta/name
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
mast
|
data/meta/repository
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
git://github.com/proutils/mast.git
|
data/meta/ruby
DELETED
data/meta/sitemap
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
doc/rdoc: mast
|
data/meta/suite
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
proutils
|
data/meta/summary
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Mast is a command line tool for generating manifests and digests.
|
data/meta/version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.2.0
|
data/meta/wiki
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
http://wiki.github.com/proutils/mast/
|