tap 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. data/Basic Overview b/data/Basic → Overview +0 -0
  2. data/Command Reference b/data/Command → Reference +0 -0
  3. data/History +14 -4
  4. data/MIT-LICENSE +0 -0
  5. data/README +0 -0
  6. data/Rakefile +0 -0
  7. data/Tutorial +0 -0
  8. data/bin/tap +11 -14
  9. data/lib/tap.rb +10 -1
  10. data/lib/tap/app.rb +1 -1
  11. data/lib/tap/cmd/console.rb +2 -6
  12. data/lib/tap/cmd/destroy.rb +0 -0
  13. data/lib/tap/cmd/generate.rb +0 -0
  14. data/lib/tap/cmd/run.rb +72 -77
  15. data/lib/tap/constants.rb +33 -2
  16. data/lib/tap/dump.rb +0 -0
  17. data/lib/tap/env.rb +40 -21
  18. data/lib/tap/file_task.rb +0 -0
  19. data/lib/tap/generator.rb +0 -0
  20. data/lib/tap/generator/generators/command/USAGE +0 -0
  21. data/lib/tap/generator/generators/command/command_generator.rb +0 -0
  22. data/lib/tap/generator/generators/command/templates/command.erb +2 -6
  23. data/lib/tap/generator/generators/config/USAGE +0 -0
  24. data/lib/tap/generator/generators/config/config_generator.rb +0 -0
  25. data/lib/tap/generator/generators/config/templates/config.erb +0 -0
  26. data/lib/tap/generator/generators/file_task/USAGE +0 -0
  27. data/lib/tap/generator/generators/file_task/file_task_generator.rb +0 -0
  28. data/lib/tap/generator/generators/file_task/templates/file.txt +0 -0
  29. data/lib/tap/generator/generators/file_task/templates/file.yml +0 -0
  30. data/lib/tap/generator/generators/file_task/templates/task.erb +0 -0
  31. data/lib/tap/generator/generators/file_task/templates/test.erb +0 -0
  32. data/lib/tap/generator/generators/generator/USAGE +0 -0
  33. data/lib/tap/generator/generators/generator/generator_generator.rb +0 -0
  34. data/lib/tap/generator/generators/generator/templates/generator.erb +0 -0
  35. data/lib/tap/generator/generators/generator/templates/usage.erb +0 -0
  36. data/lib/tap/generator/generators/root/USAGE +0 -0
  37. data/lib/tap/generator/generators/root/root_generator.rb +0 -0
  38. data/lib/tap/generator/generators/root/templates/Rakefile +0 -0
  39. data/lib/tap/generator/generators/root/templates/ReadMe.txt +0 -0
  40. data/lib/tap/generator/generators/root/templates/tap.yml +1 -0
  41. data/lib/tap/generator/generators/root/templates/test/tap_test_helper.rb +0 -0
  42. data/lib/tap/generator/generators/root/templates/test/tap_test_suite.rb +0 -0
  43. data/lib/tap/generator/generators/task/USAGE +0 -0
  44. data/lib/tap/generator/generators/task/task_generator.rb +0 -0
  45. data/lib/tap/generator/generators/task/templates/task.erb +0 -0
  46. data/lib/tap/generator/generators/task/templates/test.erb +0 -0
  47. data/lib/tap/generator/generators/workflow/USAGE +0 -0
  48. data/lib/tap/generator/generators/workflow/templates/task.erb +0 -0
  49. data/lib/tap/generator/generators/workflow/templates/test.erb +0 -0
  50. data/lib/tap/generator/generators/workflow/workflow_generator.rb +0 -0
  51. data/lib/tap/generator/options.rb +0 -0
  52. data/lib/tap/generator/usage.rb +0 -0
  53. data/lib/tap/patches/rake/rake_test_loader.rb +0 -0
  54. data/lib/tap/patches/rake/testtask.rb +0 -0
  55. data/lib/tap/patches/ruby19/backtrace_filter.rb +0 -0
  56. data/lib/tap/patches/ruby19/parsedate.rb +0 -0
  57. data/lib/tap/root.rb +0 -0
  58. data/lib/tap/support/aggregator.rb +0 -0
  59. data/lib/tap/support/audit.rb +0 -0
  60. data/lib/tap/support/batchable.rb +2 -25
  61. data/lib/tap/support/batchable_methods.rb +34 -0
  62. data/lib/tap/support/class_configuration.rb +0 -0
  63. data/lib/tap/support/command_line.rb +103 -0
  64. data/lib/tap/support/command_line_methods.rb +76 -0
  65. data/lib/tap/support/configurable.rb +1 -0
  66. data/lib/tap/support/configurable_methods.rb +1 -73
  67. data/lib/tap/support/executable.rb +0 -0
  68. data/lib/tap/support/executable_queue.rb +0 -0
  69. data/lib/tap/support/logger.rb +0 -0
  70. data/lib/tap/support/rake.rb +0 -0
  71. data/lib/tap/support/run_error.rb +0 -0
  72. data/lib/tap/support/shell_utils.rb +0 -0
  73. data/lib/tap/support/tdoc.rb +0 -0
  74. data/lib/tap/support/tdoc/config_attr.rb +0 -0
  75. data/lib/tap/support/tdoc/tdoc_html_generator.rb +0 -0
  76. data/lib/tap/support/tdoc/tdoc_html_template.rb +0 -0
  77. data/lib/tap/support/validation.rb +0 -0
  78. data/lib/tap/support/versions.rb +0 -0
  79. data/lib/tap/task.rb +1 -0
  80. data/lib/tap/test.rb +0 -0
  81. data/lib/tap/test/env_vars.rb +0 -0
  82. data/lib/tap/test/file_methods.rb +1 -1
  83. data/lib/tap/test/subset_methods.rb +0 -0
  84. data/lib/tap/test/tap_methods.rb +0 -0
  85. data/lib/tap/workflow.rb +1 -0
  86. data/test/app/config/another/task.yml +0 -0
  87. data/test/app/config/batch.yml +0 -0
  88. data/test/app/config/empty.yml +0 -0
  89. data/test/app/config/erb.yml +0 -0
  90. data/test/app/config/some/task.yml +0 -0
  91. data/test/app/config/template.yml +0 -0
  92. data/test/app/config/version-0.1.yml +0 -0
  93. data/test/app/config/version.yml +0 -0
  94. data/test/app/lib/app_test_task.rb +0 -0
  95. data/test/app_test.rb +0 -0
  96. data/test/env/test_configure/recurse_a.yml +0 -0
  97. data/test/env/test_configure/recurse_b.yml +0 -0
  98. data/test/env/test_configure/tap.yml +0 -0
  99. data/test/env/test_load_env_config/dir/tap.yml +0 -0
  100. data/test/env/test_load_env_config/recurse_a.yml +0 -0
  101. data/test/env/test_load_env_config/recurse_b.yml +0 -0
  102. data/test/env/test_load_env_config/tap.yml +0 -0
  103. data/test/env_test.rb +0 -0
  104. data/test/file_task/config/batch.yml +0 -0
  105. data/test/file_task/config/configured.yml +0 -0
  106. data/test/file_task/old_file_one.txt +0 -0
  107. data/test/file_task/old_file_two.txt +0 -0
  108. data/test/file_task_test.rb +0 -0
  109. data/test/root/alt_lib/alt_module.rb +0 -0
  110. data/test/root/file.txt +0 -0
  111. data/test/root/glob/one.txt +0 -0
  112. data/test/root/glob/two.txt +0 -0
  113. data/test/root/lib/absolute_alt_filepath.rb +0 -0
  114. data/test/root/lib/alternative_filepath.rb +0 -0
  115. data/test/root/lib/another_module.rb +0 -0
  116. data/test/root/lib/nested/some_module.rb +0 -0
  117. data/test/root/lib/no_module_included.rb +0 -0
  118. data/test/root/lib/some/module.rb +0 -0
  119. data/test/root/lib/some_class.rb +0 -0
  120. data/test/root/lib/some_module.rb +0 -0
  121. data/test/root/load_path/load_path_module.rb +0 -0
  122. data/test/root/load_path/skip_module.rb +0 -0
  123. data/test/root/mtime/older.txt +0 -0
  124. data/test/root/unload/full_path.rb +0 -0
  125. data/test/root/unload/loaded_by_nested.rb +0 -0
  126. data/test/root/unload/nested/nested_load.rb +0 -0
  127. data/test/root/unload/nested/nested_with_ext.rb +0 -0
  128. data/test/root/unload/nested/relative_path.rb +0 -0
  129. data/test/root/unload/older.rb +0 -0
  130. data/test/root/unload/unload_base.rb +0 -0
  131. data/test/root/versions/another.yml +0 -0
  132. data/test/root/versions/file-0.1.2.yml +0 -0
  133. data/test/root/versions/file-0.1.yml +0 -0
  134. data/test/root/versions/file.yml +0 -0
  135. data/test/root_test.rb +0 -0
  136. data/test/support/aggregator_test.rb +0 -0
  137. data/test/support/audit_test.rb +0 -0
  138. data/test/support/batchable_test.rb +0 -0
  139. data/test/support/class_configuration_test.rb +0 -0
  140. data/test/{script_test.rb → support/command_line_test.rb} +21 -21
  141. data/test/support/configurable/config/configured.yml +0 -0
  142. data/test/support/configurable_test.rb +0 -0
  143. data/test/support/executable_queue_test.rb +0 -0
  144. data/test/support/executable_test.rb +0 -0
  145. data/test/support/logger_test.rb +0 -0
  146. data/test/support/rake_test.rb +0 -0
  147. data/test/support/shell_utils_test.rb +0 -0
  148. data/test/support/tdoc_test.rb +0 -0
  149. data/test/support/validation_test.rb +0 -0
  150. data/test/support/versions_test.rb +0 -0
  151. data/test/tap_test_helper.rb +0 -0
  152. data/test/tap_test_suite.rb +0 -0
  153. data/test/task/config/batch.yml +0 -0
  154. data/test/task/config/batched.yml +0 -0
  155. data/test/task/config/configured.yml +0 -0
  156. data/test/task/config/example.yml +0 -0
  157. data/test/task_base_test.rb +0 -0
  158. data/test/task_syntax_test.rb +0 -0
  159. data/test/task_test.rb +0 -0
  160. data/test/test/env_vars_test.rb +0 -0
  161. data/test/test/file_methods/test_assert_files/expected/one.txt +0 -0
  162. data/test/test/file_methods/test_assert_files/expected/two.txt +0 -0
  163. data/test/test/file_methods/test_assert_files/input/one.txt +0 -0
  164. data/test/test/file_methods/test_assert_files/input/two.txt +0 -0
  165. data/test/test/file_methods/test_assert_files_can_have_no_expected_files_if_specified/input/one.txt +0 -0
  166. data/test/test/file_methods/test_assert_files_can_have_no_expected_files_if_specified/input/two.txt +0 -0
  167. data/test/test/file_methods/test_assert_files_fails_for_different_content/expected/one.txt +0 -0
  168. data/test/test/file_methods/test_assert_files_fails_for_different_content/expected/two.txt +0 -0
  169. data/test/test/file_methods/test_assert_files_fails_for_different_content/input/one.txt +0 -0
  170. data/test/test/file_methods/test_assert_files_fails_for_different_content/input/two.txt +0 -0
  171. data/test/test/file_methods/test_assert_files_fails_for_missing_expected_file/expected/one.txt +0 -0
  172. data/test/test/file_methods/test_assert_files_fails_for_missing_expected_file/input/one.txt +0 -0
  173. data/test/test/file_methods/test_assert_files_fails_for_missing_expected_file/input/two.txt +0 -0
  174. data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/expected/one.txt +0 -0
  175. data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/expected/two.txt +0 -0
  176. data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/input/one.txt +0 -0
  177. data/test/test/file_methods/test_assert_files_fails_for_missing_output_file/input/two.txt +0 -0
  178. data/test/test/file_methods/test_assert_files_fails_for_no_expected_files/input/one.txt +0 -0
  179. data/test/test/file_methods/test_assert_files_fails_for_no_expected_files/input/two.txt +0 -0
  180. data/test/test/file_methods/test_method_glob/expected/file.yml +0 -0
  181. data/test/test/file_methods/test_method_glob/expected/file_1.txt +0 -0
  182. data/test/test/file_methods/test_method_glob/expected/file_2.txt +0 -0
  183. data/test/test/file_methods_doc/test_sub/expected/one.txt +0 -0
  184. data/test/test/file_methods_doc/test_sub/expected/two.txt +0 -0
  185. data/test/test/file_methods_doc/test_sub/input/one.txt +0 -0
  186. data/test/test/file_methods_doc/test_sub/input/two.txt +0 -0
  187. data/test/test/file_methods_doc_test.rb +0 -0
  188. data/test/test/file_methods_test.rb +0 -0
  189. data/test/test/subset_methods_test.rb +0 -0
  190. data/test/test/tap_methods/test_assert_files/expected/task/name/a.txt +0 -0
  191. data/test/test/tap_methods/test_assert_files/expected/task/name/b.txt +0 -0
  192. data/test/test/tap_methods/test_assert_files/input/a.txt +0 -0
  193. data/test/test/tap_methods/test_assert_files/input/b.txt +0 -0
  194. data/test/test/tap_methods_test.rb +0 -0
  195. data/test/workflow_test.rb +0 -0
  196. data/vendor/rails_generator.rb +0 -0
  197. data/vendor/rails_generator/base.rb +0 -0
  198. data/vendor/rails_generator/commands.rb +0 -0
  199. data/vendor/rails_generator/generated_attribute.rb +0 -0
  200. data/vendor/rails_generator/lookup.rb +0 -0
  201. data/vendor/rails_generator/manifest.rb +0 -0
  202. data/vendor/rails_generator/options.rb +0 -0
  203. data/vendor/rails_generator/scripts.rb +0 -0
  204. data/vendor/rails_generator/scripts/destroy.rb +0 -0
  205. data/vendor/rails_generator/scripts/generate.rb +0 -0
  206. data/vendor/rails_generator/scripts/update.rb +0 -0
  207. data/vendor/rails_generator/simple_logger.rb +0 -0
  208. data/vendor/rails_generator/spec.rb +0 -0
  209. metadata +7 -5
  210. data/lib/tap/script.rb +0 -96
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/tap/task.rb CHANGED
@@ -224,6 +224,7 @@ module Tap
224
224
 
