automate-it 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.hgignore +10 -0
  4. data/.loadpath +5 -0
  5. data/.project +17 -0
  6. data/CHANGES.txt +314 -0
  7. data/Hoe.rake +40 -0
  8. data/Manifest.txt +164 -0
  9. data/README.txt +40 -0
  10. data/Rakefile +256 -0
  11. data/TESTING.txt +57 -0
  12. data/TODO.txt +50 -0
  13. data/TUTORIAL.txt +391 -0
  14. data/automate-it.gemspec +25 -0
  15. data/bin/ai +3 -0
  16. data/bin/aifield +75 -0
  17. data/bin/aissh +93 -0
  18. data/bin/aitag +134 -0
  19. data/bin/automateit +133 -0
  20. data/docs/friendly_errors.txt +50 -0
  21. data/docs/previews.txt +86 -0
  22. data/examples/basic/Rakefile +26 -0
  23. data/examples/basic/config/automateit_env.rb +16 -0
  24. data/examples/basic/config/fields.yml +3 -0
  25. data/examples/basic/config/tags.yml +7 -0
  26. data/examples/basic/dist/README.txt +9 -0
  27. data/examples/basic/dist/myapp_server.erb +30 -0
  28. data/examples/basic/install.log +15 -0
  29. data/examples/basic/lib/README.txt +10 -0
  30. data/examples/basic/recipes/README.txt +4 -0
  31. data/examples/basic/recipes/install.rb +61 -0
  32. data/examples/basic/recipes/uninstall.rb +6 -0
  33. data/gpl.txt +674 -0
  34. data/helpers/cpan_wrapper.pl +220 -0
  35. data/helpers/which.cmd +7 -0
  36. data/lib/automateit.rb +55 -0
  37. data/lib/automateit/account_manager.rb +114 -0
  38. data/lib/automateit/account_manager/base.rb +138 -0
  39. data/lib/automateit/account_manager/etc.rb +128 -0
  40. data/lib/automateit/account_manager/nscd.rb +33 -0
  41. data/lib/automateit/account_manager/passwd_expect.rb +40 -0
  42. data/lib/automateit/account_manager/passwd_pty.rb +69 -0
  43. data/lib/automateit/account_manager/posix.rb +138 -0
  44. data/lib/automateit/address_manager.rb +88 -0
  45. data/lib/automateit/address_manager/base.rb +171 -0
  46. data/lib/automateit/address_manager/bsd.rb +28 -0
  47. data/lib/automateit/address_manager/freebsd.rb +59 -0
  48. data/lib/automateit/address_manager/linux.rb +42 -0
  49. data/lib/automateit/address_manager/openbsd.rb +66 -0
  50. data/lib/automateit/address_manager/portable.rb +37 -0
  51. data/lib/automateit/address_manager/sunos.rb +34 -0
  52. data/lib/automateit/cli.rb +85 -0
  53. data/lib/automateit/common.rb +65 -0
  54. data/lib/automateit/constants.rb +35 -0
  55. data/lib/automateit/download_manager.rb +48 -0
  56. data/lib/automateit/edit_manager.rb +321 -0
  57. data/lib/automateit/error.rb +10 -0
  58. data/lib/automateit/field_manager.rb +103 -0
  59. data/lib/automateit/interpreter.rb +631 -0
  60. data/lib/automateit/package_manager.rb +257 -0
  61. data/lib/automateit/package_manager/apt.rb +27 -0
  62. data/lib/automateit/package_manager/cpan.rb +101 -0
  63. data/lib/automateit/package_manager/dpkg.rb +54 -0
  64. data/lib/automateit/package_manager/egg.rb +64 -0
  65. data/lib/automateit/package_manager/gem.rb +201 -0
  66. data/lib/automateit/package_manager/pear.rb +95 -0
  67. data/lib/automateit/package_manager/pecl.rb +80 -0
  68. data/lib/automateit/package_manager/portage.rb +69 -0
  69. data/lib/automateit/package_manager/yum.rb +65 -0
  70. data/lib/automateit/platform_manager.rb +49 -0
  71. data/lib/automateit/platform_manager/darwin.rb +30 -0
  72. data/lib/automateit/platform_manager/debian.rb +26 -0
  73. data/lib/automateit/platform_manager/freebsd.rb +29 -0
  74. data/lib/automateit/platform_manager/gentoo.rb +26 -0
  75. data/lib/automateit/platform_manager/lsb.rb +44 -0
  76. data/lib/automateit/platform_manager/openbsd.rb +28 -0
  77. data/lib/automateit/platform_manager/struct.rb +80 -0
  78. data/lib/automateit/platform_manager/sunos.rb +39 -0
  79. data/lib/automateit/platform_manager/uname.rb +29 -0
  80. data/lib/automateit/platform_manager/windows.rb +40 -0
  81. data/lib/automateit/plugin.rb +7 -0
  82. data/lib/automateit/plugin/base.rb +32 -0
  83. data/lib/automateit/plugin/driver.rb +256 -0
  84. data/lib/automateit/plugin/manager.rb +224 -0
  85. data/lib/automateit/project.rb +493 -0
  86. data/lib/automateit/root.rb +17 -0
  87. data/lib/automateit/service_manager.rb +93 -0
  88. data/lib/automateit/service_manager/chkconfig.rb +39 -0
  89. data/lib/automateit/service_manager/rc_update.rb +37 -0
  90. data/lib/automateit/service_manager/sysv.rb +139 -0
  91. data/lib/automateit/service_manager/update_rcd.rb +35 -0
  92. data/lib/automateit/shell_manager.rb +316 -0
  93. data/lib/automateit/shell_manager/base_link.rb +67 -0
  94. data/lib/automateit/shell_manager/link.rb +24 -0
  95. data/lib/automateit/shell_manager/portable.rb +523 -0
  96. data/lib/automateit/shell_manager/symlink.rb +32 -0
  97. data/lib/automateit/shell_manager/which_base.rb +30 -0
  98. data/lib/automateit/shell_manager/which_unix.rb +16 -0
  99. data/lib/automateit/shell_manager/which_windows.rb +20 -0
  100. data/lib/automateit/tag_manager.rb +127 -0
  101. data/lib/automateit/tag_manager/struct.rb +121 -0
  102. data/lib/automateit/tag_manager/tag_parser.rb +93 -0
  103. data/lib/automateit/tag_manager/yaml.rb +29 -0
  104. data/lib/automateit/template_manager.rb +56 -0
  105. data/lib/automateit/template_manager/base.rb +181 -0
  106. data/lib/automateit/template_manager/erb.rb +17 -0
  107. data/lib/ext/metaclass.rb +17 -0
  108. data/lib/ext/object.rb +18 -0
  109. data/lib/ext/shell_escape.rb +7 -0
  110. data/lib/hashcache.rb +22 -0
  111. data/lib/helpful_erb.rb +63 -0
  112. data/lib/inactive_support.rb +53 -0
  113. data/lib/inactive_support/basic_object.rb +6 -0
  114. data/lib/inactive_support/clean_logger.rb +127 -0
  115. data/lib/inactive_support/core_ext/array/extract_options.rb +19 -0
  116. data/lib/inactive_support/core_ext/blank.rb +50 -0
  117. data/lib/inactive_support/core_ext/class/attribute_accessors.rb +48 -0
  118. data/lib/inactive_support/core_ext/class/inheritable_attributes.rb +140 -0
  119. data/lib/inactive_support/core_ext/enumerable.rb +63 -0
  120. data/lib/inactive_support/core_ext/hash/keys.rb +54 -0
  121. data/lib/inactive_support/core_ext/module/aliasing.rb +70 -0
  122. data/lib/inactive_support/core_ext/numeric/time.rb +91 -0
  123. data/lib/inactive_support/core_ext/string/inflections.rb +153 -0
  124. data/lib/inactive_support/core_ext/symbol.rb +14 -0
  125. data/lib/inactive_support/core_ext/time/conversions.rb +96 -0
  126. data/lib/inactive_support/duration.rb +96 -0
  127. data/lib/inactive_support/inflections.rb +53 -0
  128. data/lib/inactive_support/inflector.rb +282 -0
  129. data/lib/nested_error.rb +33 -0
  130. data/lib/nitpick.rb +33 -0
  131. data/lib/queued_logger.rb +68 -0
  132. data/lib/tempster.rb +250 -0
  133. data/misc/index_gem_repository.rb +304 -0
  134. data/misc/setup_egg.rb +12 -0
  135. data/misc/setup_gem_dependencies.sh +6 -0
  136. data/misc/setup_rubygems.sh +21 -0
  137. metadata +279 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4d3c3fab11b7c4bf2b4bf8762f297003fb2a89b0
