qiita_org 0.1.32 → 0.1.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -2
- data/Gemfile.lock +15 -15
- data/lib/qiita_org.rb +18 -36
- data/lib/qiita_org/access_qiita.rb +0 -2
- data/lib/qiita_org/all.rb +4 -4
- data/lib/qiita_org/base.rb +20 -0
- data/lib/qiita_org/config.rb +0 -2
- data/lib/qiita_org/error_message.rb +15 -10
- data/lib/qiita_org/get.rb +0 -4
- data/lib/qiita_org/get_multiple_files.rb +1 -4
- data/lib/qiita_org/get_template.rb +0 -33
- data/lib/qiita_org/list.rb +0 -5
- data/lib/qiita_org/md_converter_for_image.rb +1 -1
- data/lib/qiita_org/{file_open.rb → old_programs/file_open.rb} +0 -0
- data/lib/qiita_org/post.rb +12 -21
- data/lib/qiita_org/template.org +1 -1
- data/lib/qiita_org/upload.rb +13 -30
- data/lib/qiita_org/version.rb +1 -1
- data/tests/test.org +2 -1
- metadata +3 -2436
- data/.bandle/ruby/2.7.0/bin/htmldiff +0 -29
- data/.bandle/ruby/2.7.0/bin/ldiff +0 -29
- data/.bandle/ruby/2.7.0/bin/qiita_org +0 -27
- data/.bandle/ruby/2.7.0/bin/rake +0 -27
- data/.bandle/ruby/2.7.0/bin/rspec +0 -27
- data/.bandle/ruby/2.7.0/bin/thor +0 -27
- data/.bandle/ruby/2.7.0/cache/diff-lcs-1.4.4.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/rake-12.3.3.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/rspec-3.9.0.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/rspec-core-3.9.2.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/rspec-expectations-3.9.2.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/rspec-mocks-3.9.1.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/rspec-support-3.9.3.gem +0 -0
- data/.bandle/ruby/2.7.0/cache/thor-1.0.1.gem +0 -0
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/.rspec +0 -1
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/Code-of-Conduct.md +0 -74
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/Contributing.md +0 -118
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/History.md +0 -319
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/License.md +0 -39
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/Manifest.txt +0 -45
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/README.rdoc +0 -84
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/Rakefile +0 -74
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/autotest/discover.rb +0 -3
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/bin/htmldiff +0 -35
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/bin/ldiff +0 -9
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/docs/COPYING.txt +0 -339
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/docs/artistic.txt +0 -127
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff-lcs.rb +0 -3
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs.rb +0 -739
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/array.rb +0 -7
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/backports.rb +0 -9
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/block.rb +0 -37
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/callbacks.rb +0 -325
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/change.rb +0 -174
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/htmldiff.rb +0 -150
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/hunk.rb +0 -358
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/internals.rb +0 -304
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/ldiff.rb +0 -171
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs/string.rb +0 -5
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/change_spec.rb +0 -89
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/diff_spec.rb +0 -51
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/aX +0 -1
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/bXaX +0 -1
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ds1.csv +0 -50
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ds2.csv +0 -51
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff +0 -4
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-c +0 -7
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-e +0 -3
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-f +0 -3
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-u +0 -5
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/hunk_spec.rb +0 -83
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/issues_spec.rb +0 -154
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/lcs_spec.rb +0 -56
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/ldiff_spec.rb +0 -87
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/patch_spec.rb +0 -416
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/sdiff_spec.rb +0 -214
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/spec_helper.rb +0 -375
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/traverse_balanced_spec.rb +0 -310
- data/.bandle/ruby/2.7.0/gems/diff-lcs-1.4.4/spec/traverse_sequences_spec.rb +0 -139
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/CONTRIBUTING.rdoc +0 -43
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/Gemfile +0 -3
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/History.rdoc +0 -2344
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/MIT-LICENSE +0 -21
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/README.rdoc +0 -156
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/Rakefile +0 -41
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/azure-pipelines.yml +0 -11
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/bin/bundle +0 -105
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/bin/console +0 -7
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/bin/rake +0 -29
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/bin/rdoc +0 -29
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/bin/rubocop +0 -29
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/bin/setup +0 -6
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/command_line_usage.rdoc +0 -158
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/example/Rakefile1 +0 -38
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/example/Rakefile2 +0 -35
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/example/a.c +0 -6
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/example/b.c +0 -6
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/example/main.c +0 -11
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/glossary.rdoc +0 -42
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/jamis.rb +0 -592
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/proto_rake.rdoc +0 -127
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/rake.1 +0 -156
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/rakefile.rdoc +0 -622
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/doc/rational.rdoc +0 -151
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/exe/rake +0 -27
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake.rb +0 -71
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb +0 -824
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/backtrace.rb +0 -24
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/clean.rb +0 -78
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/cloneable.rb +0 -17
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/cpu_counter.rb +0 -107
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/default_loader.rb +0 -15
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/dsl_definition.rb +0 -195
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/early_time.rb +0 -22
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/ext/core.rb +0 -26
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/ext/string.rb +0 -176
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_creation_task.rb +0 -25
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_list.rb +0 -435
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_task.rb +0 -54
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_utils.rb +0 -137
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_utils_ext.rb +0 -145
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/invocation_chain.rb +0 -57
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/invocation_exception_mixin.rb +0 -17
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/late_time.rb +0 -18
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/linked_list.rb +0 -112
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/loaders/makefile.rb +0 -54
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/multi_task.rb +0 -14
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/name_space.rb +0 -38
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/packagetask.rb +0 -207
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/phony.rb +0 -16
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/private_reader.rb +0 -21
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/promise.rb +0 -100
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/pseudo_status.rb +0 -30
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/rake_module.rb +0 -67
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/rake_test_loader.rb +0 -27
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/rule_recursion_overflow_error.rb +0 -20
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/scope.rb +0 -43
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb +0 -413
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task_argument_error.rb +0 -8
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task_arguments.rb +0 -109
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task_manager.rb +0 -324
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/tasklib.rb +0 -12
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/testtask.rb +0 -224
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/thread_history_display.rb +0 -49
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/thread_pool.rb +0 -163
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/trace_output.rb +0 -23
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/version.rb +0 -10
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/lib/rake/win32.rb +0 -51
- data/.bandle/ruby/2.7.0/gems/rake-12.3.3/rake.gemspec +0 -42
- data/.bandle/ruby/2.7.0/gems/rspec-3.9.0/LICENSE.md +0 -27
- data/.bandle/ruby/2.7.0/gems/rspec-3.9.0/README.md +0 -43
- data/.bandle/ruby/2.7.0/gems/rspec-3.9.0/lib/rspec.rb +0 -3
- data/.bandle/ruby/2.7.0/gems/rspec-3.9.0/lib/rspec/version.rb +0 -5
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/.document +0 -5
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/.yardopts +0 -8
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/Changelog.md +0 -2291
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/LICENSE.md +0 -26
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/README.md +0 -384
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/exe/rspec +0 -4
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/autorun.rb +0 -3
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core.rb +0 -186
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/backtrace_formatter.rb +0 -65
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/coordinator.rb +0 -62
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/example_minimizer.rb +0 -173
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/fork_runner.rb +0 -135
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/server.rb +0 -61
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/shell_command.rb +0 -126
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/shell_runner.rb +0 -73
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/bisect/utilities.rb +0 -58
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/configuration.rb +0 -2363
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/configuration_options.rb +0 -233
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/did_you_mean.rb +0 -46
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/drb.rb +0 -113
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/dsl.rb +0 -98
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/example.rb +0 -656
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/example_group.rb +0 -900
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/example_status_persister.rb +0 -235
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/filter_manager.rb +0 -231
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/flat_map.rb +0 -20
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters.rb +0 -273
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_bisect_formatter.rb +0 -45
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_formatter.rb +0 -70
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/base_text_formatter.rb +0 -75
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/bisect_drb_formatter.rb +0 -29
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +0 -157
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/console_codes.rb +0 -68
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/deprecation_formatter.rb +0 -223
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/documentation_formatter.rb +0 -102
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/exception_presenter.rb +0 -511
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/failure_list_formatter.rb +0 -23
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/fallback_message_formatter.rb +0 -28
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/helpers.rb +0 -110
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_formatter.rb +0 -153
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_printer.rb +0 -414
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/html_snippet_extractor.rb +0 -120
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/json_formatter.rb +0 -102
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/profile_formatter.rb +0 -68
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/progress_formatter.rb +0 -29
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/protocol.rb +0 -182
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/snippet_extractor.rb +0 -134
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/formatters/syntax_highlighter.rb +0 -91
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/hooks.rb +0 -641
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/invocations.rb +0 -87
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/memoized_helpers.rb +0 -554
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/metadata.rb +0 -498
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/metadata_filter.rb +0 -255
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/minitest_assertions_adapter.rb +0 -31
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/flexmock.rb +0 -31
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/mocha.rb +0 -57
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/null.rb +0 -14
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/rr.rb +0 -31
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/mocking_adapters/rspec.rb +0 -32
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/notifications.rb +0 -521
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/option_parser.rb +0 -316
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/ordering.rb +0 -158
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/output_wrapper.rb +0 -29
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/pending.rb +0 -165
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/profiler.rb +0 -34
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer.rb +0 -48
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer/.rspec +0 -1
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +0 -100
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/rake_task.rb +0 -188
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/reporter.rb +0 -265
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/ruby_project.rb +0 -53
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/runner.rb +0 -204
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/sandbox.rb +0 -37
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/set.rb +0 -54
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/shared_context.rb +0 -55
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/shared_example_group.rb +0 -271
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/shell_escape.rb +0 -49
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/test_unit_assertions_adapter.rb +0 -30
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/version.rb +0 -9
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/warnings.rb +0 -40
- data/.bandle/ruby/2.7.0/gems/rspec-core-3.9.2/lib/rspec/core/world.rb +0 -276
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/.document +0 -5
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/.yardopts +0 -6
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/Changelog.md +0 -1191
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/LICENSE.md +0 -25
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/README.md +0 -320
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations.rb +0 -82
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/block_snippet_extractor.rb +0 -253
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/configuration.rb +0 -215
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/expectation_target.rb +0 -127
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/fail_with.rb +0 -39
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/failure_aggregator.rb +0 -194
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/handler.rb +0 -170
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/minitest_integration.rb +0 -58
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/syntax.rb +0 -132
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/expectations/version.rb +0 -8
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers.rb +0 -1038
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/aliased_matcher.rb +0 -116
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in.rb +0 -52
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/all.rb +0 -86
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/base_matcher.rb +0 -193
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be.rb +0 -288
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_between.rb +0 -77
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_instance_of.rb +0 -26
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_kind_of.rb +0 -20
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/be_within.rb +0 -72
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/change.rb +0 -428
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/compound.rb +0 -276
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/contain_exactly.rb +0 -302
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/cover.rb +0 -24
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/eq.rb +0 -40
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/eql.rb +0 -34
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/equal.rb +0 -81
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/exist.rb +0 -90
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/has.rb +0 -103
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/have_attributes.rb +0 -114
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/include.rb +0 -149
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/match.rb +0 -106
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/operators.rb +0 -128
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/output.rb +0 -200
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/raise_error.rb +0 -230
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/respond_to.rb +0 -199
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/satisfy.rb +0 -60
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/start_or_end_with.rb +0 -94
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/throw_symbol.rb +0 -132
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/built_in/yield.rb +0 -441
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/composable.rb +0 -171
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/dsl.rb +0 -540
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/english_phrasing.rb +0 -58
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +0 -82
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/fail_matchers.rb +0 -42
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/generated_descriptions.rb +0 -41
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/matcher_delegator.rb +0 -35
- data/.bandle/ruby/2.7.0/gems/rspec-expectations-3.9.2/lib/rspec/matchers/matcher_protocol.rb +0 -99
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/.document +0 -5
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/.yardopts +0 -6
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/Changelog.md +0 -1133
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/LICENSE.md +0 -25
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/README.md +0 -463
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks.rb +0 -130
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance.rb +0 -11
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/chain.rb +0 -111
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/error_generator.rb +0 -31
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/expect_chain_chain.rb +0 -31
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/expectation_chain.rb +0 -50
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/message_chains.rb +0 -83
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/proxy.rb +0 -116
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/recorder.rb +0 -294
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/stub_chain.rb +0 -51
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +0 -23
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/argument_list_matcher.rb +0 -100
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/argument_matchers.rb +0 -322
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/configuration.rb +0 -212
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/error_generator.rb +0 -369
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/example_methods.rb +0 -434
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/instance_method_stasher.rb +0 -146
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/marshal_extension.rb +0 -41
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/expectation_customization.rb +0 -20
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/have_received.rb +0 -134
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive.rb +0 -132
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive_message_chain.rb +0 -82
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/matchers/receive_messages.rb +0 -77
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/message_chain.rb +0 -87
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/message_expectation.rb +0 -751
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/method_double.rb +0 -287
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/method_reference.rb +0 -202
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/minitest_integration.rb +0 -68
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/mutate_const.rb +0 -339
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/object_reference.rb +0 -149
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/order_group.rb +0 -81
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/proxy.rb +0 -503
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/space.rb +0 -238
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/standalone.rb +0 -3
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/syntax.rb +0 -325
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/targets.rb +0 -124
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/test_double.rb +0 -171
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_double.rb +0 -129
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_message_expectation.rb +0 -54
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/verifying_proxy.rb +0 -220
- data/.bandle/ruby/2.7.0/gems/rspec-mocks-3.9.1/lib/rspec/mocks/version.rb +0 -9
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/Changelog.md +0 -302
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/LICENSE.md +0 -23
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/README.md +0 -40
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support.rb +0 -149
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/caller_filter.rb +0 -83
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/comparable_version.rb +0 -46
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/differ.rb +0 -215
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/directory_maker.rb +0 -63
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/encoded_string.rb +0 -161
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/fuzzy_matcher.rb +0 -48
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/hunk_generator.rb +0 -47
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/matcher_definition.rb +0 -42
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/method_signature_verifier.rb +0 -438
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/mutex.rb +0 -73
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/object_formatter.rb +0 -275
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/recursive_const_methods.rb +0 -76
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/reentrant_mutex.rb +0 -61
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/ruby_features.rb +0 -190
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source.rb +0 -75
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source/location.rb +0 -21
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source/node.rb +0 -110
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/source/token.rb +0 -87
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec.rb +0 -81
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/deprecation_helpers.rb +0 -64
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/formatting_support.rb +0 -9
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/in_sub_process.rb +0 -69
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/library_wide_checks.rb +0 -150
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/shell_out.rb +0 -89
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/stderr_splitter.rb +0 -75
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/string_matcher.rb +0 -46
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/with_isolated_directory.rb +0 -13
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/spec/with_isolated_stderr.rb +0 -13
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/version.rb +0 -7
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/warnings.rb +0 -39
- data/.bandle/ruby/2.7.0/gems/rspec-support-3.9.3/lib/rspec/support/with_keywords_when_needed.rb +0 -33
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/.document +0 -5
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/CHANGELOG.md +0 -220
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/CONTRIBUTING.md +0 -15
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/LICENSE.md +0 -20
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/README.md +0 -51
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/bin/thor +0 -6
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor.rb +0 -517
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions.rb +0 -336
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions/create_file.rb +0 -104
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions/create_link.rb +0 -61
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions/directory.rb +0 -108
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions/empty_directory.rb +0 -143
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions/file_manipulation.rb +0 -373
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/actions/inject_into_file.rb +0 -120
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/base.rb +0 -699
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/command.rb +0 -142
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -97
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/error.rb +0 -110
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/group.rb +0 -281
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb +0 -178
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor.rb +0 -17
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor/basic.rb +0 -37
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/line_editor/readline.rb +0 -88
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/nested_context.rb +0 -29
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/parser.rb +0 -4
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/parser/argument.rb +0 -70
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/parser/arguments.rb +0 -175
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/parser/option.rb +0 -159
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/parser/options.rb +0 -236
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/rake_compat.rb +0 -72
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/runner.rb +0 -325
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/shell.rb +0 -81
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/shell/basic.rb +0 -491
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/shell/color.rb +0 -153
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/shell/html.rb +0 -126
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/util.rb +0 -284
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/lib/thor/version.rb +0 -3
- data/.bandle/ruby/2.7.0/gems/thor-1.0.1/thor.gemspec +0 -28
- data/.bandle/ruby/2.7.0/specifications/diff-lcs-1.4.4.gemspec +0 -50
- data/.bandle/ruby/2.7.0/specifications/rake-12.3.3.gemspec +0 -43
- data/.bandle/ruby/2.7.0/specifications/rspec-3.9.0.gemspec +0 -39
- data/.bandle/ruby/2.7.0/specifications/rspec-core-3.9.2.gemspec +0 -53
- data/.bandle/ruby/2.7.0/specifications/rspec-expectations-3.9.2.gemspec +0 -44
- data/.bandle/ruby/2.7.0/specifications/rspec-mocks-3.9.1.gemspec +0 -44
- data/.bandle/ruby/2.7.0/specifications/rspec-support-3.9.3.gemspec +0 -36
- data/.bandle/ruby/2.7.0/specifications/thor-1.0.1.gemspec +0 -34
- data/lib/qiita_org/hoge.txt +0 -3
@@ -1,108 +0,0 @@
|
|
1
|
-
require_relative "empty_directory"
|
2
|
-
|
3
|
-
class Thor
|
4
|
-
module Actions
|
5
|
-
# Copies recursively the files from source directory to root directory.
|
6
|
-
# If any of the files finishes with .tt, it's considered to be a template
|
7
|
-
# and is placed in the destination without the extension .tt. If any
|
8
|
-
# empty directory is found, it's copied and all .empty_directory files are
|
9
|
-
# ignored. If any file name is wrapped within % signs, the text within
|
10
|
-
# the % signs will be executed as a method and replaced with the returned
|
11
|
-
# value. Let's suppose a doc directory with the following files:
|
12
|
-
#
|
13
|
-
# doc/
|
14
|
-
# components/.empty_directory
|
15
|
-
# README
|
16
|
-
# rdoc.rb.tt
|
17
|
-
# %app_name%.rb
|
18
|
-
#
|
19
|
-
# When invoked as:
|
20
|
-
#
|
21
|
-
# directory "doc"
|
22
|
-
#
|
23
|
-
# It will create a doc directory in the destination with the following
|
24
|
-
# files (assuming that the `app_name` method returns the value "blog"):
|
25
|
-
#
|
26
|
-
# doc/
|
27
|
-
# components/
|
28
|
-
# README
|
29
|
-
# rdoc.rb
|
30
|
-
# blog.rb
|
31
|
-
#
|
32
|
-
# <b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can
|
33
|
-
# expand %something%, this `something` should be a public method in the class calling
|
34
|
-
# #directory. If a method is private, Thor stack raises PrivateMethodEncodedError.
|
35
|
-
#
|
36
|
-
# ==== Parameters
|
37
|
-
# source<String>:: the relative path to the source root.
|
38
|
-
# destination<String>:: the relative path to the destination root.
|
39
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
40
|
-
# If :recursive => false, does not look for paths recursively.
|
41
|
-
# If :mode => :preserve, preserve the file mode from the source.
|
42
|
-
# If :exclude_pattern => /regexp/, prevents copying files that match that regexp.
|
43
|
-
#
|
44
|
-
# ==== Examples
|
45
|
-
#
|
46
|
-
# directory "doc"
|
47
|
-
# directory "doc", "docs", :recursive => false
|
48
|
-
#
|
49
|
-
def directory(source, *args, &block)
|
50
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
51
|
-
destination = args.first || source
|
52
|
-
action Directory.new(self, source, destination || source, config, &block)
|
53
|
-
end
|
54
|
-
|
55
|
-
class Directory < EmptyDirectory #:nodoc:
|
56
|
-
attr_reader :source
|
57
|
-
|
58
|
-
def initialize(base, source, destination = nil, config = {}, &block)
|
59
|
-
@source = File.expand_path(Dir[Util.escape_globs(base.find_in_source_paths(source.to_s))].first)
|
60
|
-
@block = block
|
61
|
-
super(base, destination, {:recursive => true}.merge(config))
|
62
|
-
end
|
63
|
-
|
64
|
-
def invoke!
|
65
|
-
base.empty_directory given_destination, config
|
66
|
-
execute!
|
67
|
-
end
|
68
|
-
|
69
|
-
def revoke!
|
70
|
-
execute!
|
71
|
-
end
|
72
|
-
|
73
|
-
protected
|
74
|
-
|
75
|
-
def execute!
|
76
|
-
lookup = Util.escape_globs(source)
|
77
|
-
lookup = config[:recursive] ? File.join(lookup, "**") : lookup
|
78
|
-
lookup = file_level_lookup(lookup)
|
79
|
-
|
80
|
-
files(lookup).sort.each do |file_source|
|
81
|
-
next if File.directory?(file_source)
|
82
|
-
next if config[:exclude_pattern] && file_source.match(config[:exclude_pattern])
|
83
|
-
file_destination = File.join(given_destination, file_source.gsub(source, "."))
|
84
|
-
file_destination.gsub!("/./", "/")
|
85
|
-
|
86
|
-
case file_source
|
87
|
-
when /\.empty_directory$/
|
88
|
-
dirname = File.dirname(file_destination).gsub(%r{/\.$}, "")
|
89
|
-
next if dirname == given_destination
|
90
|
-
base.empty_directory(dirname, config)
|
91
|
-
when /#{TEMPLATE_EXTNAME}$/
|
92
|
-
base.template(file_source, file_destination[0..-4], config, &@block)
|
93
|
-
else
|
94
|
-
base.copy_file(file_source, file_destination, config, &@block)
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
def file_level_lookup(previous_lookup)
|
100
|
-
File.join(previous_lookup, "*")
|
101
|
-
end
|
102
|
-
|
103
|
-
def files(lookup)
|
104
|
-
Dir.glob(lookup, File::FNM_DOTMATCH)
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
@@ -1,143 +0,0 @@
|
|
1
|
-
class Thor
|
2
|
-
module Actions
|
3
|
-
# Creates an empty directory.
|
4
|
-
#
|
5
|
-
# ==== Parameters
|
6
|
-
# destination<String>:: the relative path to the destination root.
|
7
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
8
|
-
#
|
9
|
-
# ==== Examples
|
10
|
-
#
|
11
|
-
# empty_directory "doc"
|
12
|
-
#
|
13
|
-
def empty_directory(destination, config = {})
|
14
|
-
action EmptyDirectory.new(self, destination, config)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Class which holds create directory logic. This is the base class for
|
18
|
-
# other actions like create_file and directory.
|
19
|
-
#
|
20
|
-
# This implementation is based in Templater actions, created by Jonas Nicklas
|
21
|
-
# and Michael S. Klishin under MIT LICENSE.
|
22
|
-
#
|
23
|
-
class EmptyDirectory #:nodoc:
|
24
|
-
attr_reader :base, :destination, :given_destination, :relative_destination, :config
|
25
|
-
|
26
|
-
# Initializes given the source and destination.
|
27
|
-
#
|
28
|
-
# ==== Parameters
|
29
|
-
# base<Thor::Base>:: A Thor::Base instance
|
30
|
-
# source<String>:: Relative path to the source of this file
|
31
|
-
# destination<String>:: Relative path to the destination of this file
|
32
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
33
|
-
#
|
34
|
-
def initialize(base, destination, config = {})
|
35
|
-
@base = base
|
36
|
-
@config = {:verbose => true}.merge(config)
|
37
|
-
self.destination = destination
|
38
|
-
end
|
39
|
-
|
40
|
-
# Checks if the destination file already exists.
|
41
|
-
#
|
42
|
-
# ==== Returns
|
43
|
-
# Boolean:: true if the file exists, false otherwise.
|
44
|
-
#
|
45
|
-
def exists?
|
46
|
-
::File.exist?(destination)
|
47
|
-
end
|
48
|
-
|
49
|
-
def invoke!
|
50
|
-
invoke_with_conflict_check do
|
51
|
-
require "fileutils"
|
52
|
-
::FileUtils.mkdir_p(destination)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def revoke!
|
57
|
-
say_status :remove, :red
|
58
|
-
require "fileutils"
|
59
|
-
::FileUtils.rm_rf(destination) if !pretend? && exists?
|
60
|
-
given_destination
|
61
|
-
end
|
62
|
-
|
63
|
-
protected
|
64
|
-
|
65
|
-
# Shortcut for pretend.
|
66
|
-
#
|
67
|
-
def pretend?
|
68
|
-
base.options[:pretend]
|
69
|
-
end
|
70
|
-
|
71
|
-
# Sets the absolute destination value from a relative destination value.
|
72
|
-
# It also stores the given and relative destination. Let's suppose our
|
73
|
-
# script is being executed on "dest", it sets the destination root to
|
74
|
-
# "dest". The destination, given_destination and relative_destination
|
75
|
-
# are related in the following way:
|
76
|
-
#
|
77
|
-
# inside "bar" do
|
78
|
-
# empty_directory "baz"
|
79
|
-
# end
|
80
|
-
#
|
81
|
-
# destination #=> dest/bar/baz
|
82
|
-
# relative_destination #=> bar/baz
|
83
|
-
# given_destination #=> baz
|
84
|
-
#
|
85
|
-
def destination=(destination)
|
86
|
-
return unless destination
|
87
|
-
@given_destination = convert_encoded_instructions(destination.to_s)
|
88
|
-
@destination = ::File.expand_path(@given_destination, base.destination_root)
|
89
|
-
@relative_destination = base.relative_to_original_destination_root(@destination)
|
90
|
-
end
|
91
|
-
|
92
|
-
# Filenames in the encoded form are converted. If you have a file:
|
93
|
-
#
|
94
|
-
# %file_name%.rb
|
95
|
-
#
|
96
|
-
# It calls #file_name from the base and replaces %-string with the
|
97
|
-
# return value (should be String) of #file_name:
|
98
|
-
#
|
99
|
-
# user.rb
|
100
|
-
#
|
101
|
-
# The method referenced can be either public or private.
|
102
|
-
#
|
103
|
-
def convert_encoded_instructions(filename)
|
104
|
-
filename.gsub(/%(.*?)%/) do |initial_string|
|
105
|
-
method = $1.strip
|
106
|
-
base.respond_to?(method, true) ? base.send(method) : initial_string
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
# Receives a hash of options and just execute the block if some
|
111
|
-
# conditions are met.
|
112
|
-
#
|
113
|
-
def invoke_with_conflict_check(&block)
|
114
|
-
if exists?
|
115
|
-
on_conflict_behavior(&block)
|
116
|
-
else
|
117
|
-
yield unless pretend?
|
118
|
-
say_status :create, :green
|
119
|
-
end
|
120
|
-
|
121
|
-
destination
|
122
|
-
rescue Errno::EISDIR, Errno::EEXIST
|
123
|
-
on_file_clash_behavior
|
124
|
-
end
|
125
|
-
|
126
|
-
def on_file_clash_behavior
|
127
|
-
say_status :file_clash, :red
|
128
|
-
end
|
129
|
-
|
130
|
-
# What to do when the destination file already exists.
|
131
|
-
#
|
132
|
-
def on_conflict_behavior
|
133
|
-
say_status :exist, :blue
|
134
|
-
end
|
135
|
-
|
136
|
-
# Shortcut to say_status shell method.
|
137
|
-
#
|
138
|
-
def say_status(status, color)
|
139
|
-
base.shell.say_status status, relative_destination, color if config[:verbose]
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
@@ -1,373 +0,0 @@
|
|
1
|
-
require "erb"
|
2
|
-
|
3
|
-
class Thor
|
4
|
-
module Actions
|
5
|
-
# Copies the file from the relative source to the relative destination. If
|
6
|
-
# the destination is not given it's assumed to be equal to the source.
|
7
|
-
#
|
8
|
-
# ==== Parameters
|
9
|
-
# source<String>:: the relative path to the source root.
|
10
|
-
# destination<String>:: the relative path to the destination root.
|
11
|
-
# config<Hash>:: give :verbose => false to not log the status, and
|
12
|
-
# :mode => :preserve, to preserve the file mode from the source.
|
13
|
-
|
14
|
-
#
|
15
|
-
# ==== Examples
|
16
|
-
#
|
17
|
-
# copy_file "README", "doc/README"
|
18
|
-
#
|
19
|
-
# copy_file "doc/README"
|
20
|
-
#
|
21
|
-
def copy_file(source, *args, &block)
|
22
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
23
|
-
destination = args.first || source
|
24
|
-
source = File.expand_path(find_in_source_paths(source.to_s))
|
25
|
-
|
26
|
-
resulting_destination = create_file destination, nil, config do
|
27
|
-
content = File.binread(source)
|
28
|
-
content = yield(content) if block
|
29
|
-
content
|
30
|
-
end
|
31
|
-
if config[:mode] == :preserve
|
32
|
-
mode = File.stat(source).mode
|
33
|
-
chmod(resulting_destination, mode, config)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
# Links the file from the relative source to the relative destination. If
|
38
|
-
# the destination is not given it's assumed to be equal to the source.
|
39
|
-
#
|
40
|
-
# ==== Parameters
|
41
|
-
# source<String>:: the relative path to the source root.
|
42
|
-
# destination<String>:: the relative path to the destination root.
|
43
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
44
|
-
#
|
45
|
-
# ==== Examples
|
46
|
-
#
|
47
|
-
# link_file "README", "doc/README"
|
48
|
-
#
|
49
|
-
# link_file "doc/README"
|
50
|
-
#
|
51
|
-
def link_file(source, *args)
|
52
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
53
|
-
destination = args.first || source
|
54
|
-
source = File.expand_path(find_in_source_paths(source.to_s))
|
55
|
-
|
56
|
-
create_link destination, source, config
|
57
|
-
end
|
58
|
-
|
59
|
-
# Gets the content at the given address and places it at the given relative
|
60
|
-
# destination. If a block is given instead of destination, the content of
|
61
|
-
# the url is yielded and used as location.
|
62
|
-
#
|
63
|
-
# +get+ relies on open-uri, so passing application user input would provide
|
64
|
-
# a command injection attack vector.
|
65
|
-
#
|
66
|
-
# ==== Parameters
|
67
|
-
# source<String>:: the address of the given content.
|
68
|
-
# destination<String>:: the relative path to the destination root.
|
69
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
70
|
-
#
|
71
|
-
# ==== Examples
|
72
|
-
#
|
73
|
-
# get "http://gist.github.com/103208", "doc/README"
|
74
|
-
#
|
75
|
-
# get "http://gist.github.com/103208" do |content|
|
76
|
-
# content.split("\n").first
|
77
|
-
# end
|
78
|
-
#
|
79
|
-
def get(source, *args, &block)
|
80
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
81
|
-
destination = args.first
|
82
|
-
|
83
|
-
render = if source =~ %r{^https?\://}
|
84
|
-
require "open-uri"
|
85
|
-
URI.send(:open, source) { |input| input.binmode.read }
|
86
|
-
else
|
87
|
-
source = File.expand_path(find_in_source_paths(source.to_s))
|
88
|
-
open(source) { |input| input.binmode.read }
|
89
|
-
end
|
90
|
-
|
91
|
-
destination ||= if block_given?
|
92
|
-
block.arity == 1 ? yield(render) : yield
|
93
|
-
else
|
94
|
-
File.basename(source)
|
95
|
-
end
|
96
|
-
|
97
|
-
create_file destination, render, config
|
98
|
-
end
|
99
|
-
|
100
|
-
# Gets an ERB template at the relative source, executes it and makes a copy
|
101
|
-
# at the relative destination. If the destination is not given it's assumed
|
102
|
-
# to be equal to the source removing .tt from the filename.
|
103
|
-
#
|
104
|
-
# ==== Parameters
|
105
|
-
# source<String>:: the relative path to the source root.
|
106
|
-
# destination<String>:: the relative path to the destination root.
|
107
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
108
|
-
#
|
109
|
-
# ==== Examples
|
110
|
-
#
|
111
|
-
# template "README", "doc/README"
|
112
|
-
#
|
113
|
-
# template "doc/README"
|
114
|
-
#
|
115
|
-
def template(source, *args, &block)
|
116
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
117
|
-
destination = args.first || source.sub(/#{TEMPLATE_EXTNAME}$/, "")
|
118
|
-
|
119
|
-
source = File.expand_path(find_in_source_paths(source.to_s))
|
120
|
-
context = config.delete(:context) || instance_eval("binding")
|
121
|
-
|
122
|
-
create_file destination, nil, config do
|
123
|
-
match = ERB.version.match(/(\d+\.\d+\.\d+)/)
|
124
|
-
capturable_erb = if match && match[1] >= "2.2.0" # Ruby 2.6+
|
125
|
-
CapturableERB.new(::File.binread(source), :trim_mode => "-", :eoutvar => "@output_buffer")
|
126
|
-
else
|
127
|
-
CapturableERB.new(::File.binread(source), nil, "-", "@output_buffer")
|
128
|
-
end
|
129
|
-
content = capturable_erb.tap do |erb|
|
130
|
-
erb.filename = source
|
131
|
-
end.result(context)
|
132
|
-
content = yield(content) if block
|
133
|
-
content
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
# Changes the mode of the given file or directory.
|
138
|
-
#
|
139
|
-
# ==== Parameters
|
140
|
-
# mode<Integer>:: the file mode
|
141
|
-
# path<String>:: the name of the file to change mode
|
142
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
143
|
-
#
|
144
|
-
# ==== Example
|
145
|
-
#
|
146
|
-
# chmod "script/server", 0755
|
147
|
-
#
|
148
|
-
def chmod(path, mode, config = {})
|
149
|
-
return unless behavior == :invoke
|
150
|
-
path = File.expand_path(path, destination_root)
|
151
|
-
say_status :chmod, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
152
|
-
unless options[:pretend]
|
153
|
-
require "fileutils"
|
154
|
-
FileUtils.chmod_R(mode, path)
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
# Prepend text to a file. Since it depends on insert_into_file, it's reversible.
|
159
|
-
#
|
160
|
-
# ==== Parameters
|
161
|
-
# path<String>:: path of the file to be changed
|
162
|
-
# data<String>:: the data to prepend to the file, can be also given as a block.
|
163
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
164
|
-
#
|
165
|
-
# ==== Example
|
166
|
-
#
|
167
|
-
# prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
|
168
|
-
#
|
169
|
-
# prepend_to_file 'config/environments/test.rb' do
|
170
|
-
# 'config.gem "rspec"'
|
171
|
-
# end
|
172
|
-
#
|
173
|
-
def prepend_to_file(path, *args, &block)
|
174
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
175
|
-
config[:after] = /\A/
|
176
|
-
insert_into_file(path, *(args << config), &block)
|
177
|
-
end
|
178
|
-
alias_method :prepend_file, :prepend_to_file
|
179
|
-
|
180
|
-
# Append text to a file. Since it depends on insert_into_file, it's reversible.
|
181
|
-
#
|
182
|
-
# ==== Parameters
|
183
|
-
# path<String>:: path of the file to be changed
|
184
|
-
# data<String>:: the data to append to the file, can be also given as a block.
|
185
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
186
|
-
#
|
187
|
-
# ==== Example
|
188
|
-
#
|
189
|
-
# append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
|
190
|
-
#
|
191
|
-
# append_to_file 'config/environments/test.rb' do
|
192
|
-
# 'config.gem "rspec"'
|
193
|
-
# end
|
194
|
-
#
|
195
|
-
def append_to_file(path, *args, &block)
|
196
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
197
|
-
config[:before] = /\z/
|
198
|
-
insert_into_file(path, *(args << config), &block)
|
199
|
-
end
|
200
|
-
alias_method :append_file, :append_to_file
|
201
|
-
|
202
|
-
# Injects text right after the class definition. Since it depends on
|
203
|
-
# insert_into_file, it's reversible.
|
204
|
-
#
|
205
|
-
# ==== Parameters
|
206
|
-
# path<String>:: path of the file to be changed
|
207
|
-
# klass<String|Class>:: the class to be manipulated
|
208
|
-
# data<String>:: the data to append to the class, can be also given as a block.
|
209
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
210
|
-
#
|
211
|
-
# ==== Examples
|
212
|
-
#
|
213
|
-
# inject_into_class "app/controllers/application_controller.rb", ApplicationController, " filter_parameter :password\n"
|
214
|
-
#
|
215
|
-
# inject_into_class "app/controllers/application_controller.rb", ApplicationController do
|
216
|
-
# " filter_parameter :password\n"
|
217
|
-
# end
|
218
|
-
#
|
219
|
-
def inject_into_class(path, klass, *args, &block)
|
220
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
221
|
-
config[:after] = /class #{klass}\n|class #{klass} .*\n/
|
222
|
-
insert_into_file(path, *(args << config), &block)
|
223
|
-
end
|
224
|
-
|
225
|
-
# Injects text right after the module definition. Since it depends on
|
226
|
-
# insert_into_file, it's reversible.
|
227
|
-
#
|
228
|
-
# ==== Parameters
|
229
|
-
# path<String>:: path of the file to be changed
|
230
|
-
# module_name<String|Class>:: the module to be manipulated
|
231
|
-
# data<String>:: the data to append to the class, can be also given as a block.
|
232
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
233
|
-
#
|
234
|
-
# ==== Examples
|
235
|
-
#
|
236
|
-
# inject_into_module "app/helpers/application_helper.rb", ApplicationHelper, " def help; 'help'; end\n"
|
237
|
-
#
|
238
|
-
# inject_into_module "app/helpers/application_helper.rb", ApplicationHelper do
|
239
|
-
# " def help; 'help'; end\n"
|
240
|
-
# end
|
241
|
-
#
|
242
|
-
def inject_into_module(path, module_name, *args, &block)
|
243
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
244
|
-
config[:after] = /module #{module_name}\n|module #{module_name} .*\n/
|
245
|
-
insert_into_file(path, *(args << config), &block)
|
246
|
-
end
|
247
|
-
|
248
|
-
# Run a regular expression replacement on a file.
|
249
|
-
#
|
250
|
-
# ==== Parameters
|
251
|
-
# path<String>:: path of the file to be changed
|
252
|
-
# flag<Regexp|String>:: the regexp or string to be replaced
|
253
|
-
# replacement<String>:: the replacement, can be also given as a block
|
254
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
255
|
-
#
|
256
|
-
# ==== Example
|
257
|
-
#
|
258
|
-
# gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1'
|
259
|
-
#
|
260
|
-
# gsub_file 'README', /rake/, :green do |match|
|
261
|
-
# match << " no more. Use thor!"
|
262
|
-
# end
|
263
|
-
#
|
264
|
-
def gsub_file(path, flag, *args, &block)
|
265
|
-
return unless behavior == :invoke
|
266
|
-
config = args.last.is_a?(Hash) ? args.pop : {}
|
267
|
-
|
268
|
-
path = File.expand_path(path, destination_root)
|
269
|
-
say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
270
|
-
|
271
|
-
unless options[:pretend]
|
272
|
-
content = File.binread(path)
|
273
|
-
content.gsub!(flag, *args, &block)
|
274
|
-
File.open(path, "wb") { |file| file.write(content) }
|
275
|
-
end
|
276
|
-
end
|
277
|
-
|
278
|
-
# Uncomment all lines matching a given regex. It will leave the space
|
279
|
-
# which existed before the comment hash in tact but will remove any spacing
|
280
|
-
# between the comment hash and the beginning of the line.
|
281
|
-
#
|
282
|
-
# ==== Parameters
|
283
|
-
# path<String>:: path of the file to be changed
|
284
|
-
# flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment
|
285
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
286
|
-
#
|
287
|
-
# ==== Example
|
288
|
-
#
|
289
|
-
# uncomment_lines 'config/initializers/session_store.rb', /active_record/
|
290
|
-
#
|
291
|
-
def uncomment_lines(path, flag, *args)
|
292
|
-
flag = flag.respond_to?(:source) ? flag.source : flag
|
293
|
-
|
294
|
-
gsub_file(path, /^(\s*)#[[:blank:]]*(.*#{flag})/, '\1\2', *args)
|
295
|
-
end
|
296
|
-
|
297
|
-
# Comment all lines matching a given regex. It will leave the space
|
298
|
-
# which existed before the beginning of the line in tact and will insert
|
299
|
-
# a single space after the comment hash.
|
300
|
-
#
|
301
|
-
# ==== Parameters
|
302
|
-
# path<String>:: path of the file to be changed
|
303
|
-
# flag<Regexp|String>:: the regexp or string used to decide which lines to comment
|
304
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
305
|
-
#
|
306
|
-
# ==== Example
|
307
|
-
#
|
308
|
-
# comment_lines 'config/initializers/session_store.rb', /cookie_store/
|
309
|
-
#
|
310
|
-
def comment_lines(path, flag, *args)
|
311
|
-
flag = flag.respond_to?(:source) ? flag.source : flag
|
312
|
-
|
313
|
-
gsub_file(path, /^(\s*)([^#\n]*#{flag})/, '\1# \2', *args)
|
314
|
-
end
|
315
|
-
|
316
|
-
# Removes a file at the given location.
|
317
|
-
#
|
318
|
-
# ==== Parameters
|
319
|
-
# path<String>:: path of the file to be changed
|
320
|
-
# config<Hash>:: give :verbose => false to not log the status.
|
321
|
-
#
|
322
|
-
# ==== Example
|
323
|
-
#
|
324
|
-
# remove_file 'README'
|
325
|
-
# remove_file 'app/controllers/application_controller.rb'
|
326
|
-
#
|
327
|
-
def remove_file(path, config = {})
|
328
|
-
return unless behavior == :invoke
|
329
|
-
path = File.expand_path(path, destination_root)
|
330
|
-
|
331
|
-
say_status :remove, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
332
|
-
if !options[:pretend] && File.exist?(path)
|
333
|
-
require "fileutils"
|
334
|
-
::FileUtils.rm_rf(path)
|
335
|
-
end
|
336
|
-
end
|
337
|
-
alias_method :remove_dir, :remove_file
|
338
|
-
|
339
|
-
attr_accessor :output_buffer
|
340
|
-
private :output_buffer, :output_buffer=
|
341
|
-
|
342
|
-
private
|
343
|
-
|
344
|
-
def concat(string)
|
345
|
-
@output_buffer.concat(string)
|
346
|
-
end
|
347
|
-
|
348
|
-
def capture(*args)
|
349
|
-
with_output_buffer { yield(*args) }
|
350
|
-
end
|
351
|
-
|
352
|
-
def with_output_buffer(buf = "".dup) #:nodoc:
|
353
|
-
raise ArgumentError, "Buffer can not be a frozen object" if buf.frozen?
|
354
|
-
old_buffer = output_buffer
|
355
|
-
self.output_buffer = buf
|
356
|
-
yield
|
357
|
-
output_buffer
|
358
|
-
ensure
|
359
|
-
self.output_buffer = old_buffer
|
360
|
-
end
|
361
|
-
|
362
|
-
# Thor::Actions#capture depends on what kind of buffer is used in ERB.
|
363
|
-
# Thus CapturableERB fixes ERB to use String buffer.
|
364
|
-
class CapturableERB < ERB
|
365
|
-
def set_eoutvar(compiler, eoutvar = "_erbout")
|
366
|
-
compiler.put_cmd = "#{eoutvar}.concat"
|
367
|
-
compiler.insert_cmd = "#{eoutvar}.concat"
|
368
|
-
compiler.pre_cmd = ["#{eoutvar} = ''.dup"]
|
369
|
-
compiler.post_cmd = [eoutvar]
|
370
|
-
end
|
371
|
-
end
|
372
|
-
end
|
373
|
-
end
|