225
225
  include Base
226
226
  include Support::Configurable
227
+ extend Support::CommandLineMethods
227
228
 
228
229
  attr_reader :task_block
229
230
 
data/lib/tap/test.rb CHANGED
File without changes
File without changes
@@ -45,7 +45,7 @@ module Test # :nodoc:
45
45
  # note that the output of calller.first is like:
46
46
  # ./path/to/file.rb:10
47
47
  # ./path/to/file.rb:10:in 'method'
48
- calling_file = caller[1].gsub(/:\d+[:in .*]?$/, "" )
48
+ calling_file = caller[1].gsub(/:\d+(:in .*)?$/, "")
49
49
  calling_file.chomp!("#{File.extname(calling_file)}")
50
50
  calling_file.chomp("_test")
51
51
  end
File without changes
File without changes
data/lib/tap/workflow.rb CHANGED
@@ -82,6 +82,7 @@ module Tap
82
82
  #
83
83
  class Workflow
84
84
  include Support::Configurable
85
+ extend Support::CommandLineMethods
85
86
 
86
87
  # The entry point for self.
87
88
  attr_accessor :entry_point
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/app_test.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/env_test.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/root/file.txt CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/root_test.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,8 +1,8 @@
1
- require File.join(File.dirname(__FILE__), 'tap_test_helper')
2
- require 'tap/script'
1
+ require File.join(File.dirname(__FILE__), '../tap_test_helper')
2
+ require 'tap/support/command_line'
3
3
 
