mast 1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.rdoc +25 -4
- data/README.rdoc +25 -22
- data/lib/mast.rb +1 -1
- data/lib/mast/cli.rb +10 -10
- data/lib/plugins/syckle/mast.rb +100 -0
- data/meta/contact +1 -1
- data/meta/description +4 -1
- data/meta/download +1 -0
- data/meta/homepage +1 -1
- data/meta/{package → name} +0 -0
- data/meta/ruby +1 -0
- data/meta/{namespace → suite} +0 -0
- data/meta/summary +1 -0
- data/meta/version +1 -1
- data/meta/wiki +1 -0
- metadata +33 -22
- data/MANIFEST +0 -20
data/HISTORY.rdoc
CHANGED
@@ -1,12 +1,33 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
-
== 1.
|
3
|
+
== 1.2 / 2010-02-19
|
4
4
|
|
5
|
-
This
|
5
|
+
This release adjusts the plugins directory to conform
|
6
|
+
to the new Plugin gem and add the -i shortcut to the
|
7
|
+
command-line help.
|
8
|
+
|
9
|
+
Changes:
|
10
|
+
|
11
|
+
* Rename lib/plugin to lib/plugins.
|
12
|
+
* Add -i to help output.
|
13
|
+
|
14
|
+
|
15
|
+
== 1.1 / 2009-10-24
|
16
|
+
|
17
|
+
This release fixes the show and clean commands and makes
|
18
|
+
some additional adjustments under the hood.
|
6
19
|
|
7
20
|
Changes:
|
8
21
|
|
9
|
-
*
|
22
|
+
* Fix clean and show commands.
|
23
|
+
* Change to MIT license.
|
24
|
+
|
25
|
+
|
26
|
+
== 1.0 / 2009-07-02
|
27
|
+
|
28
|
+
This is the initial release of Mast.
|
29
|
+
|
30
|
+
Changes:
|
10
31
|
|
11
|
-
|
32
|
+
* Happy Birthday!
|
12
33
|
|
data/README.rdoc
CHANGED
@@ -1,35 +1,37 @@
|
|
1
1
|
= Mast
|
2
|
+
___
|
3
|
+
.-----'---'-.
|
4
|
+
| |
|
5
|
+
| |
|
6
|
+
| |
|
7
|
+
'-----------'
|
2
8
|
|
3
|
-
* home:
|
4
|
-
*
|
5
|
-
|
9
|
+
* home: http://proutils.github.com/mast/
|
10
|
+
* work: http://github.com/proutils/mast/
|
11
|
+
* wiki: http://wiki.github.com/proutils/mast/
|
6
12
|
|
7
13
|
== DESCRIPTION
|
8
14
|
|
9
|
-
Mast is a commandline utility for generating MANIFEST
|
10
|
-
It can be useful in conjunction with packaging tools (such as Box),
|
11
|
-
tool for monitoring file changes.
|
15
|
+
Mast is a commandline utility for generating MANIFEST and DIGEST lists.
|
16
|
+
It can be useful in conjunction with packaging tools (such as Box),
|
17
|
+
or as a stand-alone tool for monitoring file changes.
|
12
18
|
|
13
19
|
|
14
20
|
== FEATURES
|
15
21
|
|
22
|
+
* Intuitive command-line interface --simply specify what to include.
|
16
23
|
* Self-referential header makes updating manifests easy.
|
17
|
-
* Checksum
|
18
|
-
|
19
|
-
|
20
|
-
== RELEASE NOTES
|
24
|
+
* Checksum digests can highlight file changes.
|
21
25
|
|
22
|
-
Please see the HISTORY.rdoc file.
|
23
26
|
|
27
|
+
== USAGE
|
24
28
|
|
25
|
-
|
29
|
+
Mast makes the process of generating manifests very easy, and even allows manifests
|
30
|
+
to be updated without repeating inclusion/exclusion criteria by storing the command
|
31
|
+
parameters in a comment line at the top of the generated output.
|
26
32
|
|
27
|
-
|
28
|
-
|
29
|
-
without repeating inclusion/exclusion criteria by storing the command parameters
|
30
|
-
in a comment line at the top of the generated output.
|
31
|
-
|
32
|
-
Lets try a simple example. Lets say we have the following folder structure:
|
33
|
+
Lets try a simple example. Lets say we have the following folder structure, using
|
34
|
+
<tt>ls -R</tt> we see:
|
33
35
|
|
34
36
|
$ ls -R
|
35
37
|
.:
|
@@ -90,14 +92,15 @@ lets say the mint directory is extraneous and we do not want it included in the
|
|
90
92
|
demo_rtar/web/rocklobster.jpg
|
91
93
|
|
92
94
|
So you can see how the commandline options carry over to the top comment line of the ouput. The advantage of
|
93
|
-
this is that if you save the output to a standard location,
|
94
|
-
an optional .txt prefix (case insensitive), then you can automaitcally update the file by calling +mast update+.
|
95
|
+
this is that if you save the output to a standard location, i.e. a file named MANIFEST or meta/manifest with
|
96
|
+
an optional .txt prefix (case insensitive), then you can automaitcally update the file by calling +mast --update+.
|
95
97
|
|
96
98
|
$ mast -x mint > MANIFEST
|
97
|
-
|
99
|
+
|
100
|
+
$ mast --update
|
98
101
|
MANIFEST updated.
|
99
102
|
|
100
|
-
You can also add a checksum to the file list
|
103
|
+
You can also add a checksum to the file list to create a *DIGEST*.
|
101
104
|
|
102
105
|
$ mast -x mint -g sha1
|
103
106
|
|
data/lib/mast.rb
CHANGED
data/lib/mast/cli.rb
CHANGED
@@ -32,18 +32,18 @@
|
|
32
32
|
# --dir When creating a list include directory paths; by default
|
33
33
|
# only files are listed.
|
34
34
|
# -s --show Show files using the options from the manifest file.
|
35
|
-
# -f --file PATH Path to manifest file.
|
36
|
-
# given then the file matching 'MANIFEST', case-insensitive
|
37
|
-
# and with an optional '.txt' extension,
|
38
|
-
#
|
39
|
-
#
|
40
|
-
# -g --digest TYPE Include
|
35
|
+
# -f --file PATH Path to manifest file. This applies to comparison commands.
|
36
|
+
# If not given then the file matching 'MANIFEST', case-insensitive
|
37
|
+
# and with an optional '.txt' extension, in the current directory
|
38
|
+
# is used. If the path of the manifest file is anything else then
|
39
|
+
# the --file option must be specified.
|
40
|
+
# -g --digest TYPE Include crytographic signiture. Type can be either
|
41
41
|
# md5, sha1, sha128, sha256, or sha512.
|
42
42
|
# -x --exclude PATH Exclude a file or dir from the manifest matching against
|
43
43
|
# full pathname. You can use --exclude repeatedly.
|
44
|
-
#
|
44
|
+
# -i --ignore PATH Exclude a file or dir from the manifest matching against
|
45
45
|
# an entries basename. You can use --ignore repeatedly.
|
46
|
-
# -q --quiet Suppress extraneous output.
|
46
|
+
# -q --quiet Suppress any extraneous output.
|
47
47
|
|
48
48
|
require 'mast'
|
49
49
|
|
@@ -406,9 +406,9 @@ module Mast
|
|
406
406
|
#
|
407
407
|
def report_verify(check)
|
408
408
|
if check
|
409
|
-
report "Manifest
|
409
|
+
report "Manifest is good."
|
410
410
|
else
|
411
|
-
report "Manifest
|
411
|
+
report "Manifest is bad!"
|
412
412
|
end
|
413
413
|
end
|
414
414
|
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module Syckle::Plugins
|
2
|
+
|
3
|
+
# = Mast Manifest Plugin
|
4
|
+
#
|
5
|
+
class Mast < Service
|
6
|
+
|
7
|
+
precycle :main, :package => :generate
|
8
|
+
|
9
|
+
cycle :main, :reset
|
10
|
+
cycle :main, :clean
|
11
|
+
|
12
|
+
# not that this is necessary, but ...
|
13
|
+
available do |project|
|
14
|
+
begin
|
15
|
+
require 'mast'
|
16
|
+
true
|
17
|
+
rescue LoadError
|
18
|
+
false
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Default MANIFEST filename.
|
23
|
+
DEFAULT_FILENAME = 'MANIFEST'
|
24
|
+
|
25
|
+
# Default files/dirs to include.
|
26
|
+
DEFAULT_INCLUDE = %w{ bin lib meta script test [A-Z]* }
|
27
|
+
|
28
|
+
# Default files/dirs to exclude.
|
29
|
+
DEFAULT_EXCLUDE = %w{ }
|
30
|
+
|
31
|
+
# Default files/dirs to ignore. Unlike exclude, this work
|
32
|
+
# on files basenames, and not full pathnames.
|
33
|
+
DEFAULT_IGNORE = %w{ .svn }
|
34
|
+
|
35
|
+
#
|
36
|
+
attr_accessor :include
|
37
|
+
|
38
|
+
#
|
39
|
+
attr_accessor :exclude
|
40
|
+
|
41
|
+
#
|
42
|
+
attr_accessor :ignore
|
43
|
+
|
44
|
+
#
|
45
|
+
attr_accessor :output
|
46
|
+
|
47
|
+
#
|
48
|
+
#def output=(path)
|
49
|
+
# @output = Pathname.new(path)
|
50
|
+
#end
|
51
|
+
|
52
|
+
#
|
53
|
+
def manifest
|
54
|
+
@manifest ||= Manifest.new(options)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Generate manifest.
|
58
|
+
def generate
|
59
|
+
manifest.generate
|
60
|
+
report "Updated #{output.to_s.sub(Dir.pwd+'/','')}"
|
61
|
+
end
|
62
|
+
|
63
|
+
# Mark MANIFEST as out-of-date.
|
64
|
+
# TODO: Implement reset.
|
65
|
+
def reset
|
66
|
+
end
|
67
|
+
|
68
|
+
# Remove MANIFEST.
|
69
|
+
# TODO: Currently a noop. Not sure removing manfest is a good idea.
|
70
|
+
def clean
|
71
|
+
end
|
72
|
+
|
73
|
+
private
|
74
|
+
|
75
|
+
#
|
76
|
+
def initialize_defaults
|
77
|
+
@include = DEFAULT_INCLUDE
|
78
|
+
@exclude = DEFAULT_EXCLUDE
|
79
|
+
@ignore = DEFAULT_IGNORE
|
80
|
+
@output = (file || project.root + DEFAULT_FILENAME).to_s
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
def file
|
85
|
+
project.root.glob("MANIFEST{,.txt}").first
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
def options
|
90
|
+
{ :include => include,
|
91
|
+
:exclude => exclude,
|
92
|
+
:ignore => ignore,
|
93
|
+
:file => output
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
data/meta/contact
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
proutils@googlegroups.com
|
data/meta/description
CHANGED
@@ -1 +1,4 @@
|
|
1
|
-
Mast is a command line tool for generating manifests.
|
1
|
+
Mast is a command line tool for generating manifests and digests.
|
2
|
+
Mast makes it easy to compare a manifest to a current directory structure,
|
3
|
+
and to update the manifest with a simple command by storing the command
|
4
|
+
option it the manifest file itself.
|
data/meta/download
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
http://github.com/proutils/mast/downloads
|
data/meta/homepage
CHANGED
@@ -1 +1 @@
|
|
1
|
-
http://proutils.
|
1
|
+
http://proutils.github.com/mast
|
data/meta/{package → name}
RENAMED
File without changes
|
data/meta/ruby
CHANGED
data/meta/{namespace → suite}
RENAMED
File without changes
|
data/meta/summary
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Mast is a command line tool for generating manifests and digests.
|
data/meta/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/meta/wiki
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
http://wiki.github.com/proutils/mast/
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 1.2.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- "- Thomas Sawyer <transfire@gmail.com>"
|
@@ -9,43 +14,47 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-02-19 00:00:00 -05:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
16
|
-
description:
|
17
|
-
|
21
|
+
description: |-
|
22
|
+
Mast is a command line tool for generating manifests and digests.
|
23
|
+
Mast makes it easy to compare a manifest to a current directory structure,
|
24
|
+
and to update the manifest with a simple command by storing the command
|
25
|
+
option it the manifest file itself.
|
26
|
+
email:
|
18
27
|
executables:
|
19
28
|
- mast
|
20
29
|
extensions: []
|
21
30
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
24
|
-
- MANIFEST
|
25
|
-
- LICENSE
|
26
|
-
- README.rdoc
|
31
|
+
extra_rdoc_files: []
|
32
|
+
|
27
33
|
files:
|
28
|
-
- HISTORY.rdoc
|
29
|
-
- LICENSE
|
30
|
-
- MANIFEST
|
31
|
-
- README.rdoc
|
32
34
|
- bin/mast
|
33
|
-
- lib/mast.rb
|
34
35
|
- lib/mast/cli.rb
|
35
36
|
- lib/mast/core_ext.rb
|
36
37
|
- lib/mast/manifest.rb
|
38
|
+
- lib/mast.rb
|
39
|
+
- lib/plugins/syckle/mast.rb
|
37
40
|
- meta/authors
|
38
41
|
- meta/contact
|
39
42
|
- meta/description
|
43
|
+
- meta/download
|
40
44
|
- meta/homepage
|
41
|
-
- meta/
|
42
|
-
- meta/package
|
45
|
+
- meta/name
|
43
46
|
- meta/repository
|
44
47
|
- meta/ruby
|
45
48
|
- meta/sitemap
|
49
|
+
- meta/suite
|
50
|
+
- meta/summary
|
46
51
|
- meta/version
|
52
|
+
- meta/wiki
|
53
|
+
- HISTORY.rdoc
|
54
|
+
- LICENSE
|
55
|
+
- README.rdoc
|
47
56
|
has_rdoc: true
|
48
|
-
homepage: http://proutils.
|
57
|
+
homepage: http://proutils.github.com/mast
|
49
58
|
licenses: []
|
50
59
|
|
51
60
|
post_install_message:
|
@@ -58,20 +67,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
67
|
requirements:
|
59
68
|
- - ">="
|
60
69
|
- !ruby/object:Gem::Version
|
70
|
+
segments:
|
71
|
+
- 0
|
61
72
|
version: "0"
|
62
|
-
version:
|
63
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
74
|
requirements:
|
65
75
|
- - ">="
|
66
76
|
- !ruby/object:Gem::Version
|
77
|
+
segments:
|
78
|
+
- 0
|
67
79
|
version: "0"
|
68
|
-
version:
|
69
80
|
requirements: []
|
70
81
|
|
71
|
-
rubyforge_project:
|
72
|
-
rubygems_version: 1.3.
|
82
|
+
rubyforge_project: mast
|
83
|
+
rubygems_version: 1.3.6.pre.3
|
73
84
|
signing_key:
|
74
85
|
specification_version: 3
|
75
|
-
summary: Mast is a command line tool for generating manifests.
|
86
|
+
summary: Mast is a command line tool for generating manifests and digests.
|
76
87
|
test_files: []
|
77
88
|
|
data/MANIFEST
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
HISTORY.rdoc
|
2
|
-
LICENSE
|
3
|
-
MANIFEST
|
4
|
-
README.rdoc
|
5
|
-
bin/mast
|
6
|
-
lib/mast
|
7
|
-
lib/mast.rb
|
8
|
-
lib/mast/cli.rb
|
9
|
-
lib/mast/core_ext.rb
|
10
|
-
lib/mast/manifest.rb
|
11
|
-
meta/authors
|
12
|
-
meta/contact
|
13
|
-
meta/description
|
14
|
-
meta/homepage
|
15
|
-
meta/namespace
|
16
|
-
meta/package
|
17
|
-
meta/repository
|
18
|
-
meta/ruby
|
19
|
-
meta/sitemap
|
20
|
-
meta/version
|