automateit 0.80116 → 0.80624
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +3 -1
- data/CHANGES.txt +12 -0
- data/Hoe.rake +3 -1
- data/Manifest.txt +58 -5
- data/README.txt +5 -9
- data/Rakefile +26 -105
- data/TODO.txt +50 -48
- data/bin/ai +0 -0
- data/bin/aifield +0 -0
- data/bin/aissh +0 -0
- data/bin/aitag +0 -0
- data/bin/automateit +0 -0
- data/lib/automateit.rb +0 -0
- data/lib/automateit/account_manager/etc.rb +0 -0
- data/lib/automateit/account_manager/nscd.rb +1 -0
- data/lib/automateit/address_manager/bsd.rb +0 -0
- data/lib/automateit/address_manager/freebsd.rb +0 -0
- data/lib/automateit/address_manager/openbsd.rb +0 -0
- data/lib/automateit/address_manager/portable.rb +0 -0
- data/lib/automateit/address_manager/sunos.rb +0 -0
- data/lib/automateit/constants.rb +4 -3
- data/lib/automateit/interpreter.rb +2 -4
- data/lib/automateit/platform_manager/windows.rb +0 -0
- data/lib/automateit/plugin/driver.rb +0 -0
- data/lib/automateit/root.rb +1 -1
- data/lib/automateit/shell_manager.rb +0 -0
- data/lib/automateit/shell_manager/portable.rb +8 -2
- data/lib/automateit/shell_manager/which_base.rb +0 -0
- data/lib/automateit/shell_manager/which_unix.rb +0 -0
- data/lib/automateit/shell_manager/which_windows.rb +0 -0
- data/lib/ext/object.rb +2 -2
- data/lib/inactive_support/core_ext/time/conversions.rb +4 -2
- data/misc/index_gem_repository.rb +0 -0
- data/misc/setup_egg.rb +0 -0
- data/misc/setup_gem_dependencies.sh +0 -0
- data/misc/setup_rubygems.sh +0 -0
- data/spec/extras/automateit_service_sysv_test +0 -0
- data/spec/extras/scratch.rb +0 -0
- data/spec/extras/simple_recipe.rb +0 -0
- data/spec/integration/account_manager_spec.rb +0 -0
- data/spec/integration/address_manager_portable_spec.rb +0 -0
- data/spec/integration/cli_spec.rb +0 -0
- data/spec/integration/platform_manager_spec.rb +0 -0
- data/spec/integration/shell_manager_spec.rb +24 -0
- data/spec/unit/edit_manager_spec.rb +0 -0
- data/spec/unit/field_manager_spec.rb +0 -0
- data/spec/unit/interpreter_spec.rb +0 -0
- data/spec/unit/object_spec.rb +2 -2
- data/spec/unit/plugins_spec.rb +0 -0
- data/spec/unit/tag_manager_spec.rb +0 -0
- metadata +131 -130
- metadata.gz.sig +0 -0
- data/lib/automateit/package_manager.rb.orig +0 -256
- data/misc/setup_ruby-dbi.rb +0 -24
- data/spec/integration/package_manager_spec.rb.orig +0 -123
data.tar.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
��R���F"Ґ���B��]�0Dr;8�D��4*l�w��v���֙��a$}u'����OF%�_NV.�����v��zuվdKCrI�溔˿ǡ��B��|s ����2���e���̳�/�����C�y���/#�|�7`Y� ��0�8%/I*3�hD
|
2
|
+
��ك}��AdM��A��lE
|
3
|
+
db�IOH��eDI�b���M����݂����ȵ�>�U�M"2�D%�-r��IB�Pddp' 6�Kcib*ř!
|
data/CHANGES.txt
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
0.80624:
|
2
|
+
Date: Tue, 24 Jun 2008 23:13:35 -0700
|
3
|
+
Desc:
|
4
|
+
- Fixed collision of time conversion methods when loading AutomateIt into Rails.
|
5
|
+
- Improved documentation, reworked Rakefile, updated TODO.txt.
|
6
|
+
|
7
|
+
0.80607:
|
8
|
+
Date: Fri, 06 Jun 2008 23:13:56 -0700
|
9
|
+
Desc:
|
10
|
+
- (%) Fixed ShellManager#rm and ShellManager#mv, can now remove and move invalid symlinks.
|
11
|
+
- Improved Object#unique_methods, it now returns an array of symbols.
|
12
|
+
|
1
13
|
0.80116:
|
2
14
|
Date: Wed, 16 Jan 2008 23:55:44 -0800
|
3
15
|
Desc:
|
data/Hoe.rake
CHANGED
@@ -5,6 +5,8 @@ $LOAD_PATH.unshift('lib')
|
|
5
5
|
require 'automateit'
|
6
6
|
@interpreter = AutomateIt.new
|
7
7
|
|
8
|
+
ENV["NODOT"] = "NODOT" # Never generate those crappy rdoc diagrams
|
9
|
+
|
8
10
|
HoeInclude = {
|
9
11
|
:executables => Dir['bin/*'].reject{|t|t.match(/~/)}.map{|t|File.basename(t)},
|
10
12
|
:files => (%w(add2path.sh gpl.txt CHANGES.txt Hoe.rake Manifest.txt Rakefile README.txt TESTING.txt TODO.txt TUTORIAL.txt) + FileList["{bin,examples,docs,helpers,lib,misc,spec}/**/*"]).to_a.reject{|t| File.directory?(t)},
|
@@ -31,7 +33,7 @@ Hoe.new("AutomateIt", AutomateIt::VERSION.to_s) do |s|
|
|
31
33
|
s.url = "http://automateit.org/"
|
32
34
|
s.spec_extras = {
|
33
35
|
:platform => Gem::Platform::RUBY,
|
34
|
-
:rdoc_options => %w(--main README.txt --promiscuous --accessor class_inheritable_accessor=R --title) << title << %w(lib
|
36
|
+
:rdoc_options => %w(--op doc --main README.txt --promiscuous --accessor class_inheritable_accessor=R --inline-source --line-numbers --title) << title << %w(lib),
|
35
37
|
:extra_rdoc_files => FileList[%w(README.txt TUTORIAL.txt TESTING.txt), "docs/*.txt"],
|
36
38
|
}
|
37
39
|
s.spec_extras.merge!(HoeInclude)
|
data/Manifest.txt
CHANGED
@@ -6,13 +6,14 @@ Rakefile
|
|
6
6
|
TESTING.txt
|
7
7
|
TODO.txt
|
8
8
|
TUTORIAL.txt
|
9
|
+
add2path.sh
|
9
10
|
bin/ai
|
10
11
|
bin/aifield
|
12
|
+
bin/aissh
|
11
13
|
bin/aitag
|
12
14
|
bin/automateit
|
13
15
|
docs/friendly_errors.txt
|
14
16
|
docs/previews.txt
|
15
|
-
env.sh
|
16
17
|
examples/basic/Rakefile
|
17
18
|
examples/basic/config/automateit_env.rb
|
18
19
|
examples/basic/config/fields.yml
|
@@ -25,24 +26,40 @@ examples/basic/recipes/README.txt
|
|
25
26
|
examples/basic/recipes/install.rb
|
26
27
|
examples/basic/recipes/uninstall.rb
|
27
28
|
gpl.txt
|
29
|
+
helpers/cpan_wrapper.pl
|
30
|
+
helpers/which.cmd
|
28
31
|
lib/automateit.rb
|
29
32
|
lib/automateit/account_manager.rb
|
30
|
-
lib/automateit/account_manager/
|
31
|
-
lib/automateit/account_manager/
|
33
|
+
lib/automateit/account_manager/base.rb
|
34
|
+
lib/automateit/account_manager/etc.rb
|
35
|
+
lib/automateit/account_manager/nscd.rb
|
36
|
+
lib/automateit/account_manager/passwd_expect.rb
|
37
|
+
lib/automateit/account_manager/passwd_pty.rb
|
38
|
+
lib/automateit/account_manager/posix.rb
|
32
39
|
lib/automateit/address_manager.rb
|
40
|
+
lib/automateit/address_manager/base.rb
|
41
|
+
lib/automateit/address_manager/bsd.rb
|
42
|
+
lib/automateit/address_manager/freebsd.rb
|
33
43
|
lib/automateit/address_manager/linux.rb
|
44
|
+
lib/automateit/address_manager/openbsd.rb
|
34
45
|
lib/automateit/address_manager/portable.rb
|
46
|
+
lib/automateit/address_manager/sunos.rb
|
35
47
|
lib/automateit/cli.rb
|
36
48
|
lib/automateit/common.rb
|
37
49
|
lib/automateit/constants.rb
|
50
|
+
lib/automateit/download_manager.rb
|
38
51
|
lib/automateit/edit_manager.rb
|
39
52
|
lib/automateit/error.rb
|
40
53
|
lib/automateit/field_manager.rb
|
41
54
|
lib/automateit/interpreter.rb
|
42
55
|
lib/automateit/package_manager.rb
|
43
56
|
lib/automateit/package_manager/apt.rb
|
57
|
+
lib/automateit/package_manager/cpan.rb
|
58
|
+
lib/automateit/package_manager/dpkg.rb
|
44
59
|
lib/automateit/package_manager/egg.rb
|
45
60
|
lib/automateit/package_manager/gem.rb
|
61
|
+
lib/automateit/package_manager/pear.rb
|
62
|
+
lib/automateit/package_manager/pecl.rb
|
46
63
|
lib/automateit/package_manager/portage.rb
|
47
64
|
lib/automateit/package_manager/yum.rb
|
48
65
|
lib/automateit/platform_manager.rb
|
@@ -51,7 +68,9 @@ lib/automateit/platform_manager/debian.rb
|
|
51
68
|
lib/automateit/platform_manager/freebsd.rb
|
52
69
|
lib/automateit/platform_manager/gentoo.rb
|
53
70
|
lib/automateit/platform_manager/lsb.rb
|
71
|
+
lib/automateit/platform_manager/openbsd.rb
|
54
72
|
lib/automateit/platform_manager/struct.rb
|
73
|
+
lib/automateit/platform_manager/sunos.rb
|
55
74
|
lib/automateit/platform_manager/uname.rb
|
56
75
|
lib/automateit/platform_manager/windows.rb
|
57
76
|
lib/automateit/plugin.rb
|
@@ -66,8 +85,13 @@ lib/automateit/service_manager/rc_update.rb
|
|
66
85
|
lib/automateit/service_manager/sysv.rb
|
67
86
|
lib/automateit/service_manager/update_rcd.rb
|
68
87
|
lib/automateit/shell_manager.rb
|
88
|
+
lib/automateit/shell_manager/base_link.rb
|
89
|
+
lib/automateit/shell_manager/link.rb
|
69
90
|
lib/automateit/shell_manager/portable.rb
|
70
|
-
lib/automateit/shell_manager/
|
91
|
+
lib/automateit/shell_manager/symlink.rb
|
92
|
+
lib/automateit/shell_manager/which_base.rb
|
93
|
+
lib/automateit/shell_manager/which_unix.rb
|
94
|
+
lib/automateit/shell_manager/which_windows.rb
|
71
95
|
lib/automateit/tag_manager.rb
|
72
96
|
lib/automateit/tag_manager/struct.rb
|
73
97
|
lib/automateit/tag_manager/tag_parser.rb
|
@@ -77,22 +101,45 @@ lib/automateit/template_manager/base.rb
|
|
77
101
|
lib/automateit/template_manager/erb.rb
|
78
102
|
lib/ext/metaclass.rb
|
79
103
|
lib/ext/object.rb
|
104
|
+
lib/ext/shell_escape.rb
|
80
105
|
lib/hashcache.rb
|
81
106
|
lib/helpful_erb.rb
|
107
|
+
lib/inactive_support.rb
|
108
|
+
lib/inactive_support/basic_object.rb
|
109
|
+
lib/inactive_support/clean_logger.rb
|
110
|
+
lib/inactive_support/core_ext/array/extract_options.rb
|
111
|
+
lib/inactive_support/core_ext/blank.rb
|
112
|
+
lib/inactive_support/core_ext/class/attribute_accessors.rb
|
113
|
+
lib/inactive_support/core_ext/class/inheritable_attributes.rb
|
114
|
+
lib/inactive_support/core_ext/enumerable.rb
|
115
|
+
lib/inactive_support/core_ext/hash/keys.rb
|
116
|
+
lib/inactive_support/core_ext/module/aliasing.rb
|
117
|
+
lib/inactive_support/core_ext/numeric/time.rb
|
118
|
+
lib/inactive_support/core_ext/string/inflections.rb
|
119
|
+
lib/inactive_support/core_ext/symbol.rb
|
120
|
+
lib/inactive_support/core_ext/time/conversions.rb
|
121
|
+
lib/inactive_support/duration.rb
|
122
|
+
lib/inactive_support/inflections.rb
|
123
|
+
lib/inactive_support/inflector.rb
|
82
124
|
lib/nested_error.rb
|
125
|
+
lib/nitpick.rb
|
83
126
|
lib/queued_logger.rb
|
84
127
|
lib/tempster.rb
|
85
128
|
misc/index_gem_repository.rb
|
86
129
|
misc/setup_egg.rb
|
87
130
|
misc/setup_gem_dependencies.sh
|
88
131
|
misc/setup_rubygems.sh
|
132
|
+
spec/breaker.rb
|
89
133
|
spec/extras/automateit_service_sysv_test
|
90
134
|
spec/extras/scratch.rb
|
91
135
|
spec/extras/simple_recipe.rb
|
136
|
+
spec/integration/account_manager_nscd_spec.rb
|
92
137
|
spec/integration/account_manager_spec.rb
|
93
|
-
spec/integration/address_manager_linux_spec.rb
|
94
138
|
spec/integration/address_manager_portable_spec.rb
|
139
|
+
spec/integration/address_manager_spec.rb
|
95
140
|
spec/integration/cli_spec.rb
|
141
|
+
spec/integration/download_spec.rb
|
142
|
+
spec/integration/edit_manager_spec.rb
|
96
143
|
spec/integration/examples_spec.rb
|
97
144
|
spec/integration/examples_spec_editor.rb
|
98
145
|
spec/integration/package_manager_spec.rb
|
@@ -100,12 +147,18 @@ spec/integration/platform_manager_spec.rb
|
|
100
147
|
spec/integration/service_manager_sysv_spec.rb
|
101
148
|
spec/integration/shell_manager_spec.rb
|
102
149
|
spec/integration/template_manager_erb_spec.rb
|
150
|
+
spec/integration/tempster_spec.rb
|
103
151
|
spec/spec_helper.rb
|
152
|
+
spec/unit/address_manager_spec.rb
|
104
153
|
spec/unit/edit_manager_spec.rb
|
105
154
|
spec/unit/field_manager_spec.rb
|
106
155
|
spec/unit/hashcache_spec.rb
|
107
156
|
spec/unit/interpreter_spec.rb
|
157
|
+
spec/unit/nested_error_spec.rb
|
158
|
+
spec/unit/object_spec.rb
|
159
|
+
spec/unit/package_manager_spec.rb
|
108
160
|
spec/unit/platform_manager_spec.rb
|
109
161
|
spec/unit/plugins_spec.rb
|
162
|
+
spec/unit/shell_escape_spec.rb
|
110
163
|
spec/unit/tag_manager_spec.rb
|
111
164
|
spec/unit/template_manager_erb_spec.rb
|
data/README.txt
CHANGED
@@ -2,25 +2,21 @@
|
|
2
2
|
|
3
3
|
<em>AutomateIt is an open source tool for automating the setup and maintenance of servers, applications and their dependencies.</em>
|
4
4
|
|
5
|
-
Information about AutomateIt is best read in the following order:
|
6
5
|
1. http://AutomateIt.org -- website explaining what it is and why it's useful
|
7
6
|
2. Screenshots[http://AutomateIt.org/screenshots] -- quick tour of sample AutomateIt code
|
8
7
|
3. TUTORIAL.txt[link:files/TUTORIAL_txt.html] -- hands-on tutorial
|
9
|
-
4. TESTING.txt[link:files/TESTING_txt.html] -- instructions on running the AutomateIt self-test
|
10
|
-
5. Links on the left provide technical documentation for specific classes and methods
|
11
8
|
|
12
|
-
===
|
9
|
+
=== Frequently-used commands
|
13
10
|
|
14
|
-
|
11
|
+
Execute these from a terminal, use <tt>--help</tt> option for help:
|
15
12
|
* +automateit+ or +ai+ -- Run a recipe or create a project.
|
16
13
|
* +aitag+ -- Query project's tags.
|
17
14
|
* +aifield+ -- Query project's fields.
|
18
15
|
|
19
|
-
|
16
|
+
=== Frequently-used classes
|
17
|
+
|
20
18
|
* AutomateIt::Interpreter -- Runs AutomateIt commands.
|
21
19
|
* AutomateIt::Project -- Collection of related recipes, tags, fields and custom plugins.
|
22
|
-
|
23
|
-
Plugins:
|
24
20
|
* AutomateIt::AccountManager -- Manipulates users and groups.
|
25
21
|
* AutomateIt::AddressManager -- Manipulates host's network addresses.
|
26
22
|
* AutomateIt::DownloadManager -- Downloads files.
|
@@ -35,7 +31,7 @@ Plugins:
|
|
35
31
|
|
36
32
|
=== Legal
|
37
33
|
|
38
|
-
Copyright (C) 2007 Igal Koshevoy (igal@pragmaticraft.com)
|
34
|
+
Copyright (C) 2007-2008 Igal Koshevoy (igal@pragmaticraft.com)
|
39
35
|
|
40
36
|
AutomateIt is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
|
41
37
|
|
data/Rakefile
CHANGED
@@ -113,28 +113,6 @@ task :loc => ["loc:count", "loc:diff", "loc:churn", "loc:sloc"]
|
|
113
113
|
|
114
114
|
#---[ RubyGems ]--------------------------------------------------------
|
115
115
|
|
116
|
-
ARCHIVE_PATH = "../gem_archive"
|
117
|
-
desc "Regenerate Gem"
|
118
|
-
task :regem do
|
119
|
-
has_archive = File.directory?(ARCHIVE_PATH)
|
120
|
-
puts "WARNING: Archive of previously released gems at '#{ARCHIVE_PATH}' is not available, do not upload without these." unless has_archive
|
121
|
-
rm_r Dir["pkg/*"]
|
122
|
-
mkdir_p "pkg/pub/gems"
|
123
|
-
if has_archive && !Dir["#{ARCHIVE_PATH}/*.gem"].empty?
|
124
|
-
cp FileList["#{ARCHIVE_PATH}/*.gem"].to_a, "pkg/pub/gems", :preserve => true
|
125
|
-
end
|
126
|
-
Rake::Task[:gem].invoke
|
127
|
-
cp Dir["pkg/*.gem"], "pkg/pub/gems", :preserve => true
|
128
|
-
cp Dir["pkg/*.gem"], "#{ARCHIVE_PATH}", :preserve => true if has_archive
|
129
|
-
sh "cd pkg/pub && ruby ../../misc/index_gem_repository.rb" if has_archive
|
130
|
-
end
|
131
|
-
|
132
|
-
desc "Populate gem_archive"
|
133
|
-
task :download_gem_archive do
|
134
|
-
mkdir_p ARCHIVE_PATH unless File.exist?(ARCHIVE_PATH)
|
135
|
-
sh "rsync -cvaxz igal@pythia.kattare.com:automateit_org/pub/gems/ #{ARCHIVE_PATH}"
|
136
|
-
end
|
137
|
-
|
138
116
|
desc "Generate manifest"
|
139
117
|
task :manifest do
|
140
118
|
hoe(:manifest)
|
@@ -165,25 +143,29 @@ namespace :gem do
|
|
165
143
|
end
|
166
144
|
|
167
145
|
desc "Create a gem"
|
168
|
-
task :gem do
|
146
|
+
task :gem => [:manifest] do
|
169
147
|
hoe(:gem)
|
170
148
|
end
|
171
149
|
|
172
|
-
desc "
|
173
|
-
task :
|
150
|
+
desc "Release gem to RubyForge"
|
151
|
+
task :release do
|
174
152
|
automateit # Loads libraries
|
175
153
|
hoe("release VERSION=#{AutomateIt::VERSION}")
|
176
|
-
|
154
|
+
end
|
155
|
+
|
156
|
+
desc "Public docs to RubyForge"
|
157
|
+
task :publish_docs do
|
158
|
+
hoe("publish_docs")
|
177
159
|
end
|
178
160
|
|
179
161
|
desc "Tag a stable release"
|
180
162
|
task :tag do
|
181
|
-
automateit
|
163
|
+
automateit # Loads libraries
|
182
164
|
sh "hg tag #{AutomateIt::VERSION}"
|
183
165
|
sh "hg tag -f stable"
|
184
166
|
end
|
185
167
|
|
186
|
-
desc "Push a stable release"
|
168
|
+
desc "Push a stable release to local repo for uploading"
|
187
169
|
task :push do
|
188
170
|
sh "hg push -r stable ../app_stable"
|
189
171
|
end
|
@@ -208,10 +190,12 @@ namespace :install do
|
|
208
190
|
end
|
209
191
|
|
210
192
|
desc "Install Gem from RubyForge without docs, removing existing Gem first"
|
211
|
-
task :
|
193
|
+
task :rubyforge do
|
212
194
|
install_wrapper "http://gems.rubyforge.org"
|
213
195
|
end
|
214
196
|
|
197
|
+
task :rf => :rubyforge
|
198
|
+
|
215
199
|
desc "Install Gem from website without docs, removing existing Gem first"
|
216
200
|
task :site do
|
217
201
|
install_wrapper "http://automateit.org/pub", :source => "http://automateit.org/pub", :reset => true
|
@@ -231,93 +215,37 @@ end
|
|
231
215
|
|
232
216
|
desc "Uninstall automateit gem"
|
233
217
|
task :uninstall do
|
234
|
-
automateit.package_manager.uninstall
|
218
|
+
automateit.package_manager.uninstall("automateit", :with => :gem)
|
235
219
|
end
|
236
220
|
|
237
221
|
#---[ RDoc ]------------------------------------------------------------
|
238
222
|
|
239
223
|
namespace :rdoc do
|
240
|
-
desc "
|
241
|
-
task :
|
242
|
-
|
243
|
-
|
244
|
-
# Create a tutorial index
|
245
|
-
File.open("doc/tutorial.html", "w+") do |writer|
|
246
|
-
writer.write(File.read("doc/index.html").sub(/README_txt.html/, 'TUTORIAL_txt.html'))
|
247
|
-
end
|
248
|
-
end
|
224
|
+
desc "List aliased_methods for inclusion into rdoc"
|
225
|
+
task :aliased_methods do
|
226
|
+
automateit.instance_eval do
|
227
|
+
methods_and_plugins = plugins.values.inject([]){|results,plugin| plugin.aliased_methods && plugin.aliased_methods.each{|method| results << [method.to_s, plugin.class.to_s]}; results}
|
249
228
|
|
250
|
-
|
251
|
-
|
252
|
-
require 'cgi'
|
253
|
-
pattern = /(\[{3})\s*(.+?)\s*(\]{3})/m
|
254
|
-
for filename in Dir["doc/**/*.html"]
|
255
|
-
input = File.read(filename)
|
256
|
-
next unless input and input.match(pattern)
|
257
|
-
puts filename
|
258
|
-
output = input.gsub(pattern){|m| CGI.unescapeHTML($2)}
|
259
|
-
if input != output
|
260
|
-
FileUtils.mv(filename, filename+".bak", :verbose => true)
|
261
|
-
File.open(filename, "w+"){|h| h.write(output)}
|
229
|
+
for method, plugin in methods_and_plugins.sort_by{|x| x[0]}
|
230
|
+
puts " # * %s -- %s#%s" % [method, plugin, method]
|
262
231
|
end
|
263
232
|
end
|
264
233
|
end
|
265
|
-
|
266
|
-
desc "Undo rewrite by restoring backups"
|
267
|
-
task :undo do
|
268
|
-
for filename in Dir["doc/**/*.html.bak"]
|
269
|
-
FileUtils.mv(filename, filename.sub(/\.bak$/, ''), :verbose => true)
|
270
|
-
end
|
271
|
-
end
|
272
|
-
|
273
|
-
desc "Generate documentation for specific files in an endless loop"
|
274
|
-
task :loop do
|
275
|
-
sources_and_targets = {
|
276
|
-
"doc/files/TUTORIAL_txt.html" => "TUTORIAL.txt"
|
277
|
-
}
|
278
|
-
|
279
|
-
while true
|
280
|
-
different = false
|
281
|
-
for source, target in sources_and_targets
|
282
|
-
if ! File.exists?(target) or (File.exists?(target) and File.mtime(target) > File.mtime(source))
|
283
|
-
different = true
|
284
|
-
break
|
285
|
-
end
|
286
|
-
end
|
287
|
-
|
288
|
-
puts "checking %s" % File.mtime(target)
|
289
|
-
puts "different" if different
|
290
|
-
|
291
|
-
sh "rdoc --template=jamis --promiscuous --accessor class_inheritable_accessor=R --title 'AutomateIt: Open source server automation' %s" % sources_and_targets.values.join(" ") if different
|
292
|
-
sleep 1
|
293
|
-
end
|
294
|
-
end
|
295
234
|
end
|
296
235
|
|
297
|
-
desc "Generate
|
236
|
+
desc "Generate documentation"
|
298
237
|
task :rdoc do
|
299
|
-
|
300
|
-
sh "rm -rf doc" if File.exist?("doc")
|
238
|
+
hoe(:docs)
|
301
239
|
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
desc "List aliased_methods for inclusion into rdoc"
|
307
|
-
task :aliased_methods do
|
308
|
-
automateit.instance_eval do
|
309
|
-
methods_and_plugins = []
|
310
|
-
plugins.values.each{|plugin| plugin.aliased_methods && plugin.aliased_methods.each{|method| methods_and_plugins << [method.to_s, plugin.class.to_s]}}
|
311
|
-
|
312
|
-
for method, plugin in methods_and_plugins.sort_by{|x| x[0]}
|
313
|
-
puts " # * %s -- %s#%s" % [method, plugin, method]
|
314
|
-
end
|
240
|
+
# Create a tutorial index
|
241
|
+
File.open("doc/tutorial.html", "w+") do |writer|
|
242
|
+
writer.write(File.read("doc/index.html").sub(/README_txt.html/, 'TUTORIAL_txt.html'))
|
315
243
|
end
|
316
244
|
end
|
317
245
|
|
318
246
|
#---[ Misc ]------------------------------------------------------------
|
319
247
|
|
320
|
-
desc "Chown files if needed"
|
248
|
+
desc "Chown files in checkout if needed"
|
321
249
|
task :chown do
|
322
250
|
if automateit.superuser?
|
323
251
|
stat = File.stat("..")
|
@@ -325,11 +253,4 @@ task :chown do
|
|
325
253
|
end
|
326
254
|
end
|
327
255
|
|
328
|
-
desc "Link to local rdoc stash"
|
329
|
-
task :rdoclink do
|
330
|
-
automateit.ln_s("/home/lagi/stash/automateit_rdoc", "doc")
|
331
|
-
end
|
332
|
-
|
333
|
-
task :after => [:rdoclink, :rdoc, :regem]
|
334
|
-
|
335
256
|
#===[ fin ]=============================================================
|
data/TODO.txt
CHANGED
@@ -1,48 +1,50 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
1
|
+
= AutomateIt's todo list
|
2
|
+
|
3
|
+
=== Software
|
4
|
+
|
5
|
+
Bugs
|
6
|
+
* Interpreter -- "def" in recipes isn't visible, why?
|
7
|
+
* ShellManager -- #ln_s of a directory source to a specific non-subdirectory name creates a link
|
8
|
+
* AccountManager::NSCD -- Uses "ps -ef", needs abstraction, create and use ProcessManager?
|
9
|
+
* AccountManager -- Solaris fails 5% of the time on the last spec. WTF?
|
10
|
+
* AccountManager -- OpenBSD stalls if it thinks a password's quality sucks. What to do?
|
11
|
+
* AccountManager -- OpenBSD fails "should add groups to a user" and "should add users to group".
|
12
|
+
|
13
|
+
Needs improvement
|
14
|
+
* Interpreter -- #unique_methods should use :symbols
|
15
|
+
* Interpreter#invoke and HelpfulERB -- Extract error context code into separate, reusable classes
|
16
|
+
* FieldManager -- Wrap #lookup("my#deep#non-existent#path") with friendly exceptions
|
17
|
+
* TagManager -- Wrap YAML and ERB errors using friendly exceptions
|
18
|
+
* ServiceManager -- Write tests for start_and_enable and such
|
19
|
+
* Shell -- Expand glob patterns, e.g. chown_R(500, 500, "*")
|
20
|
+
* Edit -- Display summary of edits, return with :details as [rv, list]
|
21
|
+
* Shell#chperm -- With symbolic mode, wrap `chmod -v` as temporary workaround?
|
22
|
+
* Shell#chperm -- Accept varargs as argument, not just string or array
|
23
|
+
* ServiceManager -- Create new #stop_and_start, and add new #restart as #tell wrapper
|
24
|
+
* PackageManager -- Improve PEAR spec by having it check files with and without channel URL
|
25
|
+
|
26
|
+
Needs redesign
|
27
|
+
* PackageManager -- How to specify command to use? E.g. 'gem1.8', 'python2.5.1' and '/usr/local/bin/perl'. Generalize CPAN driver's approach?
|
28
|
+
* PackageManager -- What's a reasonable way to leave out the ':with' option when using a hash argument to install? E.g., sudo ai -e "package_manager.install({'swiftfox-prescott' => '/tmp/swiftfox_3.0b3pre-1_prescott.deb'}, :with => :dpkg)"
|
29
|
+
* Shell -- Consistently return single items or arrays, alter specs to match
|
30
|
+
* Driver -- How to determine if a manager or driver method is available? Manager#available?, Manager#available and Driver#suitable? only say if it should be a default.
|
31
|
+
|
32
|
+
New features
|
33
|
+
* ScheduleManager -- Design, or write wrapper for RubyCron or such
|
34
|
+
* ProcessManger -- Design (provides "ps -ef" and such), add #pgrep and #pmatch methods
|
35
|
+
* Shell -- Write #su(user, *command) as a wrapper around #sh
|
36
|
+
* Interpeter -- Implement #track_changes, #changed?
|
37
|
+
* SourceManager -- Design (e.g. svn wrapper)
|
38
|
+
|
39
|
+
New drivers
|
40
|
+
* PackageManager::FreeBSD_Ports - Implement (or make generic ::Ports? and FreeBSD_Pkg
|
41
|
+
* PackageManager -- Fink and MacPorts (or generic ::Ports?)
|
42
|
+
* PackageManager -- Upgrade or install specific versions
|
43
|
+
* PackageManager::Blastwave -- Implement
|
44
|
+
* PackageManager::SunOS_Pkg -- Implement
|
45
|
+
* ServiceManager::SMF -- Implement
|
46
|
+
|
47
|
+
=== Website
|
48
|
+
|
49
|
+
* CSS -- Highlight active section of site
|
50
|
+
* Page -- Add error page
|