4
- class ScriptTest < Test::Unit::TestCase
5
- include Tap::Script
4
+ class CommandLineTest < Test::Unit::TestCase
5
+ include Tap::Support::CommandLine
6
6
 
7
7
  #
8
8
  # split_argv test
@@ -10,27 +10,27 @@ class ScriptTest < Test::Unit::TestCase
10
10
 
11
11
  def test_split_argv
12
12
  argv = ["a", "-b", "--c", "--", "d", "-e", "--f"]
13
- assert_equal([
14
- [["a", "-b", "--c"], ["d", "-e", "--f"]]
13
+ assert_equal([
14
+ [["a", "-b", "--c"], ["d", "-e", "--f"]]
15
15
  ], split_argv(argv))
16
16
 
17
17
  argv.unshift("--")
18
18
  argv.push("--")
19
- assert_equal([
20
- [["a", "-b", "--c"], ["d", "-e", "--f"]]
21
- ], split_argv(argv))
22
-
23
- argv.concat ["--++", "x", "-y", "--z"]
24
- assert_equal([
25
- [["a", "-b", "--c"], ["d", "-e", "--f"]],
26
- [["x", "-y", "--z"]]
27
- ], split_argv(argv))
28
-
29
- argv.concat ["--+", "m", "-n", "--o"]
30
- assert_equal([
31
- [["a", "-b", "--c"], ["d", "-e", "--f"]],
32
- [["m", "-n", "--o"]],
33
- [["x", "-y", "--z"]]
19
+ assert_equal([
20
+ [["a", "-b", "--c"], ["d", "-e", "--f"]]
21
+ ], split_argv(argv))
22
+
23
+ argv.concat ["--++", "x", "-y", "--z"]
24
+ assert_equal([
25
+ [["a", "-b", "--c"], ["d", "-e", "--f"]],
26
+ [["x", "-y", "--z"]]
27
+ ], split_argv(argv))
28
+
29
+ argv.concat ["--+", "m", "-n", "--o"]
30
+ assert_equal([
31
+ [["a", "-b", "--c"], ["d", "-e", "--f"]],
32
+ [["m", "-n", "--o"]],
33
+ [["x", "-y", "--z"]]
34
34
  ], split_argv(argv))
35
35
  end
36
36
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/test/task_test.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Chiang
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-09 00:00:00 -06:00
12
+ date: 2008-04-26 00:00:00 -06:00
13
13
  default_executable: tap
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -91,11 +91,13 @@ files:
91
91
  - lib/tap/cmd/destroy.rb
92
92
  - lib/tap/cmd/generate.rb
93
93
  - lib/tap/cmd/run.rb
94
- - lib/tap/script.rb
95
94
  - lib/tap/support/aggregator.rb
96
95
  - lib/tap/support/audit.rb
97
96
  - lib/tap/support/batchable.rb
97
+ - lib/tap/support/batchable_methods.rb
98
98
  - lib/tap/support/class_configuration.rb
99
+ - lib/tap/support/command_line.rb
100
+ - lib/tap/support/command_line_methods.rb
99
101
  - lib/tap/support/configurable.rb
100
102
  - lib/tap/support/configurable_methods.rb
101
103
  - lib/tap/support/executable.rb
@@ -168,11 +170,11 @@ files:
168
170
  - test/root/versions/file.yml
169
171
  - test/root/file.txt
170
172
  - test/root_test.rb
171
- - test/script_test.rb
172
173
  - test/support/aggregator_test.rb
173
174
  - test/support/audit_test.rb
174
175
  - test/support/batchable_test.rb
175
176
  - test/support/class_configuration_test.rb
177
+ - test/support/command_line_test.rb
176
178
  - test/support/configurable/config/configured.yml
177
179
  - test/support/configurable_test.rb
178
180
  - test/support/executable_queue_test.rb
@@ -266,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
268
  requirements: []
267
269
 
268
270
  rubyforge_project: tap
269
- rubygems_version: 1.0.1
271
+ rubygems_version: 1.1.1
270
272
  signing_key:
271
273
  specification_version: 2
272
274
  summary: A framework for configurable, distributable, and easy-to-use tasks and workflow applications.