saikouda 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/saikouda +5 -0
- data/lib/saikouda/cli.rb +106 -0
- data/lib/saikouda/version.rb +3 -0
- data/lib/saikouda.rb +7 -0
- data/saikouda.gemspec +34 -0
- data/vendor/bundle/bin/rake +27 -0
- data/vendor/bundle/bin/saikouda +27 -0
- data/vendor/bundle/bin/thor +27 -0
- data/vendor/bundle/cache/rake-10.5.0.gem +0 -0
- data/vendor/bundle/cache/thor-0.20.3.gem +0 -0
- data/vendor/bundle/gems/rake-10.5.0/.autotest +7 -0
- data/vendor/bundle/gems/rake-10.5.0/.rubocop.yml +27 -0
- data/vendor/bundle/gems/rake-10.5.0/.togglerc +7 -0
- data/vendor/bundle/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
- data/vendor/bundle/gems/rake-10.5.0/History.rdoc +659 -0
- data/vendor/bundle/gems/rake-10.5.0/MIT-LICENSE +21 -0
- data/vendor/bundle/gems/rake-10.5.0/Manifest.txt +166 -0
- data/vendor/bundle/gems/rake-10.5.0/README.rdoc +139 -0
- data/vendor/bundle/gems/rake-10.5.0/Rakefile +81 -0
- data/vendor/bundle/gems/rake-10.5.0/bin/rake +33 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/example/a.c +6 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/example/b.c +6 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/example/main.c +11 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/jamis.rb +591 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/rake.1 +141 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/rational.rdoc +151 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/application.rb +790 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/task.rb +383 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/version.rb +7 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
- data/vendor/bundle/gems/rake-10.5.0/lib/rake.rb +79 -0
- data/vendor/bundle/gems/rake-10.5.0/rakelib/publish.rake +20 -0
- data/vendor/bundle/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
- data/vendor/bundle/gems/rake-10.5.0/test/file_creation.rb +34 -0
- data/vendor/bundle/gems/rake-10.5.0/test/helper.rb +129 -0
- data/vendor/bundle/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
- data/vendor/bundle/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake.rb +40 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
- data/vendor/bundle/gems/thor-0.20.3/.document +5 -0
- data/vendor/bundle/gems/thor-0.20.3/CHANGELOG.md +204 -0
- data/vendor/bundle/gems/thor-0.20.3/CONTRIBUTING.md +15 -0
- data/vendor/bundle/gems/thor-0.20.3/LICENSE.md +20 -0
- data/vendor/bundle/gems/thor-0.20.3/README.md +51 -0
- data/vendor/bundle/gems/thor-0.20.3/bin/thor +6 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/create_file.rb +104 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/create_link.rb +60 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/directory.rb +118 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/empty_directory.rb +143 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/file_manipulation.rb +373 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/inject_into_file.rb +109 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions.rb +331 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/base.rb +678 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/command.rb +135 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/core_ext/hash_with_indifferent_access.rb +97 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/core_ext/io_binary_read.rb +12 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/core_ext/ordered_hash.rb +129 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/error.rb +114 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/group.rb +281 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/invocation.rb +177 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/line_editor/basic.rb +37 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/line_editor/readline.rb +88 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/line_editor.rb +17 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/argument.rb +70 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/arguments.rb +175 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/option.rb +146 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/options.rb +226 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser.rb +4 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/rake_compat.rb +71 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/runner.rb +324 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell/basic.rb +482 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell/color.rb +149 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell/html.rb +126 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell.rb +81 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/util.rb +268 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor/version.rb +3 -0
- data/vendor/bundle/gems/thor-0.20.3/lib/thor.rb +509 -0
- data/vendor/bundle/gems/thor-0.20.3/thor.gemspec +21 -0
- data/vendor/bundle/specifications/rake-10.5.0.gemspec +43 -0
- data/vendor/bundle/specifications/thor-0.20.3.gemspec +35 -0
- metadata +314 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
|
2
|
+
|
|
3
|
+
class TestRakeTopLevelFunctions < Rake::TestCase
|
|
4
|
+
|
|
5
|
+
def setup
|
|
6
|
+
super
|
|
7
|
+
|
|
8
|
+
@app = Object.new
|
|
9
|
+
|
|
10
|
+
def @app.called
|
|
11
|
+
@called
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def @app.method_missing(*a, &b)
|
|
15
|
+
@called ||= []
|
|
16
|
+
@called << [a, b]
|
|
17
|
+
nil
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
Rake.application = @app
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_namespace
|
|
24
|
+
block = proc do end
|
|
25
|
+
|
|
26
|
+
namespace("xyz", &block)
|
|
27
|
+
|
|
28
|
+
expected = [
|
|
29
|
+
[[:in_namespace, 'xyz'], block]
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
assert_equal expected, @app.called
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def test_import
|
|
36
|
+
import('x', 'y', 'z')
|
|
37
|
+
|
|
38
|
+
expected = [
|
|
39
|
+
[[:add_import, 'x'], nil],
|
|
40
|
+
[[:add_import, 'y'], nil],
|
|
41
|
+
[[:add_import, 'z'], nil],
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
assert_equal expected, @app.called
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def test_when_writing
|
|
48
|
+
out, = capture_io do
|
|
49
|
+
when_writing("NOTWRITING") do
|
|
50
|
+
puts "WRITING"
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
assert_equal "WRITING\n", out
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def test_when_not_writing
|
|
57
|
+
Rake::FileUtilsExt.nowrite_flag = true
|
|
58
|
+
_, err = capture_io do
|
|
59
|
+
when_writing("NOTWRITING") do
|
|
60
|
+
puts "WRITING"
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
assert_equal "DRYRUN: NOTWRITING\n", err
|
|
64
|
+
ensure
|
|
65
|
+
Rake::FileUtilsExt.nowrite_flag = false
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_missing_other_constant
|
|
69
|
+
assert_raises(NameError) do Object.const_missing(:Xyz) end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
|
2
|
+
|
|
3
|
+
class TestRakeWin32 < Rake::TestCase
|
|
4
|
+
|
|
5
|
+
Win32 = Rake::Win32
|
|
6
|
+
|
|
7
|
+
def test_win32_system_dir_uses_home_if_defined
|
|
8
|
+
ENV['HOME'] = 'C:\\HP'
|
|
9
|
+
|
|
10
|
+
assert_equal "C:/HP/Rake", Win32.win32_system_dir
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def test_win32_system_dir_uses_homedrive_homepath_when_no_home_defined
|
|
14
|
+
ENV['HOME'] = nil
|
|
15
|
+
ENV['HOMEDRIVE'] = 'C:'
|
|
16
|
+
ENV['HOMEPATH'] = '\\HP'
|
|
17
|
+
|
|
18
|
+
assert_equal "C:/HP/Rake", Win32.win32_system_dir
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def test_win32_system_dir_uses_appdata_when_no_home_or_home_combo
|
|
22
|
+
ENV['APPDATA'] = "C:\\Documents and Settings\\HP\\Application Data"
|
|
23
|
+
ENV['HOME'] = nil
|
|
24
|
+
ENV['HOMEDRIVE'] = nil
|
|
25
|
+
ENV['HOMEPATH'] = nil
|
|
26
|
+
|
|
27
|
+
assert_equal "C:/Documents and Settings/HP/Application Data/Rake",
|
|
28
|
+
Win32.win32_system_dir
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def test_win32_system_dir_fallback_to_userprofile_otherwise
|
|
32
|
+
ENV['HOME'] = nil
|
|
33
|
+
ENV['HOMEDRIVE'] = nil
|
|
34
|
+
ENV['HOMEPATH'] = nil
|
|
35
|
+
ENV['APPDATA'] = nil
|
|
36
|
+
ENV['USERPROFILE'] = "C:\\Documents and Settings\\HP"
|
|
37
|
+
|
|
38
|
+
assert_equal "C:/Documents and Settings/HP/Rake", Win32.win32_system_dir
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def test_win32_system_dir_nil_of_no_env_vars
|
|
42
|
+
ENV['APPDATA'] = nil
|
|
43
|
+
ENV['HOME'] = nil
|
|
44
|
+
ENV['HOMEDRIVE'] = nil
|
|
45
|
+
ENV['HOMEPATH'] = nil
|
|
46
|
+
ENV['RAKE_SYSTEM'] = nil
|
|
47
|
+
ENV['USERPROFILE'] = nil
|
|
48
|
+
|
|
49
|
+
assert_raises(Rake::Win32::Win32HomeError) do
|
|
50
|
+
Win32.win32_system_dir
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def test_win32_backtrace_with_different_case
|
|
55
|
+
ex = nil
|
|
56
|
+
begin
|
|
57
|
+
raise 'test exception'
|
|
58
|
+
rescue => ex
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
ex.set_backtrace ['abc', 'rakefile']
|
|
62
|
+
|
|
63
|
+
rake = Rake::Application.new
|
|
64
|
+
rake.options.trace = true
|
|
65
|
+
rake.instance_variable_set(:@rakefile, 'Rakefile')
|
|
66
|
+
|
|
67
|
+
_, err = capture_io { rake.display_error_message(ex) }
|
|
68
|
+
|
|
69
|
+
assert_match(/rakefile/, err)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
|
2
|
+
|
|
3
|
+
require 'rake/thread_history_display'
|
|
4
|
+
|
|
5
|
+
class TestThreadHistoryDisplay < Rake::TestCase
|
|
6
|
+
def setup
|
|
7
|
+
super
|
|
8
|
+
@time = 1_000_000
|
|
9
|
+
@stats = []
|
|
10
|
+
@display = Rake::ThreadHistoryDisplay.new(@stats)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def test_banner
|
|
14
|
+
out, _ = capture_io do
|
|
15
|
+
@display.show
|
|
16
|
+
end
|
|
17
|
+
assert_match(/Job History/i, out)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def test_item_queued
|
|
21
|
+
@stats << event(:item_queued, :item_id => 123)
|
|
22
|
+
out, _ = capture_io do
|
|
23
|
+
@display.show
|
|
24
|
+
end
|
|
25
|
+
assert_match(/^ *1000000 +A +item_queued +item_id:1$/, out)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def test_item_dequeued
|
|
29
|
+
@stats << event(:item_dequeued, :item_id => 123)
|
|
30
|
+
out, _ = capture_io do
|
|
31
|
+
@display.show
|
|
32
|
+
end
|
|
33
|
+
assert_match(/^ *1000000 +A +item_dequeued +item_id:1$/, out)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def test_multiple_items
|
|
37
|
+
@stats << event(:item_queued, :item_id => 123)
|
|
38
|
+
@stats << event(:item_queued, :item_id => 124)
|
|
39
|
+
out, _ = capture_io do
|
|
40
|
+
@display.show
|
|
41
|
+
end
|
|
42
|
+
assert_match(/^ *1000000 +A +item_queued +item_id:1$/, out)
|
|
43
|
+
assert_match(/^ *1000001 +A +item_queued +item_id:2$/, out)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def test_waiting
|
|
47
|
+
@stats << event(:waiting, :item_id => 123)
|
|
48
|
+
out, _ = capture_io do
|
|
49
|
+
@display.show
|
|
50
|
+
end
|
|
51
|
+
assert_match(/^ *1000000 +A +waiting +item_id:1$/, out)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def test_continue
|
|
55
|
+
@stats << event(:continue, :item_id => 123)
|
|
56
|
+
out, _ = capture_io do
|
|
57
|
+
@display.show
|
|
58
|
+
end
|
|
59
|
+
assert_match(/^ *1000000 +A +continue +item_id:1$/, out)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def test_thread_deleted
|
|
63
|
+
@stats << event(
|
|
64
|
+
:thread_deleted,
|
|
65
|
+
:deleted_thread => 123_456,
|
|
66
|
+
:thread_count => 12)
|
|
67
|
+
out, _ = capture_io do
|
|
68
|
+
@display.show
|
|
69
|
+
end
|
|
70
|
+
assert_match(
|
|
71
|
+
/^ *1000000 +A +thread_deleted( +deleted_thread:B| +thread_count:12){2}$/,
|
|
72
|
+
out)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def test_thread_created
|
|
76
|
+
@stats << event(
|
|
77
|
+
:thread_created,
|
|
78
|
+
:new_thread => 123_456,
|
|
79
|
+
:thread_count => 13)
|
|
80
|
+
out, _ = capture_io do
|
|
81
|
+
@display.show
|
|
82
|
+
end
|
|
83
|
+
assert_match(
|
|
84
|
+
/^ *1000000 +A +thread_created( +new_thread:B| +thread_count:13){2}$/,
|
|
85
|
+
out)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
private
|
|
89
|
+
|
|
90
|
+
def event(type, data = {})
|
|
91
|
+
result = {
|
|
92
|
+
:event => type,
|
|
93
|
+
:time => @time / 1_000_000.0,
|
|
94
|
+
:data => data,
|
|
95
|
+
:thread => Thread.current.object_id
|
|
96
|
+
}
|
|
97
|
+
@time += 1
|
|
98
|
+
result
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
|
2
|
+
require 'stringio'
|
|
3
|
+
|
|
4
|
+
class TestTraceOutput < Rake::TestCase
|
|
5
|
+
include Rake::TraceOutput
|
|
6
|
+
|
|
7
|
+
class PrintSpy
|
|
8
|
+
attr_reader :result, :calls
|
|
9
|
+
|
|
10
|
+
def initialize
|
|
11
|
+
@result = ""
|
|
12
|
+
@calls = 0
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def print(string)
|
|
16
|
+
@result << string
|
|
17
|
+
@calls += 1
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def test_trace_issues_single_io_for_args_with_empty_args
|
|
22
|
+
spy = PrintSpy.new
|
|
23
|
+
trace_on(spy)
|
|
24
|
+
assert_equal "\n", spy.result
|
|
25
|
+
assert_equal 1, spy.calls
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def test_trace_issues_single_io_for_args_multiple_strings
|
|
29
|
+
spy = PrintSpy.new
|
|
30
|
+
trace_on(spy, "HI\n", "LO")
|
|
31
|
+
assert_equal "HI\nLO\n", spy.result
|
|
32
|
+
assert_equal 1, spy.calls
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def test_trace_handles_nil_objects
|
|
36
|
+
spy = PrintSpy.new
|
|
37
|
+
trace_on(spy, "HI\n", nil, "LO")
|
|
38
|
+
assert_equal "HI\nLO\n", spy.result
|
|
39
|
+
assert_equal 1, spy.calls
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def test_trace_issues_single_io_for_args_multiple_strings_and_alternate_sep
|
|
43
|
+
old_sep = $\
|
|
44
|
+
$\ = "\r"
|
|
45
|
+
spy = PrintSpy.new
|
|
46
|
+
trace_on(spy, "HI\r", "LO")
|
|
47
|
+
assert_equal "HI\rLO\r", spy.result
|
|
48
|
+
assert_equal 1, spy.calls
|
|
49
|
+
ensure
|
|
50
|
+
$\ = old_sep
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# 0.20.3
|
|
2
|
+
* Support old versions of `did_you_mean`.
|
|
3
|
+
|
|
4
|
+
# 0.20.2
|
|
5
|
+
* Fix `did_you_mean` support.
|
|
6
|
+
|
|
7
|
+
# 0.20.1
|
|
8
|
+
* Support new versions fo ERB.
|
|
9
|
+
* Fix `check_unknown_options!` to not check the content that was not parsed, i.e. after a `--` or after the first unknown with `stop_on_unknown_option!`
|
|
10
|
+
* Add `did_you_mean` support.
|
|
11
|
+
|
|
12
|
+
## 0.20.0
|
|
13
|
+
* Add `check_default_type!` to check if the default value of an option matches the defined type.
|
|
14
|
+
It removes the warning on usage and gives the command authors the possibility to check for programming errors.
|
|
15
|
+
|
|
16
|
+
* Add `disable_required_check!` to disable check for required options in some commands.
|
|
17
|
+
It is a substitute of `disable_class_options` that was not working as intended.
|
|
18
|
+
|
|
19
|
+
* Add `inject_into_module`.
|
|
20
|
+
|
|
21
|
+
## 0.19.4, release 2016-11-28
|
|
22
|
+
* Rename `Thor::Base#thor_reserved_word?` to `#is_thor_reserved_word?`
|
|
23
|
+
|
|
24
|
+
## 0.19.3, release 2016-11-27
|
|
25
|
+
* Output a warning instead of raising an exception when a default option value doesn't match its specified type
|
|
26
|
+
|
|
27
|
+
## 0.19.2, release 2016-11-26
|
|
28
|
+
* Fix bug with handling of colors passed to `ask` (and methods like `yes?` and `no?` which it underpins)
|
|
29
|
+
* Allow numeric arguments to be negative
|
|
30
|
+
* Ensure that default option values are of the specified type (e.g. you can't specify `"foo"` as the default for a numeric option), but make symbols and strings interchangeable
|
|
31
|
+
* Add `Thor::Shell::Basic#indent` method for intending output
|
|
32
|
+
* Fix `remove_command` for an inherited command (see #451)
|
|
33
|
+
* Allow hash arguments to only have each key provided once (see #455)
|
|
34
|
+
* Allow commands to disable class options, for instance for "help" commands (see #363)
|
|
35
|
+
* Do not generate a negative option (`--no-no-foo`) for already negative boolean options (`--no-foo`)
|
|
36
|
+
* Improve compatibility of `Thor::CoreExt::HashWithIndifferentAccess` with Ruby standard library `Hash`
|
|
37
|
+
* Allow specifying a custom binding for template evaluation (e.g. `#key?` and `#fetch`)
|
|
38
|
+
* Fix support for subcommand-specific "help"s
|
|
39
|
+
* Use a string buffer when handling ERB for Ruby 2.3 compatibility
|
|
40
|
+
* Update dependencies
|
|
41
|
+
|
|
42
|
+
## 0.19.1, release 2014-03-24
|
|
43
|
+
* Fix `say` non-String break regression
|
|
44
|
+
|
|
45
|
+
## 0.19.0, release 2014-03-22
|
|
46
|
+
* Add support for a default to #ask
|
|
47
|
+
* Avoid @namespace not initialized warning
|
|
48
|
+
* Avoid private attribute? warning
|
|
49
|
+
* Fix initializing with unknown options
|
|
50
|
+
* Loosen required_rubygems_version for compatibility with Ubuntu 10.04
|
|
51
|
+
* Shell#ask: support a noecho option for stdin
|
|
52
|
+
* Shell#ask: change API to be :echo => false
|
|
53
|
+
* Display a message without a stack trace for ambiguous commands
|
|
54
|
+
* Make say and say_status thread safe
|
|
55
|
+
* Dependency for console io version check
|
|
56
|
+
* Alias --help to help on subcommands
|
|
57
|
+
* Use mime-types 1.x for Ruby 1.8.7 compatibility for Ruby 1.8 only
|
|
58
|
+
* Accept .tt files as templates
|
|
59
|
+
* Check if numeric value is in enum
|
|
60
|
+
* Use Readline for user input
|
|
61
|
+
* Fix dispatching of subcommands (concerning :help and *args)
|
|
62
|
+
* Fix warnings when running specs with `$VERBOSE = true`
|
|
63
|
+
* Make subcommand help more consistent
|
|
64
|
+
* Make the current command chain accessible in command
|
|
65
|
+
|
|
66
|
+
## 0.18.1, release 2013-03-30
|
|
67
|
+
* Revert regressions found in 0.18.0
|
|
68
|
+
|
|
69
|
+
## 0.18.0, release 2013-03-26
|
|
70
|
+
* Remove rake2thor
|
|
71
|
+
* Only display colors if output medium supports colors
|
|
72
|
+
* Pass parent_options to subcommands
|
|
73
|
+
* Fix non-dash-prefixed aliases
|
|
74
|
+
* Make error messages more helpful
|
|
75
|
+
* Rename "task" to "command"
|
|
76
|
+
* Add the method to allow for custom package name
|
|
77
|
+
|
|
78
|
+
## 0.17.0, release 2013-01-24
|
|
79
|
+
* Add better support for tasks that accept arbitrary additional arguments (e.g. things like `bundle exec`)
|
|
80
|
+
* Add #stop_on_unknown_option!
|
|
81
|
+
* Only strip from stdin.gets if it wasn't ended with EOF
|
|
82
|
+
* Allow "send" as a task name
|
|
83
|
+
* Allow passing options as arguments after "--"
|
|
84
|
+
* Autoload Thor::Group
|
|
85
|
+
|
|
86
|
+
## 0.16.0, release 2012-08-14
|
|
87
|
+
* Add enum to string arguments
|
|
88
|
+
|
|
89
|
+
## 0.15.4, release 2012-06-29
|
|
90
|
+
* Fix regression when destination root contains reserved regexp characters
|
|
91
|
+
|
|
92
|
+
## 0.15.3, release 2012-06-18
|
|
93
|
+
* Support strict_args_position! for backwards compatibility
|
|
94
|
+
* Escape Dir glob characters in paths
|
|
95
|
+
|
|
96
|
+
## 0.15.2, released 2012-05-07
|
|
97
|
+
* Added print_in_columns
|
|
98
|
+
* Exposed terminal_width as a public API
|
|
99
|
+
|
|
100
|
+
## 0.15.1, release 2012-05-06
|
|
101
|
+
* Fix Ruby 1.8 truncation bug with unicode chars
|
|
102
|
+
* Fix shell delegate methods to pass their block
|
|
103
|
+
* Don't output trailing spaces when printing the last column in a table
|
|
104
|
+
|
|
105
|
+
## 0.15, released 2012-04-29
|
|
106
|
+
* Alias method_options to options
|
|
107
|
+
* Refactor say to allow multiple colors
|
|
108
|
+
* Exposed error as a public API
|
|
109
|
+
* Exposed file_collision as a public API
|
|
110
|
+
* Exposed print_wrapped as a public API
|
|
111
|
+
* Exposed set_color as a public API
|
|
112
|
+
* Fix number-formatting bugs in print_table
|
|
113
|
+
* Fix "indent" typo in print_table
|
|
114
|
+
* Fix Errno::EPIPE when piping tasks to `head`
|
|
115
|
+
* More friendly error messages
|
|
116
|
+
|
|
117
|
+
## 0.14, released 2010-07-25
|
|
118
|
+
* Added CreateLink class and #link_file method
|
|
119
|
+
* Made Thor::Actions#run use system as default method for system calls
|
|
120
|
+
* Allow use of private methods from superclass as tasks
|
|
121
|
+
* Added mute(&block) method which allows to run block without any output
|
|
122
|
+
* Removed config[:pretend]
|
|
123
|
+
* Enabled underscores for command line switches
|
|
124
|
+
* Added Thor::Base.basename which is used by both Thor.banner and Thor::Group.banner
|
|
125
|
+
* Deprecated invoke() without arguments
|
|
126
|
+
* Added :only and :except to check_unknown_options
|
|
127
|
+
|
|
128
|
+
## 0.13, released 2010-02-03
|
|
129
|
+
* Added :lazy_default which is only triggered if a switch is given
|
|
130
|
+
* Added Thor::Shell::HTML
|
|
131
|
+
* Added subcommands
|
|
132
|
+
* Decoupled Thor::Group and Thor, so it's easier to vendor
|
|
133
|
+
* Added check_unknown_options! in case you want error messages to be raised in valid switches
|
|
134
|
+
* run(command) should return the results of command
|
|
135
|
+
|
|
136
|
+
## 0.12, released 2010-01-02
|
|
137
|
+
* Methods generated by attr_* are automatically not marked as tasks
|
|
138
|
+
* inject_into_file does not add the same content twice, unless :force is set
|
|
139
|
+
* Removed rr in favor to rspec mock framework
|
|
140
|
+
* Improved output for thor -T
|
|
141
|
+
* [#7] Do not force white color on status
|
|
142
|
+
* [#8] Yield a block with the filename on directory
|
|
143
|
+
|
|
144
|
+
## 0.11, released 2009-07-01
|
|
145
|
+
* Added a rake compatibility layer. It allows you to use spec and rdoc tasks on
|
|
146
|
+
Thor classes.
|
|
147
|
+
* BACKWARDS INCOMPATIBLE: aliases are not generated automatically anymore
|
|
148
|
+
since it may cause wrong behavior in the invocation system.
|
|
149
|
+
* thor help now show information about any class/task. All those calls are
|
|
150
|
+
possible:
|
|
151
|
+
|
|
152
|
+
thor help describe
|
|
153
|
+
thor help describe:amazing
|
|
154
|
+
Or even with default namespaces:
|
|
155
|
+
|
|
156
|
+
thor help :spec
|
|
157
|
+
* Thor::Runner now invokes the default task if none is supplied:
|
|
158
|
+
|
|
159
|
+
thor describe # invokes the default task, usually help
|
|
160
|
+
* Thor::Runner now works with mappings:
|
|
161
|
+
|
|
162
|
+
thor describe -h
|
|
163
|
+
* Added some documentation and code refactoring.
|
|
164
|
+
|
|
165
|
+
## 0.9.8, released 2008-10-20
|
|
166
|
+
* Fixed some tiny issues that were introduced lately.
|
|
167
|
+
|
|
168
|
+
## 0.9.7, released 2008-10-13
|
|
169
|
+
* Setting global method options on the initialize method works as expected:
|
|
170
|
+
All other tasks will accept these global options in addition to their own.
|
|
171
|
+
* Added 'group' notion to Thor task sets (class Thor); by default all tasks
|
|
172
|
+
are in the 'standard' group. Running 'thor -T' will only show the standard
|
|
173
|
+
tasks - adding --all will show all tasks. You can also filter on a specific
|
|
174
|
+
group using the --group option: thor -T --group advanced
|
|
175
|
+
|
|
176
|
+
## 0.9.6, released 2008-09-13
|
|
177
|
+
* Generic improvements
|
|
178
|
+
|
|
179
|
+
## 0.9.5, released 2008-08-27
|
|
180
|
+
* Improve Windows compatibility
|
|
181
|
+
* Update (incorrect) README and task.thor sample file
|
|
182
|
+
* Options hash is now frozen (once returned)
|
|
183
|
+
* Allow magic predicates on options object. For instance: `options.force?`
|
|
184
|
+
* Add support for :numeric type
|
|
185
|
+
* BACKWARDS INCOMPATIBLE: Refactor Thor::Options. You cannot access shorthand forms in options hash anymore (for instance, options[:f])
|
|
186
|
+
* Allow specifying optional args with default values: method_options(:user => "mislav")
|
|
187
|
+
* Don't write options for nil or false values. This allows, for example, turning color off when running specs.
|
|
188
|
+
* Exit with the status of the spec command to help CI stuff out some.
|
|
189
|
+
|
|
190
|
+
## 0.9.4, released 2008-08-13
|
|
191
|
+
* Try to add Windows compatibility.
|
|
192
|
+
* BACKWARDS INCOMPATIBLE: options hash is now accessed as a property in your class and is not passed as last argument anymore
|
|
193
|
+
* Allow options at the beginning of the argument list as well as the end.
|
|
194
|
+
* Make options available with symbol keys in addition to string keys.
|
|
195
|
+
* Allow true to be passed to Thor#method_options to denote a boolean option.
|
|
196
|
+
* If loading a thor file fails, don't give up, just print a warning and keep going.
|
|
197
|
+
* Make sure that we re-raise errors if they happened further down the pipe than we care about.
|
|
198
|
+
* Only delete the old file on updating when the installation of the new one is a success
|
|
199
|
+
* Make it Ruby 1.8.5 compatible.
|
|
200
|
+
* Don't raise an error if a boolean switch is defined multiple times.
|
|
201
|
+
* Thor::Options now doesn't parse through things that look like options but aren't.
|
|
202
|
+
* Add URI detection to install task, and make sure we don't append ".thor" to URIs
|
|
203
|
+
* Add rake2thor to the gem binfiles.
|
|
204
|
+
* Make sure local Thorfiles override system-wide ones.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Pull Requests
|
|
2
|
+
-------------
|
|
3
|
+
Here are some reasons why a pull request may not be merged:
|
|
4
|
+
|
|
5
|
+
1. It hasn’t been reviewed.
|
|
6
|
+
2. It doesn’t include specs for new functionality.
|
|
7
|
+
3. It doesn’t include documentation for new functionality.
|
|
8
|
+
4. It changes behavior without changing the relevant documentation, comments, or specs.
|
|
9
|
+
5. It changes behavior of an existing public API, breaking backward compatibility.
|
|
10
|
+
6. It breaks the tests on a supported platform.
|
|
11
|
+
7. It doesn’t merge cleanly (requiring Git rebasing and conflict resolution).
|
|
12
|
+
|
|
13
|
+
If you would like to help in this process, you can start by evaluating open pull requests against the criteria above. For example, if a pull request does not include specs for new functionality, you can add a comment like: “If you would like this feature to be added to Thor, please add specs to ensure that it does not break in the future.” This will help move a pull request closer to being merged.
|
|
14
|
+
|
|
15
|
+
Include this emoji in the top of your ticket to signal to us that you read this file: 🌈
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2008 Yehuda Katz, Eric Hodel, et al.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Thor
|
|
2
|
+
====
|
|
3
|
+
|
|
4
|
+
[][gem]
|
|
5
|
+
[][travis]
|
|
6
|
+
[][codeclimate]
|
|
7
|
+
[][coveralls]
|
|
8
|
+
|
|
9
|
+
[gem]: https://rubygems.org/gems/thor
|
|
10
|
+
[travis]: http://travis-ci.org/erikhuda/thor
|
|
11
|
+
[codeclimate]: https://codeclimate.com/github/erikhuda/thor
|
|
12
|
+
[coveralls]: https://coveralls.io/r/erikhuda/thor
|
|
13
|
+
|
|
14
|
+
Description
|
|
15
|
+
-----------
|
|
16
|
+
Thor is a simple and efficient tool for building self-documenting command line
|
|
17
|
+
utilities. It removes the pain of parsing command line options, writing
|
|
18
|
+
"USAGE:" banners, and can also be used as an alternative to the [Rake][rake]
|
|
19
|
+
build tool. The syntax is Rake-like, so it should be familiar to most Rake
|
|
20
|
+
users.
|
|
21
|
+
|
|
22
|
+
Please note: Thor, by design, is a system tool created to allow seamless file and url
|
|
23
|
+
access, which should not receive application user input. It relies on [open-uri][open-uri],
|
|
24
|
+
which combined with application user input would provide a command injection attack
|
|
25
|
+
vector.
|
|
26
|
+
|
|
27
|
+
[rake]: https://github.com/ruby/rake
|
|
28
|
+
[open-uri]: https://ruby-doc.org/stdlib-2.5.1/libdoc/open-uri/rdoc/index.html
|
|
29
|
+
|
|
30
|
+
Installation
|
|
31
|
+
------------
|
|
32
|
+
gem install thor
|
|
33
|
+
|
|
34
|
+
Usage and documentation
|
|
35
|
+
-----------------------
|
|
36
|
+
Please see the [wiki][] for basic usage and other documentation on using Thor. You can also checkout the [official homepage][homepage].
|
|
37
|
+
|
|
38
|
+
[wiki]: https://github.com/erikhuda/thor/wiki
|
|
39
|
+
[homepage]: http://whatisthor.com/
|
|
40
|
+
|
|
41
|
+
Contributing
|
|
42
|
+
------------
|
|
43
|
+
If you would like to help, please read the [CONTRIBUTING][] file for suggestions.
|
|
44
|
+
|
|
45
|
+
[contributing]: CONTRIBUTING.md
|
|
46
|
+
|
|
47
|
+
License
|
|
48
|
+
-------
|
|
49
|
+
Released under the MIT License. See the [LICENSE][] file for further details.
|
|
50
|
+
|
|
51
|
+
[license]: LICENSE.md
|