rubyjobbuilderdsl 0.0.0 → 0.0.1
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 +4 -4
- data/Gemfile.lock +8 -0
- data/lib/rubyjobbuilderdsl/buildstep/xvfb.rb +46 -0
- data/lib/rubyjobbuilderdsl/freestyle.rb +8 -0
- data/lib/rubyjobbuilderdsl/xml_generator.rb +14 -0
- data/rubyjobbuilderdsl-0.0.0.gem +0 -0
- data/rubyjobbuilderdsl.gemspec +2 -2
- data/sample/local.ini +3 -3
- data/test/test_xvfb.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/bin/nokogiri +23 -0
- data/vendor/bundle/ruby/2.1.0/bin/nokogiri.bat +6 -0
- data/vendor/bundle/ruby/2.1.0/bin/rake +23 -0
- data/vendor/bundle/ruby/2.1.0/bin/rake.bat +6 -0
- data/vendor/bundle/ruby/2.1.0/bin/rubocop +23 -0
- data/vendor/bundle/ruby/2.1.0/bin/rubocop.bat +6 -0
- data/vendor/bundle/ruby/2.1.0/bin/ruby-parse +23 -0
- data/vendor/bundle/ruby/2.1.0/bin/ruby-parse.bat +6 -0
- data/vendor/bundle/ruby/2.1.0/bin/ruby-rewrite +23 -0
- data/vendor/bundle/ruby/2.1.0/bin/ruby-rewrite.bat +6 -0
- data/vendor/bundle/ruby/2.1.0/cache/ast-2.0.0.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/astrolabe-1.3.0.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/builder-3.2.2.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/mini_portile-0.6.0.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/nokogiri-1.6.3.1-x64-mingw32.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/parser-2.2.0.pre.4.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/powerpack-0.0.9.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/rainbow-2.0.0.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/rake-0.9.6.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/rubocop-0.26.0.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/ruby-progressbar-1.5.1.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/cache/slop-3.6.0.gem +0 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/CHANGELOG.md +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/Gemfile +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/LICENSE.MIT +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/README.YARD.md +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/README.md +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/Rakefile +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/ast.gemspec +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/lib/ast/node.rb +232 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/lib/ast/processor.rb +266 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/lib/ast/sexp.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/lib/ast.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/test/helper.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/ast-2.0.0/test/test_ast.rb +243 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/CHANGELOG.md +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/Gemfile +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/Guardfile +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/README.md +130 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/Rakefile +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/astrolabe.gemspec +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/benchmark/benchmark_helper.rb +122 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/benchmark/performance_spec.rb +346 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe/builder.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe/node.rb +270 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe/sexp.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe/version.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/lib/astrolabe.rb +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/spec/astrolabe/node_spec.rb +479 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/spec/astrolabe/sexp_spec.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/spec/spec_helper.rb +96 -0
- data/vendor/bundle/ruby/2.1.0/gems/astrolabe-1.3.0/spec/support/shared_contexts.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/CHANGES +107 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/README.md +258 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/Rakefile +195 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/doc/releases/builder-1.2.4.rdoc +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/doc/releases/builder-2.0.0.rdoc +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/doc/releases/builder-2.1.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/blankslate.rb +137 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder/blankslate.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder/version.rb +8 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder/xchar.rb +197 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder/xmlbase.rb +199 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder/xmlevents.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder/xmlmarkup.rb +339 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/lib/builder.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/rakelib/publish.rake +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/rakelib/tags.rake +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/performance.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/preload.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/test_blankslate.rb +217 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/test_eventbuilder.rb +150 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/test_markupbuilder.rb +611 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/test_method_caching.rb +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/test_namecollision.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/builder-3.2.2/test/test_xchar.rb +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/mini_portile-0.6.0/History.txt +86 -0
- data/vendor/bundle/ruby/2.1.0/gems/mini_portile-0.6.0/LICENSE.txt +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/mini_portile-0.6.0/README.rdoc +169 -0
- data/vendor/bundle/ruby/2.1.0/gems/mini_portile-0.6.0/Rakefile +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/mini_portile-0.6.0/examples/Rakefile +113 -0
- data/vendor/bundle/ruby/2.1.0/gems/mini_portile-0.6.0/lib/mini_portile.rb +437 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/CHANGELOG.ja.rdoc +913 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/CHANGELOG.rdoc +922 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/C_CODING_STYLE.rdoc +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/Gemfile +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/Manifest.txt +377 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/README.ja.rdoc +111 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/README.rdoc +180 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ROADMAP.md +89 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/Rakefile +356 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/STANDARD_RESPONSES.md +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/Y_U_NO_GEMSPEC.md +155 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/bin/nokogiri +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/build_all +129 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/dependencies.yml +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/depend +358 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/extconf.rb +548 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_document.c +170 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_document.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_element_description.c +279 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_element_description.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_entity_lookup.c +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_entity_lookup.h +8 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_sax_parser_context.c +116 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_sax_parser_context.h +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_sax_push_parser.c +87 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/html_sax_push_parser.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/nokogiri.c +148 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/nokogiri.h +164 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_attr.c +94 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_attr.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_attribute_decl.c +70 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_attribute_decl.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_cdata.c +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_cdata.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_comment.c +54 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_comment.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_document.c +600 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_document.h +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_document_fragment.c +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_document_fragment.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_dtd.c +202 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_dtd.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_element_content.c +123 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_element_content.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_element_decl.c +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_element_decl.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_encoding_handler.c +79 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_encoding_handler.h +8 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_entity_decl.c +110 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_entity_decl.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_entity_reference.c +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_entity_reference.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_io.c +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_io.h +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_libxml2_hacks.c +112 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_libxml2_hacks.h +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_namespace.c +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_namespace.h +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_node.c +1603 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_node.h +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_node_set.c +467 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_node_set.h +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_processing_instruction.c +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_processing_instruction.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_reader.c +681 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_reader.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_relax_ng.c +161 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_relax_ng.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_sax_parser.c +312 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_sax_parser.h +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_sax_parser_context.c +262 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_sax_parser_context.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_sax_push_parser.c +115 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_sax_push_parser.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_schema.c +205 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_schema.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_syntax_error.c +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_syntax_error.h +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_text.c +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_text.h +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_xpath_context.c +307 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xml_xpath_context.h +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xslt_stylesheet.c +270 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/ext/nokogiri/xslt_stylesheet.h +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/2.0/nokogiri.so +0 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/2.1/nokogiri.so +0 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/node.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/parser.rb +715 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/parser.y +249 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/parser_extras.rb +91 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/syntax_error.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/tokenizer.rb +152 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/tokenizer.rex +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css/xpath_visitor.rb +219 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/css.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/decorators/slop.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/builder.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/document.rb +333 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/document_fragment.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/element_description.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/element_description_defaults.rb +671 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/entity_lookup.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/sax/parser.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/sax/parser_context.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html/sax/push_parser.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/html.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/syntax_error.rb +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/version.rb +106 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/attr.rb +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/attribute_decl.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/builder.rb +443 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/cdata.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/character_data.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/document.rb +279 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/document_fragment.rb +112 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/dtd.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/element_content.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/element_decl.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/entity_decl.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/namespace.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/node/save_options.rb +61 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/node.rb +992 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/node_set.rb +355 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/notation.rb +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/parse_options.rb +98 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/pp/character_data.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/pp/node.rb +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/pp.rb +2 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/processing_instruction.rb +8 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/reader.rb +112 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/relax_ng.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/sax/document.rb +171 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/sax/parser.rb +123 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/sax/parser_context.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/sax/push_parser.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/sax.rb +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/schema.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/syntax_error.rb +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/text.rb +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/xpath.rb +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml/xpath_context.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xml.rb +73 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xslt/stylesheet.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri/xslt.rb +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/nokogiri.rb +137 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/lib/xsd/xmlparser/nokogiri.rb +102 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/suppressions/README.txt +1 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/suppressions/nokogiri_ree-1.8.7.358.supp +61 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/suppressions/nokogiri_ruby-1.8.7.370.supp +0 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/suppressions/nokogiri_ruby-1.9.2.320.supp +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/suppressions/nokogiri_ruby-1.9.3.327.supp +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/tasks/nokogiri.org.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/tasks/test.rb +95 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/css/test_nthiness.rb +222 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/css/test_parser.rb +358 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/css/test_tokenizer.rb +198 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/css/test_xpath_visitor.rb +96 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/decorators/test_slop.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/2ch.html +108 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/address_book.rlx +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/address_book.xml +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/atom.xml +344 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/bar/bar.xsd +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/bogus.xml +0 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/dont_hurt_em_why.xml +422 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/encoding.html +82 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/encoding.xhtml +84 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/exslt.xml +8 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/exslt.xslt +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/foo/foo.xsd +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/metacharset.html +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/noencoding.html +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/po.xml +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/po.xsd +66 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/saml/saml20assertion_schema.xsd +283 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/saml/saml20protocol_schema.xsd +302 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/saml/xenc_schema.xsd +146 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/saml/xmldsig_schema.xsd +318 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/shift_jis.html +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/shift_jis.xml +5 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/shift_jis_no_charset.html +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/slow-xpath.xml +25509 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/snuggles.xml +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/staff.dtd +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/staff.xml +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/staff.xslt +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/test_document_url/bar.xml +2 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/test_document_url/document.dtd +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/test_document_url/document.xml +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/tlm.html +850 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/to_be_xincluded.xml +2 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/valid_bar.xml +2 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/files/xinclude.xml +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/helper.rb +164 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/sax/test_parser.rb +141 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/sax/test_parser_context.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_builder.rb +164 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_document.rb +619 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_document_encoding.rb +148 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_document_fragment.rb +267 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_element_description.rb +105 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_named_characters.rb +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_node.rb +196 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/html/test_node_encoding.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_additional_namespaces_in_builder_doc.rb +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_namespaces_aliased_default.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_namespaces_in_builder_doc.rb +75 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_namespaces_in_cloned_doc.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_namespaces_in_created_doc.rb +75 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_namespaces_in_parsed_doc.rb +66 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/namespaces/test_namespaces_preservation.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_convert_xpath.rb +135 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_css_cache.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_encoding_handler.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_memory_leak.rb +156 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_nokogiri.rb +138 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_reader.rb +558 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_soap4r_sax.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/test_xslt_transforms.rb +279 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/node/test_save_options.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/node/test_subclass.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/sax/test_parser.rb +382 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/sax/test_parser_context.rb +115 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/sax/test_push_parser.rb +157 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_attr.rb +64 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_attribute_decl.rb +86 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_builder.rb +315 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_c14n.rb +161 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_cdata.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_comment.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_document.rb +940 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_document_encoding.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_document_fragment.rb +228 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_dtd.rb +187 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_dtd_encoding.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_element_content.rb +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_element_decl.rb +73 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_entity_decl.rb +122 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_entity_reference.rb +245 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_namespace.rb +95 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_node.rb +1197 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_node_attributes.rb +113 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_node_encoding.rb +107 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_node_inheritance.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_node_reparenting.rb +374 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_node_set.rb +755 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_parse_options.rb +64 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_processing_instruction.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_reader_encoding.rb +142 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_relax_ng.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_schema.rb +129 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_syntax_error.rb +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_text.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_unparented_node.rb +427 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_xinclude.rb +83 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xml/test_xpath.rb +382 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xslt/test_custom_functions.rb +133 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test/xslt/test_exception_handling.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.3.1-x64-mingw32/test_all +81 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/CHANGELOG.md +496 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/CONTRIBUTING.md +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/Gemfile +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/LICENSE.txt +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/README.md +272 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/Rakefile +146 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/bin/ruby-parse +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/bin/ruby-rewrite +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/doc/AST_FORMAT.md +1546 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/doc/CUSTOMIZATION.md +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/doc/INTERNALS.md +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/doc/css/common.css +68 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/gauntlet_parser.rb +121 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/all.rb +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ast/node.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ast/processor.rb +190 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/base.rb +269 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/builders/default.rb +1383 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/clobbering_error.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/compatibility/ruby1_8.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/compatibility/ruby1_9.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/current.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/diagnostic/engine.rb +103 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/diagnostic.rb +104 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/lexer/explanation.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/lexer/literal.rb +235 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/lexer/stack_state.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/lexer.rb +20895 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/lexer.rl +2163 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/messages.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/meta.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/rewriter.rb +119 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby18.rb +6344 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby18.y +1917 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby19.rb +6827 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby19.y +2148 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby20.rb +7332 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby20.y +2324 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby21.rb +7385 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby21.y +2319 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby22.rb +7393 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/ruby22.y +2327 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/runner/ruby_parse.rb +129 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/runner/ruby_rewrite.rb +98 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/runner.rb +215 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/buffer.rb +245 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/comment/associator.rb +157 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/comment.rb +106 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/collection.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/condition.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/constant.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/definition.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/for.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/heredoc.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/keyword.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/operator.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/rescue_body.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/send.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/ternary.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map/variable.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/map.rb +146 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/range.rb +187 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/rewriter/action.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/source/rewriter.rb +221 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/static_environment.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/syntax_error.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser/version.rb +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/lib/parser.rb +79 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/parser.gemspec +49 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/helper.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/parse_helper.rb +241 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/racc_coverage_helper.rb +130 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_base.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_current.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_diagnostic.rb +49 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_diagnostic_engine.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_encoding.rb +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_lexer.rb +3064 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_lexer_stack_state.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_parse_helper.rb +80 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_parser.rb +4872 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_source_buffer.rb +103 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_source_comment.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_source_comment_associator.rb +107 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_source_range.rb +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_source_rewriter.rb +183 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_source_rewriter_action.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/parser-2.2.0.pre.4/test/test_static_environment.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/CHANGELOG.md +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/Gemfile +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/README.md +95 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/Rakefile +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/array/butfirst.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/array/butlast.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/array.rb +2 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/average.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/drop_last.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/drop_last_while.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/exactly.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/frequencies.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/several.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/sum.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/take_last.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable/take_last_while.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/enumerable.rb +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/hash/symbolize_keys.rb +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/hash.rb +1 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/numeric/neg.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/numeric/pos.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/numeric/scale.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/numeric.rb +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/ascii_only.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/blank.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/format.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/remove.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/squish.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/strip_indent.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string/strip_margin.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/string.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack/version.rb +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/lib/powerpack.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/powerpack.gemspec +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/array/butfirst_spec.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/array/butlast_spec.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/average_spec.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/drop_last_spec.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/drop_last_while_spec.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/exactly_spec.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/frequencies_spec.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/several_spec.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/sum_spec.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/take_last_spec.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/enumerable/take_last_while_spec.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/hash/symbolize_keys_spec.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/numeric/neg_spec.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/numeric/pos_spec.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/numeric/scale_spec.rb +139 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/ascii_only_spec.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/blank_spec.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/format_spec.rb +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/remove_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/squish_spec.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/strip_indent_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/strip_margin_spec.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/spec_helper.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/Changelog.md +67 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/Gemfile +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/Guardfile +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/LICENSE +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/README.markdown +175 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/Rakefile +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/color.rb +115 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/ext/string.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/global.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/legacy.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/null_presenter.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/presenter.rb +113 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/string_utils.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/version.rb +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/wrapper.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/rainbow.gemspec +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/integration/instance_spec.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/integration/rainbow_spec.rb +139 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/integration/string_spec.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/spec_helper.rb +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/support/presenter_shared_examples.rb +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/unit/color_spec.rb +244 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/unit/namespace_spec.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/unit/null_presenter_spec.rb +93 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/unit/presenter_spec.rb +168 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/unit/string_utils_spec.rb +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/spec/unit/wrapper_spec.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/CHANGES +526 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/README.rdoc +187 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/Rakefile +374 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/TODO +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/bin/rake +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/command_line_usage.rdoc +169 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/glossary.rdoc +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/rake.1.gz +0 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/rakefile.rdoc +557 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.4.rdoc +110 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.5.rdoc +114 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/doc/release_notes/rake-0.9.6.rdoc +127 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/install.rb +90 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/alt_system.rb +109 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/application.rb +702 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/backtrace.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/classic_namespace.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/clean.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/contrib/ftptools.rb +151 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/contrib/publisher.rb +73 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/contrib/rubyforgepublisher.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/contrib/sshpublisher.rb +50 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/contrib/sys.rb +192 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/default_loader.rb +10 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/dsl_definition.rb +182 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/early_time.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/ext/core.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/ext/module.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/ext/string.rb +168 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/ext/time.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/file_list.rb +410 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/file_task.rb +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/file_utils.rb +114 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/file_utils_ext.rb +146 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/gempackagetask.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/invocation_chain.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/loaders/makefile.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/name_space.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/packagetask.rb +185 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/pathmap.rb +1 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/pseudo_status.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/rake_module.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/rdoctask.rb +234 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/ruby182_test_unit_fix.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/runtest.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/task.rb +350 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/task_arguments.rb +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/task_manager.rb +307 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/tasklib.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/testtask.rb +198 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/thread_pool.rb +155 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/trace_output.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/version.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake/win32.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/file_creation.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/helper.rb +562 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_private_reader.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_application.rb +531 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_application_options.rb +460 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_backtrace.rb +89 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_clean.rb +14 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_definitions.rb +80 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_directory_task.rb +57 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_dsl.rb +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_extension.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_file_list.rb +628 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_file_task.rb +122 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_file_utils.rb +305 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_ftp_file.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_functional.rb +496 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_invocation_chain.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_makefile_loader.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_multi_task.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_name_space.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_path_map.rb +157 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_rake_test_loader.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_rdoc_task.rb +83 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_reduce_compat.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_require.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_rules.rb +327 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task.rb +316 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task_argument_parsing.rb +103 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task_arguments.rb +88 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task_lib.rb +9 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task_manager.rb +157 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task_manager_argument_resolution.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_task_with_arguments.rb +181 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_test_task.rb +120 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_thread_pool.rb +123 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_top_level_functions.rb +111 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_sys.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_thread_history_display.rb +91 -0
- data/vendor/bundle/ruby/2.1.0/gems/rake-0.9.6/test/test_trace_output.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/CHANGELOG.md +1095 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/CONTRIBUTING.md +68 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/Gemfile +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/LICENSE.txt +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/README.md +807 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/Rakefile +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/assets/output.html.erb +190 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/bin/rubocop +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/config/default.yml +581 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/config/disabled.yml +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/config/enabled.yml +952 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cli.rb +116 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/comment_config.rb +101 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/config.rb +160 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/config_loader.rb +152 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/config_store.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/commissioner.rb +102 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/cop.rb +218 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/corrector.rb +84 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/force.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/ignored_node.rb +38 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/ambiguous_operator.rb +50 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/assignment_in_condition.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/block_alignment.rb +176 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/condition_position.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/debugger.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/def_end_alignment.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/deprecated_class_methods.rb +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/else_layout.rb +57 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/empty_ensure.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/empty_interpolation.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/end_alignment.rb +75 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/end_in_method.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/ensure_return.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/eval.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/handle_exceptions.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/invalid_character_literal.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/literal_in_condition.rb +138 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/literal_in_interpolation.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/loop.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/require_parentheses.rb +68 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/rescue_exception.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/space_before_first_arg.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +50 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/syntax.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/unreachable_code.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/unused_block_argument.rb +80 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/unused_method_argument.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/useless_access_modifier.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/useless_assignment.rb +113 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/useless_comparison.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/useless_else_without_rescue.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/useless_setter_call.rb +157 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/lint/void.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/block_nesting.rb +54 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/class_length.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/line_length.rb +88 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/method_length.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/parameter_lists.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/metrics/perceived_complexity.rb +61 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/access_modifier_node.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/annotation_comment.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/array_syntax.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/autocorrect_alignment.rb +112 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/autocorrect_unless_changing_ast.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/check_assignment.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/code_length.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/configurable_enforced_style.rb +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/configurable_max.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/configurable_naming.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/end_keyword_alignment.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/if_node.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/method_complexity.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/negative_conditional.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/on_method.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/on_normal_if_unless.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/parser_diagnostic.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/percent_literal.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/safe_assignment.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/space_after_punctuation.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/space_before_punctuation.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/space_inside.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/statement_modifier.rb +58 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/string_help.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/surrounding_space.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/mixin/unused_argument.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/offense.rb +132 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/action_filter.rb +71 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/default_scope.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/delegate.rb +111 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/output.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/read_write_attribute.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/scope_args.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/rails/validation.rb +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/severity.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/access_modifier_indentation.rb +87 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/accessor_method_name.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/alias.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/align_array.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/align_hash.rb +265 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/align_parameters.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/and_or.rb +85 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/array_join.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/ascii_comments.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/ascii_identifiers.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/attr.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/bare_percent_literals.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/begin_block.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/block_comments.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/block_end_newline.rb +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/blocks.rb +80 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/braces_around_hash_parameters.rb +94 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/case_equality.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/case_indentation.rb +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/character_literal.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/class_and_module_camel_case.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/class_and_module_children.rb +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/class_check.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/class_methods.rb +54 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/class_vars.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/collection_methods.rb +70 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/colon_method_call.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/comment_annotation.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/comment_indentation.rb +66 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/constant_name.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/def_with_parentheses.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/deprecated_hash_methods.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/documentation.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/dot_position.rb +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/double_negation.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/each_with_object.rb +58 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/empty_line_between_defs.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/empty_lines.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/empty_lines_around_access_modifier.rb +74 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/empty_lines_around_body.rb +75 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/empty_literal.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/encoding.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/end_block.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/end_of_line.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/even_odd.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/file_name.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/flip_flop.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/for.rb +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/format_string.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/global_vars.rb +74 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/guard_clause.rb +79 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/hash_syntax.rb +89 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/if_unless_modifier.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/if_with_semicolon.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/indent_array.rb +64 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/indent_hash.rb +160 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/indentation_consistency.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/indentation_width.rb +217 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/infinite_loop.rb +57 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/inline_comment.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/lambda.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/lambda_call.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/leading_comment_space.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/line_end_concatenation.rb +89 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/method_call_parentheses.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/method_called_on_do_end_block.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/method_def_parentheses.rb +72 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/method_name.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/module_function.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/multiline_block_chain.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/multiline_block_layout.rb +73 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/multiline_if_then.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/multiline_ternary_operator.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/negated_if.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/negated_while.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/nested_ternary_operator.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/next.rb +97 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/nil_comparison.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/non_nil_check.rb +116 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/not.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/numeric_literals.rb +85 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/one_line_conditional.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/op_method.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/parentheses_around_condition.rb +72 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/percent_literal_delimiters.rb +151 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/percent_q_literals.rb +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/perl_backrefs.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/predicate_name.rb +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/proc.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/raise_args.rb +68 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/redundant_begin.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/redundant_exception.rb +32 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/redundant_return.rb +66 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/redundant_self.rb +144 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/regexp_literal.rb +81 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/rescue_modifier.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/self_assignment.rb +68 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/semicolon.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/signal_exception.rb +95 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/single_line_block_params.rb +61 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/single_line_methods.rb +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/single_space_before_first_arg.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_after_colon.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_after_comma.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_after_control_keyword.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_after_method_name.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_after_not.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_after_semicolon.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb +66 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_around_operators.rb +83 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_before_block_braces.rb +64 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_before_comma.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_before_comment.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_before_modifier_keyword.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_before_semicolon.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_inside_block_braces.rb +156 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_inside_brackets.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +109 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_inside_parens.rb +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/space_inside_range_literal.rb +58 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/special_global_vars.rb +84 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/string_literals.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/symbol_array.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/symbol_proc.rb +71 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/tab.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/trailing_blank_lines.rb +58 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/trailing_comma.rb +153 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/trailing_whitespace.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/trivial_accessors.rb +144 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/unless_else.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/unneeded_capital_w.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/unneeded_percent_q.rb +58 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/unneeded_percent_x.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/variable_interpolation.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/variable_name.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/when_then.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/while_until_do.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/while_until_modifier.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/style/word_array.rb +87 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/team.rb +123 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/util.rb +188 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force/assignment.rb +95 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force/locatable.rb +183 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force/reference.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force/scope.rb +90 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force/variable.rb +102 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force/variable_table.rb +128 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/cop/variable_force.rb +419 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/base_formatter.rb +119 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/clang_style_formatter.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/colorizable.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/disabled_config_formatter.rb +66 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/disabled_lines_formatter.rb +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/emacs_style_formatter.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/file_list_formatter.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/formatter_set.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/fuubar_style_formatter.rb +74 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/html_formatter.rb +90 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/json_formatter.rb +74 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/offense_count_formatter.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/progress_formatter.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/formatter/simple_text_formatter.rb +117 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/options.rb +203 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/path_util.rb +38 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/processed_source.rb +91 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/rake_task.rb +88 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/runner.rb +156 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/string_util.rb +153 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/target_finder.rb +98 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/token.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop/version.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/lib/rubocop.rb +284 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.19.0.md +94 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.19.1.md +16 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.20.0.md +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.20.1.md +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.21.0.md +56 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.22.0.md +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.23.0.md +79 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.24.0.md +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.24.1.md +15 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.25.0.md +91 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/relnotes/v0.26.0.md +89 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/rubocop.gemspec +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/isolated_environment_spec.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/project_spec.rb +118 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cli_spec.rb +2246 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/comment_config_spec.rb +105 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/config_loader_spec.rb +356 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/config_spec.rb +235 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/config_store_spec.rb +53 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/commissioner_spec.rb +85 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/cop_spec.rb +135 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/corrector_spec.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/force_spec.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/ambiguous_operator_spec.rb +113 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/ambiguous_regexp_literal_spec.rb +35 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/assignment_in_condition_spec.rb +107 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/block_alignment_spec.rb +534 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/condition_position_spec.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/debugger_spec.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/def_end_alignment_spec.rb +108 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/deprecated_class_methods_spec.rb +38 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/else_layout_spec.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/empty_ensure_spec.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/empty_interpolation_spec.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/end_alignment_spec.rb +91 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/end_in_method_spec.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/ensure_return_spec.rb +39 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/eval_spec.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/handle_exceptions_spec.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/invalid_character_literal_spec.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/literal_in_condition_spec.rb +154 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/literal_in_interpolation_spec.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/loop_spec.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/parentheses_as_grouped_expression_spec.rb +57 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/require_parentheses_spec.rb +82 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/rescue_exception_spec.rb +159 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/shadowing_outer_local_variable_spec.rb +237 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/space_before_first_arg_spec.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/string_conversion_in_interpolation_spec.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/syntax_spec.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/underscore_prefixed_variable_name_spec.rb +179 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/unreachable_code_spec.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/unused_block_argument_spec.rb +231 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/unused_method_argument_spec.rb +278 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/useless_access_modifier_spec.rb +192 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/useless_assignment_spec.rb +1785 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/useless_comparison_spec.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/useless_else_without_rescue_spec.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/useless_setter_call_spec.rb +199 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/lint/void_spec.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/block_nesting_spec.rb +156 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/class_length_spec.rb +131 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/cyclomatic_complexity_spec.rb +204 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/if_unless_modifier_spec.rb +146 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/line_length_spec.rb +108 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/method_length_spec.rb +147 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/parameter_lists_spec.rb +44 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/perceived_complexity_spec.rb +222 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/metrics/while_until_modifier_spec.rb +93 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/offense_spec.rb +133 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/action_filter_spec.rb +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/default_scope_spec.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/delegate_spec.rb +169 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/has_and_belongs_to_many_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/output_spec.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/read_write_attribute_spec.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/scope_args_spec.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/rails/validation_spec.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/severity_spec.rb +113 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/access_modifier_indentation_spec.rb +399 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/accessor_method_name_spec.rb +81 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/alias_spec.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/align_array_spec.rb +123 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/align_hash_spec.rb +398 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/align_parameters_spec.rb +420 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/and_or_spec.rb +250 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/array_join_spec.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/ascii_comments_spec.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/ascii_identifiers_spec.rb +36 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/attr_spec.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/bare_percent_literals_spec.rb +132 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/begin_block_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/block_comments_spec.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/block_end_newline_spec.rb +61 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/blocks_spec.rb +105 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/braces_around_hash_parameters_spec.rb +302 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/case_equality_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/case_indentation_spec.rb +292 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/character_literal_spec.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/class_and_module_camel_case_spec.rb +40 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/class_and_module_children_spec.rb +131 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/class_check_spec.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/class_methods_spec.rb +68 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/class_vars_spec.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/collection_methods_spec.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/colon_method_call_spec.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/comment_annotation_spec.rb +86 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/comment_indentation_spec.rb +174 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/constant_name_spec.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/def_with_parentheses_spec.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/deprecated_hash_methods_spec.rb +45 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/documentation_spec.rb +147 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/dot_position_spec.rb +130 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/double_negation_spec.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/each_with_object_spec.rb +73 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/empty_line_between_defs_spec.rb +135 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb +100 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/empty_lines_around_body_spec.rb +131 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/empty_lines_spec.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/empty_literal_spec.rb +100 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/encoding_spec.rb +139 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/end_block_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/end_of_line_spec.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/even_odd_spec.rb +75 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/file_name_spec.rb +84 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/flip_flop_spec.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/for_spec.rb +105 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/format_string_spec.rb +148 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/global_vars_spec.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/guard_clause_spec.rb +155 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/hash_syntax_spec.rb +137 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/if_with_semicolon_spec.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/indent_array_spec.rb +171 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/indent_hash_spec.rb +366 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/indentation_consistency_spec.rb +510 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/indentation_width_spec.rb +843 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/infinite_loop_spec.rb +48 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/inline_comment_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/lambda_call_spec.rb +65 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/lambda_spec.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/leading_comment_space_spec.rb +64 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/line_end_concatenation_spec.rb +136 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/method_call_parentheses_spec.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/method_called_on_do_end_block_spec.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/method_def_parentheses_spec.rb +108 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/method_name_spec.rb +125 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/module_function_spec.rb +24 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/multiline_block_chain_spec.rb +78 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/multiline_block_layout_spec.rb +138 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/multiline_if_then_spec.rb +116 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/multiline_ternary_operator_spec.rb +18 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/negated_if_spec.rb +102 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/negated_while_spec.rb +62 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/nested_ternary_operator_spec.rb +21 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/next_spec.rb +285 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/nil_comparison_spec.rb +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/non_nil_check_spec.rb +101 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/not_spec.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/numeric_literals_spec.rb +80 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/one_line_conditional_spec.rb +13 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/op_method_spec.rb +82 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/parentheses_around_condition_spec.rb +143 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/percent_literal_delimiters_spec.rb +316 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/percent_q_literals_spec.rb +122 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/perl_backrefs_spec.rb +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/predicate_name_spec.rb +57 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/proc_spec.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/raise_args_spec.rb +87 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/redundant_begin_spec.rb +121 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/redundant_exception_spec.rb +27 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/redundant_return_spec.rb +171 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/redundant_self_spec.rb +142 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/regexp_literal_spec.rb +188 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/rescue_modifier_spec.rb +116 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/self_assignment_spec.rb +43 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/semicolon_spec.rb +114 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/signal_exception_spec.rb +290 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/single_line_block_params_spec.rb +70 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/single_line_methods_spec.rb +90 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/single_space_before_first_arg_spec.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_after_colon_spec.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_after_comma_spec.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_after_control_keyword_spec.rb +84 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_after_method_name_spec.rb +70 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_after_not_spec.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_after_semicolon_spec.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb +86 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_around_operators_spec.rb +327 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_before_block_braces_spec.rb +72 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_before_comma_spec.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_before_comment_spec.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb +70 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_before_semicolon_spec.rb +28 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_inside_block_braces_spec.rb +307 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_inside_brackets_spec.rb +83 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_inside_hash_literal_braces_spec.rb +147 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_inside_parens_spec.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/space_inside_range_literal_spec.rb +52 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/special_global_vars_spec.rb +57 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/string_literals_spec.rb +218 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/symbol_array_spec.rb +37 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/symbol_proc_spec.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/tab_spec.rb +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/trailing_blank_lines_spec.rb +83 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/trailing_comma_spec.rb +390 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/trailing_whitespace_spec.rb +31 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/trivial_accessors_spec.rb +542 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/unless_else_spec.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/unneeded_capital_w_spec.rb +96 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/unneeded_percent_q_spec.rb +127 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/unneeded_percent_x_spec.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/variable_interpolation_spec.rb +76 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/variable_name_spec.rb +107 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/when_then_spec.rb +42 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/while_until_do_spec.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/word_array_spec.rb +103 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/team_spec.rb +190 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/util_spec.rb +51 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/variable_force/assignment_spec.rb +200 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/variable_force/locatable_spec.rb +699 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/variable_force/scope_spec.rb +319 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/variable_force/variable_spec.rb +59 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/variable_force/variable_table_spec.rb +269 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/variable_force_spec.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/base_formatter_spec.rb +191 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/clang_style_formatter_spec.rb +114 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/colorizable_spec.rb +107 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/disabled_config_formatter_spec.rb +50 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/disabled_lines_formatter_spec.rb +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/emacs_style_formatter_spec.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/file_list_formatter_spec.rb +33 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/formatter_set_spec.rb +132 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/fuubar_style_formatter_spec.rb +129 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/html_formatter_spec.rb +145 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/json_formatter_spec.rb +152 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/offense_count_formatter_spec.rb +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/progress_formatter_spec.rb +182 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/formatter/simple_text_formatter_spec.rb +135 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/options_spec.rb +173 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/path_util_spec.rb +77 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/processed_source_spec.rb +184 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/runner_spec.rb +64 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/string_util_spec.rb +46 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/target_finder_spec.rb +211 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/token_spec.rb +25 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/spec_helper.rb +154 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/file_helper.rb +23 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/isolated_environment.rb +34 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/mri_syntax_checker.rb +73 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/offenses_matcher.rb +30 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/shared_context.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/shared_examples.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/support/statement_modifier_helper.rb +41 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/LICENSE +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/README.md +440 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/base.rb +212 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/bar.rb +60 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/elapsed_timer.rb +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/estimated_timer.rb +86 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/progressable.rb +105 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/rate.rb +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/throttle.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components/timer.rb +69 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/components.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/errors/invalid_progress_error.rb +4 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/format/base.rb +55 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/format/molecule.rb +38 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/format.rb +2 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/formatter.rb +103 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/length_calculator.rb +63 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/running_average_calculator.rb +7 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/time.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar/version.rb +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/lib/ruby-progressbar.rb +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/fixtures/benchmark.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/base_spec.rb +852 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/components/bar_spec.rb +210 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/components/elapsed_timer_spec.rb +91 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/components/estimated_timer_spec.rb +241 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/components/progressable_spec.rb +47 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/components/throttle_spec.rb +100 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/format/molecule_spec.rb +22 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/running_average_calculator_spec.rb +11 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/lib/ruby-progressbar/time_spec.rb +49 -0
- data/vendor/bundle/ruby/2.1.0/gems/ruby-progressbar-1.5.1/spec/support/time.rb +19 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/CHANGES.md +309 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/Gemfile +3 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/LICENSE +20 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/README.md +202 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/Rakefile +29 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/lib/slop/commands.rb +196 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/lib/slop/option.rb +214 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/lib/slop.rb +687 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/slop.gemspec +17 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/test/commands_test.rb +26 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/test/helper.rb +12 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/test/option_test.rb +145 -0
- data/vendor/bundle/ruby/2.1.0/gems/slop-3.6.0/test/slop_test.rb +518 -0
- data/vendor/bundle/ruby/2.1.0/specifications/ast-2.0.0.gemspec +56 -0
- data/vendor/bundle/ruby/2.1.0/specifications/astrolabe-1.3.0.gemspec +62 -0
- data/vendor/bundle/ruby/2.1.0/specifications/builder-3.2.2.gemspec +23 -0
- data/vendor/bundle/ruby/2.1.0/specifications/mini_portile-0.6.0.gemspec +24 -0
- data/vendor/bundle/ruby/2.1.0/specifications/nokogiri-1.6.3.1-x64-mingw32.gemspec +73 -0
- data/vendor/bundle/ruby/2.1.0/specifications/parser-2.2.0.pre.4.gemspec +79 -0
- data/vendor/bundle/ruby/2.1.0/specifications/powerpack-0.0.9.gemspec +41 -0
- data/vendor/bundle/ruby/2.1.0/specifications/rainbow-2.0.0.gemspec +39 -0
- data/vendor/bundle/ruby/2.1.0/specifications/rake-0.9.6.gemspec +37 -0
- data/vendor/bundle/ruby/2.1.0/specifications/rubocop-0.26.0.gemspec +63 -0
- data/vendor/bundle/ruby/2.1.0/specifications/ruby-progressbar-1.5.1.gemspec +47 -0
- data/vendor/bundle/ruby/2.1.0/specifications/slop-3.6.0.gemspec +36 -0
- metadata +1253 -2
|
@@ -0,0 +1,2246 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
require 'tmpdir'
|
|
5
|
+
require 'spec_helper'
|
|
6
|
+
require 'timeout'
|
|
7
|
+
|
|
8
|
+
describe RuboCop::CLI, :isolated_environment do
|
|
9
|
+
include FileHelper
|
|
10
|
+
|
|
11
|
+
subject(:cli) { described_class.new }
|
|
12
|
+
|
|
13
|
+
before(:each) do
|
|
14
|
+
$stdout = StringIO.new
|
|
15
|
+
$stderr = StringIO.new
|
|
16
|
+
RuboCop::ConfigLoader.debug = false
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
after(:each) do
|
|
20
|
+
$stdout = STDOUT
|
|
21
|
+
$stderr = STDERR
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def abs(path)
|
|
25
|
+
File.expand_path(path)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe 'option' do
|
|
29
|
+
describe '--version' do
|
|
30
|
+
it 'exits cleanly' do
|
|
31
|
+
expect { cli.run ['-v'] }.to exit_with_code(0)
|
|
32
|
+
expect { cli.run ['--version'] }.to exit_with_code(0)
|
|
33
|
+
expect($stdout.string).to eq((RuboCop::Version::STRING + "\n") * 2)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
describe '--auto-correct' do
|
|
38
|
+
it 'honors Exclude settings in individual cops' do
|
|
39
|
+
source = ['# encoding: utf-8',
|
|
40
|
+
'puts %x(ls)']
|
|
41
|
+
create_file('example.rb', source)
|
|
42
|
+
create_file('.rubocop.yml', ['Style/UnneededPercentX:',
|
|
43
|
+
' Exclude:',
|
|
44
|
+
' - example.rb'])
|
|
45
|
+
expect(cli.run(['--auto-correct'])).to eq(0)
|
|
46
|
+
expect($stdout.string).to include('no offenses detected')
|
|
47
|
+
expect(IO.read('example.rb')).to eq(source.join("\n") + "\n")
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it 'corrects code with indentation problems' do
|
|
51
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
52
|
+
'module Bar',
|
|
53
|
+
'class Goo',
|
|
54
|
+
' def something',
|
|
55
|
+
' first call',
|
|
56
|
+
" do_other 'things'",
|
|
57
|
+
' if other > 34',
|
|
58
|
+
' more_work',
|
|
59
|
+
' end',
|
|
60
|
+
' end',
|
|
61
|
+
'end',
|
|
62
|
+
'end',
|
|
63
|
+
'',
|
|
64
|
+
'module Foo',
|
|
65
|
+
'class Bar',
|
|
66
|
+
'',
|
|
67
|
+
' stuff = [',
|
|
68
|
+
' {',
|
|
69
|
+
" some: 'hash',",
|
|
70
|
+
' },',
|
|
71
|
+
' {',
|
|
72
|
+
" another: 'hash',",
|
|
73
|
+
" with: 'more'",
|
|
74
|
+
' },',
|
|
75
|
+
' ]',
|
|
76
|
+
'end',
|
|
77
|
+
'end'
|
|
78
|
+
])
|
|
79
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
80
|
+
expect(IO.read('example.rb'))
|
|
81
|
+
.to eq(['# encoding: utf-8',
|
|
82
|
+
'module Bar',
|
|
83
|
+
' class Goo',
|
|
84
|
+
' def something',
|
|
85
|
+
' first call',
|
|
86
|
+
" do_other 'things'",
|
|
87
|
+
' if other > 34',
|
|
88
|
+
' more_work',
|
|
89
|
+
' end',
|
|
90
|
+
' end',
|
|
91
|
+
' end',
|
|
92
|
+
'end',
|
|
93
|
+
'',
|
|
94
|
+
'module Foo',
|
|
95
|
+
' class Bar',
|
|
96
|
+
' stuff = [',
|
|
97
|
+
' {',
|
|
98
|
+
" some: 'hash'",
|
|
99
|
+
' },',
|
|
100
|
+
' {',
|
|
101
|
+
" another: 'hash',",
|
|
102
|
+
" with: 'more'",
|
|
103
|
+
' }',
|
|
104
|
+
' ]',
|
|
105
|
+
' end',
|
|
106
|
+
'end',
|
|
107
|
+
''].join("\n"))
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
it 'can change block comments and indent them' do
|
|
111
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
112
|
+
'module Foo',
|
|
113
|
+
'class Bar',
|
|
114
|
+
'=begin',
|
|
115
|
+
'This is a nice long',
|
|
116
|
+
'comment',
|
|
117
|
+
'which spans a few lines',
|
|
118
|
+
'=end',
|
|
119
|
+
' def baz',
|
|
120
|
+
' do_something',
|
|
121
|
+
' end',
|
|
122
|
+
'end',
|
|
123
|
+
'end'])
|
|
124
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
125
|
+
expect(IO.read('example.rb'))
|
|
126
|
+
.to eq(['# encoding: utf-8',
|
|
127
|
+
'module Foo',
|
|
128
|
+
' class Bar',
|
|
129
|
+
' # This is a nice long',
|
|
130
|
+
' # comment',
|
|
131
|
+
' # which spans a few lines',
|
|
132
|
+
' def baz',
|
|
133
|
+
' do_something',
|
|
134
|
+
' end',
|
|
135
|
+
' end',
|
|
136
|
+
'end',
|
|
137
|
+
''].join("\n"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
it 'can correct two problems with blocks' do
|
|
141
|
+
# {} should be do..end and space is missing.
|
|
142
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
143
|
+
'(1..10).each{ |i|',
|
|
144
|
+
' puts i',
|
|
145
|
+
'}'])
|
|
146
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
147
|
+
expect(IO.read('example.rb'))
|
|
148
|
+
.to eq(['# encoding: utf-8',
|
|
149
|
+
'(1..10).each do |i|',
|
|
150
|
+
' puts i',
|
|
151
|
+
'end',
|
|
152
|
+
''].join("\n"))
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
it 'can handle spaces when removing braces' do
|
|
156
|
+
create_file('example.rb',
|
|
157
|
+
['# encoding: utf-8',
|
|
158
|
+
"assert_post_status_code 400, 's', {:type => 'bad'}"])
|
|
159
|
+
expect(cli.run(%w(--auto-correct --format emacs))).to eq(1)
|
|
160
|
+
expect(IO.read('example.rb'))
|
|
161
|
+
.to eq(['# encoding: utf-8',
|
|
162
|
+
"assert_post_status_code 400, 's', type: 'bad'",
|
|
163
|
+
''].join("\n"))
|
|
164
|
+
e = abs('example.rb')
|
|
165
|
+
expect($stdout.string)
|
|
166
|
+
.to eq(["#{e}:2:35: C: [Corrected] Redundant curly braces around " \
|
|
167
|
+
'a hash parameter.',
|
|
168
|
+
"#{e}:2:35: C: [Corrected] Use the new Ruby 1.9 hash " \
|
|
169
|
+
'syntax.',
|
|
170
|
+
# TODO: Don't report that a problem is corrected when it
|
|
171
|
+
# actually went away due to another correction.
|
|
172
|
+
"#{e}:2:35: C: [Corrected] Space inside { missing.",
|
|
173
|
+
# TODO: Don't report duplicates (HashSyntax in this case).
|
|
174
|
+
"#{e}:2:36: C: [Corrected] Use the new Ruby 1.9 hash " \
|
|
175
|
+
'syntax.',
|
|
176
|
+
"#{e}:2:50: C: [Corrected] Space inside } missing.",
|
|
177
|
+
''].join("\n"))
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# A case where two cops, EmptyLinesAroundBody and EmptyLines, try to
|
|
181
|
+
# remove the same line in autocorrect.
|
|
182
|
+
it 'can correct two empty lines at end of class body' do
|
|
183
|
+
create_file('example.rb', ['class Test',
|
|
184
|
+
' def f',
|
|
185
|
+
' end',
|
|
186
|
+
'',
|
|
187
|
+
'',
|
|
188
|
+
'end'])
|
|
189
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
190
|
+
expect($stderr.string).to eq('')
|
|
191
|
+
expect(IO.read('example.rb')).to eq(['class Test',
|
|
192
|
+
' def f',
|
|
193
|
+
' end',
|
|
194
|
+
'end',
|
|
195
|
+
''].join("\n"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# A case where WordArray's correction can be clobbered by
|
|
199
|
+
# AccessModifierIndentation's correction.
|
|
200
|
+
it 'can correct indentation and another thing' do
|
|
201
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
202
|
+
'class Dsl',
|
|
203
|
+
'private',
|
|
204
|
+
' A = ["git", "path",]',
|
|
205
|
+
'end'])
|
|
206
|
+
expect(cli.run(%w(--auto-correct --format emacs))).to eq(1)
|
|
207
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
208
|
+
'class Dsl',
|
|
209
|
+
' private',
|
|
210
|
+
'',
|
|
211
|
+
' A = %w(git path)',
|
|
212
|
+
'end',
|
|
213
|
+
''].join("\n"))
|
|
214
|
+
e = abs('example.rb')
|
|
215
|
+
expect($stdout.string)
|
|
216
|
+
.to eq(["#{e}:2:1: C: Missing top-level class documentation " \
|
|
217
|
+
'comment.',
|
|
218
|
+
"#{e}:3:1: C: [Corrected] Indent access modifiers like " \
|
|
219
|
+
'`private`.',
|
|
220
|
+
"#{e}:3:1: C: [Corrected] Keep a blank line before and " \
|
|
221
|
+
'after `private`.',
|
|
222
|
+
"#{e}:3:3: W: Useless `private` access modifier.",
|
|
223
|
+
"#{e}:3:3: C: [Corrected] Keep a blank line before and " \
|
|
224
|
+
'after `private`.',
|
|
225
|
+
"#{e}:4:7: C: [Corrected] Use `%w` or `%W` " \
|
|
226
|
+
'for array of words.',
|
|
227
|
+
"#{e}:4:8: C: [Corrected] Prefer single-quoted strings " \
|
|
228
|
+
"when you don't need string interpolation or special " \
|
|
229
|
+
'symbols.',
|
|
230
|
+
"#{e}:4:15: C: [Corrected] Prefer single-quoted strings " \
|
|
231
|
+
"when you don't need string interpolation or special " \
|
|
232
|
+
'symbols.',
|
|
233
|
+
"#{e}:4:21: C: [Corrected] Avoid comma after the last item " \
|
|
234
|
+
'of an array.',
|
|
235
|
+
"#{e}:5:7: C: [Corrected] Use `%w` or `%W` " \
|
|
236
|
+
'for array of words.',
|
|
237
|
+
"#{e}:5:8: C: [Corrected] Prefer single-quoted strings " \
|
|
238
|
+
"when you don't need string interpolation or special " \
|
|
239
|
+
'symbols.',
|
|
240
|
+
"#{e}:5:15: C: [Corrected] Prefer single-quoted strings " \
|
|
241
|
+
"when you don't need string interpolation or special " \
|
|
242
|
+
'symbols.',
|
|
243
|
+
"#{e}:5:21: C: [Corrected] Avoid comma after the last item " \
|
|
244
|
+
'of an array.',
|
|
245
|
+
''].join("\n"))
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# A case where the same cop could try to correct an offense twice in one
|
|
249
|
+
# place.
|
|
250
|
+
it 'can correct empty line inside special form of nested modules' do
|
|
251
|
+
create_file('example.rb', ['module A module B',
|
|
252
|
+
'',
|
|
253
|
+
'end end'])
|
|
254
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
255
|
+
expect(IO.read('example.rb')).to eq(['module A module B',
|
|
256
|
+
'end end',
|
|
257
|
+
''].join("\n"))
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
it 'can correct single line methods' do
|
|
261
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
262
|
+
'def func1; do_something end # comment',
|
|
263
|
+
'def func2() do_1; do_2; end'])
|
|
264
|
+
expect(cli.run(%w(--auto-correct --format offenses))).to eq(1)
|
|
265
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
266
|
+
'# comment',
|
|
267
|
+
'def func1',
|
|
268
|
+
' do_something',
|
|
269
|
+
'end',
|
|
270
|
+
'',
|
|
271
|
+
'def func2',
|
|
272
|
+
' do_1',
|
|
273
|
+
' do_2',
|
|
274
|
+
'end',
|
|
275
|
+
''].join("\n"))
|
|
276
|
+
expect($stdout.string).to eq(['',
|
|
277
|
+
'6 Style/TrailingWhitespace',
|
|
278
|
+
'4 Style/Semicolon',
|
|
279
|
+
'2 Style/SingleLineMethods',
|
|
280
|
+
'1 Style/DefWithParentheses',
|
|
281
|
+
'1 Style/EmptyLineBetweenDefs',
|
|
282
|
+
'--',
|
|
283
|
+
'14 Total',
|
|
284
|
+
'',
|
|
285
|
+
''].join("\n"))
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# In this example, the auto-correction (changing "raise" to "fail")
|
|
289
|
+
# creates a new problem (alignment of parameters), which is also
|
|
290
|
+
# corrected automatically.
|
|
291
|
+
it 'can correct a problems and the problem it creates' do
|
|
292
|
+
create_file('example.rb',
|
|
293
|
+
['# encoding: utf-8',
|
|
294
|
+
'raise NotImplementedError,',
|
|
295
|
+
" 'Method should be overridden in child classes'"])
|
|
296
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
297
|
+
expect(IO.read('example.rb'))
|
|
298
|
+
.to eq(['# encoding: utf-8',
|
|
299
|
+
'fail NotImplementedError,',
|
|
300
|
+
" 'Method should be overridden in child classes'",
|
|
301
|
+
''].join("\n"))
|
|
302
|
+
expect($stdout.string)
|
|
303
|
+
.to eq(['Inspecting 1 file',
|
|
304
|
+
'C',
|
|
305
|
+
'',
|
|
306
|
+
'Offenses:',
|
|
307
|
+
'',
|
|
308
|
+
'example.rb:2:1: C: [Corrected] Use fail instead of ' \
|
|
309
|
+
'raise to signal exceptions.',
|
|
310
|
+
'raise NotImplementedError,',
|
|
311
|
+
'^^^^^',
|
|
312
|
+
'example.rb:3:7: C: [Corrected] Align the parameters of a ' \
|
|
313
|
+
'method call if they span more than one line.',
|
|
314
|
+
" 'Method should be overridden in child classes'",
|
|
315
|
+
' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^',
|
|
316
|
+
'',
|
|
317
|
+
'1 file inspected, 2 offenses detected, 2 offenses ' \
|
|
318
|
+
'corrected',
|
|
319
|
+
''].join("\n"))
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Thanks to repeated auto-correction, we can get rid of the trailing
|
|
323
|
+
# spaces, and then the extra empty line.
|
|
324
|
+
it 'can correct two problems in the same place' do
|
|
325
|
+
create_file('example.rb',
|
|
326
|
+
['# encoding: utf-8',
|
|
327
|
+
'# Example class.',
|
|
328
|
+
'class Klass',
|
|
329
|
+
' ',
|
|
330
|
+
' def f',
|
|
331
|
+
' end',
|
|
332
|
+
'end'])
|
|
333
|
+
expect(cli.run(['--auto-correct'])).to eq(1)
|
|
334
|
+
expect(IO.read('example.rb'))
|
|
335
|
+
.to eq(['# encoding: utf-8',
|
|
336
|
+
'# Example class.',
|
|
337
|
+
'class Klass',
|
|
338
|
+
' def f',
|
|
339
|
+
' end',
|
|
340
|
+
'end',
|
|
341
|
+
''].join("\n"))
|
|
342
|
+
expect($stderr.string).to eq('')
|
|
343
|
+
expect($stdout.string)
|
|
344
|
+
.to eq(['Inspecting 1 file',
|
|
345
|
+
'C',
|
|
346
|
+
'',
|
|
347
|
+
'Offenses:',
|
|
348
|
+
'',
|
|
349
|
+
'example.rb:4:1: C: [Corrected] Extra empty line detected ' \
|
|
350
|
+
'at body beginning.',
|
|
351
|
+
'example.rb:4:1: C: [Corrected] Trailing whitespace ' \
|
|
352
|
+
'detected.',
|
|
353
|
+
'',
|
|
354
|
+
'1 file inspected, 2 offenses detected, 2 offenses ' \
|
|
355
|
+
'corrected',
|
|
356
|
+
''].join("\n"))
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
it 'can correct MethodDefParentheses and other offense' do
|
|
360
|
+
create_file('example.rb',
|
|
361
|
+
['# encoding: utf-8',
|
|
362
|
+
'def primes limit',
|
|
363
|
+
' 1.upto(limit).find_all { |i| is_prime[i] }',
|
|
364
|
+
'end'])
|
|
365
|
+
expect(cli.run(%w(-D --auto-correct))).to eq(1)
|
|
366
|
+
expect($stderr.string).to eq('')
|
|
367
|
+
expect(IO.read('example.rb'))
|
|
368
|
+
.to eq(['# encoding: utf-8',
|
|
369
|
+
'def primes(limit)',
|
|
370
|
+
' 1.upto(limit).select { |i| is_prime[i] }',
|
|
371
|
+
'end',
|
|
372
|
+
''].join("\n"))
|
|
373
|
+
expect($stdout.string)
|
|
374
|
+
.to eq(['Inspecting 1 file',
|
|
375
|
+
'C',
|
|
376
|
+
'',
|
|
377
|
+
'Offenses:',
|
|
378
|
+
'',
|
|
379
|
+
'example.rb:2:12: C: [Corrected] ' \
|
|
380
|
+
'Style/MethodDefParentheses: ' \
|
|
381
|
+
'Use def with parentheses when there are parameters.',
|
|
382
|
+
'def primes limit',
|
|
383
|
+
' ^^^^^',
|
|
384
|
+
'example.rb:3:17: C: [Corrected] Style/CollectionMethods: ' \
|
|
385
|
+
'Prefer select over find_all.',
|
|
386
|
+
' 1.upto(limit).find_all { |i| is_prime[i] }',
|
|
387
|
+
' ^^^^^^^^',
|
|
388
|
+
'',
|
|
389
|
+
'1 file inspected, 2 offenses detected, 2 offenses ' \
|
|
390
|
+
'corrected',
|
|
391
|
+
''].join("\n"))
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
it 'can correct WordArray and SpaceAfterComma offenses' do
|
|
395
|
+
create_file('example.rb',
|
|
396
|
+
['# encoding: utf-8',
|
|
397
|
+
"f(type: ['offline','offline_payment'],",
|
|
398
|
+
" bar_colors: ['958c12','953579','ff5800','0085cc'])"])
|
|
399
|
+
expect(cli.run(%w(-D --auto-correct --format o))).to eq(1)
|
|
400
|
+
expect($stdout.string)
|
|
401
|
+
.to eq(['',
|
|
402
|
+
'4 Style/SpaceAfterComma',
|
|
403
|
+
'2 Style/WordArray',
|
|
404
|
+
'--',
|
|
405
|
+
'6 Total',
|
|
406
|
+
'',
|
|
407
|
+
''].join("\n"))
|
|
408
|
+
expect(IO.read('example.rb'))
|
|
409
|
+
.to eq(['# encoding: utf-8',
|
|
410
|
+
'f(type: %w(offline offline_payment),',
|
|
411
|
+
' bar_colors: %w(958c12 953579 ff5800 0085cc))',
|
|
412
|
+
''].join("\n"))
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
it 'can correct SpaceAfterComma and HashSyntax offenses' do
|
|
416
|
+
create_file('example.rb',
|
|
417
|
+
['# encoding: utf-8',
|
|
418
|
+
"I18n.t('description',:property_name => property.name)"])
|
|
419
|
+
expect(cli.run(%w(-D --auto-correct --format emacs))).to eq(1)
|
|
420
|
+
expect($stdout.string)
|
|
421
|
+
.to eq(["#{abs('example.rb')}:2:21: C: [Corrected] " \
|
|
422
|
+
'Style/SpaceAfterComma: Space missing after comma.',
|
|
423
|
+
"#{abs('example.rb')}:2:22: C: [Corrected] " \
|
|
424
|
+
'Style/HashSyntax: Use the new Ruby 1.9 hash syntax.',
|
|
425
|
+
''].join("\n"))
|
|
426
|
+
expect(IO.read('example.rb'))
|
|
427
|
+
.to eq(['# encoding: utf-8',
|
|
428
|
+
"I18n.t('description', property_name: property.name)",
|
|
429
|
+
''].join("\n"))
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
it 'can correct HashSyntax and SpaceAroundOperators offenses' do
|
|
433
|
+
create_file('example.rb',
|
|
434
|
+
['# encoding: utf-8',
|
|
435
|
+
'{ :b=>1 }'])
|
|
436
|
+
expect(cli.run(%w(-D --auto-correct --format emacs))).to eq(1)
|
|
437
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
438
|
+
'{ b: 1 }',
|
|
439
|
+
''].join("\n"))
|
|
440
|
+
expect($stdout.string)
|
|
441
|
+
.to eq(["#{abs('example.rb')}:2:3: C: [Corrected] " \
|
|
442
|
+
'Style/HashSyntax: Use the new Ruby 1.9 hash syntax.',
|
|
443
|
+
"#{abs('example.rb')}:2:5: C: [Corrected] " \
|
|
444
|
+
'Style/SpaceAroundOperators: Surrounding space missing for ' \
|
|
445
|
+
"operator '=>'.",
|
|
446
|
+
''].join("\n"))
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
it 'can correct HashSyntax when --only is used' do
|
|
450
|
+
create_file('example.rb',
|
|
451
|
+
['# encoding: utf-8',
|
|
452
|
+
'{ :b=>1 }'])
|
|
453
|
+
expect(cli.run(%w(--auto-correct -f emacs
|
|
454
|
+
--only Style/HashSyntax))).to eq(1)
|
|
455
|
+
expect($stderr.string).to eq('')
|
|
456
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
457
|
+
'{ b: 1 }',
|
|
458
|
+
''].join("\n"))
|
|
459
|
+
expect($stdout.string)
|
|
460
|
+
.to eq(["#{abs('example.rb')}:2:3: C: [Corrected] Use the new " \
|
|
461
|
+
'Ruby 1.9 hash syntax.',
|
|
462
|
+
''].join("\n"))
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
it 'can correct TrailingBlankLines and TrailingWhitespace offenses' do
|
|
466
|
+
create_file('example.rb',
|
|
467
|
+
['# encoding: utf-8',
|
|
468
|
+
'',
|
|
469
|
+
' ',
|
|
470
|
+
'',
|
|
471
|
+
''])
|
|
472
|
+
expect(cli.run(%w(--auto-correct --format emacs))).to eq(1)
|
|
473
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
474
|
+
''].join("\n"))
|
|
475
|
+
expect($stdout.string)
|
|
476
|
+
.to eq(["#{abs('example.rb')}:2:1: C: [Corrected] 3 trailing " \
|
|
477
|
+
'blank lines detected.',
|
|
478
|
+
"#{abs('example.rb')}:3:1: C: [Corrected] Trailing " \
|
|
479
|
+
'whitespace detected.',
|
|
480
|
+
''].join("\n"))
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
it 'can correct MethodCallParentheses and EmptyLiteral offenses' do
|
|
484
|
+
create_file('example.rb',
|
|
485
|
+
['# encoding: utf-8',
|
|
486
|
+
'Hash.new()'])
|
|
487
|
+
expect(cli.run(%w(--auto-correct --format emacs))).to eq(1)
|
|
488
|
+
expect($stderr.string).to eq('')
|
|
489
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
490
|
+
'{}',
|
|
491
|
+
''].join("\n"))
|
|
492
|
+
expect($stdout.string)
|
|
493
|
+
.to eq(["#{abs('example.rb')}:2:1: C: [Corrected] Use hash " \
|
|
494
|
+
'literal {} instead of Hash.new.',
|
|
495
|
+
"#{abs('example.rb')}:2:9: C: [Corrected] Do not use " \
|
|
496
|
+
'parentheses for method calls with no arguments.',
|
|
497
|
+
''].join("\n"))
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
it 'can correct IndentHash offenses with separator style' do
|
|
501
|
+
create_file('example.rb',
|
|
502
|
+
['# encoding: utf-8',
|
|
503
|
+
'CONVERSION_CORRESPONDENCE = {',
|
|
504
|
+
' match_for_should: :match,',
|
|
505
|
+
' match_for_should_not: :match_when_negated,',
|
|
506
|
+
' failure_message_for_should: :failure_message,',
|
|
507
|
+
'failure_message_for_should_not: :failure_message_when',
|
|
508
|
+
'}'])
|
|
509
|
+
create_file('.rubocop.yml',
|
|
510
|
+
['Style/AlignHash:',
|
|
511
|
+
' EnforcedColonStyle: separator'])
|
|
512
|
+
expect(cli.run(%w(--auto-correct))).to eq(1)
|
|
513
|
+
expect(IO.read('example.rb'))
|
|
514
|
+
.to eq(['# encoding: utf-8',
|
|
515
|
+
'CONVERSION_CORRESPONDENCE = {',
|
|
516
|
+
' match_for_should: :match,',
|
|
517
|
+
' match_for_should_not: :match_when_negated,',
|
|
518
|
+
' failure_message_for_should: :failure_message,',
|
|
519
|
+
' failure_message_for_should_not: :failure_message_when',
|
|
520
|
+
'}',
|
|
521
|
+
''].join("\n"))
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
it 'does not say [Corrected] if correction was avoided' do
|
|
525
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
526
|
+
'a = c and b',
|
|
527
|
+
'not a && b',
|
|
528
|
+
'func a do b end'])
|
|
529
|
+
expect(cli.run(%w(-a -f simple))).to eq(1)
|
|
530
|
+
expect($stderr.string).to eq('')
|
|
531
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
532
|
+
'a = c and b',
|
|
533
|
+
'not a && b',
|
|
534
|
+
'func a do b end',
|
|
535
|
+
''].join("\n"))
|
|
536
|
+
expect($stdout.string)
|
|
537
|
+
.to eq(['== example.rb ==',
|
|
538
|
+
'C: 2: 7: Use && instead of and.',
|
|
539
|
+
'C: 3: 1: Use ! instead of not.',
|
|
540
|
+
'C: 4: 8: Prefer {...} over do...end for single-line ' \
|
|
541
|
+
'blocks.',
|
|
542
|
+
'',
|
|
543
|
+
'1 file inspected, 3 offenses detected',
|
|
544
|
+
''].join("\n"))
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
it 'does not hang SpaceAfterPunctuation and SpaceInsideParens' do
|
|
548
|
+
create_file('example.rb',
|
|
549
|
+
['# encoding: utf-8',
|
|
550
|
+
'some_method(a, )'])
|
|
551
|
+
Timeout.timeout(10) do
|
|
552
|
+
expect(cli.run(%w(--auto-correct))).to eq(1)
|
|
553
|
+
end
|
|
554
|
+
expect($stderr.string).to eq('')
|
|
555
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
556
|
+
'some_method(a)',
|
|
557
|
+
''].join("\n"))
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
it 'does not hang SpaceAfterPunctuation and SpaceInsideBrackets' do
|
|
561
|
+
create_file('example.rb',
|
|
562
|
+
['# encoding: utf-8',
|
|
563
|
+
'puts [1, ]'])
|
|
564
|
+
Timeout.timeout(10) do
|
|
565
|
+
expect(cli.run(%w(--auto-correct))).to eq(1)
|
|
566
|
+
end
|
|
567
|
+
expect($stderr.string).to eq('')
|
|
568
|
+
expect(IO.read('example.rb')).to eq(['# encoding: utf-8',
|
|
569
|
+
'puts [1]',
|
|
570
|
+
''].join("\n"))
|
|
571
|
+
end
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
describe '--auto-gen-config' do
|
|
575
|
+
before(:each) do
|
|
576
|
+
RuboCop::Formatter::DisabledConfigFormatter
|
|
577
|
+
.config_to_allow_offenses = {}
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
it 'overwrites an existing todo file' do
|
|
581
|
+
create_file('example1.rb', ['# encoding: utf-8',
|
|
582
|
+
'x= 0 ',
|
|
583
|
+
'#' * 85,
|
|
584
|
+
'y ',
|
|
585
|
+
'puts x'])
|
|
586
|
+
create_file('.rubocop_todo.yml', ['Metrics/LineLength:',
|
|
587
|
+
' Enabled: false'])
|
|
588
|
+
create_file('.rubocop.yml', ['inherit_from: .rubocop_todo.yml'])
|
|
589
|
+
expect(cli.run(['--auto-gen-config'])).to eq(1)
|
|
590
|
+
expect(IO.readlines('.rubocop_todo.yml')[7..-1].map(&:chomp))
|
|
591
|
+
.to eq(['# Offense count: 1',
|
|
592
|
+
'# Configuration parameters: AllowURI.',
|
|
593
|
+
'Metrics/LineLength:',
|
|
594
|
+
' Max: 85',
|
|
595
|
+
'',
|
|
596
|
+
'# Offense count: 1',
|
|
597
|
+
'# Cop supports --auto-correct.',
|
|
598
|
+
'Style/SpaceAroundOperators:',
|
|
599
|
+
' Enabled: false',
|
|
600
|
+
'',
|
|
601
|
+
'# Offense count: 2',
|
|
602
|
+
'# Cop supports --auto-correct.',
|
|
603
|
+
'Style/TrailingWhitespace:',
|
|
604
|
+
' Enabled: false'])
|
|
605
|
+
|
|
606
|
+
# Create new CLI instance to avoid using cached configuration.
|
|
607
|
+
new_cli = described_class.new
|
|
608
|
+
|
|
609
|
+
expect(new_cli.run(['example1.rb'])).to eq(0)
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
it 'exits with error if file arguments are given' do
|
|
613
|
+
create_file('example1.rb', ['# encoding: utf-8',
|
|
614
|
+
'x= 0 ',
|
|
615
|
+
'#' * 85,
|
|
616
|
+
'y ',
|
|
617
|
+
'puts x'])
|
|
618
|
+
expect { cli.run(['--auto-gen-config', 'example1.rb']) }
|
|
619
|
+
.to exit_with_code(1)
|
|
620
|
+
expect($stderr.string)
|
|
621
|
+
.to eq(['--auto-gen-config can not be combined with any other ' \
|
|
622
|
+
'arguments.',
|
|
623
|
+
''].join("\n"))
|
|
624
|
+
expect($stdout.string).to eq('')
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
it 'can generate a todo list' do
|
|
628
|
+
create_file('example1.rb', ['# encoding: utf-8',
|
|
629
|
+
'$x= 0 ',
|
|
630
|
+
'#' * 90,
|
|
631
|
+
'#' * 85,
|
|
632
|
+
'y ',
|
|
633
|
+
'puts x'])
|
|
634
|
+
create_file('example2.rb', ['# encoding: utf-8',
|
|
635
|
+
"\tx = 0",
|
|
636
|
+
'puts x'])
|
|
637
|
+
expect(cli.run(['--auto-gen-config'])).to eq(1)
|
|
638
|
+
expect($stderr.string).to eq('')
|
|
639
|
+
expect($stdout.string)
|
|
640
|
+
.to include(['Created .rubocop_todo.yml.',
|
|
641
|
+
'Run `rubocop --config .rubocop_todo.yml`, or',
|
|
642
|
+
'add inherit_from: .rubocop_todo.yml in a ' \
|
|
643
|
+
'.rubocop.yml file.',
|
|
644
|
+
''].join("\n"))
|
|
645
|
+
expected =
|
|
646
|
+
['# This configuration was generated by `rubocop --auto-gen-config`',
|
|
647
|
+
/# on .* using RuboCop version .*/,
|
|
648
|
+
'# The point is for the user to remove these configuration records',
|
|
649
|
+
'# one by one as the offenses are removed from the code base.',
|
|
650
|
+
'# Note that changes in the inspected code, or installation of new',
|
|
651
|
+
'# versions of RuboCop, may require this file to be generated ' \
|
|
652
|
+
'again.',
|
|
653
|
+
'',
|
|
654
|
+
'# Offense count: 2',
|
|
655
|
+
'# Configuration parameters: AllowURI.',
|
|
656
|
+
'Metrics/LineLength:',
|
|
657
|
+
' Max: 90',
|
|
658
|
+
'',
|
|
659
|
+
'# Offense count: 1',
|
|
660
|
+
'# Cop supports --auto-correct.',
|
|
661
|
+
'Style/CommentIndentation:',
|
|
662
|
+
' Enabled: false',
|
|
663
|
+
'',
|
|
664
|
+
'# Offense count: 1',
|
|
665
|
+
'# Configuration parameters: AllowedVariables.',
|
|
666
|
+
'Style/GlobalVars:',
|
|
667
|
+
' Enabled: false',
|
|
668
|
+
'',
|
|
669
|
+
'# Offense count: 1',
|
|
670
|
+
'# Cop supports --auto-correct.',
|
|
671
|
+
'Style/IndentationConsistency:',
|
|
672
|
+
' Enabled: false',
|
|
673
|
+
'',
|
|
674
|
+
'# Offense count: 1',
|
|
675
|
+
'# Cop supports --auto-correct.',
|
|
676
|
+
'Style/SpaceAroundOperators:',
|
|
677
|
+
' Enabled: false',
|
|
678
|
+
'',
|
|
679
|
+
'# Offense count: 1',
|
|
680
|
+
'# Cop supports --auto-correct.',
|
|
681
|
+
'Style/Tab:',
|
|
682
|
+
' Enabled: false',
|
|
683
|
+
'',
|
|
684
|
+
'# Offense count: 2',
|
|
685
|
+
'# Cop supports --auto-correct.',
|
|
686
|
+
'Style/TrailingWhitespace:',
|
|
687
|
+
' Enabled: false']
|
|
688
|
+
actual = IO.read('.rubocop_todo.yml').split($RS)
|
|
689
|
+
expected.each_with_index do |line, ix|
|
|
690
|
+
if line.is_a?(String)
|
|
691
|
+
expect(actual[ix]).to eq(line)
|
|
692
|
+
else
|
|
693
|
+
expect(actual[ix]).to match(line)
|
|
694
|
+
end
|
|
695
|
+
end
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
it 'does not generate configuration for the Syntax cop' do
|
|
699
|
+
create_file('example1.rb', ['# encoding: utf-8',
|
|
700
|
+
'x = < ', # Syntax error
|
|
701
|
+
'puts x'])
|
|
702
|
+
create_file('example2.rb', ['# encoding: utf-8',
|
|
703
|
+
"\tx = 0",
|
|
704
|
+
'puts x'])
|
|
705
|
+
expect(cli.run(['--auto-gen-config'])).to eq(1)
|
|
706
|
+
expect($stderr.string).to eq('')
|
|
707
|
+
expected =
|
|
708
|
+
['# This configuration was generated by `rubocop --auto-gen-config`',
|
|
709
|
+
/# on .* using RuboCop version .*/,
|
|
710
|
+
'# The point is for the user to remove these configuration records',
|
|
711
|
+
'# one by one as the offenses are removed from the code base.',
|
|
712
|
+
'# Note that changes in the inspected code, or installation of new',
|
|
713
|
+
'# versions of RuboCop, may require this file to be generated ' \
|
|
714
|
+
'again.',
|
|
715
|
+
'',
|
|
716
|
+
'# Offense count: 1',
|
|
717
|
+
'# Cop supports --auto-correct.',
|
|
718
|
+
'Style/CommentIndentation:',
|
|
719
|
+
' Enabled: false',
|
|
720
|
+
'',
|
|
721
|
+
'# Offense count: 1',
|
|
722
|
+
'# Cop supports --auto-correct.',
|
|
723
|
+
'Style/IndentationConsistency:',
|
|
724
|
+
' Enabled: false',
|
|
725
|
+
'',
|
|
726
|
+
'# Offense count: 1',
|
|
727
|
+
'# Cop supports --auto-correct.',
|
|
728
|
+
'Style/Tab:',
|
|
729
|
+
' Enabled: false']
|
|
730
|
+
actual = IO.read('.rubocop_todo.yml').split($RS)
|
|
731
|
+
expect(actual.length).to eq(expected.length)
|
|
732
|
+
expected.each_with_index do |line, ix|
|
|
733
|
+
if line.is_a?(String)
|
|
734
|
+
expect(actual[ix]).to eq(line)
|
|
735
|
+
else
|
|
736
|
+
expect(actual[ix]).to match(line)
|
|
737
|
+
end
|
|
738
|
+
end
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
it 'generates a todo list that removes the reports' do
|
|
742
|
+
RuboCop::Cop::Style::RegexpLiteral.slash_count = 0
|
|
743
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
744
|
+
'y.gsub!(%r{abc/xyz}, "#{x}")'])
|
|
745
|
+
expect(cli.run(%w(--format emacs))).to eq(1)
|
|
746
|
+
expect($stdout.string)
|
|
747
|
+
.to eq(["#{abs('example.rb')}:2:9: C: Use %r only for regular " \
|
|
748
|
+
"expressions matching more than 1 '/' character.",
|
|
749
|
+
''].join("\n"))
|
|
750
|
+
expect(cli.run(['--auto-gen-config'])).to eq(1)
|
|
751
|
+
expected =
|
|
752
|
+
['# This configuration was generated by `rubocop --auto-gen-config`',
|
|
753
|
+
/# on .* using RuboCop version .*/,
|
|
754
|
+
'# The point is for the user to remove these configuration records',
|
|
755
|
+
'# one by one as the offenses are removed from the code base.',
|
|
756
|
+
'# Note that changes in the inspected code, or installation of new',
|
|
757
|
+
'# versions of RuboCop, may require this file to be generated ' \
|
|
758
|
+
'again.',
|
|
759
|
+
'',
|
|
760
|
+
'# Offense count: 1',
|
|
761
|
+
'# Configuration parameters: MaxSlashes.',
|
|
762
|
+
'Style/RegexpLiteral:',
|
|
763
|
+
' Enabled: false']
|
|
764
|
+
actual = IO.read('.rubocop_todo.yml').split($RS)
|
|
765
|
+
expected.each_with_index do |line, ix|
|
|
766
|
+
if line.is_a?(String)
|
|
767
|
+
expect(actual[ix]).to eq(line)
|
|
768
|
+
else
|
|
769
|
+
expect(actual[ix]).to match(line)
|
|
770
|
+
end
|
|
771
|
+
end
|
|
772
|
+
$stdout = StringIO.new
|
|
773
|
+
result = cli.run(%w(--config .rubocop_todo.yml --format emacs))
|
|
774
|
+
expect($stdout.string).to eq('')
|
|
775
|
+
expect(result).to eq(0)
|
|
776
|
+
end
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
describe '--only' do
|
|
780
|
+
context 'when one cop is given' do
|
|
781
|
+
it 'runs just one cop' do
|
|
782
|
+
create_file('example.rb', ['if x== 0 ',
|
|
783
|
+
"\ty",
|
|
784
|
+
'end'])
|
|
785
|
+
# IfUnlessModifier depends on the configuration of LineLength.
|
|
786
|
+
|
|
787
|
+
expect(cli.run(['--format', 'simple',
|
|
788
|
+
'--only', 'Style/IfUnlessModifier',
|
|
789
|
+
'example.rb'])).to eq(1)
|
|
790
|
+
expect($stdout.string)
|
|
791
|
+
.to eq(['== example.rb ==',
|
|
792
|
+
'C: 1: 1: Favor modifier if usage when ' \
|
|
793
|
+
'having a single-line body. Another good alternative is ' \
|
|
794
|
+
'the usage of control flow &&/||.',
|
|
795
|
+
'',
|
|
796
|
+
'1 file inspected, 1 offense detected',
|
|
797
|
+
''].join("\n"))
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
it 'exits with error if an incorrect cop name is passed' do
|
|
801
|
+
create_file('example.rb', ['if x== 0 ',
|
|
802
|
+
"\ty",
|
|
803
|
+
'end'])
|
|
804
|
+
expect(cli.run(['--only', 'Style/123'])).to eq(1)
|
|
805
|
+
expect($stderr.string).to include('Unrecognized cop name: Style/123.')
|
|
806
|
+
end
|
|
807
|
+
|
|
808
|
+
it 'accepts cop names from plugins' do
|
|
809
|
+
create_file('.rubocop.yml', ['require: rubocop_ext',
|
|
810
|
+
'',
|
|
811
|
+
'Style/SomeCop:',
|
|
812
|
+
' Description: Something',
|
|
813
|
+
' Enabled: true'])
|
|
814
|
+
create_file('rubocop_ext.rb', ['module RuboCop',
|
|
815
|
+
' module Cop',
|
|
816
|
+
' module Style',
|
|
817
|
+
' class SomeCop < Cop',
|
|
818
|
+
' end',
|
|
819
|
+
' end',
|
|
820
|
+
' end',
|
|
821
|
+
'end'])
|
|
822
|
+
create_file('redirect.rb', '$stderr = STDOUT')
|
|
823
|
+
rubocop = "#{RuboCop::ConfigLoader::RUBOCOP_HOME}/bin/rubocop"
|
|
824
|
+
# Since we define a new cop class, we have to do this in a separate
|
|
825
|
+
# process. Otherwise, the extra cop will affect other specs.
|
|
826
|
+
output =
|
|
827
|
+
`ruby -I . #{rubocop} --require redirect.rb --only Style/SomeCop`
|
|
828
|
+
expect($CHILD_STATUS.success?).to be_truthy
|
|
829
|
+
# The warning about the unrecognized cop is expected. It's given due
|
|
830
|
+
# to the fact that we haven't supplied any default configuration for
|
|
831
|
+
# rubocop_ext in this example.
|
|
832
|
+
expect(output)
|
|
833
|
+
.to eq(['Warning: unrecognized cop Style/SomeCop found in ' \
|
|
834
|
+
"#{abs('.rubocop.yml')}",
|
|
835
|
+
'Inspecting 2 files',
|
|
836
|
+
'..',
|
|
837
|
+
'',
|
|
838
|
+
'2 files inspected, no offenses detected',
|
|
839
|
+
''].join("\n"))
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
context 'without using namespace' do
|
|
843
|
+
it 'runs just one cop' do
|
|
844
|
+
create_file('example.rb', ['if x== 0 ',
|
|
845
|
+
"\ty",
|
|
846
|
+
'end'])
|
|
847
|
+
|
|
848
|
+
expect(cli.run(['--format', 'simple',
|
|
849
|
+
'--display-cop-names',
|
|
850
|
+
'--only', 'IfUnlessModifier',
|
|
851
|
+
'example.rb'])).to eq(1)
|
|
852
|
+
expect($stdout.string)
|
|
853
|
+
.to eq(['== example.rb ==',
|
|
854
|
+
'C: 1: 1: Style/IfUnlessModifier: Favor modifier if ' \
|
|
855
|
+
'usage when having a single-line body. Another good ' \
|
|
856
|
+
'alternative is the usage of control flow &&/||.',
|
|
857
|
+
'',
|
|
858
|
+
'1 file inspected, 1 offense detected',
|
|
859
|
+
''].join("\n"))
|
|
860
|
+
end
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
it 'enables the given cop' do
|
|
864
|
+
create_file('example.rb',
|
|
865
|
+
['x = 0 ',
|
|
866
|
+
# Disabling comments still apply.
|
|
867
|
+
'# rubocop:disable Style/TrailingWhitespace',
|
|
868
|
+
'y = 1 '])
|
|
869
|
+
|
|
870
|
+
create_file('.rubocop.yml', ['Style/TrailingWhitespace:',
|
|
871
|
+
' Enabled: false'])
|
|
872
|
+
|
|
873
|
+
expect(cli.run(['--format', 'simple',
|
|
874
|
+
'--only', 'Style/TrailingWhitespace',
|
|
875
|
+
'example.rb'])).to eq(1)
|
|
876
|
+
expect($stderr.string).to eq('')
|
|
877
|
+
expect($stdout.string)
|
|
878
|
+
.to eq(['== example.rb ==',
|
|
879
|
+
'C: 1: 6: Trailing whitespace detected.',
|
|
880
|
+
'',
|
|
881
|
+
'1 file inspected, 1 offense detected',
|
|
882
|
+
''].join("\n"))
|
|
883
|
+
end
|
|
884
|
+
end
|
|
885
|
+
|
|
886
|
+
context 'when several cops are given' do
|
|
887
|
+
it 'runs the given cops' do
|
|
888
|
+
create_file('example.rb', ['if x== 100000000000000 ',
|
|
889
|
+
"\ty",
|
|
890
|
+
'end'])
|
|
891
|
+
expect(cli.run(['--format', 'simple',
|
|
892
|
+
'--only',
|
|
893
|
+
'Style/IfUnlessModifier,Style/Tab,' \
|
|
894
|
+
'Style/SpaceAroundOperators',
|
|
895
|
+
'example.rb'])).to eq(1)
|
|
896
|
+
expect($stderr.string).to eq('')
|
|
897
|
+
expect($stdout.string)
|
|
898
|
+
.to eq(['== example.rb ==',
|
|
899
|
+
'C: 1: 1: Favor modifier if usage when ' \
|
|
900
|
+
'having a single-line body. Another good alternative is ' \
|
|
901
|
+
'the usage of control flow &&/||.',
|
|
902
|
+
"C: 1: 5: Surrounding space missing for operator '=='.",
|
|
903
|
+
'C: 2: 1: Tab detected.',
|
|
904
|
+
'',
|
|
905
|
+
'1 file inspected, 3 offenses detected',
|
|
906
|
+
''].join("\n"))
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
context 'and --lint' do
|
|
910
|
+
it 'runs the given cops plus all enabled lint cops' do
|
|
911
|
+
create_file('example.rb', ['if x== 100000000000000 ',
|
|
912
|
+
"\ty = 3",
|
|
913
|
+
' end'])
|
|
914
|
+
create_file('.rubocop.yml', ['Lint/EndAlignment:',
|
|
915
|
+
' Enabled: false'])
|
|
916
|
+
expect(cli.run(['--format', 'simple',
|
|
917
|
+
'--only', 'Style/Tab,Style/SpaceAroundOperators',
|
|
918
|
+
'--lint',
|
|
919
|
+
'example.rb'])).to eq(1)
|
|
920
|
+
expect($stdout.string)
|
|
921
|
+
.to eq(['== example.rb ==',
|
|
922
|
+
'C: 1: 5: Surrounding space missing for operator ' \
|
|
923
|
+
"'=='.",
|
|
924
|
+
'C: 2: 1: Tab detected.',
|
|
925
|
+
'W: 2: 2: Useless assignment to variable - y.',
|
|
926
|
+
'',
|
|
927
|
+
'1 file inspected, 3 offenses detected',
|
|
928
|
+
''].join("\n"))
|
|
929
|
+
end
|
|
930
|
+
end
|
|
931
|
+
end
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
describe '--lint' do
|
|
935
|
+
it 'runs only lint cops' do
|
|
936
|
+
create_file('example.rb', ['if 0 ',
|
|
937
|
+
"\ty",
|
|
938
|
+
'end'])
|
|
939
|
+
# IfUnlessModifier depends on the configuration of LineLength.
|
|
940
|
+
|
|
941
|
+
expect(cli.run(['--format', 'simple', '--lint',
|
|
942
|
+
'example.rb'])).to eq(1)
|
|
943
|
+
expect($stdout.string)
|
|
944
|
+
.to eq(['== example.rb ==',
|
|
945
|
+
'W: 1: 4: Literal 0 appeared in a condition.',
|
|
946
|
+
'',
|
|
947
|
+
'1 file inspected, 1 offense detected',
|
|
948
|
+
''].join("\n"))
|
|
949
|
+
end
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
describe '-d/--debug' do
|
|
953
|
+
it 'shows config files' do
|
|
954
|
+
create_file('example1.rb', "\tputs 0")
|
|
955
|
+
expect(cli.run(['--debug', 'example1.rb'])).to eq(1)
|
|
956
|
+
home = File.dirname(File.dirname(File.dirname(__FILE__)))
|
|
957
|
+
expect($stdout.string.lines.grep(/configuration/).map(&:chomp))
|
|
958
|
+
.to eq(["For #{abs('')}:" \
|
|
959
|
+
" configuration from #{home}/config/default.yml",
|
|
960
|
+
"Inheriting configuration from #{home}/config/enabled.yml",
|
|
961
|
+
"Inheriting configuration from #{home}/config/disabled.yml"
|
|
962
|
+
])
|
|
963
|
+
end
|
|
964
|
+
|
|
965
|
+
it 'shows cop names' do
|
|
966
|
+
create_file('example1.rb', "\tputs 0")
|
|
967
|
+
expect(cli.run(['--format',
|
|
968
|
+
'emacs',
|
|
969
|
+
'--debug',
|
|
970
|
+
'example1.rb'])).to eq(1)
|
|
971
|
+
expect($stdout.string.lines.to_a[-1])
|
|
972
|
+
.to eq(["#{abs('example1.rb')}:1:1: C: Style/Tab: Tab detected.",
|
|
973
|
+
''].join("\n"))
|
|
974
|
+
end
|
|
975
|
+
end
|
|
976
|
+
|
|
977
|
+
describe '-D/--display-cop-names' do
|
|
978
|
+
it 'shows cop names' do
|
|
979
|
+
create_file('example1.rb', "\tputs 0")
|
|
980
|
+
expect(cli.run(['--format',
|
|
981
|
+
'emacs',
|
|
982
|
+
'--debug',
|
|
983
|
+
'example1.rb'])).to eq(1)
|
|
984
|
+
expect($stdout.string.lines.to_a[-1])
|
|
985
|
+
.to eq(["#{abs('example1.rb')}:1:1: C: Style/Tab: Tab detected.",
|
|
986
|
+
''].join("\n"))
|
|
987
|
+
end
|
|
988
|
+
end
|
|
989
|
+
|
|
990
|
+
describe '--show-cops' do
|
|
991
|
+
shared_examples(:prints_config) do
|
|
992
|
+
it 'prints the current configuration' do
|
|
993
|
+
out = stdout.lines.to_a
|
|
994
|
+
printed_config = YAML.load(out.join)
|
|
995
|
+
cop_names = (cop_list[0] || '').split(',')
|
|
996
|
+
cop_names.each do |cop_name|
|
|
997
|
+
global_conf[cop_name].each do |key, value|
|
|
998
|
+
printed_value = printed_config[cop_name][key]
|
|
999
|
+
expect(printed_value).to eq(value)
|
|
1000
|
+
end
|
|
1001
|
+
end
|
|
1002
|
+
end
|
|
1003
|
+
end
|
|
1004
|
+
|
|
1005
|
+
let(:cops) { RuboCop::Cop::Cop.all }
|
|
1006
|
+
|
|
1007
|
+
let(:global_conf) do
|
|
1008
|
+
config_path =
|
|
1009
|
+
RuboCop::ConfigLoader.configuration_file_for(Dir.pwd.to_s)
|
|
1010
|
+
RuboCop::ConfigLoader.configuration_from_file(config_path)
|
|
1011
|
+
end
|
|
1012
|
+
|
|
1013
|
+
let(:stdout) { $stdout.string }
|
|
1014
|
+
|
|
1015
|
+
before do
|
|
1016
|
+
create_file('.rubocop.yml', ['Metrics/LineLength:',
|
|
1017
|
+
' Max: 110'])
|
|
1018
|
+
expect { cli.run ['--show-cops'] + cop_list }.to exit_with_code(0)
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
context 'with no args' do
|
|
1022
|
+
let(:cop_list) { [] }
|
|
1023
|
+
|
|
1024
|
+
# Extracts the first line out of the description
|
|
1025
|
+
def short_description_of_cop(cop)
|
|
1026
|
+
desc = full_description_of_cop(cop)
|
|
1027
|
+
desc ? desc.lines.first.strip : ''
|
|
1028
|
+
end
|
|
1029
|
+
|
|
1030
|
+
# Gets the full description of the cop or nil if no description is set.
|
|
1031
|
+
def full_description_of_cop(cop)
|
|
1032
|
+
cop_config = global_conf.for_cop(cop)
|
|
1033
|
+
cop_config['Description']
|
|
1034
|
+
end
|
|
1035
|
+
|
|
1036
|
+
it 'prints all available cops and their description' do
|
|
1037
|
+
cops.each do |cop|
|
|
1038
|
+
expect(stdout).to include cop.cop_name
|
|
1039
|
+
# Because of line breaks, we will only find the beginning.
|
|
1040
|
+
expect(stdout).to include short_description_of_cop(cop)[0..60]
|
|
1041
|
+
end
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
it 'prints all types' do
|
|
1045
|
+
cops
|
|
1046
|
+
.types
|
|
1047
|
+
.map(&:to_s)
|
|
1048
|
+
.map(&:capitalize)
|
|
1049
|
+
.each { |type| expect(stdout).to include(type) }
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1052
|
+
it 'prints all cops in their right type listing' do
|
|
1053
|
+
lines = stdout.lines
|
|
1054
|
+
lines.slice_before(/Type /).each do |slice|
|
|
1055
|
+
types = cops.types.map(&:to_s).map(&:capitalize)
|
|
1056
|
+
current = types.delete(slice.shift[/Type '(?<c>[^']+)'/, 'c'])
|
|
1057
|
+
# all cops in their type listing
|
|
1058
|
+
cops.with_type(current).each do |cop|
|
|
1059
|
+
expect(slice.any? { |l| l.include? cop.cop_name }).to be_truthy
|
|
1060
|
+
end
|
|
1061
|
+
|
|
1062
|
+
# no cop in wrong type listing
|
|
1063
|
+
types.each do |type|
|
|
1064
|
+
cops.with_type(type).each do |cop|
|
|
1065
|
+
expect(slice.any? { |l| l.include? cop.cop_name }).to be_falsey
|
|
1066
|
+
end
|
|
1067
|
+
end
|
|
1068
|
+
end
|
|
1069
|
+
end
|
|
1070
|
+
|
|
1071
|
+
include_examples :prints_config
|
|
1072
|
+
end
|
|
1073
|
+
|
|
1074
|
+
context 'with one cop given' do
|
|
1075
|
+
let(:cop_list) { ['Style/Tab'] }
|
|
1076
|
+
|
|
1077
|
+
it 'prints that cop and nothing else' do
|
|
1078
|
+
expect(stdout).to eq(
|
|
1079
|
+
['# Supports --auto-correct',
|
|
1080
|
+
'Style/Tab:',
|
|
1081
|
+
' Description: No hard tabs.',
|
|
1082
|
+
' StyleGuide: ' \
|
|
1083
|
+
'https://github.com/bbatsov/ruby-style-guide#spaces-indentation',
|
|
1084
|
+
' Enabled: true',
|
|
1085
|
+
'',
|
|
1086
|
+
''].join("\n"))
|
|
1087
|
+
end
|
|
1088
|
+
|
|
1089
|
+
include_examples :prints_config
|
|
1090
|
+
end
|
|
1091
|
+
|
|
1092
|
+
context 'with two cops given' do
|
|
1093
|
+
let(:cop_list) { ['Style/Tab,Metrics/LineLength'] }
|
|
1094
|
+
include_examples :prints_config
|
|
1095
|
+
end
|
|
1096
|
+
|
|
1097
|
+
context 'with one of the cops misspelled' do
|
|
1098
|
+
let(:cop_list) { ['Style/Tab,Lint/X123'] }
|
|
1099
|
+
|
|
1100
|
+
it 'skips the unknown cop' do
|
|
1101
|
+
expect(stdout).to eq(
|
|
1102
|
+
['# Supports --auto-correct',
|
|
1103
|
+
'Style/Tab:',
|
|
1104
|
+
' Description: No hard tabs.',
|
|
1105
|
+
' StyleGuide: ' \
|
|
1106
|
+
'https://github.com/bbatsov/ruby-style-guide#spaces-indentation',
|
|
1107
|
+
' Enabled: true',
|
|
1108
|
+
'',
|
|
1109
|
+
''].join("\n"))
|
|
1110
|
+
end
|
|
1111
|
+
end
|
|
1112
|
+
end
|
|
1113
|
+
|
|
1114
|
+
describe '-f/--format' do
|
|
1115
|
+
let(:target_file) { 'example.rb' }
|
|
1116
|
+
|
|
1117
|
+
before do
|
|
1118
|
+
create_file(target_file, ['# encoding: utf-8',
|
|
1119
|
+
'#' * 90])
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
describe 'builtin formatters' do
|
|
1123
|
+
context 'when simple format is specified' do
|
|
1124
|
+
it 'outputs with simple format' do
|
|
1125
|
+
cli.run(['--format', 'simple', 'example.rb'])
|
|
1126
|
+
expect($stdout.string)
|
|
1127
|
+
.to include(["== #{target_file} ==",
|
|
1128
|
+
'C: 2: 81: Line is too long. [90/80]'].join("\n"))
|
|
1129
|
+
end
|
|
1130
|
+
end
|
|
1131
|
+
|
|
1132
|
+
context 'when clang format is specified' do
|
|
1133
|
+
it 'outputs with clang format' do
|
|
1134
|
+
create_file('example1.rb', ['# encoding: utf-8',
|
|
1135
|
+
'x= 0 ',
|
|
1136
|
+
'#' * 85,
|
|
1137
|
+
'y ',
|
|
1138
|
+
'puts x'])
|
|
1139
|
+
create_file('example2.rb', ['# encoding: utf-8',
|
|
1140
|
+
"\tx",
|
|
1141
|
+
'def a',
|
|
1142
|
+
' puts',
|
|
1143
|
+
'end'])
|
|
1144
|
+
create_file('example3.rb', ['# encoding: utf-8',
|
|
1145
|
+
'def badName',
|
|
1146
|
+
' if something',
|
|
1147
|
+
' test',
|
|
1148
|
+
' end',
|
|
1149
|
+
'end'])
|
|
1150
|
+
expect(cli.run(['--format', 'clang', 'example1.rb',
|
|
1151
|
+
'example2.rb', 'example3.rb']))
|
|
1152
|
+
.to eq(1)
|
|
1153
|
+
expect($stdout.string)
|
|
1154
|
+
.to eq(['example1.rb:2:2: C: Surrounding space missing for ' \
|
|
1155
|
+
"operator '='.",
|
|
1156
|
+
'x= 0 ',
|
|
1157
|
+
' ^',
|
|
1158
|
+
'example1.rb:2:5: C: Trailing whitespace detected.',
|
|
1159
|
+
'x= 0 ',
|
|
1160
|
+
' ^',
|
|
1161
|
+
'example1.rb:3:81: C: Line is too long. [85/80]',
|
|
1162
|
+
'###################################################' \
|
|
1163
|
+
'##################################',
|
|
1164
|
+
' ' \
|
|
1165
|
+
' ^^^^^',
|
|
1166
|
+
'example1.rb:4:2: C: Trailing whitespace detected.',
|
|
1167
|
+
'y ',
|
|
1168
|
+
' ^',
|
|
1169
|
+
'example2.rb:1:1: C: Incorrect indentation detected' \
|
|
1170
|
+
' (column 0 instead of 1).',
|
|
1171
|
+
'# encoding: utf-8',
|
|
1172
|
+
'^^^^^^^^^^^^^^^^^',
|
|
1173
|
+
'example2.rb:2:1: C: Tab detected.',
|
|
1174
|
+
"\tx",
|
|
1175
|
+
'^',
|
|
1176
|
+
'example2.rb:3:1: C: Inconsistent indentation ' \
|
|
1177
|
+
'detected.',
|
|
1178
|
+
'def a',
|
|
1179
|
+
'^^^^^',
|
|
1180
|
+
'example2.rb:4:1: C: Use 2 (not 3) spaces for ' \
|
|
1181
|
+
'indentation.',
|
|
1182
|
+
' puts',
|
|
1183
|
+
'^^^',
|
|
1184
|
+
'example3.rb:2:5: C: Use snake_case for methods.',
|
|
1185
|
+
'def badName',
|
|
1186
|
+
' ^^^^^^^',
|
|
1187
|
+
'example3.rb:3:3: C: Use a guard clause instead of ' \
|
|
1188
|
+
'wrapping the code inside a conditional expression.',
|
|
1189
|
+
' if something',
|
|
1190
|
+
' ^^',
|
|
1191
|
+
'example3.rb:3:3: C: Favor modifier if usage ' \
|
|
1192
|
+
'when having a single-line body. Another good ' \
|
|
1193
|
+
'alternative is the usage of control flow &&/||.',
|
|
1194
|
+
' if something',
|
|
1195
|
+
' ^^',
|
|
1196
|
+
'example3.rb:5:5: W: end at 5, 4 is not aligned ' \
|
|
1197
|
+
'with if at 3, 2',
|
|
1198
|
+
' end',
|
|
1199
|
+
' ^^^',
|
|
1200
|
+
'',
|
|
1201
|
+
'3 files inspected, 12 offenses detected',
|
|
1202
|
+
''].join("\n"))
|
|
1203
|
+
end
|
|
1204
|
+
end
|
|
1205
|
+
|
|
1206
|
+
context 'when emacs format is specified' do
|
|
1207
|
+
it 'outputs with emacs format' do
|
|
1208
|
+
create_file('example1.rb', ['# encoding: utf-8',
|
|
1209
|
+
'x= 0 ',
|
|
1210
|
+
'y ',
|
|
1211
|
+
'puts x'])
|
|
1212
|
+
create_file('example2.rb', ['# encoding: utf-8',
|
|
1213
|
+
"\tx = 0",
|
|
1214
|
+
'puts x'])
|
|
1215
|
+
expect(cli.run(['--format', 'emacs', 'example1.rb',
|
|
1216
|
+
'example2.rb'])).to eq(1)
|
|
1217
|
+
expected_output =
|
|
1218
|
+
["#{abs('example1.rb')}:2:2: C: Surrounding space missing" \
|
|
1219
|
+
" for operator '='.",
|
|
1220
|
+
"#{abs('example1.rb')}:2:5: C: Trailing whitespace detected.",
|
|
1221
|
+
"#{abs('example1.rb')}:3:2: C: Trailing whitespace detected.",
|
|
1222
|
+
"#{abs('example2.rb')}:1:1: C: Incorrect indentation detected" \
|
|
1223
|
+
' (column 0 instead of 1).',
|
|
1224
|
+
"#{abs('example2.rb')}:2:1: C: Tab detected.",
|
|
1225
|
+
"#{abs('example2.rb')}:3:1: C: Inconsistent indentation " \
|
|
1226
|
+
'detected.',
|
|
1227
|
+
''].join("\n")
|
|
1228
|
+
expect($stdout.string).to eq(expected_output)
|
|
1229
|
+
end
|
|
1230
|
+
end
|
|
1231
|
+
|
|
1232
|
+
context 'when unknown format name is specified' do
|
|
1233
|
+
it 'aborts with error message' do
|
|
1234
|
+
expect { cli.run(['--format', 'unknown', 'example.rb']) }
|
|
1235
|
+
.to exit_with_code(1)
|
|
1236
|
+
expect($stderr.string)
|
|
1237
|
+
.to include('No formatter for "unknown"')
|
|
1238
|
+
end
|
|
1239
|
+
end
|
|
1240
|
+
end
|
|
1241
|
+
|
|
1242
|
+
describe 'custom formatter' do
|
|
1243
|
+
let(:target_file) { abs('example.rb') }
|
|
1244
|
+
|
|
1245
|
+
context 'when a class name is specified' do
|
|
1246
|
+
it 'uses the class as a formatter' do
|
|
1247
|
+
module MyTool
|
|
1248
|
+
class RuboCopFormatter < RuboCop::Formatter::BaseFormatter
|
|
1249
|
+
def started(all_files)
|
|
1250
|
+
output.puts "started: #{all_files.join(',')}"
|
|
1251
|
+
end
|
|
1252
|
+
|
|
1253
|
+
def file_started(file, _options)
|
|
1254
|
+
output.puts "file_started: #{file}"
|
|
1255
|
+
end
|
|
1256
|
+
|
|
1257
|
+
def file_finished(file, _offenses)
|
|
1258
|
+
output.puts "file_finished: #{file}"
|
|
1259
|
+
end
|
|
1260
|
+
|
|
1261
|
+
def finished(processed_files)
|
|
1262
|
+
output.puts "finished: #{processed_files.join(',')}"
|
|
1263
|
+
end
|
|
1264
|
+
end
|
|
1265
|
+
end
|
|
1266
|
+
|
|
1267
|
+
cli.run(['--format', 'MyTool::RuboCopFormatter', 'example.rb'])
|
|
1268
|
+
expect($stdout.string).to eq(["started: #{target_file}",
|
|
1269
|
+
"file_started: #{target_file}",
|
|
1270
|
+
"file_finished: #{target_file}",
|
|
1271
|
+
"finished: #{target_file}",
|
|
1272
|
+
''].join("\n"))
|
|
1273
|
+
end
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
context 'when unknown class name is specified' do
|
|
1277
|
+
it 'aborts with error message' do
|
|
1278
|
+
args = '--format UnknownFormatter example.rb'
|
|
1279
|
+
expect { cli.run(args.split) }.to exit_with_code(1)
|
|
1280
|
+
expect($stderr.string).to include('UnknownFormatter')
|
|
1281
|
+
end
|
|
1282
|
+
end
|
|
1283
|
+
end
|
|
1284
|
+
|
|
1285
|
+
it 'can be used multiple times' do
|
|
1286
|
+
cli.run(['--format', 'simple', '--format', 'emacs', 'example.rb'])
|
|
1287
|
+
expect($stdout.string)
|
|
1288
|
+
.to include(["== #{target_file} ==",
|
|
1289
|
+
'C: 2: 81: Line is too long. [90/80]',
|
|
1290
|
+
"#{abs(target_file)}:2:81: C: Line is too long. " \
|
|
1291
|
+
'[90/80]'].join("\n"))
|
|
1292
|
+
end
|
|
1293
|
+
end
|
|
1294
|
+
|
|
1295
|
+
describe '-o/--out option' do
|
|
1296
|
+
let(:target_file) { 'example.rb' }
|
|
1297
|
+
|
|
1298
|
+
before do
|
|
1299
|
+
create_file(target_file, ['# encoding: utf-8',
|
|
1300
|
+
'#' * 90])
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
it 'redirects output to the specified file' do
|
|
1304
|
+
cli.run(['--out', 'output.txt', target_file])
|
|
1305
|
+
expect(File.read('output.txt')).to include('Line is too long.')
|
|
1306
|
+
end
|
|
1307
|
+
|
|
1308
|
+
it 'is applied to the previously specified formatter' do
|
|
1309
|
+
cli.run(['--format', 'simple',
|
|
1310
|
+
'--format', 'emacs', '--out', 'emacs_output.txt',
|
|
1311
|
+
target_file])
|
|
1312
|
+
|
|
1313
|
+
expect($stdout.string).to eq(["== #{target_file} ==",
|
|
1314
|
+
'C: 2: 81: Line is too long. [90/80]',
|
|
1315
|
+
'',
|
|
1316
|
+
'1 file inspected, 1 offense detected',
|
|
1317
|
+
''].join("\n"))
|
|
1318
|
+
|
|
1319
|
+
expect(File.read('emacs_output.txt'))
|
|
1320
|
+
.to eq(["#{abs(target_file)}:2:81: C: Line is too long. [90/80]",
|
|
1321
|
+
''].join("\n"))
|
|
1322
|
+
end
|
|
1323
|
+
end
|
|
1324
|
+
|
|
1325
|
+
describe '--fail-level option' do
|
|
1326
|
+
let(:target_file) { 'example.rb' }
|
|
1327
|
+
|
|
1328
|
+
before do
|
|
1329
|
+
create_file(target_file, ['# encoding: utf-8',
|
|
1330
|
+
'#' * 90])
|
|
1331
|
+
end
|
|
1332
|
+
|
|
1333
|
+
it 'fails when option is less than the severity level' do
|
|
1334
|
+
expect(cli.run(['--fail-level', 'convention', target_file])).to eq(1)
|
|
1335
|
+
end
|
|
1336
|
+
|
|
1337
|
+
it 'succeed when option is greater than the severity level' do
|
|
1338
|
+
expect(cli.run(['--fail-level', 'warning', target_file])).to eq(0)
|
|
1339
|
+
end
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
describe '--force-exclusion' do
|
|
1343
|
+
let(:target_file) { 'example.rb' }
|
|
1344
|
+
|
|
1345
|
+
before do
|
|
1346
|
+
create_file(target_file, ['# encoding: utf-8',
|
|
1347
|
+
'#' * 90])
|
|
1348
|
+
|
|
1349
|
+
create_file('.rubocop.yml', ['AllCops:',
|
|
1350
|
+
' Exclude:',
|
|
1351
|
+
" - #{target_file}"])
|
|
1352
|
+
|
|
1353
|
+
end
|
|
1354
|
+
|
|
1355
|
+
it 'excludes files specified in the configuration Exclude ' \
|
|
1356
|
+
'even if they are explicitly passed as arguments' do
|
|
1357
|
+
expect(cli.run(['--force-exclusion', target_file])).to eq(0)
|
|
1358
|
+
end
|
|
1359
|
+
end
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
context 'when interrupted' do
|
|
1363
|
+
it 'returns 1' do
|
|
1364
|
+
allow_any_instance_of(RuboCop::Runner)
|
|
1365
|
+
.to receive(:aborting?).and_return(true)
|
|
1366
|
+
create_file('example.rb', '# encoding: utf-8')
|
|
1367
|
+
expect(cli.run(['example.rb'])).to eq(1)
|
|
1368
|
+
end
|
|
1369
|
+
end
|
|
1370
|
+
|
|
1371
|
+
describe '#trap_interrupt' do
|
|
1372
|
+
let(:runner) { RuboCop::Runner.new({}, RuboCop::ConfigStore.new) }
|
|
1373
|
+
let(:interrupt_handlers) { [] }
|
|
1374
|
+
|
|
1375
|
+
before do
|
|
1376
|
+
allow(Signal).to receive(:trap).with('INT') do |&block|
|
|
1377
|
+
interrupt_handlers << block
|
|
1378
|
+
end
|
|
1379
|
+
end
|
|
1380
|
+
|
|
1381
|
+
def interrupt
|
|
1382
|
+
interrupt_handlers.each(&:call)
|
|
1383
|
+
end
|
|
1384
|
+
|
|
1385
|
+
it 'adds a handler for SIGINT' do
|
|
1386
|
+
expect(interrupt_handlers).to be_empty
|
|
1387
|
+
cli.trap_interrupt(runner)
|
|
1388
|
+
expect(interrupt_handlers.size).to eq(1)
|
|
1389
|
+
end
|
|
1390
|
+
|
|
1391
|
+
context 'with SIGINT once' do
|
|
1392
|
+
it 'aborts processing' do
|
|
1393
|
+
cli.trap_interrupt(runner)
|
|
1394
|
+
expect(runner).to receive(:abort)
|
|
1395
|
+
interrupt
|
|
1396
|
+
end
|
|
1397
|
+
|
|
1398
|
+
it 'does not exit immediately' do
|
|
1399
|
+
cli.trap_interrupt(runner)
|
|
1400
|
+
expect_any_instance_of(Object).not_to receive(:exit)
|
|
1401
|
+
expect_any_instance_of(Object).not_to receive(:exit!)
|
|
1402
|
+
interrupt
|
|
1403
|
+
end
|
|
1404
|
+
end
|
|
1405
|
+
|
|
1406
|
+
context 'with SIGINT twice' do
|
|
1407
|
+
it 'exits immediately' do
|
|
1408
|
+
cli.trap_interrupt(runner)
|
|
1409
|
+
expect_any_instance_of(Object).to receive(:exit!).with(1)
|
|
1410
|
+
interrupt
|
|
1411
|
+
interrupt
|
|
1412
|
+
end
|
|
1413
|
+
end
|
|
1414
|
+
end
|
|
1415
|
+
|
|
1416
|
+
it 'checks a given correct file and returns 0' do
|
|
1417
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1418
|
+
'x = 0',
|
|
1419
|
+
'puts x'])
|
|
1420
|
+
expect(cli.run(['--format', 'simple', 'example.rb'])).to eq(0)
|
|
1421
|
+
expect($stdout.string)
|
|
1422
|
+
.to eq(['',
|
|
1423
|
+
'1 file inspected, no offenses detected',
|
|
1424
|
+
''].join("\n"))
|
|
1425
|
+
end
|
|
1426
|
+
|
|
1427
|
+
it 'checks a given file with faults and returns 1' do
|
|
1428
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1429
|
+
'x = 0 ',
|
|
1430
|
+
'puts x'])
|
|
1431
|
+
expect(cli.run(['--format', 'simple', 'example.rb'])).to eq(1)
|
|
1432
|
+
expect($stdout.string)
|
|
1433
|
+
.to eq ['== example.rb ==',
|
|
1434
|
+
'C: 2: 6: Trailing whitespace detected.',
|
|
1435
|
+
'',
|
|
1436
|
+
'1 file inspected, 1 offense detected',
|
|
1437
|
+
''].join("\n")
|
|
1438
|
+
end
|
|
1439
|
+
|
|
1440
|
+
it 'registers an offense for a syntax error' do
|
|
1441
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1442
|
+
'class Test',
|
|
1443
|
+
'en'])
|
|
1444
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1445
|
+
expect($stdout.string)
|
|
1446
|
+
.to eq(["#{abs('example.rb')}:4:1: E: unexpected " \
|
|
1447
|
+
'token $end',
|
|
1448
|
+
''].join("\n"))
|
|
1449
|
+
end
|
|
1450
|
+
|
|
1451
|
+
it 'registers an offense for Parser warnings' do
|
|
1452
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1453
|
+
'puts *test',
|
|
1454
|
+
'if a then b else c end'])
|
|
1455
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1456
|
+
expect($stdout.string)
|
|
1457
|
+
.to eq(["#{abs('example.rb')}:2:6: W: " \
|
|
1458
|
+
'Ambiguous splat operator. Parenthesize the method arguments ' \
|
|
1459
|
+
"if it's surely a splat operator, or add a whitespace to the " \
|
|
1460
|
+
'right of the `*` if it should be a multiplication.',
|
|
1461
|
+
"#{abs('example.rb')}:3:1: C: " \
|
|
1462
|
+
'Favor the ternary operator (?:) over if/then/else/end ' \
|
|
1463
|
+
'constructs.',
|
|
1464
|
+
''].join("\n"))
|
|
1465
|
+
end
|
|
1466
|
+
|
|
1467
|
+
it 'can process a file with an invalid UTF-8 byte sequence' do
|
|
1468
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1469
|
+
"# #{'f9'.hex.chr}#{'29'.hex.chr}"])
|
|
1470
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1471
|
+
expect($stdout.string)
|
|
1472
|
+
.to eq(["#{abs('example.rb')}:1:1: F: Invalid byte sequence in utf-8.",
|
|
1473
|
+
''].join("\n"))
|
|
1474
|
+
end
|
|
1475
|
+
|
|
1476
|
+
context 'when errors are raised while processing files due to bugs' do
|
|
1477
|
+
let(:errors) do
|
|
1478
|
+
['An error occurred while Encoding cop was inspecting file.rb.']
|
|
1479
|
+
end
|
|
1480
|
+
|
|
1481
|
+
before do
|
|
1482
|
+
allow_any_instance_of(RuboCop::Runner)
|
|
1483
|
+
.to receive(:errors).and_return(errors)
|
|
1484
|
+
end
|
|
1485
|
+
|
|
1486
|
+
it 'displays an error message to stderr' do
|
|
1487
|
+
cli.run([])
|
|
1488
|
+
expect($stderr.string)
|
|
1489
|
+
.to include('1 error occurred:').and include(errors.first)
|
|
1490
|
+
end
|
|
1491
|
+
end
|
|
1492
|
+
|
|
1493
|
+
describe 'rubocop:disable comment' do
|
|
1494
|
+
it 'can disable all cops in a code section' do
|
|
1495
|
+
src = ['# encoding: utf-8',
|
|
1496
|
+
'# rubocop:disable all',
|
|
1497
|
+
'#' * 90,
|
|
1498
|
+
'x(123456)',
|
|
1499
|
+
'y("123")',
|
|
1500
|
+
'def func',
|
|
1501
|
+
' # rubocop: enable Metrics/LineLength,Style/StringLiterals',
|
|
1502
|
+
' ' + '#' * 93,
|
|
1503
|
+
' x(123456)',
|
|
1504
|
+
' y("123")',
|
|
1505
|
+
'end']
|
|
1506
|
+
create_file('example.rb', src)
|
|
1507
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1508
|
+
# all cops were disabled, then 2 were enabled again, so we
|
|
1509
|
+
# should get 2 offenses reported.
|
|
1510
|
+
expect($stdout.string)
|
|
1511
|
+
.to eq(["#{abs('example.rb')}:8:81: C: Line is too long. [95/80]",
|
|
1512
|
+
"#{abs('example.rb')}:10:5: C: Prefer single-quoted " \
|
|
1513
|
+
"strings when you don't need string interpolation or " \
|
|
1514
|
+
'special symbols.',
|
|
1515
|
+
''].join("\n"))
|
|
1516
|
+
end
|
|
1517
|
+
|
|
1518
|
+
it 'can disable selected cops in a code section' do
|
|
1519
|
+
create_file('example.rb',
|
|
1520
|
+
['# encoding: utf-8',
|
|
1521
|
+
'# rubocop:disable Style/LineLength,' \
|
|
1522
|
+
'Style/NumericLiterals,Style/StringLiterals',
|
|
1523
|
+
'#' * 90,
|
|
1524
|
+
'x(123456)',
|
|
1525
|
+
'y("123")',
|
|
1526
|
+
'def func',
|
|
1527
|
+
' # rubocop: enable Metrics/LineLength, ' \
|
|
1528
|
+
'Style/StringLiterals',
|
|
1529
|
+
' ' + '#' * 93,
|
|
1530
|
+
' x(123456)',
|
|
1531
|
+
' y("123")',
|
|
1532
|
+
'end'])
|
|
1533
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1534
|
+
expect($stderr.string)
|
|
1535
|
+
.to eq(["#{abs('example.rb')}: Style/LineLength has the wrong " \
|
|
1536
|
+
'namespace - should be Metrics',
|
|
1537
|
+
''].join("\n"))
|
|
1538
|
+
# 3 cops were disabled, then 2 were enabled again, so we
|
|
1539
|
+
# should get 2 offenses reported.
|
|
1540
|
+
expect($stdout.string)
|
|
1541
|
+
.to eq(["#{abs('example.rb')}:8:81: C: Line is too long. [95/80]",
|
|
1542
|
+
"#{abs('example.rb')}:10:5: C: Prefer single-quoted " \
|
|
1543
|
+
"strings when you don't need string interpolation or " \
|
|
1544
|
+
'special symbols.',
|
|
1545
|
+
''].join("\n"))
|
|
1546
|
+
end
|
|
1547
|
+
|
|
1548
|
+
it 'can disable all cops on a single line' do
|
|
1549
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1550
|
+
'y("123", 123456) # rubocop:disable all'
|
|
1551
|
+
])
|
|
1552
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(0)
|
|
1553
|
+
expect($stdout.string).to be_empty
|
|
1554
|
+
end
|
|
1555
|
+
|
|
1556
|
+
it 'can disable selected cops on a single line' do
|
|
1557
|
+
create_file('example.rb',
|
|
1558
|
+
['# encoding: utf-8',
|
|
1559
|
+
'a' * 90 + ' # rubocop:disable Metrics/LineLength',
|
|
1560
|
+
'#' * 95,
|
|
1561
|
+
'y("123") # rubocop:disable Metrics/LineLength,' \
|
|
1562
|
+
'Style/StringLiterals'
|
|
1563
|
+
])
|
|
1564
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1565
|
+
expect($stdout.string)
|
|
1566
|
+
.to eq(
|
|
1567
|
+
["#{abs('example.rb')}:3:81: C: Line is too long. [95/80]",
|
|
1568
|
+
''].join("\n"))
|
|
1569
|
+
end
|
|
1570
|
+
|
|
1571
|
+
context 'without using namespace' do
|
|
1572
|
+
it 'can disable selected cops on a single line' do
|
|
1573
|
+
create_file('example.rb',
|
|
1574
|
+
['# encoding: utf-8',
|
|
1575
|
+
'a' * 90 + ' # rubocop:disable LineLength',
|
|
1576
|
+
'#' * 95,
|
|
1577
|
+
'y("123") # rubocop:disable StringLiterals'
|
|
1578
|
+
])
|
|
1579
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1580
|
+
expect($stdout.string)
|
|
1581
|
+
.to eq(
|
|
1582
|
+
["#{abs('example.rb')}:3:81: C: Line is too long. [95/80]",
|
|
1583
|
+
''].join("\n"))
|
|
1584
|
+
end
|
|
1585
|
+
end
|
|
1586
|
+
end
|
|
1587
|
+
|
|
1588
|
+
it 'finds a file with no .rb extension but has a shebang line' do
|
|
1589
|
+
create_file('example', ['#!/usr/bin/env ruby',
|
|
1590
|
+
'# encoding: utf-8',
|
|
1591
|
+
'x = 0',
|
|
1592
|
+
'puts x'
|
|
1593
|
+
])
|
|
1594
|
+
expect(cli.run(%w(--format simple))).to eq(0)
|
|
1595
|
+
expect($stdout.string)
|
|
1596
|
+
.to eq(['', '1 file inspected, no offenses detected', ''].join("\n"))
|
|
1597
|
+
end
|
|
1598
|
+
|
|
1599
|
+
it 'does not register any offenses for an empty file' do
|
|
1600
|
+
create_file('example.rb', '')
|
|
1601
|
+
expect(cli.run(%w(--format simple))).to eq(0)
|
|
1602
|
+
expect($stdout.string)
|
|
1603
|
+
.to eq(['', '1 file inspected, no offenses detected', ''].join("\n"))
|
|
1604
|
+
end
|
|
1605
|
+
|
|
1606
|
+
describe 'rails cops' do
|
|
1607
|
+
describe 'enabling/disabling' do
|
|
1608
|
+
it 'by default does not run rails cops' do
|
|
1609
|
+
create_file('app/models/example1.rb', ['# encoding: utf-8',
|
|
1610
|
+
'read_attribute(:test)'])
|
|
1611
|
+
expect(cli.run(['--format', 'simple', 'app/models/example1.rb']))
|
|
1612
|
+
.to eq(0)
|
|
1613
|
+
end
|
|
1614
|
+
|
|
1615
|
+
it 'with -R given runs rails cops' do
|
|
1616
|
+
create_file('app/models/example1.rb', ['# encoding: utf-8',
|
|
1617
|
+
'read_attribute(:test)'])
|
|
1618
|
+
expect(cli.run(['--format', 'simple', '-R', 'app/models/example1.rb']))
|
|
1619
|
+
.to eq(1)
|
|
1620
|
+
expect($stdout.string).to include('Prefer self[:attr]')
|
|
1621
|
+
end
|
|
1622
|
+
|
|
1623
|
+
it 'with configation option true in one dir runs rails cops there' do
|
|
1624
|
+
source = ['# encoding: utf-8',
|
|
1625
|
+
'read_attribute(:test)']
|
|
1626
|
+
create_file('dir1/app/models/example1.rb', source)
|
|
1627
|
+
create_file('dir1/.rubocop.yml', ['AllCops:',
|
|
1628
|
+
' RunRailsCops: true',
|
|
1629
|
+
'',
|
|
1630
|
+
'Rails/ReadWriteAttribute:',
|
|
1631
|
+
' Include:',
|
|
1632
|
+
' - app/models/**/*.rb'])
|
|
1633
|
+
create_file('dir2/app/models/example2.rb', source)
|
|
1634
|
+
create_file('dir2/.rubocop.yml', ['AllCops:',
|
|
1635
|
+
' RunRailsCops: false',
|
|
1636
|
+
'',
|
|
1637
|
+
'Rails/ReadWriteAttribute:',
|
|
1638
|
+
' Include:',
|
|
1639
|
+
' - app/models/**/*.rb'])
|
|
1640
|
+
expect(cli.run(%w(--format simple dir1 dir2))).to eq(1)
|
|
1641
|
+
expect($stdout.string)
|
|
1642
|
+
.to eq(['== dir1/app/models/example1.rb ==',
|
|
1643
|
+
'C: 2: 1: Prefer self[:attr] over read_attribute' \
|
|
1644
|
+
'(:attr).',
|
|
1645
|
+
'',
|
|
1646
|
+
'2 files inspected, 1 offense detected',
|
|
1647
|
+
''].join("\n"))
|
|
1648
|
+
end
|
|
1649
|
+
|
|
1650
|
+
it 'with configation option false but -R given runs rails cops' do
|
|
1651
|
+
create_file('app/models/example1.rb', ['# encoding: utf-8',
|
|
1652
|
+
'read_attribute(:test)'])
|
|
1653
|
+
create_file('.rubocop.yml', ['AllCops:',
|
|
1654
|
+
' RunRailsCops: false'])
|
|
1655
|
+
expect(cli.run(['--format', 'simple', '-R', 'app/models/example1.rb']))
|
|
1656
|
+
.to eq(1)
|
|
1657
|
+
expect($stdout.string).to include('Prefer self[:attr]')
|
|
1658
|
+
end
|
|
1659
|
+
end
|
|
1660
|
+
|
|
1661
|
+
describe 'including/excluding' do
|
|
1662
|
+
it 'includes some directories by default' do
|
|
1663
|
+
source = ['# encoding: utf-8',
|
|
1664
|
+
'read_attribute(:test)',
|
|
1665
|
+
"default_scope order: 'position'"]
|
|
1666
|
+
# Several rails cops include app/models by default.
|
|
1667
|
+
create_file('dir1/app/models/example1.rb', source)
|
|
1668
|
+
create_file('dir1/app/models/example2.rb', source)
|
|
1669
|
+
# No rails cops include app/views by default.
|
|
1670
|
+
create_file('dir1/app/views/example3.rb', source)
|
|
1671
|
+
# The .rubocop.yml file inherits from default.yml where the Include
|
|
1672
|
+
# config parameter is set for the rails cops. The paths are interpreted
|
|
1673
|
+
# as relative to dir1 because .rubocop.yml is placed there.
|
|
1674
|
+
create_file('dir1/.rubocop.yml', ['AllCops:',
|
|
1675
|
+
' RunRailsCops: true',
|
|
1676
|
+
'',
|
|
1677
|
+
'Rails/ReadWriteAttribute:',
|
|
1678
|
+
' Exclude:',
|
|
1679
|
+
' - "**/example2.rb"',
|
|
1680
|
+
'',
|
|
1681
|
+
'Rails/DefaultScope:',
|
|
1682
|
+
' Exclude:',
|
|
1683
|
+
' - "**/example2.rb"'])
|
|
1684
|
+
# No .rubocop.yml file in dir2 means that the paths from default.yml
|
|
1685
|
+
# are interpreted as relative to the current directory, so they don't
|
|
1686
|
+
# match.
|
|
1687
|
+
create_file('dir2/app/models/example4.rb', source)
|
|
1688
|
+
|
|
1689
|
+
expect(cli.run(%w(--format simple dir1 dir2))).to eq(1)
|
|
1690
|
+
expect($stdout.string)
|
|
1691
|
+
.to eq(['== dir1/app/models/example1.rb ==',
|
|
1692
|
+
'C: 2: 1: Prefer self[:attr] over read_attribute' \
|
|
1693
|
+
'(:attr).',
|
|
1694
|
+
'C: 3: 15: default_scope expects a block as its sole' \
|
|
1695
|
+
' argument.',
|
|
1696
|
+
'',
|
|
1697
|
+
'4 files inspected, 2 offenses detected',
|
|
1698
|
+
''].join("\n"))
|
|
1699
|
+
end
|
|
1700
|
+
end
|
|
1701
|
+
end
|
|
1702
|
+
|
|
1703
|
+
describe 'cops can exclude files based on config' do
|
|
1704
|
+
it 'ignores excluded files' do
|
|
1705
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1706
|
+
'x = 0'])
|
|
1707
|
+
create_file('regexp.rb', ['# encoding: utf-8',
|
|
1708
|
+
'x = 0'])
|
|
1709
|
+
create_file('exclude_glob.rb', ['#!/usr/bin/env ruby',
|
|
1710
|
+
'# encoding: utf-8',
|
|
1711
|
+
'x = 0'])
|
|
1712
|
+
create_file('dir/thing.rb', ['# encoding: utf-8',
|
|
1713
|
+
'x = 0'])
|
|
1714
|
+
create_file('.rubocop.yml', ['Lint/UselessAssignment:',
|
|
1715
|
+
' Exclude:',
|
|
1716
|
+
' - example.rb',
|
|
1717
|
+
' - !ruby/regexp /regexp.rb\z/',
|
|
1718
|
+
' - "exclude_*"',
|
|
1719
|
+
' - "dir/*"'])
|
|
1720
|
+
expect(cli.run(%w(--format simple))).to eq(0)
|
|
1721
|
+
expect($stdout.string)
|
|
1722
|
+
.to eq(['', '4 files inspected, no offenses detected',
|
|
1723
|
+
''].join("\n"))
|
|
1724
|
+
end
|
|
1725
|
+
|
|
1726
|
+
end
|
|
1727
|
+
|
|
1728
|
+
describe 'configuration from file' do
|
|
1729
|
+
it 'allows the default configuration file as the -c argument' do
|
|
1730
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1731
|
+
'x = 0',
|
|
1732
|
+
'puts x'
|
|
1733
|
+
])
|
|
1734
|
+
create_file('.rubocop.yml', [])
|
|
1735
|
+
|
|
1736
|
+
expect(cli.run(%w(--format simple -c .rubocop.yml))).to eq(0)
|
|
1737
|
+
expect($stdout.string)
|
|
1738
|
+
.to eq(['', '1 file inspected, no offenses detected',
|
|
1739
|
+
''].join("\n"))
|
|
1740
|
+
end
|
|
1741
|
+
|
|
1742
|
+
it 'finds included files' do
|
|
1743
|
+
create_file('example', ['# encoding: utf-8',
|
|
1744
|
+
'x = 0',
|
|
1745
|
+
'puts x'
|
|
1746
|
+
])
|
|
1747
|
+
create_file('regexp', ['# encoding: utf-8',
|
|
1748
|
+
'x = 0',
|
|
1749
|
+
'puts x'
|
|
1750
|
+
])
|
|
1751
|
+
create_file('.rubocop.yml', ['AllCops:',
|
|
1752
|
+
' Include:',
|
|
1753
|
+
' - example',
|
|
1754
|
+
' - !ruby/regexp /regexp$/'
|
|
1755
|
+
])
|
|
1756
|
+
expect(cli.run(%w(--format simple))).to eq(0)
|
|
1757
|
+
expect($stdout.string)
|
|
1758
|
+
.to eq(['', '2 files inspected, no offenses detected',
|
|
1759
|
+
''].join("\n"))
|
|
1760
|
+
end
|
|
1761
|
+
|
|
1762
|
+
it 'ignores excluded files' do
|
|
1763
|
+
create_file('example.rb', ['# encoding: utf-8',
|
|
1764
|
+
'x = 0',
|
|
1765
|
+
'puts x'
|
|
1766
|
+
])
|
|
1767
|
+
create_file('regexp.rb', ['# encoding: utf-8',
|
|
1768
|
+
'x = 0',
|
|
1769
|
+
'puts x'
|
|
1770
|
+
])
|
|
1771
|
+
create_file('exclude_glob.rb', ['#!/usr/bin/env ruby',
|
|
1772
|
+
'# encoding: utf-8',
|
|
1773
|
+
'x = 0',
|
|
1774
|
+
'puts x'
|
|
1775
|
+
])
|
|
1776
|
+
create_file('.rubocop.yml', ['AllCops:',
|
|
1777
|
+
' Exclude:',
|
|
1778
|
+
' - example.rb',
|
|
1779
|
+
' - !ruby/regexp /regexp.rb$/',
|
|
1780
|
+
' - "exclude_*"'
|
|
1781
|
+
])
|
|
1782
|
+
expect(cli.run(%w(--format simple))).to eq(0)
|
|
1783
|
+
expect($stdout.string)
|
|
1784
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
1785
|
+
''].join("\n"))
|
|
1786
|
+
end
|
|
1787
|
+
|
|
1788
|
+
it 'matches included/excluded files corectly when . argument is given' do
|
|
1789
|
+
create_file('example.rb', 'x = 0')
|
|
1790
|
+
create_file('special.dsl', ['# encoding: utf-8',
|
|
1791
|
+
'setup { "stuff" }'
|
|
1792
|
+
])
|
|
1793
|
+
create_file('.rubocop.yml', ['AllCops:',
|
|
1794
|
+
' Include:',
|
|
1795
|
+
' - "*.dsl"',
|
|
1796
|
+
' Exclude:',
|
|
1797
|
+
' - example.rb'
|
|
1798
|
+
])
|
|
1799
|
+
expect(cli.run(%w(--format simple .))).to eq(1)
|
|
1800
|
+
expect($stdout.string)
|
|
1801
|
+
.to eq(['== special.dsl ==',
|
|
1802
|
+
"C: 2: 9: Prefer single-quoted strings when you don't " \
|
|
1803
|
+
'need string interpolation or special symbols.',
|
|
1804
|
+
'',
|
|
1805
|
+
'1 file inspected, 1 offense detected',
|
|
1806
|
+
''].join("\n"))
|
|
1807
|
+
end
|
|
1808
|
+
|
|
1809
|
+
# With rubinius 2.0.0.rc1 + rspec 2.13.1,
|
|
1810
|
+
# File.stub(:open).and_call_original causes SystemStackError.
|
|
1811
|
+
it 'does not read files in excluded list', broken: :rbx do
|
|
1812
|
+
%w(rb.rb non-rb.ext without-ext).each do |filename|
|
|
1813
|
+
create_file("example/ignored/#{filename}", ['# encoding: utf-8',
|
|
1814
|
+
'#' * 90
|
|
1815
|
+
])
|
|
1816
|
+
end
|
|
1817
|
+
|
|
1818
|
+
create_file('example/.rubocop.yml', ['AllCops:',
|
|
1819
|
+
' Exclude:',
|
|
1820
|
+
' - ignored/**'])
|
|
1821
|
+
expect(File).not_to receive(:open).with(%r{/ignored/})
|
|
1822
|
+
allow(File).to receive(:open).and_call_original
|
|
1823
|
+
expect(cli.run(%w(--format simple example))).to eq(0)
|
|
1824
|
+
expect($stdout.string)
|
|
1825
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
1826
|
+
''].join("\n"))
|
|
1827
|
+
end
|
|
1828
|
+
|
|
1829
|
+
it 'can be configured with option to disable a certain error' do
|
|
1830
|
+
create_file('example1.rb', 'puts 0 ')
|
|
1831
|
+
create_file('rubocop.yml', ['Style/Encoding:',
|
|
1832
|
+
' Enabled: false',
|
|
1833
|
+
'',
|
|
1834
|
+
'Style/CaseIndentation:',
|
|
1835
|
+
' Enabled: false'])
|
|
1836
|
+
expect(cli.run(['--format', 'simple',
|
|
1837
|
+
'-c', 'rubocop.yml', 'example1.rb'])).to eq(1)
|
|
1838
|
+
expect($stdout.string)
|
|
1839
|
+
.to eq(['== example1.rb ==',
|
|
1840
|
+
'C: 1: 7: Trailing whitespace detected.',
|
|
1841
|
+
'',
|
|
1842
|
+
'1 file inspected, 1 offense detected',
|
|
1843
|
+
''].join("\n"))
|
|
1844
|
+
end
|
|
1845
|
+
|
|
1846
|
+
context 'without using namespace' do
|
|
1847
|
+
it 'can be configured with option to disable a certain error' do
|
|
1848
|
+
create_file('example1.rb', 'puts 0 ')
|
|
1849
|
+
create_file('rubocop.yml', ['Encoding:',
|
|
1850
|
+
' Enabled: false',
|
|
1851
|
+
'',
|
|
1852
|
+
'CaseIndentation:',
|
|
1853
|
+
' Enabled: false'])
|
|
1854
|
+
expect(cli.run(['--format', 'simple',
|
|
1855
|
+
'-c', 'rubocop.yml', 'example1.rb'])).to eq(1)
|
|
1856
|
+
expect($stdout.string)
|
|
1857
|
+
.to eq(['== example1.rb ==',
|
|
1858
|
+
'C: 1: 7: Trailing whitespace detected.',
|
|
1859
|
+
'',
|
|
1860
|
+
'1 file inspected, 1 offense detected',
|
|
1861
|
+
''].join("\n"))
|
|
1862
|
+
end
|
|
1863
|
+
end
|
|
1864
|
+
|
|
1865
|
+
it 'can disable parser-derived offenses with warning severity' do
|
|
1866
|
+
# `-' interpreted as argument prefix
|
|
1867
|
+
create_file('example.rb', 'puts -1')
|
|
1868
|
+
create_file('.rubocop.yml', ['Style/Encoding:',
|
|
1869
|
+
' Enabled: false',
|
|
1870
|
+
'',
|
|
1871
|
+
'Lint/AmbiguousOperator:',
|
|
1872
|
+
' Enabled: false'
|
|
1873
|
+
])
|
|
1874
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(0)
|
|
1875
|
+
end
|
|
1876
|
+
|
|
1877
|
+
it 'cannot disable Syntax offenses with fatal/error severity' do
|
|
1878
|
+
create_file('example.rb', 'class Test')
|
|
1879
|
+
create_file('.rubocop.yml', ['Style/Encoding:',
|
|
1880
|
+
' Enabled: false',
|
|
1881
|
+
'',
|
|
1882
|
+
'Syntax:',
|
|
1883
|
+
' Enabled: false'
|
|
1884
|
+
])
|
|
1885
|
+
expect(cli.run(['--format', 'emacs', 'example.rb'])).to eq(1)
|
|
1886
|
+
expect($stdout.string).to include('unexpected token $end')
|
|
1887
|
+
end
|
|
1888
|
+
|
|
1889
|
+
it 'can be configured to merge a parameter that is a hash' do
|
|
1890
|
+
create_file('example1.rb',
|
|
1891
|
+
['# encoding: utf-8',
|
|
1892
|
+
'puts %w(a b c)',
|
|
1893
|
+
'puts %q|hi|'])
|
|
1894
|
+
# We want to change the preferred delimiters for word arrays. The other
|
|
1895
|
+
# settings from default.yml are unchanged.
|
|
1896
|
+
create_file('rubocop.yml',
|
|
1897
|
+
['Style/PercentLiteralDelimiters:',
|
|
1898
|
+
' PreferredDelimiters:',
|
|
1899
|
+
" '%w': '[]'",
|
|
1900
|
+
" '%W': '[]'"])
|
|
1901
|
+
cli.run(['--format', 'simple', '-c', 'rubocop.yml', 'example1.rb'])
|
|
1902
|
+
expect($stdout.string)
|
|
1903
|
+
.to eq(['== example1.rb ==',
|
|
1904
|
+
'C: 2: 6: %w-literals should be delimited by [ and ]',
|
|
1905
|
+
'C: 3: 6: %q-literals should be delimited by ( and )',
|
|
1906
|
+
'C: 3: 6: Use %q only for strings that contain both single ' \
|
|
1907
|
+
'quotes and double quotes.',
|
|
1908
|
+
'',
|
|
1909
|
+
'1 file inspected, 3 offenses detected',
|
|
1910
|
+
''].join("\n"))
|
|
1911
|
+
end
|
|
1912
|
+
|
|
1913
|
+
it 'can be configured to override a parameter that is a hash in a ' \
|
|
1914
|
+
'special case' do
|
|
1915
|
+
create_file('example1.rb',
|
|
1916
|
+
['# encoding: utf-8',
|
|
1917
|
+
'arr.select { |e| e > 0 }.collect { |e| e * 2 }',
|
|
1918
|
+
'a2.find_all { |e| e > 0 }'])
|
|
1919
|
+
# We prefer find_all over select. This setting overrides the default
|
|
1920
|
+
# select over find_all. Other preferred methods appearing in the default
|
|
1921
|
+
# config (e.g., map over collect) are kept.
|
|
1922
|
+
create_file('rubocop.yml',
|
|
1923
|
+
['Style/CollectionMethods:',
|
|
1924
|
+
' PreferredMethods:',
|
|
1925
|
+
' select: find_all'])
|
|
1926
|
+
cli.run(['--format', 'simple', '-c', 'rubocop.yml', 'example1.rb'])
|
|
1927
|
+
expect($stdout.string)
|
|
1928
|
+
.to eq(['== example1.rb ==',
|
|
1929
|
+
'C: 2: 5: Prefer find_all over select.',
|
|
1930
|
+
'C: 2: 26: Prefer map over collect.',
|
|
1931
|
+
'',
|
|
1932
|
+
'1 file inspected, 2 offenses detected',
|
|
1933
|
+
''].join("\n"))
|
|
1934
|
+
end
|
|
1935
|
+
|
|
1936
|
+
it 'works when a cop that others depend on is disabled' do
|
|
1937
|
+
create_file('example1.rb', ['if a',
|
|
1938
|
+
' b',
|
|
1939
|
+
'end'])
|
|
1940
|
+
create_file('rubocop.yml', ['Style/Encoding:',
|
|
1941
|
+
' Enabled: false',
|
|
1942
|
+
'',
|
|
1943
|
+
'Metrics/LineLength:',
|
|
1944
|
+
' Enabled: false'
|
|
1945
|
+
])
|
|
1946
|
+
result = cli.run(['--format', 'simple',
|
|
1947
|
+
'-c', 'rubocop.yml', 'example1.rb'])
|
|
1948
|
+
expect($stdout.string)
|
|
1949
|
+
.to eq(['== example1.rb ==',
|
|
1950
|
+
'C: 1: 1: Favor modifier if usage when having ' \
|
|
1951
|
+
'a single-line body. Another good alternative is the ' \
|
|
1952
|
+
'usage of control flow &&/||.',
|
|
1953
|
+
'',
|
|
1954
|
+
'1 file inspected, 1 offense detected',
|
|
1955
|
+
''].join("\n"))
|
|
1956
|
+
expect(result).to eq(1)
|
|
1957
|
+
end
|
|
1958
|
+
|
|
1959
|
+
it 'can be configured with project config to disable a certain error' do
|
|
1960
|
+
create_file('example_src/example1.rb', 'puts 0 ')
|
|
1961
|
+
create_file('example_src/.rubocop.yml', ['Style/Encoding:',
|
|
1962
|
+
' Enabled: false',
|
|
1963
|
+
'',
|
|
1964
|
+
'Style/CaseIndentation:',
|
|
1965
|
+
' Enabled: false'
|
|
1966
|
+
])
|
|
1967
|
+
expect(cli.run(['--format', 'simple',
|
|
1968
|
+
'example_src/example1.rb'])).to eq(1)
|
|
1969
|
+
expect($stdout.string)
|
|
1970
|
+
.to eq(['== example_src/example1.rb ==',
|
|
1971
|
+
'C: 1: 7: Trailing whitespace detected.',
|
|
1972
|
+
'',
|
|
1973
|
+
'1 file inspected, 1 offense detected',
|
|
1974
|
+
''].join("\n"))
|
|
1975
|
+
end
|
|
1976
|
+
|
|
1977
|
+
it 'can use an alternative max line length from a config file' do
|
|
1978
|
+
create_file('example_src/example1.rb', ['# encoding: utf-8',
|
|
1979
|
+
'#' * 90
|
|
1980
|
+
])
|
|
1981
|
+
create_file('example_src/.rubocop.yml', ['Metrics/LineLength:',
|
|
1982
|
+
' Enabled: true',
|
|
1983
|
+
' Max: 100'
|
|
1984
|
+
])
|
|
1985
|
+
expect(cli.run(['--format', 'simple',
|
|
1986
|
+
'example_src/example1.rb'])).to eq(0)
|
|
1987
|
+
expect($stdout.string)
|
|
1988
|
+
.to eq(['', '1 file inspected, no offenses detected', ''].join("\n"))
|
|
1989
|
+
end
|
|
1990
|
+
|
|
1991
|
+
it 'can have different config files in different directories' do
|
|
1992
|
+
%w(src lib).each do |dir|
|
|
1993
|
+
create_file("example/#{dir}/example1.rb", ['# encoding: utf-8',
|
|
1994
|
+
'#' * 90
|
|
1995
|
+
])
|
|
1996
|
+
end
|
|
1997
|
+
create_file('example/src/.rubocop.yml', ['Metrics/LineLength:',
|
|
1998
|
+
' Enabled: true',
|
|
1999
|
+
' Max: 100'
|
|
2000
|
+
])
|
|
2001
|
+
expect(cli.run(%w(--format simple example))).to eq(1)
|
|
2002
|
+
expect($stdout.string).to eq(
|
|
2003
|
+
['== example/lib/example1.rb ==',
|
|
2004
|
+
'C: 2: 81: Line is too long. [90/80]',
|
|
2005
|
+
'',
|
|
2006
|
+
'2 files inspected, 1 offense detected',
|
|
2007
|
+
''].join("\n"))
|
|
2008
|
+
end
|
|
2009
|
+
|
|
2010
|
+
it 'prefers a config file in ancestor directory to another in home' do
|
|
2011
|
+
create_file('example_src/example1.rb', ['# encoding: utf-8',
|
|
2012
|
+
'#' * 90
|
|
2013
|
+
])
|
|
2014
|
+
create_file('example_src/.rubocop.yml', ['Metrics/LineLength:',
|
|
2015
|
+
' Enabled: true',
|
|
2016
|
+
' Max: 100'
|
|
2017
|
+
])
|
|
2018
|
+
create_file("#{Dir.home}/.rubocop.yml", ['Metrics/LineLength:',
|
|
2019
|
+
' Enabled: true',
|
|
2020
|
+
' Max: 80'
|
|
2021
|
+
])
|
|
2022
|
+
expect(cli.run(['--format', 'simple',
|
|
2023
|
+
'example_src/example1.rb'])).to eq(0)
|
|
2024
|
+
expect($stdout.string)
|
|
2025
|
+
.to eq(['', '1 file inspected, no offenses detected', ''].join("\n"))
|
|
2026
|
+
end
|
|
2027
|
+
|
|
2028
|
+
it 'can exclude directories relative to .rubocop.yml' do
|
|
2029
|
+
%w(src etc/test etc/spec tmp/test tmp/spec).each do |dir|
|
|
2030
|
+
create_file("example/#{dir}/example1.rb", ['# encoding: utf-8',
|
|
2031
|
+
'#' * 90
|
|
2032
|
+
])
|
|
2033
|
+
end
|
|
2034
|
+
|
|
2035
|
+
create_file('example/.rubocop.yml', ['AllCops:',
|
|
2036
|
+
' Exclude:',
|
|
2037
|
+
' - src/**',
|
|
2038
|
+
' - etc/**/*',
|
|
2039
|
+
' - tmp/spec/**'])
|
|
2040
|
+
|
|
2041
|
+
expect(cli.run(%w(--format simple example))).to eq(1)
|
|
2042
|
+
expect($stdout.string).to eq(
|
|
2043
|
+
['== example/tmp/test/example1.rb ==',
|
|
2044
|
+
'C: 2: 81: Line is too long. [90/80]',
|
|
2045
|
+
'',
|
|
2046
|
+
'1 file inspected, 1 offense detected',
|
|
2047
|
+
''].join("\n"))
|
|
2048
|
+
end
|
|
2049
|
+
|
|
2050
|
+
it 'can exclude a typical vendor directory' do
|
|
2051
|
+
create_file('vendor/bundle/ruby/1.9.1/gems/parser-2.0.0/.rubocop.yml',
|
|
2052
|
+
['AllCops:',
|
|
2053
|
+
' Exclude:',
|
|
2054
|
+
' - lib/parser/lexer.rb'])
|
|
2055
|
+
|
|
2056
|
+
create_file('vendor/bundle/ruby/1.9.1/gems/parser-2.0.0/lib/ex.rb',
|
|
2057
|
+
['# encoding: utf-8',
|
|
2058
|
+
'#' * 90])
|
|
2059
|
+
|
|
2060
|
+
create_file('.rubocop.yml',
|
|
2061
|
+
['AllCops:',
|
|
2062
|
+
' Exclude:',
|
|
2063
|
+
' - vendor/**/*'])
|
|
2064
|
+
|
|
2065
|
+
cli.run(%w(--format simple))
|
|
2066
|
+
expect($stdout.string)
|
|
2067
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
2068
|
+
''].join("\n"))
|
|
2069
|
+
end
|
|
2070
|
+
|
|
2071
|
+
it 'excludes the vendor directory by default' do
|
|
2072
|
+
create_file('vendor/ex.rb',
|
|
2073
|
+
['# encoding: utf-8',
|
|
2074
|
+
'#' * 90])
|
|
2075
|
+
|
|
2076
|
+
cli.run(%w(--format simple))
|
|
2077
|
+
expect($stdout.string)
|
|
2078
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
2079
|
+
''].join("\n"))
|
|
2080
|
+
end
|
|
2081
|
+
|
|
2082
|
+
# Being immune to bad configuration files in excluded directories has
|
|
2083
|
+
# become important due to a bug in rubygems
|
|
2084
|
+
# (https://github.com/rubygems/rubygems/issues/680) that makes
|
|
2085
|
+
# installations of, for example, rubocop lack their .rubocop.yml in the
|
|
2086
|
+
# root directory.
|
|
2087
|
+
it 'can exclude a vendor directory with an erroneous config file' do
|
|
2088
|
+
create_file('vendor/bundle/ruby/1.9.1/gems/parser-2.0.0/.rubocop.yml',
|
|
2089
|
+
['inherit_from: non_existent.yml'])
|
|
2090
|
+
|
|
2091
|
+
create_file('vendor/bundle/ruby/1.9.1/gems/parser-2.0.0/lib/ex.rb',
|
|
2092
|
+
['# encoding: utf-8',
|
|
2093
|
+
'#' * 90])
|
|
2094
|
+
|
|
2095
|
+
create_file('.rubocop.yml',
|
|
2096
|
+
['AllCops:',
|
|
2097
|
+
' Exclude:',
|
|
2098
|
+
' - vendor/**/*'])
|
|
2099
|
+
|
|
2100
|
+
cli.run(%w(--format simple))
|
|
2101
|
+
expect($stderr.string).to eq('')
|
|
2102
|
+
expect($stdout.string)
|
|
2103
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
2104
|
+
''].join("\n"))
|
|
2105
|
+
end
|
|
2106
|
+
|
|
2107
|
+
# Relative exclude paths in .rubocop.yml files are relative to that file,
|
|
2108
|
+
# but in configuration files with other names they will be relative to
|
|
2109
|
+
# whatever file inherits from them.
|
|
2110
|
+
it 'can exclude a vendor directory indirectly' do
|
|
2111
|
+
create_file('vendor/bundle/ruby/1.9.1/gems/parser-2.0.0/.rubocop.yml',
|
|
2112
|
+
['AllCops:',
|
|
2113
|
+
' Exclude:',
|
|
2114
|
+
' - lib/parser/lexer.rb'])
|
|
2115
|
+
|
|
2116
|
+
create_file('vendor/bundle/ruby/1.9.1/gems/parser-2.0.0/lib/ex.rb',
|
|
2117
|
+
['# encoding: utf-8',
|
|
2118
|
+
'#' * 90])
|
|
2119
|
+
|
|
2120
|
+
create_file('.rubocop.yml',
|
|
2121
|
+
['inherit_from: config/default.yml'])
|
|
2122
|
+
|
|
2123
|
+
create_file('config/default.yml',
|
|
2124
|
+
['AllCops:',
|
|
2125
|
+
' Exclude:',
|
|
2126
|
+
' - vendor/**/*'])
|
|
2127
|
+
|
|
2128
|
+
cli.run(%w(--format simple))
|
|
2129
|
+
expect($stdout.string)
|
|
2130
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
2131
|
+
''].join("\n"))
|
|
2132
|
+
end
|
|
2133
|
+
|
|
2134
|
+
it 'prints a warning for an unrecognized cop name in .rubocop.yml' do
|
|
2135
|
+
create_file('example/example1.rb', ['# encoding: utf-8',
|
|
2136
|
+
'#' * 90])
|
|
2137
|
+
|
|
2138
|
+
create_file('example/.rubocop.yml', ['Style/LyneLenth:',
|
|
2139
|
+
' Enabled: true',
|
|
2140
|
+
' Max: 100'])
|
|
2141
|
+
|
|
2142
|
+
expect(cli.run(%w(--format simple example))).to eq(1)
|
|
2143
|
+
expect($stderr.string)
|
|
2144
|
+
.to eq(['Warning: unrecognized cop Style/LyneLenth found in ' +
|
|
2145
|
+
abs('example/.rubocop.yml'),
|
|
2146
|
+
''].join("\n"))
|
|
2147
|
+
end
|
|
2148
|
+
|
|
2149
|
+
it 'prints a warning for an unrecognized configuration parameter' do
|
|
2150
|
+
create_file('example/example1.rb', ['# encoding: utf-8',
|
|
2151
|
+
'#' * 90])
|
|
2152
|
+
|
|
2153
|
+
create_file('example/.rubocop.yml', ['Metrics/LineLength:',
|
|
2154
|
+
' Enabled: true',
|
|
2155
|
+
' Min: 10'])
|
|
2156
|
+
|
|
2157
|
+
expect(cli.run(%w(--format simple example))).to eq(1)
|
|
2158
|
+
expect($stderr.string)
|
|
2159
|
+
.to eq(['Warning: unrecognized parameter Metrics/LineLength:Min ' \
|
|
2160
|
+
'found in ' + abs('example/.rubocop.yml'),
|
|
2161
|
+
''].join("\n"))
|
|
2162
|
+
end
|
|
2163
|
+
|
|
2164
|
+
it 'works when a configuration file passed by -c specifies Exclude ' \
|
|
2165
|
+
'with regexp' do
|
|
2166
|
+
create_file('example/example1.rb', ['# encoding: utf-8',
|
|
2167
|
+
'#' * 90])
|
|
2168
|
+
|
|
2169
|
+
create_file('rubocop.yml', ['AllCops:',
|
|
2170
|
+
' Exclude:',
|
|
2171
|
+
' - !ruby/regexp /example1\.rb$/'])
|
|
2172
|
+
|
|
2173
|
+
cli.run(%w(--format simple -c rubocop.yml))
|
|
2174
|
+
expect($stdout.string)
|
|
2175
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
2176
|
+
''].join("\n"))
|
|
2177
|
+
end
|
|
2178
|
+
|
|
2179
|
+
it 'works when a configuration file passed by -c specifies Exclude ' \
|
|
2180
|
+
'with strings' do
|
|
2181
|
+
create_file('example/example1.rb', ['# encoding: utf-8',
|
|
2182
|
+
'#' * 90])
|
|
2183
|
+
|
|
2184
|
+
create_file('rubocop.yml', ['AllCops:',
|
|
2185
|
+
' Exclude:',
|
|
2186
|
+
' - example/**'])
|
|
2187
|
+
|
|
2188
|
+
cli.run(%w(--format simple -c rubocop.yml))
|
|
2189
|
+
expect($stdout.string)
|
|
2190
|
+
.to eq(['', '0 files inspected, no offenses detected',
|
|
2191
|
+
''].join("\n"))
|
|
2192
|
+
end
|
|
2193
|
+
|
|
2194
|
+
it 'works when a configuration file specifies a Severity' do
|
|
2195
|
+
create_file('example/example1.rb', ['# encoding: utf-8',
|
|
2196
|
+
'#' * 90])
|
|
2197
|
+
|
|
2198
|
+
create_file('rubocop.yml', ['Metrics/LineLength:',
|
|
2199
|
+
' Severity: error'])
|
|
2200
|
+
|
|
2201
|
+
cli.run(%w(--format simple -c rubocop.yml))
|
|
2202
|
+
expect($stdout.string)
|
|
2203
|
+
.to eq(['== example/example1.rb ==',
|
|
2204
|
+
'E: 2: 81: Line is too long. [90/80]',
|
|
2205
|
+
'',
|
|
2206
|
+
'1 file inspected, 1 offense detected',
|
|
2207
|
+
''].join("\n"))
|
|
2208
|
+
expect($stderr.string).to eq('')
|
|
2209
|
+
end
|
|
2210
|
+
|
|
2211
|
+
it 'fails when a configuration file specifies an invalid Severity' do
|
|
2212
|
+
create_file('example/example1.rb', ['# encoding: utf-8',
|
|
2213
|
+
'#' * 90])
|
|
2214
|
+
|
|
2215
|
+
create_file('rubocop.yml', ['Metrics/LineLength:',
|
|
2216
|
+
' Severity: superbad'])
|
|
2217
|
+
|
|
2218
|
+
cli.run(%w(--format simple -c rubocop.yml))
|
|
2219
|
+
expect($stderr.string)
|
|
2220
|
+
.to eq(["Warning: Invalid severity 'superbad'. " \
|
|
2221
|
+
'Valid severities are refactor, convention, ' \
|
|
2222
|
+
'warning, error, fatal.',
|
|
2223
|
+
''].join("\n"))
|
|
2224
|
+
end
|
|
2225
|
+
|
|
2226
|
+
context 'when a file inherits from the old auto generated file' do
|
|
2227
|
+
before do
|
|
2228
|
+
create_file('rubocop-todo.yml', '')
|
|
2229
|
+
create_file('.rubocop.yml', ['inherit_from: rubocop-todo.yml'])
|
|
2230
|
+
end
|
|
2231
|
+
|
|
2232
|
+
it 'prints no warning when --auto-gen-config is not set' do
|
|
2233
|
+
expect { cli.run(%w(-c .rubocop.yml)) }.not_to exit_with_code(1)
|
|
2234
|
+
end
|
|
2235
|
+
|
|
2236
|
+
it 'prints a warning when --auto-gen-config is set' do
|
|
2237
|
+
expect { cli.run(%w(-c .rubocop.yml --auto-gen-config)) }
|
|
2238
|
+
.to exit_with_code(1)
|
|
2239
|
+
expect($stderr.string)
|
|
2240
|
+
.to eq(['Attention: rubocop-todo.yml has been renamed to ' \
|
|
2241
|
+
'.rubocop_todo.yml',
|
|
2242
|
+
''].join("\n"))
|
|
2243
|
+
end
|
|
2244
|
+
end
|
|
2245
|
+
end
|
|
2246
|
+
end
|