4
+ data.tar.gz: a46714c271aecc9befcfbef839bf6bc31658a57a
5
+ SHA512:
6
+ metadata.gz: 37a1783b58e98a3fa2212cdbeae37742f1967ddcfe5c44f88bac3b87e4663beb2203ba3d5ba0302c77e20fc16207ae9f13d2eda1e3597efbbaedf1c8de738163
7
+ data.tar.gz: e49fe5e2b81666f79320c0e4143d095c9a524db1f1c392b2308b52961cb71c50efc70849693668357fb209ed01fada3e065966fc34d9a0d9442fff936aa056ce
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ log/*.log
2
+ tmp
3
+ tmp/**/*
4
+ doc/**/*
5
+ doc/*
6
+ config/database.yml
7
+ db/*.sqlite3
8
+ db/schema.rb
9
+ *~
10
+ start
11
+ *.swp
12
+ *.swo
13
+ features
14
+ spec
15
+ *.dat
16
+ .bundle
17
+ .vagrant
18
+ *.bak
19
+ *.gem
data/.hgignore ADDED
@@ -0,0 +1,10 @@
1
+ syntax: glob
2
+
3
+ *.rcov
4
+ coverage
5
+ doc
6
+ pkg
7
+ prof.txt
8
+ tags
9
+ *.tmp
10
+ *.diff
data/.loadpath ADDED
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <loadpath>
3
+ <pathentry excluding="/hg/|doc/" path="" type="src"/>
4
+ <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/>
5
+ </loadpath>
data/.project ADDED
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>automateit</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.rubypeople.rdt.core.rubybuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.rubypeople.rdt.core.rubynature</nature>
16
+ </natures>
17
+ </projectDescription>
data/CHANGES.txt ADDED
@@ -0,0 +1,314 @@
1
+ 0.9.0
2
+ Date: 16 May 2013
3
+ Desc:
4
+ - Forked as automate-it
5
+ - Added sudo option for ServiceManager
6
+ - Added Debian Backports support
7
+
8
+
9
+ 0.80624:
10
+ Date: Tue, 24 Jun 2008 23:13:35 -0700
11
+ Desc:
12
+ - Fixed collision of time conversion methods when loading AutomateIt into Rails.
13
+ - Improved documentation, reworked Rakefile, updated TODO.txt.
14
+
15
+ 0.80607:
16
+ Date: Fri, 06 Jun 2008 23:13:56 -0700
17
+ Desc:
18
+ - (%) Fixed ShellManager#rm and ShellManager#mv, can now remove and move invalid symlinks.
19
+ - Improved Object#unique_methods, it now returns an array of symbols.
20
+
21
+ 0.80116:
22
+ Date: Wed, 16 Jan 2008 23:55:44 -0800
23
+ Desc:
24
+ - (!) Fixed bug that prevented AutomateIt from working without the Builder gem's "blankslate" library. This fix should completely eliminate AutomateIt's dependence on Builder and ActiveSupport, like 0.71230 was supposed to do. This error was missed because other gems provide a "blankslate"-workalike and thus merely uninstalling Builder wasn't enough to confirm the previous fix.
25
+ - (+) Improved PackageManager::Gem, it can now use commands other than "gem" to manage RubyGem packages, such as "gem1.8". It now detects the best available command, but also lets you specify a default or choose one on a per-call basis. See the PackageManager::Gem documentation for examples. Comments are sought on the new syntax.
26
+ - Improved PackageManager#_list_normalizer, it now accepts comments mid-way through a line and can parse arrays of strings.
27
+ - Updated misc/setup_rubygems.sh, a simple shell script that downloads and install RubyGems 1.0.1, useful for bootstrapping a system to get AutomateIt running on it.
28
+
29
+ 0.71230:
30
+ Date: Sun, 30 Dec 2007 14:05:31 -0800
31
+ Desc:
32
+ - (!) Removed all code that relied on the ActiveSupport and Builder libraries. The new, AutomateIt-specific replacements for these libraries are guaranteed to work correctly and load much more quickly.
33
+ - (!) Removed the "--to-xml" option from "aitag" and "aifield". If anyone relied on this functionality, post to the mailing list and I'll write a replacement.
34
+ - (%) Fixed PlatformManager::LSB, it no longer converts OS release versions like "7.10" into "7.1".
35
+ - (%) Fixed "aitags" with "--tags" options, it now returns a sorted array instead of a set.
36
+ - (%) Fixed case/when statements to work with Ruby 1.9.
37
+ - (%) Fixed TemplateManager#render, it now only runs file-related checks when rendering to a file.
38
+ - Improved PackageManager::CPAN's "cpan_wrapper.pl". It's now just a single file that can be used as both a command and library.
39
+ - Improved EditManager. In preview mode, it now checks to make sure the file is readable, rather than failing due to permission denied errors.
40
+
41
+ 0.71226.1:
42
+ Date: Wed, 26 Dec 2007 11:45:03 -0800
43
+ Desc:
44
+ - Same as previous version. Something went wrong with Rubyforge and the gem was only partially uploaded, so trying again.
45
+
46
+ 0.71226:
47
+ Date: Wed, 26 Dec 2007 11:41:03 -0800
48
+ Desc:
49
+ - (%) Fixed PackageManager::CPAN driver. It now provides a workaround to activate CPAN if it wasn't already configured, previously it'd hang as CPAN tried to get input. It now provides a workaround for rejecting all CPAN inputs because the CPAN default options are surprisingly dangerous. It now tries harder to execute the Perl helper files, previously these wouldn't be executed on some OSes. The helpers' core logic has been abstracted into a wrapper library.
50
+
51
+ 0.71221:
52
+ Date: Sun, 23 Dec 2007 00:48:30 -0800
53
+ Desc:
54
+ - (%) Fixed PackageManager::APT driver. In 0.71220, the DPKG driver was selected as the default driver over APT. The fix chooses APT as the default over DPKG, like before.
55
+ - Fixed Rakefile to work with latest version of RubyGems.
56
+
57
+ 0.71220:
58
+ Date: Thu, 20 Dec 2007 23:36:05 -0800
59
+ Desc:
60
+ - (+) Added PackageManager::CPAN for managing Perl packages. Thanks go out to Jesse Hallett for assisting me with research on how to use the CPAN APIs.
61
+ - Fixed PackageManager#install when called with a single Symbol argument.
62
+ - Added PackageManager::DPKG for local installation of .deb packages. Added logic to help it install a hash of package names to file names. Added spec to validate this.
63
+ - Refactored PackageManager::APT to defer to PackageManager::DPKG's logic when possible.
64
+
65
+ 0.71219:
66
+ Date: Wed, 19 Dec 2007 22:00:59 -0800
67
+ Desc:
68
+ - Created a bunch of workarounds needed because of bugs and backwards incompatible changes in new versions of third-party libraries...
69
+ - (%) Fixed "gem install automateit". Created workaround for new ActiveSupport bug which doesn't install the Builder gem.
70
+ - (%) Fixed "rake regem" which generates the AutomateIt gem. Created workaround for new RubyGems bug which no longer installs the necessary Gem::Format dependency. Created workaround for new Rake bug which causes FileList to act like a string instead of an array. Created workaround for new Rake/RubyGems bugs that don't load 'rubygems' by default.
71
+ - Improved PasswdExpect, no longer passing username/password on command-line to improve security.
72
+
73
+ 0.71112:
74
+ Date: Mon, 12 Nov 2007 09:51:31 -0800
75
+ Desc:
76
+ - (%) Fixed ShellManager::WhichWindows#which, forgot to include helper file in gem.
77
+
78
+ 0.71111:
79
+ Date: Sun, 11 Nov 2007 06:06:27 -0800
80
+ Desc:
81
+ - (+) Improved AccountManager::Etc detection logic, it now tries to run commands rather than relying on blacklists. This better supports Windows and JRuby.
82
+ - (+) Added ShellManager::WhichWindows, it simulates the #which command on Windows.
83
+ - WARNING: AccountManager::POSIX#add_groups_to_user and add_users_to_group
84
+
85
+ 0.71104:
86
+ Date: Sun, 04 Nov 2007 21:01:10 -0800
87
+ Desc:
88
+ - (%) Fixed bugs in startup sequence when run on Microsoft Windows. Added support for Vista.
89
+ - (%) Fixed bugs encountered on Windows in Plugin::Driver. Dependency checks are now done in specific order and stop as soon as a missing dependency is detected.
90
+
91
+ 0.71103:
92
+ Date: Sat, 03 Nov 2007 01:26:13 -0700
93
+ Desc:
94
+ - (+) Added "aissh" command, provides an easy way to run commands on a group of hosts. For example, see if there's a Rails process running on all hosts matching the "rails_servers" tag: "aissh -p . rails_servers 'ps -ef | grep rails'"
95
+ - Improved PackageManager, it can now accept package names as Symbols.
96
+ - Improved AccountManager spec with additional examples for checking password changes.
97
+ - Improved AccountManager::NSCD with refactoring and additional tests.
98
+ - Improved AddressManager spec with additional tests for address conversion routines and code generation helpers.
99
+ - Improved Plugin spec with more checks against invalid managers and drivers, and unavailable dependencies.
100
+ - Improved ShellManager spec with more checks against hard links and symbolic links; for #cp when contents, modes or ownership changes; for #rm with :force option: for #umask with and without block, and with caught exceptions.
101
+ - Added spec for String#shell_escape.
102
+ - Added spec for Object's extensions for #unique_methods and #args_and_opts.
103
+ - Added spec for NestedError.
104
+
105
+ 0.71102:
106
+ Date: Fri, 02 Nov 2007 02:59:41 -0700
107
+ Desc:
108
+ - Improved PackageManager::PEAR and PackageManager::PECL, can now :force installation of unstable packages.
109
+ - Refactored PackageManager spec and added :force to get PEAR and PECL to workaround systems that refuse to load the unstable testing packages.
110
+
111
+ 0.71101.2:
112
+ Date: Thu, 01 Nov 2007 22:37:44 -0700
113
+ Desc:
114
+ - (%) Fixed bug in TagParser, it couldn't parse hostnames with non-letter characters. Added tests. Thanks for the report, David Brewer.
115
+ - (%) Fixed bug in TagManager, adding a run-time tag caused it to not parse tags.yml. Added tests.
116
+ - (+) Improved TagManager, it now makes run-time tags available to the interpreter when parsing tags.yml, which provides greater flexibility in defining tags. Added tests. Thanks for the suggestion, David Brewer.
117
+
118
+ Thanks for the report, David Brewer.
119
+
120
+ 0.71101.1:
121
+ Date: Thu, 01 Nov 2007 18:52:01 -0700
122
+ Desc:
123
+ - (%) Fixed bug in Interpreter, which only set optional run-time tags specified on the command-line AFTER it loaded the fields/tags files. Thanks for the report, David Brewer.
124
+
125
+ 0.71101:
126
+ Date: Thu, 01 Nov 2007 17:07:51 -0700
127
+ Desc:
128
+ - (%) Fixed bug in TagManager#tagged? when checking tag names containing dashes ("-"), refactored to improve tag tokenizing rules, added test. Thank you, David Brewer.
129
+ - Fixed bug in TemplateManager#render when rendering templates to strings, added tests. Thank you for the report, David Brewer.
130
+
131
+ 0.71031.2:
132
+ Date: Wed, 31 Oct 2007 23:48:41 -0700
133
+ Desc:
134
+ - (+) Added PackageManager::PEAR and PackageManager::PECL, graciously contributed by David Brewer.
135
+
136
+ 0.71031.1:
137
+ Date: Wed, 31 Oct 2007 13:15:30 -0700
138
+ Desc:
139
+ - (%) Fixed bug in EditSession methods, these weren't escaping regular expression characters in strings. Refactored some of these methods for clarity.
140
+
141
+ 0.71031:
142
+ Date: Wed, 31 Oct 2007 02:58:58 -0700
143
+ Desc:
144
+ - Improved Project libraries so they're loaded before Tags and Fields. This makes it possible to, for example, write a library helper that's called from within the fields.yml file via ERB.
145
+
146
+ 0.71030:
147
+ Date: Tue, 30 Oct 2007 01:43:02 -0700
148
+ Desc:
149
+ - (%) Fixed bug in AddressManager#add_user when called with multiple groups. Improved AddressManager spec.
150
+ - (+) Added documentation to Project explaining how to partition recipes, and run recipes from other recipes.
151
+ - (+) Added AddressManager::POSIX which provides support for Linux and SunOS, and eliminated the OS-specific drivers for these.
152
+ - Added AddressManager::NSCD by extracting methods from old OS-specific drivers.
153
+ - Added AddressManager::PasswdExpect which uses Expect for much more reliable password changes.
154
+ - Improved AddressManager::PasswdPty by adding retry capability.
155
+
156
+ 0.71021:
157
+ Date: Sun, 21 Oct 2007 04:58:01 -0700
158
+ Desc:
159
+ - Added PlatformManager::OpenBSD.
160
+ - Added AddressManager::OpenBSD.
161
+ - Added AddressManager::FreeBSD.
162
+ - Added AddressManager::BSD which assists SunOS, FreeBSD and OpenBSD.
163
+
164
+ 0.71017:
165
+ Date: Wed, 17 Oct 2007 00:24:24 -0700
166
+ Desc:
167
+ - (%) Fixed, created workaround so AutomateIt can run using the newly-released ActiveSupport 1.4.4 (part of Rails 2.0 PR1), because this new library breaks backwards compatibility by depending on new #extract_options method.
168
+
169
+ 0.71012:
170
+ Date: Fri, 12 Oct 2007 03:54:30 -0700
171
+ Desc:
172
+ - (%) Fixed #touch, it worked fine but was corrupting log output
173
+ - (%) Fixed AccountManager::Linux, it now only runs when the OS detected is Linux.
174
+ - Added PlatformManager::SunOS.
175
+ - Added AddressManager::SunOS.
176
+ - Improved #render, added default :backup option to save files before overwriting them.
177
+ - Improved #backup, added :quiet option to prevent output.
178
+ - Improved #chperm, it now displays the exact changes made rather than approximations.
179
+ - Improved ServiceManager::SysV spec to validate :wait and :pause options with safe mocks.
180
+
181
+ 0.71006:
182
+ Date: Sat, 06 Oct 2007 17:55:37 -0700
183
+ Desc:
184
+ - (%) Fixed EditSession#delete to delete lines matching substrings rather than exact matches.
185
+ - Fixed EditSession#comment to not comment already commented-out lines.
186
+ - Fixed SessionManager#start and #stop so these don't check status when called with :force option.
187
+ - Improved SessionManager#restart to use :wait option.
188
+ - Improved #download to accept array or hash as arguments.
189
+
190
+ 0.71003:
191
+ Date: Wed, 03 Oct 2007 01:17:32 -0700
192
+ Desc:
193
+ - Fixed bug in #backup on JRuby because it lacks methods to query properties. It now copies the file and timestamp, but not the owner/group/mode because these can't be queried on JRuby.
194
+ - Improved #cp with new :preserve => :try option so that properties are preserved when possible, but no exception is thrown when these can't be preserved.
195
+ - Improved #touch with options for :like and :stamp options.
196
+
197
+ 0.70930:
198
+ Date: Sun, 30 Sep 2007 15:10:43 -0700
199
+ Desc:
200
+ - Fixed ShellManager#rm to display output like 'rm -rf' rather than 'rm_rf'.
201
+ - Fixed #tags, removed the standalone tag for the distro's version (e.g., "7.04"), it must now be qualified with the distro's name, "ubuntu_7.04".
202
+ - Improved bin/automateit so it doesn't display error trace when user types 'exit' into irb.
203
+ - Improved comments in basic/examples recipes.
204
+ - Improved #tag_for to return a sorted Array instead of a Set.
205
+
206
+ 0.70928:
207
+ Date: Fri, 28 Sep 2007 23:18:37 -0700
208
+ Desc:
209
+ - (%) Fixed #cp, #ln and #install when called with relative path source and directory target. These tried to create items which included the relative path, rather than discarding it.
210
+ - (+) Added an "--add TAGS" feature to executables: automateit, aifield, aitag. This makes it easy to define tag(s) for a specific run.
211
+ - (+) Added #backup command to save copies of files, it's now used by default when using #edit to modify a file.
212
+ - (+) Added #download command to retrieve data via HTTP and FTP to a file or directory.
213
+ - Improved specs and provided coverage for more exception handling.
214
+
215
+ 0.70923:
216
+ Date: Sun, 23 Sep 2007 16:01:03 -0700
217
+ Desc:
218
+ - Fixed hard link and symlink detection on Windows, spec will now skip these examples.
219
+ - Fixed cli_spec so it can invoke Windows version of rake.
220
+
221
+ 0.70922:
222
+ Date: Sat, 22 Sep 2007 22:56:39 -0700
223
+ Desc:
224
+ - Refactored AccountManager::Linux and extracted Passwd driver.
225
+ - Refactored Shellmanager::Portable and extracted Which, Link and Symlink drivers.
226
+ - Improved Plugin::Driver, added a depends_on :libraries option.
227
+
228
+ 0.70921:
229
+ Date: Fri, 21 Sep 2007 18:29:24 -0700
230
+ Desc:
231
+ - Improved AccountManager::Linux to work around a race condition in PTY/Expect that happens about 1% of the time when setting a password.
232
+ - Improved executables (e.g., bin/automateit) to display help with "-h", in addition to "--help".
233
+ - Improved executables (e.g., bin/automateit) to display version with "-v" and "--version".
234
+ - Refactored EditSession and its documentation.
235
+ - Refactored TemplateManager, moved common logic into BaseDriver.
236
+ - Refactored Rakefile for clarity.
237
+ - Replaced GemSpec with Hoe in preparation to uploading AutomateIt to RubyForge.
238
+
239
+ 0.70919:
240
+ Date: Wed, 19 Sep 2007 22:08:42 -0700
241
+ Desc:
242
+ - (!) Normalized PackageManager methods and ShellManager#chperm to use consistent ':details => true' option.
243
+ - (!) Refactored PackageManager with :details mode to return both a boolean and list of affected packages, previously it only returned packages.
244
+ - Fixed bug in ShellManager and Tempster that created temporary files and directories in preview mode.
245
+ - Created 'preview' methods to replace old 'noop' commands. Improved documentation for previewing commands.
246
+ - Made it easier to embed the Interpreter using new methods 'include_in' and 'add_method_missing_to'. Included Rakefile with default and example projects to demonstrate embedding.
247
+ - Improved AccountManager, it can set and change passwords on user accounts.
248
+ - Improved TagManager, it lazy-loads tags to speed startup.
249
+ - Improved ShellManager, TemplateManager and EditManager so they translate :owner to :user for Cfengine refugees.
250
+ - Improved support for Darwin and JRuby. Reworked methods and drivers to let these access more features.
251
+
252
+ 0.70915:
253
+ Date: Sat, 15 Sep 2007 23:09:26 -0700
254
+ Desc:
255
+ - Improved Interpreter with friendly error messages that make it easier for users to see what's wrong with a recipe. These new messages display the cause, a snapshot of the problematic code, shortened paths, and only the relevant stack frames. Also provided way to get complete, raw backtraces for debugging internals.
256
+ - Improved plugins that use ERB by creating a new HelpfulERB class that provides sane behavior and provides friendly, contextual error messages making it much easier for users to identify and fix problems in templates.
257
+
258
+ 0.70914:
259
+ Date: Fri, 14 Sep 2007 17:37:48 -0700
260
+ Desc:
261
+ - (%) Fixed bug in ShellManager::Portable that caused 'cp' to actually copy even when in 'noop' mode.
262
+ - Ported code to work with JRuby.
263
+ - Wrote TagParser that works with JRuby and handles arbitrarily complex and deep rules with correct precedence.
264
+ - Improved PackageManager commands to accept hash of names to paths, e.g., if package 'TracTags' isn't present, installs it from a directory.
265
+ - Improved PackageManager commands to accept annotated, free-form strings with comments.
266
+ - Improved Interpreter.invoke to search a project's recipes directory, making it easier for recipes to invoke other recipes.
267
+ - Improved EditSession to provide easier access to Interpreter methods.
268
+ - Improved ServiceManager to provide 'start_and_enable' and 'start_or_restart' convenience commands.
269
+
270
+ 0.70913:
271
+ Date: Thu, 13 Sep 2007 06:35:50 -0700
272
+ Desc:
273
+ - (%) Fixed bug in PackageManager::Gem, it wasn't recognizing packages installed multiple times as being installed.
274
+ - Provided complete support for CentOS and RedHat.
275
+ - Provided complete support for Gentoo with new PackageManager::Portage and ServiceManager::RC_Update drivers.
276
+ - Provided basic support for FreeBSD with new PlatformManager::FreeBSD.
277
+ - Rewrote AddressManager::Linux using pure 'ifconfig' calls, which provide more universal support than 'iproute'.
278
+ - Reworked examples to create a user for the application, demonstrating the use of AccountManager and eliminating need for workarounds to platform-specific differences for the 'nobody' account.
279
+ - Added new 'depends_on' option to check complex dependencies using callbacks, e.g., ensure a specific version of ifconfig.
280
+ - Included examples/basic in Gem distribution, the code used in the Screenshots.
281
+
282
+ 0.70912:
283
+ Date: Wed, 12 Sep 2007 18:54:10 -0700
284
+ Desc:
285
+ - (%) Fixed bug where a project's fields were sometimes accidentally cleared. Wrote tests to make sure this won't happen again.
286
+ - Added tests for examples/basic recipes.
287
+ - Added ServiceManager started? and stopped? methods with wait timeouts.
288
+ 0.70910:
289
+ Date: Mon, 10 Sep 2007 19:34:25 -0700
290
+ Desc:
291
+ - (!) Reworked Plugins so drivers find managers by inheritance, rather than by name. Simplifies code and allows drivers in different namespaces than their manager. Should be one of the last changes that breaks backwards-compatibility in Plugins for a while.
292
+
293
+ 0.70909:
294
+ Date: Sun, 09 Sep 2007 16:39:58 -0700
295
+ Desc:
296
+ - Added initial support for Apple Mac OS X. Includes a PlatformManager driver for Darwin, and assorted changes needed for AutomateIt to run on the old Ruby 1.8.2 bundled with Tiger.
297
+ - Fixed AddressManager by eliminating exceptions raised on misconfigured systems that didn't have IPs for local hostnames.
298
+
299
+ 0.70907:
300
+ Date: Fri, 07 Sep 2007 23:48:55 -0700
301
+ Desc:
302
+ - (!) Created AbstractDriver classes for each plugin and made the concrete drivers subclass these.
303
+ - Wrote tests for CLI, which create projects, invoke recipes, run the interactive shell, etc.
304
+ - Eliminated need for custom drivers to run 'setup' on their associated plugin instance.
305
+
306
+ 0.70906:
307
+ Date: Thu, 06 Sep 2007 23:55:30 -0700
308
+ Desc:
309
+ - Massive improvements to documentation -- thanks Amy!
310
+ - Renamed "UNIX" to "Unix" to avoid trademark issues.
311
+ 0.70903:
312
+ Date: Sun, 03 Sep 2007 10:02:56 -0700
313
+ Desc:
314
+ - Initial beta release.
data/Hoe.rake ADDED
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'hoe'
3
+
4
+ $LOAD_PATH.unshift('lib')
5
+ require 'automateit'
6
+ @interpreter = AutomateIt.new
7
+
8
+ ENV["NODOT"] = "NODOT" # Never generate those crappy rdoc diagrams
9
+
10
+ HoeInclude = {
11
+ :executables => Dir['bin/*'].reject{|t|t.match(/~/)}.map{|t|File.basename(t)},
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)},
13
+ :test_files => FileList["{spec}/**/*"].to_a,
14
+ }
15
+
16
+ desc "Create manifest"
17
+ task :manifest do
18
+ # Diff: rake -f Hoe.rake check_manifest
19
+ items = Set.new(HoeInclude[:files])
20
+ File.open("Manifest.txt", "w+"){|h| h.write(items.to_a.sort.join("\n")+"\n")}
21
+ end
22
+
23
+ Hoe.new("AutomateIt", AutomateIt::VERSION.to_s) do |s|
24
+ slogan = "AutomateIt is an open source tool for automating the setup and maintenance of servers, applications and their dependencies."
25
+ title = "AutomateIt: Open source server automation"
26
+ s.author = "Igal Koshevoy"
27
+ s.changes = s.paragraphs_of('CHANGES.txt', 0).join("\n")
28
+ s.description = slogan
29
+ s.email = "igal@pragmaticraft.com"
30
+ s.extra_deps = [["open4", ">= 0.9"]]
31
+ s.name = "automateit"
32
+ s.summary = slogan
33
+ s.url = "http://automateit.org/"
34
+ s.spec_extras = {
35
+ :platform => Gem::Platform::RUBY,
36
+ :rdoc_options => %w(--op doc --main README.txt --promiscuous --accessor class_inheritable_accessor=R --inline-source --line-numbers --title) << title << %w(lib),
37
+ :extra_rdoc_files => FileList[%w(README.txt TUTORIAL.txt TESTING.txt), "docs/*.txt"],
38
+ }
39
+ s.spec_extras.merge!(HoeInclude)
40
+ end
data/Manifest.txt ADDED
@@ -0,0 +1,164 @@
1
+ CHANGES.txt
2
+ Hoe.rake
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ TESTING.txt
7
+ TODO.txt
8
+ TUTORIAL.txt
9
+ add2path.sh
10
+ bin/ai
11
+ bin/aifield
12
+ bin/aissh
13
+ bin/aitag
14
+ bin/automateit
15
+ docs/friendly_errors.txt
16
+ docs/previews.txt
17
+ examples/basic/Rakefile
18
+ examples/basic/config/automateit_env.rb
19
+ examples/basic/config/fields.yml
20
+ examples/basic/config/tags.yml
21
+ examples/basic/dist/README.txt
22
+ examples/basic/dist/myapp_server.erb
23
+ examples/basic/install.log
24
+ examples/basic/lib/README.txt
25
+ examples/basic/recipes/README.txt
26
+ examples/basic/recipes/install.rb
27
+ examples/basic/recipes/uninstall.rb
28
+ gpl.txt
29
+ helpers/cpan_wrapper.pl
30
+ helpers/which.cmd
31
+ lib/automateit.rb
32
+ lib/automateit/account_manager.rb
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
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
43
+ lib/automateit/address_manager/linux.rb
44
+ lib/automateit/address_manager/openbsd.rb
45
+ lib/automateit/address_manager/portable.rb
46
+ lib/automateit/address_manager/sunos.rb
47
+ lib/automateit/cli.rb
48
+ lib/automateit/common.rb
49
+ lib/automateit/constants.rb
50
+ lib/automateit/download_manager.rb
51
+ lib/automateit/edit_manager.rb
52
+ lib/automateit/error.rb
53
+ lib/automateit/field_manager.rb
54
+ lib/automateit/interpreter.rb
55
+ lib/automateit/package_manager.rb
56
+ lib/automateit/package_manager/apt.rb
57
+ lib/automateit/package_manager/cpan.rb
58
+ lib/automateit/package_manager/dpkg.rb
59
+ lib/automateit/package_manager/egg.rb
60
+ lib/automateit/package_manager/gem.rb
61
+ lib/automateit/package_manager/pear.rb
62
+ lib/automateit/package_manager/pecl.rb
63
+ lib/automateit/package_manager/portage.rb
64
+ lib/automateit/package_manager/yum.rb
65
+ lib/automateit/platform_manager.rb
66
+ lib/automateit/platform_manager/darwin.rb
67
+ lib/automateit/platform_manager/debian.rb
68
+ lib/automateit/platform_manager/freebsd.rb
69
+ lib/automateit/platform_manager/gentoo.rb
70
+ lib/automateit/platform_manager/lsb.rb
71
+ lib/automateit/platform_manager/openbsd.rb
72
+ lib/automateit/platform_manager/struct.rb
73
+ lib/automateit/platform_manager/sunos.rb
74
+ lib/automateit/platform_manager/uname.rb
75
+ lib/automateit/platform_manager/windows.rb
76
+ lib/automateit/plugin.rb
77
+ lib/automateit/plugin/base.rb
78
+ lib/automateit/plugin/driver.rb
79
+ lib/automateit/plugin/manager.rb
80
+ lib/automateit/project.rb
81
+ lib/automateit/root.rb
82
+ lib/automateit/service_manager.rb
83
+ lib/automateit/service_manager/chkconfig.rb
84
+ lib/automateit/service_manager/rc_update.rb
85
+ lib/automateit/service_manager/sysv.rb
86
+ lib/automateit/service_manager/update_rcd.rb
87
+ lib/automateit/shell_manager.rb
88
+ lib/automateit/shell_manager/base_link.rb
89
+ lib/automateit/shell_manager/link.rb
90
+ lib/automateit/shell_manager/portable.rb
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
95
+ lib/automateit/tag_manager.rb
96
+ lib/automateit/tag_manager/struct.rb
97
+ lib/automateit/tag_manager/tag_parser.rb
98
+ lib/automateit/tag_manager/yaml.rb
99
+ lib/automateit/template_manager.rb
100
+ lib/automateit/template_manager/base.rb
101
+ lib/automateit/template_manager/erb.rb
102
+ lib/ext/metaclass.rb
103
+ lib/ext/object.rb
104
+ lib/ext/shell_escape.rb
105
+ lib/hashcache.rb
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
124
+ lib/nested_error.rb
125
+ lib/nitpick.rb
126
+ lib/queued_logger.rb
127
+ lib/tempster.rb
128
+ misc/index_gem_repository.rb
129
+ misc/setup_egg.rb
130
+ misc/setup_gem_dependencies.sh
131
+ misc/setup_rubygems.sh
132
+ spec/breaker.rb
133
+ spec/extras/automateit_service_sysv_test
134
+ spec/extras/scratch.rb
135
+ spec/extras/simple_recipe.rb
136
+ spec/integration/account_manager_nscd_spec.rb
137
+ spec/integration/account_manager_spec.rb
138
+ spec/integration/address_manager_portable_spec.rb
139
+ spec/integration/address_manager_spec.rb
140
+ spec/integration/cli_spec.rb
141
+ spec/integration/download_spec.rb
142
+ spec/integration/edit_manager_spec.rb
143
+ spec/integration/examples_spec.rb
144
+ spec/integration/examples_spec_editor.rb
145
+ spec/integration/package_manager_spec.rb
146
+ spec/integration/platform_manager_spec.rb
147
+ spec/integration/service_manager_sysv_spec.rb
148
+ spec/integration/shell_manager_spec.rb
149
+ spec/integration/template_manager_erb_spec.rb
150
+ spec/integration/tempster_spec.rb
151
+ spec/spec_helper.rb
152
+ spec/unit/address_manager_spec.rb
153
+ spec/unit/edit_manager_spec.rb
154
+ spec/unit/field_manager_spec.rb
155
+ spec/unit/hashcache_spec.rb
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
160
+ spec/unit/platform_manager_spec.rb
161
+ spec/unit/plugins_spec.rb
162
+ spec/unit/shell_escape_spec.rb
163
+ spec/unit/tag_manager_spec.rb
164
+ spec/unit/template_manager_erb_spec.rb