bibtex_to_scrapbox 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 +19 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE +22 -0
- data/README.md +43 -0
- data/Rakefile +6 -0
- data/bibtex_to_scrapbox.gemspec +29 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/bibtex_to_scrapbox +7 -0
- data/gems/bin/htmldiff +29 -0
- data/gems/bin/ldiff +29 -0
- data/gems/bin/rake +27 -0
- data/gems/bin/rspec +27 -0
- data/gems/bin/thor +27 -0
- data/gems/extensions/x86_64-darwin-16/2.4.0-static/unicode-0.4.4.4/gem.build_complete +0 -0
- data/gems/extensions/x86_64-darwin-16/2.4.0-static/unicode-0.4.4.4/gem_make.out +288 -0
- data/gems/extensions/x86_64-darwin-16/2.4.0-static/unicode-0.4.4.4/unicode/unicode_native.bundle +0 -0
- data/gems/gems/bibtex-ruby-4.4.4/Gemfile +66 -0
- data/gems/gems/bibtex-ruby-4.4.4/Guardfile +22 -0
- data/gems/gems/bibtex-ruby-4.4.4/History.txt +306 -0
- data/gems/gems/bibtex-ruby-4.4.4/LICENSE +621 -0
- data/gems/gems/bibtex-ruby-4.4.4/Manifest +100 -0
- data/gems/gems/bibtex-ruby-4.4.4/README.md +615 -0
- data/gems/gems/bibtex-ruby-4.4.4/Rakefile +123 -0
- data/gems/gems/bibtex-ruby-4.4.4/bibtex-ruby.gemspec +38 -0
- data/gems/gems/bibtex-ruby-4.4.4/examples/bib2html.rb +42 -0
- data/gems/gems/bibtex-ruby-4.4.4/examples/bib2yaml.rb +12 -0
- data/gems/gems/bibtex-ruby-4.4.4/examples/markdown.bib +39 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/bibtex.feature +96 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/entries.feature +67 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/braced_strings.feature +48 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/crossref.feature +62 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/latex_filter.feature +171 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/multiline_strings.feature +14 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/name_parsing.feature +19 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/non_ascii_default_keys.feature +20 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/non_ascii_keys.feature +17 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/number_keys.feature +45 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/parse_months.feature +43 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/slash_keys.feature +21 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/trailing_comma.feature +21 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/issues/whitespace_keys.feature +23 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/names.feature +86 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/preambles.feature +27 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/query.feature +102 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/replacement.feature +68 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/step_definitions/bibtex_steps.rb +119 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/step_definitions/name_steps.rb +18 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/strings.feature +53 -0
- data/gems/gems/bibtex-ruby-4.4.4/features/support/env.rb +21 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex.rb +83 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/bibliography.rb +594 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/bibliography/rdf_converter.rb +27 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/bibtex.y +141 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/compatibility.rb +25 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/elements.rb +376 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry.rb +690 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry/bibtexml_converter.rb +44 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry/citeproc_converter.rb +164 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/entry/rdf_converter.rb +588 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/error.rb +49 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/extensions.rb +25 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/filters.rb +55 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/filters/latex.rb +13 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/filters/linebreaks.rb +11 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/lexer.rb +358 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/name_parser.rb +563 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/names.rb +315 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/names.y +267 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/parser.rb +474 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/replaceable.rb +52 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/ruby.rb +1 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/utilities.rb +59 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb +305 -0
- data/gems/gems/bibtex-ruby-4.4.4/lib/bibtex/version.rb +28 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/benchmark.rb +84 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/entry/test_rdf_converter.rb +341 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_bibliography.rb +446 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_elements.rb +64 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_entry.rb +698 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_filters.rb +36 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_lexer.rb +42 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_name_parser.rb +29 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_names.rb +168 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_parser.rb +210 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_string.rb +83 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_utilities.rb +34 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/bibtex/test_value.rb +189 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/bibdesk.bib +50 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/comment.bib +15 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/decoret.bib +83 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/empty.bib +0 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/entry.bib +24 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/errors.bib +67 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/no_bibtex.bib +9 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/preamble.bib +12 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/fixtures/roundtrip.bib +11 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/helper.rb +43 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/macruby.d +21 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/macruby.rb +22 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/profile.rb +28 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/test_bibtex.rb +127 -0
- data/gems/gems/bibtex-ruby-4.4.4/test/test_export.rb +33 -0
- data/gems/gems/diff-lcs-1.3/.rspec +1 -0
- data/gems/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
- data/gems/gems/diff-lcs-1.3/Contributing.md +83 -0
- data/gems/gems/diff-lcs-1.3/History.md +220 -0
- data/gems/gems/diff-lcs-1.3/License.md +39 -0
- data/gems/gems/diff-lcs-1.3/Manifest.txt +37 -0
- data/gems/gems/diff-lcs-1.3/README.rdoc +84 -0
- data/gems/gems/diff-lcs-1.3/Rakefile +57 -0
- data/gems/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
- data/gems/gems/diff-lcs-1.3/bin/htmldiff +32 -0
- data/gems/gems/diff-lcs-1.3/bin/ldiff +6 -0
- data/gems/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
- data/gems/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
- data/gems/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
- data/gems/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
- data/gems/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
- data/gems/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
- data/gems/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
- data/gems/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
- data/gems/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
- data/gems/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
- data/gems/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
- data/gems/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
- data/gems/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
- data/gems/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
- data/gems/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
- data/gems/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
- data/gems/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
- data/gems/gems/latex-decode-0.2.2/.gitignore +6 -0
- data/gems/gems/latex-decode-0.2.2/.travis.yml +18 -0
- data/gems/gems/latex-decode-0.2.2/Gemfile +21 -0
- data/gems/gems/latex-decode-0.2.2/LICENSE +621 -0
- data/gems/gems/latex-decode-0.2.2/README.md +65 -0
- data/gems/gems/latex-decode-0.2.2/Rakefile +41 -0
- data/gems/gems/latex-decode-0.2.2/cucumber.yml +1 -0
- data/gems/gems/latex-decode-0.2.2/features/brackets.feature +11 -0
- data/gems/gems/latex-decode-0.2.2/features/diacritics.feature +40 -0
- data/gems/gems/latex-decode-0.2.2/features/greek.feature +13 -0
- data/gems/gems/latex-decode-0.2.2/features/maths.feature +9 -0
- data/gems/gems/latex-decode-0.2.2/features/non-latex.feature +15 -0
- data/gems/gems/latex-decode-0.2.2/features/punctuation.feature +50 -0
- data/gems/gems/latex-decode-0.2.2/features/special_characters.feature +21 -0
- data/gems/gems/latex-decode-0.2.2/features/step_definitions/latex.rb +7 -0
- data/gems/gems/latex-decode-0.2.2/features/support/env.rb +14 -0
- data/gems/gems/latex-decode-0.2.2/features/symbols.feature +21 -0
- data/gems/gems/latex-decode-0.2.2/features/umlauts.feature +11 -0
- data/gems/gems/latex-decode-0.2.2/latex-decode.gemspec +33 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode.rb +54 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/accents.rb +36 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/base.rb +62 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/compatibility.rb +89 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/diacritics.rb +46 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/greek.rb +61 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/maths.rb +21 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/punctuation.rb +59 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/symbols.rb +225 -0
- data/gems/gems/latex-decode-0.2.2/lib/latex/decode/version.rb +5 -0
- data/gems/gems/rake-10.5.0/.autotest +7 -0
- data/gems/gems/rake-10.5.0/.rubocop.yml +27 -0
- data/gems/gems/rake-10.5.0/.togglerc +7 -0
- data/gems/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
- data/gems/gems/rake-10.5.0/History.rdoc +659 -0
- data/gems/gems/rake-10.5.0/MIT-LICENSE +21 -0
- data/gems/gems/rake-10.5.0/Manifest.txt +166 -0
- data/gems/gems/rake-10.5.0/README.rdoc +139 -0
- data/gems/gems/rake-10.5.0/Rakefile +81 -0
- data/gems/gems/rake-10.5.0/bin/rake +33 -0
- data/gems/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
- data/gems/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
- data/gems/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
- data/gems/gems/rake-10.5.0/doc/example/a.c +6 -0
- data/gems/gems/rake-10.5.0/doc/example/b.c +6 -0
- data/gems/gems/rake-10.5.0/doc/example/main.c +11 -0
- data/gems/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
- data/gems/gems/rake-10.5.0/doc/jamis.rb +591 -0
- data/gems/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
- data/gems/gems/rake-10.5.0/doc/rake.1 +141 -0
- data/gems/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
- data/gems/gems/rake-10.5.0/doc/rational.rdoc +151 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/gems/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/gems/gems/rake-10.5.0/lib/rake.rb +79 -0
- data/gems/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
- data/gems/gems/rake-10.5.0/lib/rake/application.rb +790 -0
- data/gems/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
- data/gems/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
- data/gems/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
- data/gems/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
- data/gems/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
- data/gems/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
- data/gems/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
- data/gems/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
- data/gems/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
- data/gems/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
- data/gems/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
- data/gems/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
- data/gems/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
- data/gems/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
- data/gems/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
- data/gems/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
- data/gems/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
- data/gems/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
- data/gems/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
- data/gems/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
- data/gems/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/gems/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
- data/gems/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
- data/gems/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
- data/gems/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
- data/gems/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
- data/gems/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
- data/gems/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
- data/gems/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
- data/gems/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
- data/gems/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
- data/gems/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
- data/gems/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
- data/gems/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
- data/gems/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
- data/gems/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/gems/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/gems/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
- data/gems/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
- data/gems/gems/rake-10.5.0/lib/rake/task.rb +383 -0
- data/gems/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
- data/gems/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
- data/gems/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
- data/gems/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
- data/gems/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
- data/gems/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
- data/gems/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
- data/gems/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
- data/gems/gems/rake-10.5.0/lib/rake/version.rb +7 -0
- data/gems/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
- data/gems/gems/rake-10.5.0/rakelib/publish.rake +20 -0
- data/gems/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
- data/gems/gems/rake-10.5.0/test/file_creation.rb +34 -0
- data/gems/gems/rake-10.5.0/test/helper.rb +129 -0
- data/gems/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
- data/gems/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
- data/gems/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
- data/gems/gems/rake-10.5.0/test/test_rake.rb +40 -0
- data/gems/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
- data/gems/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
- data/gems/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
- data/gems/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
- data/gems/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
- data/gems/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
- data/gems/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
- data/gems/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
- data/gems/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
- data/gems/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
- data/gems/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
- data/gems/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
- data/gems/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
- data/gems/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
- data/gems/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
- data/gems/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
- data/gems/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
- data/gems/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
- data/gems/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
- data/gems/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
- data/gems/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
- data/gems/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
- data/gems/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
- data/gems/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
- data/gems/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
- data/gems/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
- data/gems/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
- data/gems/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
- data/gems/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
- data/gems/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
- data/gems/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
- data/gems/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
- data/gems/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
- data/gems/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/gems/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
- data/gems/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
- data/gems/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
- data/gems/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
- data/gems/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
- data/gems/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
- data/gems/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
- data/gems/gems/rspec-3.6.0/LICENSE.md +27 -0
- data/gems/gems/rspec-3.6.0/README.md +39 -0
- data/gems/gems/rspec-3.6.0/lib/rspec.rb +3 -0
- data/gems/gems/rspec-3.6.0/lib/rspec/version.rb +5 -0
- data/gems/gems/rspec-core-3.6.0/.document +5 -0
- data/gems/gems/rspec-core-3.6.0/.yardopts +8 -0
- data/gems/gems/rspec-core-3.6.0/Changelog.md +2167 -0
- data/gems/gems/rspec-core-3.6.0/LICENSE.md +26 -0
- data/gems/gems/rspec-core-3.6.0/README.md +384 -0
- data/gems/gems/rspec-core-3.6.0/exe/rspec +4 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/autorun.rb +3 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core.rb +185 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/backtrace_formatter.rb +65 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/coordinator.rb +66 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/example_minimizer.rb +169 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/runner.rb +169 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/bisect/server.rb +70 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb +2177 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/configuration_options.rb +196 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/drb.rb +113 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/dsl.rb +98 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/example.rb +653 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/example_group.rb +883 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/example_status_persister.rb +235 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/filter_manager.rb +231 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/flat_map.rb +20 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters.rb +265 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/bisect_formatter.rb +69 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +144 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/console_codes.rb +68 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb +496 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/helpers.rb +110 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/html_printer.rb +414 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/html_snippet_extractor.rb +118 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/json_formatter.rb +101 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/protocol.rb +182 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/hooks.rb +624 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/invocations.rb +85 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/memoized_helpers.rb +535 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/metadata.rb +499 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/metadata_filter.rb +255 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb +514 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/option_parser.rb +309 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/ordering.rb +158 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/output_wrapper.rb +29 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/pending.rb +165 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/profiler.rb +32 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/project_initializer.rb +48 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/project_initializer/.rspec +1 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/rake_task.rb +168 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb +260 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/ruby_project.rb +53 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb +193 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/sandbox.rb +37 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/set.rb +54 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/shared_context.rb +55 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/shared_example_group.rb +271 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/shell_escape.rb +49 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/version.rb +9 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/warnings.rb +40 -0
- data/gems/gems/rspec-core-3.6.0/lib/rspec/core/world.rb +264 -0
- data/gems/gems/rspec-expectations-3.6.0/.document +5 -0
- data/gems/gems/rspec-expectations-3.6.0/.yardopts +6 -0
- data/gems/gems/rspec-expectations-3.6.0/Changelog.md +1072 -0
- data/gems/gems/rspec-expectations-3.6.0/LICENSE.md +25 -0
- data/gems/gems/rspec-expectations-3.6.0/README.md +305 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations.rb +82 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/configuration.rb +201 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/expectation_target.rb +127 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/fail_with.rb +39 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/failure_aggregator.rb +194 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/handler.rb +170 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/syntax.rb +132 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/expectations/version.rb +8 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers.rb +1025 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in.rb +52 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/all.rb +85 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be.rb +288 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/be_within.rb +72 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/change.rb +387 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/compound.rb +272 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/contain_exactly.rb +301 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/cover.rb +24 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/eq.rb +40 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/eql.rb +34 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/equal.rb +81 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/exist.rb +90 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/has.rb +103 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/include.rb +143 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/match.rb +106 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/output.rb +200 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/raise_error.rb +230 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/respond_to.rb +165 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/satisfy.rb +60 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/built_in/yield.rb +432 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/composable.rb +169 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/dsl.rb +527 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/generated_descriptions.rb +42 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/matcher_delegator.rb +35 -0
- data/gems/gems/rspec-expectations-3.6.0/lib/rspec/matchers/matcher_protocol.rb +99 -0
- data/gems/gems/rspec-mocks-3.6.0/.document +5 -0
- data/gems/gems/rspec-mocks-3.6.0/.yardopts +6 -0
- data/gems/gems/rspec-mocks-3.6.0/Changelog.md +1073 -0
- data/gems/gems/rspec-mocks-3.6.0/LICENSE.md +25 -0
- data/gems/gems/rspec-mocks-3.6.0/README.md +460 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks.rb +130 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance.rb +11 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/argument_matchers.rb +320 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/configuration.rb +212 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/error_generator.rb +369 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/example_methods.rb +434 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/marshal_extension.rb +41 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/have_received.rb +130 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/receive.rb +132 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/message_chain.rb +87 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/message_expectation.rb +740 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/method_double.rb +287 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/method_reference.rb +202 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/minitest_integration.rb +68 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/mutate_const.rb +339 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/object_reference.rb +149 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/order_group.rb +81 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/proxy.rb +484 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/space.rb +238 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/standalone.rb +3 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/syntax.rb +325 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/targets.rb +124 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/test_double.rb +171 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/verifying_double.rb +129 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
- data/gems/gems/rspec-mocks-3.6.0/lib/rspec/mocks/version.rb +9 -0
- data/gems/gems/rspec-support-3.6.0/Changelog.md +211 -0
- data/gems/gems/rspec-support-3.6.0/LICENSE.md +23 -0
- data/gems/gems/rspec-support-3.6.0/README.md +40 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support.rb +139 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/caller_filter.rb +83 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/comparable_version.rb +46 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/differ.rb +215 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/directory_maker.rb +63 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/encoded_string.rb +165 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/hunk_generator.rb +47 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/matcher_definition.rb +42 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/method_signature_verifier.rb +392 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/mutex.rb +73 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/object_formatter.rb +268 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/recursive_const_methods.rb +76 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/reentrant_mutex.rb +53 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/ruby_features.rb +162 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source.rb +75 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source/location.rb +21 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source/node.rb +107 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/source/token.rb +87 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec.rb +81 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/formatting_support.rb +9 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/shell_out.rb +84 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/string_matcher.rb +46 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/version.rb +7 -0
- data/gems/gems/rspec-support-3.6.0/lib/rspec/support/warnings.rb +39 -0
- data/gems/gems/thor-0.19.4/.document +5 -0
- data/gems/gems/thor-0.19.4/CHANGELOG.md +163 -0
- data/gems/gems/thor-0.19.4/CONTRIBUTING.md +15 -0
- data/gems/gems/thor-0.19.4/LICENSE.md +20 -0
- data/gems/gems/thor-0.19.4/README.md +47 -0
- data/gems/gems/thor-0.19.4/bin/thor +6 -0
- data/gems/gems/thor-0.19.4/lib/thor.rb +492 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions.rb +318 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions/create_file.rb +103 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions/create_link.rb +59 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions/directory.rb +118 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb +135 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb +327 -0
- data/gems/gems/thor-0.19.4/lib/thor/actions/inject_into_file.rb +103 -0
- data/gems/gems/thor-0.19.4/lib/thor/base.rb +656 -0
- data/gems/gems/thor-0.19.4/lib/thor/command.rb +133 -0
- data/gems/gems/thor-0.19.4/lib/thor/core_ext/hash_with_indifferent_access.rb +85 -0
- data/gems/gems/thor-0.19.4/lib/thor/core_ext/io_binary_read.rb +12 -0
- data/gems/gems/thor-0.19.4/lib/thor/core_ext/ordered_hash.rb +129 -0
- data/gems/gems/thor-0.19.4/lib/thor/error.rb +32 -0
- data/gems/gems/thor-0.19.4/lib/thor/group.rb +281 -0
- data/gems/gems/thor-0.19.4/lib/thor/invocation.rb +177 -0
- data/gems/gems/thor-0.19.4/lib/thor/line_editor.rb +17 -0
- data/gems/gems/thor-0.19.4/lib/thor/line_editor/basic.rb +35 -0
- data/gems/gems/thor-0.19.4/lib/thor/line_editor/readline.rb +88 -0
- data/gems/gems/thor-0.19.4/lib/thor/parser.rb +4 -0
- data/gems/gems/thor-0.19.4/lib/thor/parser/argument.rb +70 -0
- data/gems/gems/thor-0.19.4/lib/thor/parser/arguments.rb +175 -0
- data/gems/gems/thor-0.19.4/lib/thor/parser/option.rb +146 -0
- data/gems/gems/thor-0.19.4/lib/thor/parser/options.rb +220 -0
- data/gems/gems/thor-0.19.4/lib/thor/rake_compat.rb +71 -0
- data/gems/gems/thor-0.19.4/lib/thor/runner.rb +322 -0
- data/gems/gems/thor-0.19.4/lib/thor/shell.rb +81 -0
- data/gems/gems/thor-0.19.4/lib/thor/shell/basic.rb +436 -0
- data/gems/gems/thor-0.19.4/lib/thor/shell/color.rb +149 -0
- data/gems/gems/thor-0.19.4/lib/thor/shell/html.rb +126 -0
- data/gems/gems/thor-0.19.4/lib/thor/util.rb +268 -0
- data/gems/gems/thor-0.19.4/lib/thor/version.rb +3 -0
- data/gems/gems/thor-0.19.4/thor.gemspec +21 -0
- data/gems/gems/unicode-0.4.4.4/README +156 -0
- data/gems/gems/unicode-0.4.4.4/Rakefile +103 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/.sitearchdir.-.unicode.time +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/Makefile +264 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/extconf.rb +3 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unicode.c +1325 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unicode.o +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unicode_native.bundle +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/unidata.map +24555 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/ustring.c +208 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/ustring.h +48 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/ustring.o +0 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/wstring.c +257 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/wstring.h +43 -0
- data/gems/gems/unicode-0.4.4.4/ext/unicode/wstring.o +0 -0
- data/gems/gems/unicode-0.4.4.4/lib/unicode.rb +6 -0
- data/gems/gems/unicode-0.4.4.4/lib/unicode/unicode_native.bundle +0 -0
- data/gems/gems/unicode-0.4.4.4/test/test.rb +69 -0
- data/gems/gems/unicode-0.4.4.4/tools/README +7 -0
- data/gems/gems/unicode-0.4.4.4/tools/mkunidata.rb +293 -0
- data/gems/gems/unicode-0.4.4.4/tools/normtest.rb +111 -0
- data/gems/gems/unicode-0.4.4.4/unicode.gemspec +30 -0
- data/gems/specifications/bibtex-ruby-4.4.4.gemspec +32 -0
- data/gems/specifications/diff-lcs-1.3.gemspec +61 -0
- data/gems/specifications/latex-decode-0.2.2.gemspec +35 -0
- data/gems/specifications/rake-10.5.0.gemspec +43 -0
- data/gems/specifications/rspec-3.6.0.gemspec +42 -0
- data/gems/specifications/rspec-core-3.6.0.gemspec +62 -0
- data/gems/specifications/rspec-expectations-3.6.0.gemspec +50 -0
- data/gems/specifications/rspec-mocks-3.6.0.gemspec +50 -0
- data/gems/specifications/rspec-support-3.6.0.gemspec +41 -0
- data/gems/specifications/thor-0.19.4.gemspec +35 -0
- data/gems/specifications/unicode-0.4.4.4.gemspec +25 -0
- data/lib/bibtex_to_scrapbox.rb +67 -0
- data/lib/bibtex_to_scrapbox/version.rb +3 -0
- data/lib/cli.rb +23 -0
- metadata +740 -0
@@ -0,0 +1,118 @@
|
|
1
|
+
require "thor/actions/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(base.find_in_source_paths(source.to_s))
|
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
|
+
if RUBY_VERSION < "2.0"
|
100
|
+
def file_level_lookup(previous_lookup)
|
101
|
+
File.join(previous_lookup, "{*,.[a-z]*}")
|
102
|
+
end
|
103
|
+
|
104
|
+
def files(lookup)
|
105
|
+
Dir[lookup]
|
106
|
+
end
|
107
|
+
else
|
108
|
+
def file_level_lookup(previous_lookup)
|
109
|
+
File.join(previous_lookup, "*")
|
110
|
+
end
|
111
|
+
|
112
|
+
def files(lookup)
|
113
|
+
Dir.glob(lookup, File::FNM_DOTMATCH)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,135 @@
|
|
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
|
+
::FileUtils.mkdir_p(destination)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def revoke!
|
56
|
+
say_status :remove, :red
|
57
|
+
::FileUtils.rm_rf(destination) if !pretend? && exists?
|
58
|
+
given_destination
|
59
|
+
end
|
60
|
+
|
61
|
+
protected
|
62
|
+
|
63
|
+
# Shortcut for pretend.
|
64
|
+
#
|
65
|
+
def pretend?
|
66
|
+
base.options[:pretend]
|
67
|
+
end
|
68
|
+
|
69
|
+
# Sets the absolute destination value from a relative destination value.
|
70
|
+
# It also stores the given and relative destination. Let's suppose our
|
71
|
+
# script is being executed on "dest", it sets the destination root to
|
72
|
+
# "dest". The destination, given_destination and relative_destination
|
73
|
+
# are related in the following way:
|
74
|
+
#
|
75
|
+
# inside "bar" do
|
76
|
+
# empty_directory "baz"
|
77
|
+
# end
|
78
|
+
#
|
79
|
+
# destination #=> dest/bar/baz
|
80
|
+
# relative_destination #=> bar/baz
|
81
|
+
# given_destination #=> baz
|
82
|
+
#
|
83
|
+
def destination=(destination)
|
84
|
+
return unless destination
|
85
|
+
@given_destination = convert_encoded_instructions(destination.to_s)
|
86
|
+
@destination = ::File.expand_path(@given_destination, base.destination_root)
|
87
|
+
@relative_destination = base.relative_to_original_destination_root(@destination)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Filenames in the encoded form are converted. If you have a file:
|
91
|
+
#
|
92
|
+
# %file_name%.rb
|
93
|
+
#
|
94
|
+
# It calls #file_name from the base and replaces %-string with the
|
95
|
+
# return value (should be String) of #file_name:
|
96
|
+
#
|
97
|
+
# user.rb
|
98
|
+
#
|
99
|
+
# The method referenced can be either public or private.
|
100
|
+
#
|
101
|
+
def convert_encoded_instructions(filename)
|
102
|
+
filename.gsub(/%(.*?)%/) do |initial_string|
|
103
|
+
method = $1.strip
|
104
|
+
base.respond_to?(method, true) ? base.send(method) : initial_string
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Receives a hash of options and just execute the block if some
|
109
|
+
# conditions are met.
|
110
|
+
#
|
111
|
+
def invoke_with_conflict_check(&block)
|
112
|
+
if exists?
|
113
|
+
on_conflict_behavior(&block)
|
114
|
+
else
|
115
|
+
say_status :create, :green
|
116
|
+
yield unless pretend?
|
117
|
+
end
|
118
|
+
|
119
|
+
destination
|
120
|
+
end
|
121
|
+
|
122
|
+
# What to do when the destination file already exists.
|
123
|
+
#
|
124
|
+
def on_conflict_behavior
|
125
|
+
say_status :exist, :blue
|
126
|
+
end
|
127
|
+
|
128
|
+
# Shortcut to say_status shell method.
|
129
|
+
#
|
130
|
+
def say_status(status, color)
|
131
|
+
base.shell.say_status status, relative_destination, color if config[:verbose]
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,327 @@
|
|
1
|
+
require "erb"
|
2
|
+
require "open-uri"
|
3
|
+
|
4
|
+
class Thor
|
5
|
+
module Actions
|
6
|
+
# Copies the file from the relative source to the relative destination. If
|
7
|
+
# the destination is not given it's assumed to be equal to the source.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# source<String>:: the relative path to the source root.
|
11
|
+
# destination<String>:: the relative path to the destination root.
|
12
|
+
# config<Hash>:: give :verbose => false to not log the status, and
|
13
|
+
# :mode => :preserve, to preserve the file mode from the source.
|
14
|
+
|
15
|
+
#
|
16
|
+
# ==== Examples
|
17
|
+
#
|
18
|
+
# copy_file "README", "doc/README"
|
19
|
+
#
|
20
|
+
# copy_file "doc/README"
|
21
|
+
#
|
22
|
+
def copy_file(source, *args, &block)
|
23
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
24
|
+
destination = args.first || source
|
25
|
+
source = File.expand_path(find_in_source_paths(source.to_s))
|
26
|
+
|
27
|
+
create_file destination, nil, config do
|
28
|
+
content = File.binread(source)
|
29
|
+
content = yield(content) if block
|
30
|
+
content
|
31
|
+
end
|
32
|
+
if config[:mode] == :preserve
|
33
|
+
mode = File.stat(source).mode
|
34
|
+
chmod(destination, mode, config)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Links the file from the relative source to the relative destination. If
|
39
|
+
# the destination is not given it's assumed to be equal to the source.
|
40
|
+
#
|
41
|
+
# ==== Parameters
|
42
|
+
# source<String>:: the relative path to the source root.
|
43
|
+
# destination<String>:: the relative path to the destination root.
|
44
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
45
|
+
#
|
46
|
+
# ==== Examples
|
47
|
+
#
|
48
|
+
# link_file "README", "doc/README"
|
49
|
+
#
|
50
|
+
# link_file "doc/README"
|
51
|
+
#
|
52
|
+
def link_file(source, *args)
|
53
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
54
|
+
destination = args.first || source
|
55
|
+
source = File.expand_path(find_in_source_paths(source.to_s))
|
56
|
+
|
57
|
+
create_link destination, source, config
|
58
|
+
end
|
59
|
+
|
60
|
+
# Gets the content at the given address and places it at the given relative
|
61
|
+
# destination. If a block is given instead of destination, the content of
|
62
|
+
# the url is yielded and used as location.
|
63
|
+
#
|
64
|
+
# ==== Parameters
|
65
|
+
# source<String>:: the address of the given content.
|
66
|
+
# destination<String>:: the relative path to the destination root.
|
67
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
68
|
+
#
|
69
|
+
# ==== Examples
|
70
|
+
#
|
71
|
+
# get "http://gist.github.com/103208", "doc/README"
|
72
|
+
#
|
73
|
+
# get "http://gist.github.com/103208" do |content|
|
74
|
+
# content.split("\n").first
|
75
|
+
# end
|
76
|
+
#
|
77
|
+
def get(source, *args, &block)
|
78
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
79
|
+
destination = args.first
|
80
|
+
|
81
|
+
source = File.expand_path(find_in_source_paths(source.to_s)) unless source =~ %r{^https?\://}
|
82
|
+
render = open(source) { |input| input.binmode.read }
|
83
|
+
|
84
|
+
destination ||= if block_given?
|
85
|
+
block.arity == 1 ? yield(render) : yield
|
86
|
+
else
|
87
|
+
File.basename(source)
|
88
|
+
end
|
89
|
+
|
90
|
+
create_file destination, render, config
|
91
|
+
end
|
92
|
+
|
93
|
+
# Gets an ERB template at the relative source, executes it and makes a copy
|
94
|
+
# at the relative destination. If the destination is not given it's assumed
|
95
|
+
# to be equal to the source removing .tt from the filename.
|
96
|
+
#
|
97
|
+
# ==== Parameters
|
98
|
+
# source<String>:: the relative path to the source root.
|
99
|
+
# destination<String>:: the relative path to the destination root.
|
100
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
101
|
+
#
|
102
|
+
# ==== Examples
|
103
|
+
#
|
104
|
+
# template "README", "doc/README"
|
105
|
+
#
|
106
|
+
# template "doc/README"
|
107
|
+
#
|
108
|
+
def template(source, *args, &block)
|
109
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
110
|
+
destination = args.first || source.sub(/#{TEMPLATE_EXTNAME}$/, "")
|
111
|
+
|
112
|
+
source = File.expand_path(find_in_source_paths(source.to_s))
|
113
|
+
context = config.delete(:context) || instance_eval("binding")
|
114
|
+
|
115
|
+
create_file destination, nil, config do
|
116
|
+
content = CapturableERB.new(::File.binread(source), nil, "-", "@output_buffer").result(context)
|
117
|
+
content = yield(content) if block
|
118
|
+
content
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Changes the mode of the given file or directory.
|
123
|
+
#
|
124
|
+
# ==== Parameters
|
125
|
+
# mode<Integer>:: the file mode
|
126
|
+
# path<String>:: the name of the file to change mode
|
127
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
128
|
+
#
|
129
|
+
# ==== Example
|
130
|
+
#
|
131
|
+
# chmod "script/server", 0755
|
132
|
+
#
|
133
|
+
def chmod(path, mode, config = {})
|
134
|
+
return unless behavior == :invoke
|
135
|
+
path = File.expand_path(path, destination_root)
|
136
|
+
say_status :chmod, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
137
|
+
FileUtils.chmod_R(mode, path) unless options[:pretend]
|
138
|
+
end
|
139
|
+
|
140
|
+
# Prepend text to a file. Since it depends on insert_into_file, it's reversible.
|
141
|
+
#
|
142
|
+
# ==== Parameters
|
143
|
+
# path<String>:: path of the file to be changed
|
144
|
+
# data<String>:: the data to prepend to the file, can be also given as a block.
|
145
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
146
|
+
#
|
147
|
+
# ==== Example
|
148
|
+
#
|
149
|
+
# prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
|
150
|
+
#
|
151
|
+
# prepend_to_file 'config/environments/test.rb' do
|
152
|
+
# 'config.gem "rspec"'
|
153
|
+
# end
|
154
|
+
#
|
155
|
+
def prepend_to_file(path, *args, &block)
|
156
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
157
|
+
config[:after] = /\A/
|
158
|
+
insert_into_file(path, *(args << config), &block)
|
159
|
+
end
|
160
|
+
alias_method :prepend_file, :prepend_to_file
|
161
|
+
|
162
|
+
# Append text to a file. Since it depends on insert_into_file, it's reversible.
|
163
|
+
#
|
164
|
+
# ==== Parameters
|
165
|
+
# path<String>:: path of the file to be changed
|
166
|
+
# data<String>:: the data to append to the file, can be also given as a block.
|
167
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
168
|
+
#
|
169
|
+
# ==== Example
|
170
|
+
#
|
171
|
+
# append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
|
172
|
+
#
|
173
|
+
# append_to_file 'config/environments/test.rb' do
|
174
|
+
# 'config.gem "rspec"'
|
175
|
+
# end
|
176
|
+
#
|
177
|
+
def append_to_file(path, *args, &block)
|
178
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
179
|
+
config[:before] = /\z/
|
180
|
+
insert_into_file(path, *(args << config), &block)
|
181
|
+
end
|
182
|
+
alias_method :append_file, :append_to_file
|
183
|
+
|
184
|
+
# Injects text right after the class definition. Since it depends on
|
185
|
+
# insert_into_file, it's reversible.
|
186
|
+
#
|
187
|
+
# ==== Parameters
|
188
|
+
# path<String>:: path of the file to be changed
|
189
|
+
# klass<String|Class>:: the class to be manipulated
|
190
|
+
# data<String>:: the data to append to the class, can be also given as a block.
|
191
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
192
|
+
#
|
193
|
+
# ==== Examples
|
194
|
+
#
|
195
|
+
# inject_into_class "app/controllers/application_controller.rb", ApplicationController, " filter_parameter :password\n"
|
196
|
+
#
|
197
|
+
# inject_into_class "app/controllers/application_controller.rb", ApplicationController do
|
198
|
+
# " filter_parameter :password\n"
|
199
|
+
# end
|
200
|
+
#
|
201
|
+
def inject_into_class(path, klass, *args, &block)
|
202
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
203
|
+
config[:after] = /class #{klass}\n|class #{klass} .*\n/
|
204
|
+
insert_into_file(path, *(args << config), &block)
|
205
|
+
end
|
206
|
+
|
207
|
+
# Run a regular expression replacement on a file.
|
208
|
+
#
|
209
|
+
# ==== Parameters
|
210
|
+
# path<String>:: path of the file to be changed
|
211
|
+
# flag<Regexp|String>:: the regexp or string to be replaced
|
212
|
+
# replacement<String>:: the replacement, can be also given as a block
|
213
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
214
|
+
#
|
215
|
+
# ==== Example
|
216
|
+
#
|
217
|
+
# gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1'
|
218
|
+
#
|
219
|
+
# gsub_file 'README', /rake/, :green do |match|
|
220
|
+
# match << " no more. Use thor!"
|
221
|
+
# end
|
222
|
+
#
|
223
|
+
def gsub_file(path, flag, *args, &block)
|
224
|
+
return unless behavior == :invoke
|
225
|
+
config = args.last.is_a?(Hash) ? args.pop : {}
|
226
|
+
|
227
|
+
path = File.expand_path(path, destination_root)
|
228
|
+
say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
229
|
+
|
230
|
+
unless options[:pretend]
|
231
|
+
content = File.binread(path)
|
232
|
+
content.gsub!(flag, *args, &block)
|
233
|
+
File.open(path, "wb") { |file| file.write(content) }
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
# Uncomment all lines matching a given regex. It will leave the space
|
238
|
+
# which existed before the comment hash in tact but will remove any spacing
|
239
|
+
# between the comment hash and the beginning of the line.
|
240
|
+
#
|
241
|
+
# ==== Parameters
|
242
|
+
# path<String>:: path of the file to be changed
|
243
|
+
# flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment
|
244
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
245
|
+
#
|
246
|
+
# ==== Example
|
247
|
+
#
|
248
|
+
# uncomment_lines 'config/initializers/session_store.rb', /active_record/
|
249
|
+
#
|
250
|
+
def uncomment_lines(path, flag, *args)
|
251
|
+
flag = flag.respond_to?(:source) ? flag.source : flag
|
252
|
+
|
253
|
+
gsub_file(path, /^(\s*)#[[:blank:]]*(.*#{flag})/, '\1\2', *args)
|
254
|
+
end
|
255
|
+
|
256
|
+
# Comment all lines matching a given regex. It will leave the space
|
257
|
+
# which existed before the beginning of the line in tact and will insert
|
258
|
+
# a single space after the comment hash.
|
259
|
+
#
|
260
|
+
# ==== Parameters
|
261
|
+
# path<String>:: path of the file to be changed
|
262
|
+
# flag<Regexp|String>:: the regexp or string used to decide which lines to comment
|
263
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
264
|
+
#
|
265
|
+
# ==== Example
|
266
|
+
#
|
267
|
+
# comment_lines 'config/initializers/session_store.rb', /cookie_store/
|
268
|
+
#
|
269
|
+
def comment_lines(path, flag, *args)
|
270
|
+
flag = flag.respond_to?(:source) ? flag.source : flag
|
271
|
+
|
272
|
+
gsub_file(path, /^(\s*)([^#|\n]*#{flag})/, '\1# \2', *args)
|
273
|
+
end
|
274
|
+
|
275
|
+
# Removes a file at the given location.
|
276
|
+
#
|
277
|
+
# ==== Parameters
|
278
|
+
# path<String>:: path of the file to be changed
|
279
|
+
# config<Hash>:: give :verbose => false to not log the status.
|
280
|
+
#
|
281
|
+
# ==== Example
|
282
|
+
#
|
283
|
+
# remove_file 'README'
|
284
|
+
# remove_file 'app/controllers/application_controller.rb'
|
285
|
+
#
|
286
|
+
def remove_file(path, config = {})
|
287
|
+
return unless behavior == :invoke
|
288
|
+
path = File.expand_path(path, destination_root)
|
289
|
+
|
290
|
+
say_status :remove, relative_to_original_destination_root(path), config.fetch(:verbose, true)
|
291
|
+
::FileUtils.rm_rf(path) if !options[:pretend] && File.exist?(path)
|
292
|
+
end
|
293
|
+
alias_method :remove_dir, :remove_file
|
294
|
+
|
295
|
+
attr_accessor :output_buffer
|
296
|
+
private :output_buffer, :output_buffer=
|
297
|
+
|
298
|
+
private
|
299
|
+
|
300
|
+
def concat(string)
|
301
|
+
@output_buffer.concat(string)
|
302
|
+
end
|
303
|
+
|
304
|
+
def capture(*args)
|
305
|
+
with_output_buffer { yield(*args) }
|
306
|
+
end
|
307
|
+
|
308
|
+
def with_output_buffer(buf = "") #:nodoc:
|
309
|
+
self.output_buffer, old_buffer = buf, output_buffer
|
310
|
+
yield
|
311
|
+
output_buffer
|
312
|
+
ensure
|
313
|
+
self.output_buffer = old_buffer
|
314
|
+
end
|
315
|
+
|
316
|
+
# Thor::Actions#capture depends on what kind of buffer is used in ERB.
|
317
|
+
# Thus CapturableERB fixes ERB to use String buffer.
|
318
|
+
class CapturableERB < ERB
|
319
|
+
def set_eoutvar(compiler, eoutvar = "_erbout")
|
320
|
+
compiler.put_cmd = "#{eoutvar}.concat"
|
321
|
+
compiler.insert_cmd = "#{eoutvar}.concat"
|
322
|
+
compiler.pre_cmd = ["#{eoutvar} = ''"]
|
323
|
+
compiler.post_cmd = [eoutvar]
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
327
|
+
end
|