tap 0.9.1 → 0.10.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 +37 -30
- data/MIT-LICENSE +1 -1
- data/README +92 -44
- data/bin/tap +62 -75
- data/cmd/console.rb +42 -0
- data/cmd/destroy.rb +16 -0
- data/cmd/generate.rb +16 -0
- data/cmd/run.rb +126 -0
- data/doc/Class Reference +362 -0
- data/doc/Command Reference +153 -0
- data/doc/Tutorial +237 -0
- data/lib/tap.rb +6 -45
- data/lib/tap/app.rb +126 -500
- data/lib/tap/constants.rb +2 -29
- data/lib/tap/env.rb +555 -250
- data/lib/tap/file_task.rb +60 -103
- data/lib/tap/generator/base.rb +109 -0
- data/lib/tap/generator/destroy.rb +37 -0
- data/lib/tap/generator/generate.rb +61 -0
- data/lib/tap/generator/generators/command/command_generator.rb +16 -12
- data/lib/tap/generator/generators/command/templates/command.erb +13 -19
- data/lib/tap/generator/generators/config/config_generator.rb +18 -27
- data/lib/tap/generator/generators/config/templates/doc.erb +12 -0
- data/lib/tap/generator/generators/config/templates/nodoc.erb +8 -0
- data/lib/tap/generator/generators/file_task/file_task_generator.rb +16 -11
- data/lib/tap/generator/generators/file_task/templates/file.txt +11 -2
- data/lib/tap/generator/generators/file_task/templates/result.yml +6 -0
- data/lib/tap/generator/generators/file_task/templates/task.erb +24 -31
- data/lib/tap/generator/generators/file_task/templates/test.erb +18 -22
- data/lib/tap/generator/generators/root/root_generator.rb +45 -31
- data/lib/tap/generator/generators/root/templates/Rakefile +64 -41
- data/lib/tap/generator/generators/root/templates/gemspec +27 -0
- data/lib/tap/generator/generators/root/templates/tapfile +8 -0
- data/lib/tap/generator/generators/root/templates/test/tap_test_helper.rb +0 -0
- data/lib/tap/generator/generators/root/templates/test/tap_test_suite.rb +1 -1
- data/lib/tap/generator/generators/root/templates/test/tapfile_test.rb +15 -0
- data/lib/tap/generator/generators/task/task_generator.rb +21 -28
- data/lib/tap/generator/generators/task/templates/task.erb +13 -23
- data/lib/tap/generator/generators/task/templates/test.erb +15 -18
- data/lib/tap/generator/manifest.rb +14 -0
- data/lib/tap/patches/rake/rake_test_loader.rb +0 -0
- data/lib/tap/patches/rake/testtask.rb +0 -0
- data/lib/tap/patches/ruby19/backtrace_filter.rb +0 -0
- data/lib/tap/patches/ruby19/parsedate.rb +0 -0
- data/lib/tap/root.rb +260 -21
- data/lib/tap/support/aggregator.rb +11 -11
- data/lib/tap/support/assignments.rb +172 -0
- data/lib/tap/support/audit.rb +20 -18
- data/lib/tap/support/batchable.rb +21 -10
- data/lib/tap/support/batchable_class.rb +107 -0
- data/lib/tap/support/class_configuration.rb +154 -239
- data/lib/tap/support/command_line.rb +97 -102
- data/lib/tap/support/comment.rb +270 -0
- data/lib/tap/support/configurable.rb +86 -65
- data/lib/tap/support/configurable_class.rb +296 -0
- data/lib/tap/support/configuration.rb +122 -0
- data/lib/tap/support/constant.rb +70 -0
- data/lib/tap/support/constant_utils.rb +127 -0
- data/lib/tap/support/declarations.rb +111 -0
- data/lib/tap/support/executable.rb +30 -17
- data/lib/tap/support/executable_queue.rb +0 -0
- data/lib/tap/support/framework.rb +71 -0
- data/lib/tap/support/framework_class.rb +199 -0
- data/lib/tap/support/instance_configuration.rb +147 -0
- data/lib/tap/support/lazydoc.rb +428 -0
- data/lib/tap/support/manifest.rb +89 -0
- data/lib/tap/support/run_error.rb +0 -0
- data/lib/tap/support/shell_utils.rb +33 -9
- data/lib/tap/support/summary.rb +30 -0
- data/lib/tap/support/tdoc.rb +339 -134
- data/lib/tap/support/tdoc/tdoc_html_generator.rb +0 -0
- data/lib/tap/support/tdoc/tdoc_html_template.rb +0 -0
- data/lib/tap/support/templater.rb +180 -0
- data/lib/tap/support/validation.rb +409 -76
- data/lib/tap/support/versions.rb +5 -3
- data/lib/tap/task.rb +78 -174
- data/lib/tap/tasks/dump.rb +56 -0
- data/lib/tap/tasks/rake.rb +93 -0
- data/lib/tap/test.rb +3 -3
- data/lib/tap/test/env_vars.rb +2 -2
- data/lib/tap/test/file_methods.rb +19 -20
- data/lib/tap/test/script_methods.rb +144 -0
- data/lib/tap/test/subset_methods.rb +1 -1
- data/lib/tap/test/tap_methods.rb +28 -62
- data/lib/tap/workflow.rb +22 -39
- metadata +48 -179
- data/Basic Overview +0 -151
- data/Command Reference +0 -99
- data/Rakefile +0 -127
- data/Tutorial +0 -287
- data/lib/tap/cmd/console.rb +0 -31
- data/lib/tap/cmd/destroy.rb +0 -20
- data/lib/tap/cmd/generate.rb +0 -20
- data/lib/tap/cmd/run.rb +0 -151
- data/lib/tap/dump.rb +0 -57
- data/lib/tap/generator.rb +0 -91
- data/lib/tap/generator/generators/command/USAGE +0 -6
- data/lib/tap/generator/generators/config/USAGE +0 -21
- data/lib/tap/generator/generators/config/templates/config.erb +0 -1
- data/lib/tap/generator/generators/file_task/USAGE +0 -3
- data/lib/tap/generator/generators/file_task/templates/file.yml +0 -3
- data/lib/tap/generator/generators/generator/USAGE +0 -0
- data/lib/tap/generator/generators/generator/generator_generator.rb +0 -21
- data/lib/tap/generator/generators/generator/templates/generator.erb +0 -32
- data/lib/tap/generator/generators/generator/templates/usage.erb +0 -1
- data/lib/tap/generator/generators/root/USAGE +0 -0
- data/lib/tap/generator/generators/root/templates/ReadMe.txt +0 -0
- data/lib/tap/generator/generators/root/templates/tap.yml +0 -80
- data/lib/tap/generator/generators/task/USAGE +0 -3
- data/lib/tap/generator/generators/workflow/USAGE +0 -0
- data/lib/tap/generator/generators/workflow/templates/task.erb +0 -16
- data/lib/tap/generator/generators/workflow/templates/test.erb +0 -7
- data/lib/tap/generator/generators/workflow/workflow_generator.rb +0 -6
- data/lib/tap/generator/options.rb +0 -26
- data/lib/tap/generator/usage.rb +0 -26
- data/lib/tap/support/batchable_methods.rb +0 -34
- data/lib/tap/support/command_line_methods.rb +0 -76
- data/lib/tap/support/configurable_methods.rb +0 -224
- data/lib/tap/support/logger.rb +0 -88
- data/lib/tap/support/rake.rb +0 -43
- data/lib/tap/support/tdoc/config_attr.rb +0 -362
- data/test/app/config/another/task.yml +0 -1
- data/test/app/config/batch.yml +0 -2
- data/test/app/config/empty.yml +0 -0
- data/test/app/config/erb.yml +0 -2
- data/test/app/config/some/task.yml +0 -1
- data/test/app/config/template.yml +0 -2
- data/test/app/config/version-0.1.yml +0 -1
- data/test/app/config/version.yml +0 -1
- data/test/app/lib/app_test_task.rb +0 -3
- data/test/app_test.rb +0 -1849
- data/test/env/test_configure/recurse_a.yml +0 -2
- data/test/env/test_configure/recurse_b.yml +0 -2
- data/test/env/test_configure/tap.yml +0 -23
- data/test/env/test_load_env_config/dir/tap.yml +0 -3
- data/test/env/test_load_env_config/recurse_a.yml +0 -2
- data/test/env/test_load_env_config/recurse_b.yml +0 -2
- data/test/env/test_load_env_config/tap.yml +0 -3
- data/test/env_test.rb +0 -198
- data/test/file_task/config/batch.yml +0 -2
- data/test/file_task/config/configured.yml +0 -1
- data/test/file_task/old_file_one.txt +0 -0
- data/test/file_task/old_file_two.txt +0 -0
- data/test/file_task_test.rb +0 -1291
- data/test/root/alt_lib/alt_module.rb +0 -4
- data/test/root/file.txt +0 -0
- data/test/root/glob/one.txt +0 -0
- data/test/root/glob/two.txt +0 -0
- data/test/root/lib/absolute_alt_filepath.rb +0 -2
- data/test/root/lib/alternative_filepath.rb +0 -2
- data/test/root/lib/another_module.rb +0 -2
- data/test/root/lib/nested/some_module.rb +0 -4
- data/test/root/lib/no_module_included.rb +0 -0
- data/test/root/lib/some/module.rb +0 -4
- data/test/root/lib/some_class.rb +0 -2
- data/test/root/lib/some_module.rb +0 -3
- data/test/root/load_path/load_path_module.rb +0 -2
- data/test/root/load_path/skip_module.rb +0 -2
- data/test/root/mtime/older.txt +0 -0
- data/test/root/unload/full_path.rb +0 -2
- data/test/root/unload/loaded_by_nested.rb +0 -2
- data/test/root/unload/nested/nested_load.rb +0 -6
- data/test/root/unload/nested/nested_with_ext.rb +0 -4
- data/test/root/unload/nested/relative_path.rb +0 -4
- data/test/root/unload/older.rb +0 -2
- data/test/root/unload/unload_base.rb +0 -9
- data/test/root/versions/another.yml +0 -0
- data/test/root/versions/file-0.1.2.yml +0 -0
- data/test/root/versions/file-0.1.yml +0 -0
- data/test/root/versions/file.yml +0 -0
- data/test/root_test.rb +0 -718
- data/test/support/aggregator_test.rb +0 -99
- data/test/support/audit_test.rb +0 -445
- data/test/support/batchable_test.rb +0 -74
- data/test/support/class_configuration_test.rb +0 -331
- data/test/support/command_line_test.rb +0 -58
- data/test/support/configurable/config/configured.yml +0 -2
- data/test/support/configurable_test.rb +0 -295
- data/test/support/executable_queue_test.rb +0 -103
- data/test/support/executable_test.rb +0 -38
- data/test/support/logger_test.rb +0 -31
- data/test/support/rake_test.rb +0 -37
- data/test/support/shell_utils_test.rb +0 -24
- data/test/support/tdoc_test.rb +0 -370
- data/test/support/validation_test.rb +0 -54
- data/test/support/versions_test.rb +0 -103
- data/test/tap_test_helper.rb +0 -57
- data/test/tap_test_suite.rb +0 -7
- data/test/task/config/batch.yml +0 -2
- data/test/task/config/batched.yml +0 -2
- data/test/task/config/configured.yml +0 -1
- data/test/task/config/example.yml +0 -1
- data/test/task_base_test.rb +0 -24
- data/test/task_syntax_test.rb +0 -300
- data/test/task_test.rb +0 -320
- data/test/test/env_vars_test.rb +0 -48
- data/test/test/file_methods/test_assert_files/expected/one.txt +0 -1
- data/test/test/file_methods/test_assert_files/expected/two.txt +0 -1
- data/test/test/file_methods/test_assert_files/input/one.txt +0 -1
- data/test/test/file_methods/test_assert_files/input/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_can_have_no_expected_files_if_specified/input/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_can_have_no_expected_files_if_specified/input/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_different_content/expected/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_different_content/expected/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_different_content/input/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_different_content/input/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_expected_file/expected/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_expected_file/input/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_expected_file/input/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/expected/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/expected/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/input/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/input/two.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_no_expected_files/input/one.txt +0 -1
- data/test/test/file_methods/test_assert_files_fails_for_no_expected_files/input/two.txt +0 -1
- data/test/test/file_methods/test_method_glob/expected/file.yml +0 -0
- data/test/test/file_methods/test_method_glob/expected/file_1.txt +0 -0
- data/test/test/file_methods/test_method_glob/expected/file_2.txt +0 -0
- data/test/test/file_methods_doc/test_sub/expected/one.txt +0 -1
- data/test/test/file_methods_doc/test_sub/expected/two.txt +0 -1
- data/test/test/file_methods_doc/test_sub/input/one.txt +0 -1
- data/test/test/file_methods_doc/test_sub/input/two.txt +0 -1
- data/test/test/file_methods_doc_test.rb +0 -29
- data/test/test/file_methods_test.rb +0 -275
- data/test/test/subset_methods_test.rb +0 -171
- data/test/test/tap_methods/test_assert_files/expected/task/name/a.txt +0 -1
- data/test/test/tap_methods/test_assert_files/expected/task/name/b.txt +0 -1
- data/test/test/tap_methods/test_assert_files/input/a.txt +0 -1
- data/test/test/tap_methods/test_assert_files/input/b.txt +0 -1
- data/test/test/tap_methods_test.rb +0 -399
- data/test/workflow_test.rb +0 -120
- data/vendor/rails_generator.rb +0 -56
- data/vendor/rails_generator/base.rb +0 -263
- data/vendor/rails_generator/commands.rb +0 -581
- data/vendor/rails_generator/generated_attribute.rb +0 -42
- data/vendor/rails_generator/lookup.rb +0 -209
- data/vendor/rails_generator/manifest.rb +0 -53
- data/vendor/rails_generator/options.rb +0 -143
- data/vendor/rails_generator/scripts.rb +0 -83
- data/vendor/rails_generator/scripts/destroy.rb +0 -7
- data/vendor/rails_generator/scripts/generate.rb +0 -7
- data/vendor/rails_generator/scripts/update.rb +0 -12
- data/vendor/rails_generator/simple_logger.rb +0 -46
- data/vendor/rails_generator/spec.rb +0 -44
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Simon Chiang
|
|
@@ -9,20 +9,12 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-
|
|
12
|
+
date: 2008-08-08 00:00:00 -06:00
|
|
13
13
|
default_executable: tap
|
|
14
|
-
dependencies:
|
|
15
|
-
|
|
16
|
-
name: activesupport
|
|
17
|
-
version_requirement:
|
|
18
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
19
|
-
requirements:
|
|
20
|
-
- - ">="
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: 2.0.1
|
|
23
|
-
version:
|
|
14
|
+
dependencies: []
|
|
15
|
+
|
|
24
16
|
description:
|
|
25
|
-
email: simon.chiang@
|
|
17
|
+
email: simon.a.chiang@gmail.com
|
|
26
18
|
executables:
|
|
27
19
|
- tap
|
|
28
20
|
extensions: []
|
|
@@ -31,218 +23,95 @@ extra_rdoc_files:
|
|
|
31
23
|
- README
|
|
32
24
|
- MIT-LICENSE
|
|
33
25
|
- History
|
|
34
|
-
- Tutorial
|
|
35
|
-
-
|
|
36
|
-
- Command Reference
|
|
26
|
+
- doc/Tutorial
|
|
27
|
+
- doc/Class Reference
|
|
28
|
+
- doc/Command Reference
|
|
37
29
|
files:
|
|
38
30
|
- README
|
|
39
31
|
- MIT-LICENSE
|
|
40
32
|
- History
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
33
|
+
- cmd/console.rb
|
|
34
|
+
- cmd/destroy.rb
|
|
35
|
+
- cmd/generate.rb
|
|
36
|
+
- cmd/run.rb
|
|
37
|
+
- doc/Tutorial
|
|
38
|
+
- doc/Class Reference
|
|
39
|
+
- doc/Command Reference
|
|
45
40
|
- bin/tap
|
|
46
41
|
- lib/tap/app.rb
|
|
47
42
|
- lib/tap/constants.rb
|
|
48
|
-
- lib/tap/dump.rb
|
|
49
43
|
- lib/tap/env.rb
|
|
50
44
|
- lib/tap/file_task.rb
|
|
45
|
+
- lib/tap/generator/base.rb
|
|
46
|
+
- lib/tap/generator/destroy.rb
|
|
47
|
+
- lib/tap/generator/generate.rb
|
|
51
48
|
- lib/tap/generator/generators/command/command_generator.rb
|
|
52
49
|
- lib/tap/generator/generators/command/templates/command.erb
|
|
53
|
-
- lib/tap/generator/generators/command/USAGE
|
|
54
50
|
- lib/tap/generator/generators/config/config_generator.rb
|
|
55
|
-
- lib/tap/generator/generators/config/templates/
|
|
56
|
-
- lib/tap/generator/generators/config/
|
|
51
|
+
- lib/tap/generator/generators/config/templates/doc.erb
|
|
52
|
+
- lib/tap/generator/generators/config/templates/nodoc.erb
|
|
57
53
|
- lib/tap/generator/generators/file_task/file_task_generator.rb
|
|
58
54
|
- lib/tap/generator/generators/file_task/templates/file.txt
|
|
59
|
-
- lib/tap/generator/generators/file_task/templates/
|
|
55
|
+
- lib/tap/generator/generators/file_task/templates/result.yml
|
|
60
56
|
- lib/tap/generator/generators/file_task/templates/task.erb
|
|
61
57
|
- lib/tap/generator/generators/file_task/templates/test.erb
|
|
62
|
-
- lib/tap/generator/generators/file_task/USAGE
|
|
63
|
-
- lib/tap/generator/generators/generator/generator_generator.rb
|
|
64
|
-
- lib/tap/generator/generators/generator/templates/generator.erb
|
|
65
|
-
- lib/tap/generator/generators/generator/templates/usage.erb
|
|
66
|
-
- lib/tap/generator/generators/generator/USAGE
|
|
67
58
|
- lib/tap/generator/generators/root/root_generator.rb
|
|
68
59
|
- lib/tap/generator/generators/root/templates/Rakefile
|
|
69
|
-
- lib/tap/generator/generators/root/templates/
|
|
70
|
-
- lib/tap/generator/generators/root/templates/
|
|
60
|
+
- lib/tap/generator/generators/root/templates/tapfile
|
|
61
|
+
- lib/tap/generator/generators/root/templates/gemspec
|
|
71
62
|
- lib/tap/generator/generators/root/templates/test/tap_test_helper.rb
|
|
72
63
|
- lib/tap/generator/generators/root/templates/test/tap_test_suite.rb
|
|
73
|
-
- lib/tap/generator/generators/root/
|
|
64
|
+
- lib/tap/generator/generators/root/templates/test/tapfile_test.rb
|
|
74
65
|
- lib/tap/generator/generators/task/task_generator.rb
|
|
75
66
|
- lib/tap/generator/generators/task/templates/task.erb
|
|
76
67
|
- lib/tap/generator/generators/task/templates/test.erb
|
|
77
|
-
- lib/tap/generator/
|
|
78
|
-
- lib/tap/generator/generators/workflow/templates/task.erb
|
|
79
|
-
- lib/tap/generator/generators/workflow/templates/test.erb
|
|
80
|
-
- lib/tap/generator/generators/workflow/USAGE
|
|
81
|
-
- lib/tap/generator/generators/workflow/workflow_generator.rb
|
|
82
|
-
- lib/tap/generator/options.rb
|
|
83
|
-
- lib/tap/generator/usage.rb
|
|
84
|
-
- lib/tap/generator.rb
|
|
68
|
+
- lib/tap/generator/manifest.rb
|
|
85
69
|
- lib/tap/patches/rake/rake_test_loader.rb
|
|
86
70
|
- lib/tap/patches/rake/testtask.rb
|
|
87
71
|
- lib/tap/patches/ruby19/backtrace_filter.rb
|
|
88
72
|
- lib/tap/patches/ruby19/parsedate.rb
|
|
89
73
|
- lib/tap/root.rb
|
|
90
|
-
- lib/tap/cmd/console.rb
|
|
91
|
-
- lib/tap/cmd/destroy.rb
|
|
92
|
-
- lib/tap/cmd/generate.rb
|
|
93
|
-
- lib/tap/cmd/run.rb
|
|
94
74
|
- lib/tap/support/aggregator.rb
|
|
75
|
+
- lib/tap/support/assignments.rb
|
|
95
76
|
- lib/tap/support/audit.rb
|
|
96
77
|
- lib/tap/support/batchable.rb
|
|
97
|
-
- lib/tap/support/
|
|
78
|
+
- lib/tap/support/batchable_class.rb
|
|
98
79
|
- lib/tap/support/class_configuration.rb
|
|
99
80
|
- lib/tap/support/command_line.rb
|
|
100
|
-
- lib/tap/support/
|
|
81
|
+
- lib/tap/support/comment.rb
|
|
101
82
|
- lib/tap/support/configurable.rb
|
|
102
|
-
- lib/tap/support/
|
|
83
|
+
- lib/tap/support/configurable_class.rb
|
|
84
|
+
- lib/tap/support/configuration.rb
|
|
85
|
+
- lib/tap/support/constant.rb
|
|
86
|
+
- lib/tap/support/constant_utils.rb
|
|
87
|
+
- lib/tap/support/declarations.rb
|
|
103
88
|
- lib/tap/support/executable.rb
|
|
104
89
|
- lib/tap/support/executable_queue.rb
|
|
105
|
-
- lib/tap/support/
|
|
106
|
-
- lib/tap/support/
|
|
90
|
+
- lib/tap/support/framework.rb
|
|
91
|
+
- lib/tap/support/framework_class.rb
|
|
92
|
+
- lib/tap/support/instance_configuration.rb
|
|
93
|
+
- lib/tap/support/lazydoc.rb
|
|
94
|
+
- lib/tap/support/manifest.rb
|
|
107
95
|
- lib/tap/support/run_error.rb
|
|
108
96
|
- lib/tap/support/shell_utils.rb
|
|
109
|
-
- lib/tap/support/tdoc
|
|
97
|
+
- lib/tap/support/tdoc.rb
|
|
110
98
|
- lib/tap/support/tdoc/tdoc_html_generator.rb
|
|
111
99
|
- lib/tap/support/tdoc/tdoc_html_template.rb
|
|
112
|
-
- lib/tap/support/
|
|
100
|
+
- lib/tap/support/summary.rb
|
|
101
|
+
- lib/tap/support/templater.rb
|
|
113
102
|
- lib/tap/support/validation.rb
|
|
114
103
|
- lib/tap/support/versions.rb
|
|
115
104
|
- lib/tap/task.rb
|
|
105
|
+
- lib/tap/tasks/dump.rb
|
|
106
|
+
- lib/tap/tasks/rake.rb
|
|
116
107
|
- lib/tap/test/env_vars.rb
|
|
117
108
|
- lib/tap/test/file_methods.rb
|
|
109
|
+
- lib/tap/test/script_methods.rb
|
|
118
110
|
- lib/tap/test/subset_methods.rb
|
|
119
111
|
- lib/tap/test/tap_methods.rb
|
|
120
112
|
- lib/tap/test.rb
|
|
121
113
|
- lib/tap/workflow.rb
|
|
122
114
|
- lib/tap.rb
|
|
123
|
-
- test/app/config/another/task.yml
|
|
124
|
-
- test/app/config/batch.yml
|
|
125
|
-
- test/app/config/empty.yml
|
|
126
|
-
- test/app/config/erb.yml
|
|
127
|
-
- test/app/config/some/task.yml
|
|
128
|
-
- test/app/config/template.yml
|
|
129
|
-
- test/app/config/version-0.1.yml
|
|
130
|
-
- test/app/config/version.yml
|
|
131
|
-
- test/app/lib/app_test_task.rb
|
|
132
|
-
- test/app_test.rb
|
|
133
|
-
- test/env/test_configure/recurse_a.yml
|
|
134
|
-
- test/env/test_configure/recurse_b.yml
|
|
135
|
-
- test/env/test_configure/tap.yml
|
|
136
|
-
- test/env/test_load_env_config/dir/tap.yml
|
|
137
|
-
- test/env/test_load_env_config/recurse_a.yml
|
|
138
|
-
- test/env/test_load_env_config/recurse_b.yml
|
|
139
|
-
- test/env/test_load_env_config/tap.yml
|
|
140
|
-
- test/env_test.rb
|
|
141
|
-
- test/file_task/config/batch.yml
|
|
142
|
-
- test/file_task/config/configured.yml
|
|
143
|
-
- test/file_task/old_file_one.txt
|
|
144
|
-
- test/file_task/old_file_two.txt
|
|
145
|
-
- test/file_task_test.rb
|
|
146
|
-
- test/root/alt_lib/alt_module.rb
|
|
147
|
-
- test/root/glob/one.txt
|
|
148
|
-
- test/root/glob/two.txt
|
|
149
|
-
- test/root/lib/absolute_alt_filepath.rb
|
|
150
|
-
- test/root/lib/alternative_filepath.rb
|
|
151
|
-
- test/root/lib/another_module.rb
|
|
152
|
-
- test/root/lib/nested/some_module.rb
|
|
153
|
-
- test/root/lib/no_module_included.rb
|
|
154
|
-
- test/root/lib/some/module.rb
|
|
155
|
-
- test/root/lib/some_class.rb
|
|
156
|
-
- test/root/lib/some_module.rb
|
|
157
|
-
- test/root/load_path/load_path_module.rb
|
|
158
|
-
- test/root/load_path/skip_module.rb
|
|
159
|
-
- test/root/mtime/older.txt
|
|
160
|
-
- test/root/unload/full_path.rb
|
|
161
|
-
- test/root/unload/loaded_by_nested.rb
|
|
162
|
-
- test/root/unload/nested/nested_load.rb
|
|
163
|
-
- test/root/unload/nested/nested_with_ext.rb
|
|
164
|
-
- test/root/unload/nested/relative_path.rb
|
|
165
|
-
- test/root/unload/older.rb
|
|
166
|
-
- test/root/unload/unload_base.rb
|
|
167
|
-
- test/root/versions/another.yml
|
|
168
|
-
- test/root/versions/file-0.1.2.yml
|
|
169
|
-
- test/root/versions/file-0.1.yml
|
|
170
|
-
- test/root/versions/file.yml
|
|
171
|
-
- test/root/file.txt
|
|
172
|
-
- test/root_test.rb
|
|
173
|
-
- test/support/aggregator_test.rb
|
|
174
|
-
- test/support/audit_test.rb
|
|
175
|
-
- test/support/batchable_test.rb
|
|
176
|
-
- test/support/class_configuration_test.rb
|
|
177
|
-
- test/support/command_line_test.rb
|
|
178
|
-
- test/support/configurable/config/configured.yml
|
|
179
|
-
- test/support/configurable_test.rb
|
|
180
|
-
- test/support/executable_queue_test.rb
|
|
181
|
-
- test/support/executable_test.rb
|
|
182
|
-
- test/support/logger_test.rb
|
|
183
|
-
- test/support/rake_test.rb
|
|
184
|
-
- test/support/shell_utils_test.rb
|
|
185
|
-
- test/support/tdoc_test.rb
|
|
186
|
-
- test/support/validation_test.rb
|
|
187
|
-
- test/support/versions_test.rb
|
|
188
|
-
- test/tap_test_helper.rb
|
|
189
|
-
- test/tap_test_suite.rb
|
|
190
|
-
- test/task/config/batch.yml
|
|
191
|
-
- test/task/config/batched.yml
|
|
192
|
-
- test/task/config/configured.yml
|
|
193
|
-
- test/task/config/example.yml
|
|
194
|
-
- test/task_base_test.rb
|
|
195
|
-
- test/task_syntax_test.rb
|
|
196
|
-
- test/task_test.rb
|
|
197
|
-
- test/test/env_vars_test.rb
|
|
198
|
-
- test/test/file_methods/test_assert_files/expected/one.txt
|
|
199
|
-
- test/test/file_methods/test_assert_files/expected/two.txt
|
|
200
|
-
- test/test/file_methods/test_assert_files/input/one.txt
|
|
201
|
-
- test/test/file_methods/test_assert_files/input/two.txt
|
|
202
|
-
- test/test/file_methods/test_assert_files_can_have_no_expected_files_if_specified/input/one.txt
|
|
203
|
-
- test/test/file_methods/test_assert_files_can_have_no_expected_files_if_specified/input/two.txt
|
|
204
|
-
- test/test/file_methods/test_assert_files_fails_for_different_content/expected/one.txt
|
|
205
|
-
- test/test/file_methods/test_assert_files_fails_for_different_content/expected/two.txt
|
|
206
|
-
- test/test/file_methods/test_assert_files_fails_for_different_content/input/one.txt
|
|
207
|
-
- test/test/file_methods/test_assert_files_fails_for_different_content/input/two.txt
|
|
208
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_expected_file/expected/one.txt
|
|
209
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_expected_file/input/one.txt
|
|
210
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_expected_file/input/two.txt
|
|
211
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_output_file/expected/one.txt
|
|
212
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_output_file/expected/two.txt
|
|
213
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_output_file/input/one.txt
|
|
214
|
-
- test/test/file_methods/test_assert_files_fails_for_missing_output_file/input/two.txt
|
|
215
|
-
- test/test/file_methods/test_assert_files_fails_for_no_expected_files/input/one.txt
|
|
216
|
-
- test/test/file_methods/test_assert_files_fails_for_no_expected_files/input/two.txt
|
|
217
|
-
- test/test/file_methods/test_method_glob/expected/file.yml
|
|
218
|
-
- test/test/file_methods/test_method_glob/expected/file_1.txt
|
|
219
|
-
- test/test/file_methods/test_method_glob/expected/file_2.txt
|
|
220
|
-
- test/test/file_methods_doc/test_sub/expected/one.txt
|
|
221
|
-
- test/test/file_methods_doc/test_sub/expected/two.txt
|
|
222
|
-
- test/test/file_methods_doc/test_sub/input/one.txt
|
|
223
|
-
- test/test/file_methods_doc/test_sub/input/two.txt
|
|
224
|
-
- test/test/file_methods_doc_test.rb
|
|
225
|
-
- test/test/file_methods_test.rb
|
|
226
|
-
- test/test/subset_methods_test.rb
|
|
227
|
-
- test/test/tap_methods/test_assert_files/expected/task/name/a.txt
|
|
228
|
-
- test/test/tap_methods/test_assert_files/expected/task/name/b.txt
|
|
229
|
-
- test/test/tap_methods/test_assert_files/input/a.txt
|
|
230
|
-
- test/test/tap_methods/test_assert_files/input/b.txt
|
|
231
|
-
- test/test/tap_methods_test.rb
|
|
232
|
-
- test/workflow_test.rb
|
|
233
|
-
- vendor/rails_generator/base.rb
|
|
234
|
-
- vendor/rails_generator/commands.rb
|
|
235
|
-
- vendor/rails_generator/generated_attribute.rb
|
|
236
|
-
- vendor/rails_generator/lookup.rb
|
|
237
|
-
- vendor/rails_generator/manifest.rb
|
|
238
|
-
- vendor/rails_generator/options.rb
|
|
239
|
-
- vendor/rails_generator/scripts/destroy.rb
|
|
240
|
-
- vendor/rails_generator/scripts/generate.rb
|
|
241
|
-
- vendor/rails_generator/scripts/update.rb
|
|
242
|
-
- vendor/rails_generator/scripts.rb
|
|
243
|
-
- vendor/rails_generator/simple_logger.rb
|
|
244
|
-
- vendor/rails_generator/spec.rb
|
|
245
|
-
- vendor/rails_generator.rb
|
|
246
115
|
has_rdoc: true
|
|
247
116
|
homepage: http://tap.rubyforge.org
|
|
248
117
|
post_install_message:
|
|
@@ -268,9 +137,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
268
137
|
requirements: []
|
|
269
138
|
|
|
270
139
|
rubyforge_project: tap
|
|
271
|
-
rubygems_version: 1.
|
|
140
|
+
rubygems_version: 1.2.0
|
|
272
141
|
signing_key:
|
|
273
142
|
specification_version: 2
|
|
274
|
-
summary: A framework for configurable, distributable
|
|
275
|
-
test_files:
|
|
276
|
-
|
|
143
|
+
summary: A framework for creating configurable, distributable tasks and workflows.
|
|
144
|
+
test_files: []
|
|
145
|
+
|
data/Basic Overview
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
= The Tap Application (Tap::App)
|
|
2
|
-
|
|
3
|
-
Instances of Tap::App coordinate the execution of tasks. Normally a script will only need and use a single instance (often Tap::App.instance), but there is no reason why multiple instances could not be used. Apps basically consist of reference to a root directory, and task queue.
|
|
4
|
-
|
|
5
|
-
=== Root Directory (Tap::Root)
|
|
6
|
-
|
|
7
|
-
The root directory establishes the base of a standard directory structure that facilitates configuration, dependency loading, and file handling. Apps 'live' in the directory structure, but are not confined to it. Code associated with the root directory allows you to alias directories, basically meaning that the conceptual standard directories can be put anywhere in the file system.
|
|
8
|
-
|
|
9
|
-
The basic structure looks like this:
|
|
10
|
-
|
|
11
|
-
/path/to/root_dir
|
|
12
|
-
|- config
|
|
13
|
-
| `- sample
|
|
14
|
-
| `- task.yml # a default config file for Sample::Task
|
|
15
|
-
|- lib
|
|
16
|
-
| `- sample
|
|
17
|
-
| `- task.rb # a class file like above
|
|
18
|
-
|- tap.yml # a configuration file for Tap::App
|
|
19
|
-
|
|
20
|
-
All these files/directories are optional (and there are others that could be added), but for illustration say you instantiated an App to the directory above:
|
|
21
|
-
|
|
22
|
-
require 'tap'
|
|
23
|
-
|
|
24
|
-
app = Tap::App.new :root => '/path/to/root_dir'
|
|
25
|
-
app.root # => '/path/to/root_dir'
|
|
26
|
-
app['config'] # => '/path/to/root_dir/config'
|
|
27
|
-
app.filepath('config', 'sample/task.yml') # => '/path/to/root_dir/config/sample/task.yml'
|
|
28
|
-
|
|
29
|
-
Then if you wanted to alias the config directory somewhere else:
|
|
30
|
-
|
|
31
|
-
# set a new directory relative to root
|
|
32
|
-
app['config'] = 'alt'
|
|
33
|
-
app['config'] # => '/path/to/root_dir/alt'
|
|
34
|
-
app.filepath('config', 'sample/task.yml') # => '/path/to/root_dir/alt/sample/task.yml'
|
|
35
|
-
|
|
36
|
-
# set an absolute path to anywhere
|
|
37
|
-
app['config', true] = '/path/somewhere/else'
|
|
38
|
-
app['config'] # => '/path/somewhere/else'
|
|
39
|
-
app.filepath('config', 'sample/task.yml') # => '/path/somewhere/else/sample/task.yml'
|
|
40
|
-
|
|
41
|
-
While very simple, this ability to reference files using directory aliases is useful, powerful, and forms the basis of the Tap execution environment. All directory aliases and environment configurations can be defined in the 'tap.yml' file.
|
|
42
|
-
|
|
43
|
-
=== Task Queue
|
|
44
|
-
|
|
45
|
-
Apps coordinate the execution of tasks through a queue. Although referred to here as a 'task queue', the queue is actually just a stack of methods to run and the inputs to the methods. Any methods from any object can be enqued; tasks do not need to be involved.
|
|
46
|
-
|
|
47
|
-
During a run the enqued methods are run sequentially. When multithreading, multiple methods can be run at once, but normally methods are run one at a time on the same thread.
|
|
48
|
-
|
|
49
|
-
= Tasks (Tap::Task)
|
|
50
|
-
|
|
51
|
-
Tasks can be defined within a script using a syntax similar to Rake:
|
|
52
|
-
|
|
53
|
-
t = Tap::Task.new do |task|
|
|
54
|
-
# .. do something ...
|
|
55
|
-
end
|
|
56
|
-
t.execute
|
|
57
|
-
|
|
58
|
-
Unlike a Rake task, Tap tasks can be made to take inputs:
|
|
59
|
-
|
|
60
|
-
t = Tap::Task.new do |task, one, two|
|
|
61
|
-
# .. do something with the inputs ...
|
|
62
|
-
end
|
|
63
|
-
t.execute(1,2)
|
|
64
|
-
|
|
65
|
-
Tasks are designed for subclassing. A task class is structured like this (with annotation):
|
|
66
|
-
|
|
67
|
-
module Sample
|
|
68
|
-
# == Description
|
|
69
|
-
# This documentation is available in RDoc, as well as from the command line.
|
|
70
|
-
# === Usage
|
|
71
|
-
# % tap run sample/task
|
|
72
|
-
#
|
|
73
|
-
# By default, usage info comes up as well...
|
|
74
|
-
#
|
|
75
|
-
class Task < Tap::Task
|
|
76
|
-
|
|
77
|
-
# Configurations are defined like this. Tap makes
|
|
78
|
-
# the config documentation available in Rdoc and
|
|
79
|
-
# in the command line.
|
|
80
|
-
#
|
|
81
|
-
# The default 'config' creates accessors, as can
|
|
82
|
-
# be seen in the process method.
|
|
83
|
-
|
|
84
|
-
# Full documentation for the configuration
|
|
85
|
-
# can be written here.
|
|
86
|
-
config :key, "input" # command line documentation
|
|
87
|
-
|
|
88
|
-
# Configurations can be transformed or
|
|
89
|
-
# validated by an optional block.
|
|
90
|
-
config :transformation, "string" do |value| # this config is modified to "STRING"
|
|
91
|
-
value.upcase
|
|
92
|
-
end
|
|
93
|
-
config :standard_validation, {}, &c.check(Hash) # non-hash values raise an error
|
|
94
|
-
|
|
95
|
-
# Process receives each input from the command line
|
|
96
|
-
# and is analogous to the block in the samples above.
|
|
97
|
-
# Any number of inputs are allowed, including an
|
|
98
|
-
# arbitrary number of inputs (using *) and no inputs.
|
|
99
|
-
def process(input)
|
|
100
|
-
|
|
101
|
-
# log is available to record information
|
|
102
|
-
result = "#{input} was processed with #{key}"
|
|
103
|
-
log self.name, result
|
|
104
|
-
|
|
105
|
-
result
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
Once instantiated, tasks can be enqued to an App or joined into a workflow.
|
|
111
|
-
|
|
112
|
-
All task instances may have a name, which serves as a relative filepath to a configuration file and other associated files. When the application instantiates a task by the name 'sample/task' it sets the instance configs from 'config/sample/task.yml'. Nil can be used to specify no config file.
|
|
113
|
-
|
|
114
|
-
Names need not be unique. Multiple task instances, even from different classes, may be named the same and thus get their configurations from the same file. A map of task names to task classes can be set up in an app, allowing easy lookup and task instantiation through the app.task method:
|
|
115
|
-
|
|
116
|
-
app = Tap:App.instance
|
|
117
|
-
|
|
118
|
-
# set up a mapping between a name and a task class
|
|
119
|
-
app.map["alt"] = Sample::Task
|
|
120
|
-
|
|
121
|
-
t1 = app.task("sample/task") # Sample::Task configured from 'config/sample/task.yml'
|
|
122
|
-
t2 = app.task("alt") # Sample::Task configured from 'config/alt.yml'
|
|
123
|
-
|
|
124
|
-
# the idea is the same if you manually make a task...
|
|
125
|
-
|
|
126
|
-
t3 = Tap::Task.new("alt") # Tap::Task configured from 'config/alt.yml'
|
|
127
|
-
|
|
128
|
-
t1.class # => Sample::Task
|
|
129
|
-
t2.class # => Sample::Task
|
|
130
|
-
t3.class # => Tap::Task
|
|
131
|
-
|
|
132
|
-
= Workflows (Tap::Workflow)
|
|
133
|
-
|
|
134
|
-
Once instantiated, tasks can be joined into workflows. The workflow model used by Tap is very simple; workflows are implemented using the App queue, whereby each tasks enques the next task (or tasks) in the workflow when the task completes.
|
|
135
|
-
|
|
136
|
-
Each task can be assigned an on_complete block to do so. Arbitrary workflow logic can be used to join tasks in this way, but by default Tap supports sequencing, forking, and merging. If a task has no on_complete block, App collects the unhandled results in app.aggregator so they can be handled somewhere else.
|
|
137
|
-
|
|
138
|
-
Workflows are not Tasks, but work exactly like Tasks. Workflows can be configured, enqued, used in or joined to other workflows, and subclassed.
|
|
139
|
-
|
|
140
|
-
= Auditing (Tap::Support::Audit)
|
|
141
|
-
|
|
142
|
-
Tap tracks inputs as they are modified by various tasks. At the end of a run, the individual results can be tracked back to it's original value, through the tasks that modified it. This auditing can be very useful when workflows diverge (as they often do), adding or subtracting steps depending on the input.
|
|
143
|
-
|
|
144
|
-
Auditing is largely invisible except in on_complete blocks. On complete blocks receive the audited results so that this information can be used, as needed, to make decisions.
|
|
145
|
-
|
|
146
|
-
t = Task.new
|
|
147
|
-
t.on_complete do |_result| # _result is an Audit instance
|
|
148
|
-
_result._current # the current value
|
|
149
|
-
_result._original # the original value
|
|
150
|
-
end
|
|
151
|
-
|