brakeman 3.7.0 → 3.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (496) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +8 -0
  3. data/bin/brakeman +2 -96
  4. data/bundle/load.rb +6 -6
  5. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2/History.txt → ruby2ruby-2.4.0/History.rdoc} +15 -0
  6. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2 → ruby2ruby-2.4.0}/Manifest.txt +2 -2
  7. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2/README.txt → ruby2ruby-2.4.0/README.rdoc} +0 -0
  8. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2 → ruby2ruby-2.4.0}/Rakefile +1 -0
  9. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2 → ruby2ruby-2.4.0}/bin/r2r_show +0 -0
  10. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2 → ruby2ruby-2.4.0}/lib/ruby2ruby.rb +427 -364
  11. data/bundle/ruby/2.3.0/gems/{ruby2ruby-2.3.2 → ruby2ruby-2.4.0}/test/test_ruby2ruby.rb +1 -4
  12. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/History.rdoc +24 -0
  13. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/Manifest.txt +0 -0
  14. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/README.rdoc +0 -0
  15. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/Rakefile +2 -2
  16. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/bin/ruby_parse +0 -0
  17. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/bin/ruby_parse_extract_error +0 -0
  18. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/compare/normalize.rb +0 -0
  19. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/rp_extensions.rb +0 -0
  20. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/rp_stringscanner.rb +0 -0
  21. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby18_parser.rb +1604 -1602
  22. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby18_parser.y +0 -0
  23. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby19_parser.rb +1555 -1553
  24. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby19_parser.y +0 -0
  25. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby20_parser.rb +1760 -1756
  26. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby20_parser.y +0 -0
  27. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby21_parser.rb +1887 -1891
  28. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby21_parser.y +0 -0
  29. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby22_parser.rb +1861 -1861
  30. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby22_parser.y +0 -0
  31. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby23_parser.rb +1692 -1691
  32. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby23_parser.y +0 -0
  33. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby24_parser.rb +1692 -1691
  34. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby24_parser.y +0 -0
  35. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby_lexer.rb +6 -4
  36. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby_lexer.rex +0 -0
  37. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby_lexer.rex.rb +0 -0
  38. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby_parser.rb +1 -1
  39. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby_parser.yy +0 -0
  40. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/lib/ruby_parser_extras.rb +1 -1
  41. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/test/test_ruby_lexer.rb +0 -0
  42. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/test/test_ruby_parser.rb +9 -0
  43. data/bundle/ruby/2.3.0/gems/{ruby_parser-3.9.0 → ruby_parser-3.10.1}/test/test_ruby_parser_extras.rb +0 -0
  44. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/CODE_OF_CONDUCT.md +0 -0
  45. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/CONTRIBUTING.md +0 -0
  46. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/MIT-LICENSE +0 -0
  47. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/README.md +0 -0
  48. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/REVISION +0 -0
  49. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/Rakefile +39 -10
  50. data/bundle/ruby/2.3.0/gems/sass-3.4.25/VERSION +1 -0
  51. data/bundle/ruby/2.3.0/gems/sass-3.4.25/VERSION_DATE +1 -0
  52. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/VERSION_NAME +0 -0
  53. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/bin/sass +0 -0
  54. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/bin/sass-convert +0 -0
  55. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/bin/scss +0 -0
  56. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/extra/sass-spec-ref.sh +0 -0
  57. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/extra/update_watch.rb +0 -0
  58. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/init.rb +0 -0
  59. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass.rb +3 -3
  60. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/cache_stores.rb +0 -0
  61. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/cache_stores/base.rb +0 -0
  62. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/cache_stores/chain.rb +0 -0
  63. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/cache_stores/filesystem.rb +0 -0
  64. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/cache_stores/memory.rb +0 -0
  65. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/cache_stores/null.rb +0 -0
  66. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/callbacks.rb +0 -0
  67. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/css.rb +1 -1
  68. data/bundle/ruby/2.3.0/gems/sass-3.4.25/lib/sass/deprecation.rb +55 -0
  69. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/engine.rb +13 -5
  70. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/environment.rb +1 -1
  71. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/error.rb +0 -0
  72. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/exec.rb +0 -0
  73. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/exec/base.rb +0 -0
  74. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/exec/sass_convert.rb +0 -0
  75. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/exec/sass_scss.rb +0 -0
  76. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/features.rb +0 -0
  77. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/importers.rb +0 -0
  78. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/importers/base.rb +0 -0
  79. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/importers/deprecated_path.rb +0 -0
  80. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/importers/filesystem.rb +0 -0
  81. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/logger.rb +0 -0
  82. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/logger/base.rb +0 -0
  83. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/logger/delayed.rb +0 -0
  84. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/logger/log_level.rb +0 -0
  85. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/media.rb +0 -0
  86. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin.rb +1 -1
  87. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/compiler.rb +1 -1
  88. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/configuration.rb +1 -1
  89. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/generic.rb +0 -0
  90. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/merb.rb +0 -0
  91. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/rack.rb +2 -2
  92. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/rails.rb +0 -0
  93. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/plugin/staleness_checker.rb +1 -1
  94. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/railtie.rb +0 -0
  95. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/repl.rb +0 -0
  96. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/root.rb +0 -0
  97. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script.rb +1 -1
  98. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/css_lexer.rb +0 -0
  99. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/css_parser.rb +0 -0
  100. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/css_variable_warning.rb +0 -0
  101. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/functions.rb +2 -2
  102. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/lexer.rb +1 -1
  103. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/parser.rb +4 -3
  104. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree.rb +0 -0
  105. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/funcall.rb +0 -0
  106. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/interpolation.rb +0 -0
  107. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/list_literal.rb +0 -0
  108. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/literal.rb +0 -0
  109. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/map_literal.rb +0 -0
  110. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/node.rb +1 -1
  111. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/operation.rb +43 -16
  112. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/selector.rb +0 -0
  113. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/string_interpolation.rb +0 -0
  114. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/unary_operation.rb +0 -0
  115. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/tree/variable.rb +0 -0
  116. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value.rb +0 -0
  117. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/arg_list.rb +0 -0
  118. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/base.rb +1 -1
  119. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/bool.rb +0 -0
  120. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/color.rb +0 -0
  121. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/helpers.rb +0 -0
  122. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/list.rb +0 -0
  123. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/map.rb +0 -0
  124. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/null.rb +0 -0
  125. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/number.rb +0 -0
  126. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/script/value/string.rb +5 -12
  127. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/scss.rb +0 -0
  128. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/scss/css_parser.rb +0 -0
  129. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/scss/parser.rb +0 -0
  130. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/scss/rx.rb +0 -0
  131. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/scss/static_parser.rb +7 -0
  132. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector.rb +0 -0
  133. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector/abstract_sequence.rb +0 -0
  134. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector/comma_sequence.rb +13 -1
  135. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector/pseudo.rb +0 -0
  136. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector/sequence.rb +0 -0
  137. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector/simple.rb +1 -0
  138. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/selector/simple_sequence.rb +0 -0
  139. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/shared.rb +0 -0
  140. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/source/map.rb +0 -0
  141. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/source/position.rb +0 -0
  142. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/source/range.rb +0 -0
  143. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/stack.rb +0 -0
  144. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/supports.rb +0 -0
  145. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/at_root_node.rb +0 -0
  146. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/charset_node.rb +0 -0
  147. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/comment_node.rb +0 -0
  148. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/content_node.rb +0 -0
  149. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/css_import_node.rb +0 -0
  150. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/debug_node.rb +0 -0
  151. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/directive_node.rb +0 -0
  152. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/each_node.rb +0 -0
  153. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/error_node.rb +0 -0
  154. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/extend_node.rb +0 -0
  155. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/for_node.rb +0 -0
  156. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/function_node.rb +0 -0
  157. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/if_node.rb +0 -0
  158. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/import_node.rb +0 -0
  159. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/keyframe_rule_node.rb +0 -0
  160. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/media_node.rb +0 -0
  161. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/mixin_def_node.rb +0 -0
  162. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/mixin_node.rb +0 -0
  163. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/node.rb +2 -2
  164. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/prop_node.rb +0 -0
  165. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/return_node.rb +0 -0
  166. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/root_node.rb +0 -0
  167. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/rule_node.rb +13 -4
  168. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/supports_node.rb +0 -0
  169. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/trace_node.rb +0 -0
  170. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/variable_node.rb +0 -0
  171. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/base.rb +0 -0
  172. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/check_nesting.rb +0 -0
  173. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/convert.rb +0 -0
  174. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/cssize.rb +0 -0
  175. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/deep_copy.rb +1 -1
  176. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/extend.rb +0 -0
  177. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/perform.rb +3 -2
  178. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/set_options.rb +0 -0
  179. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/visitors/to_css.rb +0 -0
  180. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/warn_node.rb +0 -0
  181. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/tree/while_node.rb +0 -0
  182. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util.rb +0 -0
  183. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util/cross_platform_random.rb +0 -0
  184. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util/multibyte_string_scanner.rb +0 -0
  185. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util/normalized_map.rb +0 -0
  186. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util/ordered_hash.rb +0 -0
  187. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util/subset_map.rb +0 -0
  188. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/util/test.rb +0 -0
  189. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/lib/sass/version.rb +0 -0
  190. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/rails/init.rb +0 -0
  191. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass-spec.yml +0 -0
  192. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/cache_test.rb +0 -0
  193. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/callbacks_test.rb +0 -0
  194. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/compiler_test.rb +0 -0
  195. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/conversion_test.rb +3 -3
  196. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/css2sass_test.rb +1 -1
  197. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/css_variable_test.rb +0 -0
  198. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/data/hsl-rgb.txt +0 -0
  199. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/encoding_test.rb +0 -0
  200. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/engine_test.rb +56 -50
  201. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/exec_test.rb +0 -0
  202. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/extend_test.rb +14 -8
  203. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/fixtures/test_staleness_check_across_importers.css +0 -0
  204. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/fixtures/test_staleness_check_across_importers.scss +0 -0
  205. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/functions_test.rb +5 -2
  206. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/importer_test.rb +0 -0
  207. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/logger_test.rb +0 -0
  208. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/mock_importer.rb +0 -0
  209. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/more_results/more1.css +0 -0
  210. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/more_results/more1_with_line_comments.css +0 -0
  211. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/more_results/more_import.css +0 -0
  212. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/more_templates/_more_partial.sass +0 -0
  213. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/more_templates/more1.sass +23 -0
  214. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/more_templates/more_import.sass +2 -2
  215. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/plugin_test.rb +3 -3
  216. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/alt.css +0 -0
  217. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/basic.css +0 -0
  218. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/cached_import_option.css +0 -0
  219. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/compact.css +0 -0
  220. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/complex.css +0 -0
  221. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/compressed.css +0 -0
  222. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/expanded.css +0 -0
  223. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/filename_fn.css +0 -0
  224. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/if.css +0 -0
  225. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/import.css +0 -0
  226. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/import_charset.css +0 -0
  227. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/import_charset_1_8.css +0 -0
  228. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/import_charset_ibm866.css +0 -0
  229. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/import_content.css +0 -0
  230. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/line_numbers.css +0 -0
  231. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/mixins.css +0 -0
  232. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/multiline.css +0 -0
  233. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/nested.css +0 -0
  234. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/options.css +0 -0
  235. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/parent_ref.css +0 -0
  236. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/script.css +0 -0
  237. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/scss_import.css +0 -0
  238. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/scss_importee.css +0 -0
  239. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -0
  240. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/subdir/subdir.css +0 -0
  241. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/units.css +0 -0
  242. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/warn.css +0 -0
  243. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/results/warn_imported.css +0 -0
  244. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/script_conversion_test.rb +0 -0
  245. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/script_test.rb +38 -29
  246. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/scss/css_test.rb +2 -2
  247. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/scss/rx_test.rb +0 -0
  248. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/scss/scss_test.rb +25 -10
  249. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/scss/test_helper.rb +0 -0
  250. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/source_map_test.rb +13 -13
  251. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/superselector_test.rb +0 -0
  252. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_cached_import_option_partial.scss +0 -0
  253. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_double_import_loop2.sass +0 -0
  254. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_filename_fn_import.scss +0 -0
  255. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_imported_charset_ibm866.sass +0 -0
  256. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_imported_charset_utf8.sass +0 -0
  257. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_imported_content.sass +0 -0
  258. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/_partial.sass +2 -0
  259. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/_same_name_different_partiality.scss +0 -0
  260. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/alt.sass +0 -0
  261. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/basic.sass +23 -0
  262. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/bork1.sass +2 -0
  263. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/bork2.sass +0 -0
  264. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/bork3.sass +0 -0
  265. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/bork4.sass +0 -0
  266. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/bork5.sass +1 -1
  267. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/cached_import_option.scss +0 -0
  268. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/compact.sass +17 -0
  269. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/complex.sass +305 -0
  270. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/compressed.sass +15 -0
  271. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/double_import_loop1.sass +0 -0
  272. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/expanded.sass +17 -0
  273. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/filename_fn.scss +0 -0
  274. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/if.sass +0 -0
  275. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/import.sass +2 -2
  276. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/import_charset.sass +0 -0
  277. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/import_charset_1_8.sass +0 -0
  278. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/import_charset_ibm866.sass +0 -0
  279. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/import_content.sass +0 -0
  280. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/importee.less +0 -0
  281. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/importee.sass +3 -3
  282. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/line_numbers.sass +0 -0
  283. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/mixin_bork.sass +0 -0
  284. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/mixins.sass +22 -22
  285. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/multiline.sass +4 -4
  286. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/nested.sass +25 -0
  287. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/nested_bork1.sass +0 -0
  288. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/nested_bork2.sass +0 -0
  289. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/nested_bork3.sass +0 -0
  290. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/nested_bork4.sass +0 -0
  291. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/nested_import.sass +0 -0
  292. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/nested_mixin_bork.sass +0 -0
  293. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/options.sass +0 -0
  294. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/parent_ref.sass +25 -0
  295. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/same_name_different_ext.sass +0 -0
  296. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/same_name_different_ext.scss +0 -0
  297. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/same_name_different_partiality.scss +0 -0
  298. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/script.sass +101 -0
  299. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/scss_import.scss +0 -0
  300. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/scss_importee.scss +0 -0
  301. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/single_import_loop.sass +0 -0
  302. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/subdir/import_up1.scss +0 -0
  303. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/subdir/import_up2.scss +0 -0
  304. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
  305. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  306. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/subdir/subdir.sass +3 -3
  307. data/bundle/ruby/2.3.0/gems/sass-3.4.25/test/sass/templates/units.sass +11 -0
  308. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/warn.sass +0 -0
  309. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/templates/warn_imported.sass +0 -0
  310. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/test_helper.rb +0 -0
  311. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/util/multibyte_string_scanner_test.rb +10 -2
  312. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/util/normalized_map_test.rb +0 -0
  313. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/util/subset_map_test.rb +0 -0
  314. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/util_test.rb +0 -0
  315. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/sass/value_helpers_test.rb +0 -0
  316. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/test/test_helper.rb +0 -0
  317. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/CHANGELOG.md +0 -0
  318. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/CONTRIBUTING.md +0 -0
  319. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/Gemfile +0 -0
  320. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/Guardfile +0 -0
  321. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/LICENSE +0 -0
  322. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/README.md +0 -0
  323. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/Rakefile +0 -0
  324. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/Vagrantfile +0 -0
  325. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen.rb +0 -0
  326. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/adapter.rb +0 -0
  327. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/adapters/bsd.rb +0 -0
  328. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/adapters/darwin.rb +0 -0
  329. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/adapters/linux.rb +0 -0
  330. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/adapters/polling.rb +0 -0
  331. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/adapters/windows.rb +0 -0
  332. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/directory_record.rb +0 -0
  333. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/listener.rb +0 -0
  334. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/turnstile.rb +0 -0
  335. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/lib/listen/version.rb +0 -0
  336. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/listen.gemspec +0 -0
  337. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/adapter_spec.rb +0 -0
  338. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -0
  339. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -0
  340. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -0
  341. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -0
  342. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -0
  343. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/directory_record_spec.rb +0 -0
  344. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/listener_spec.rb +0 -0
  345. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen/turnstile_spec.rb +0 -0
  346. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/listen_spec.rb +0 -0
  347. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/spec_helper.rb +0 -0
  348. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/support/adapter_helper.rb +0 -0
  349. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/support/directory_record_helper.rb +0 -0
  350. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/support/fixtures_helper.rb +0 -0
  351. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/support/listeners_helper.rb +0 -0
  352. data/bundle/ruby/2.3.0/gems/{sass-3.4.24 → sass-3.4.25}/vendor/listen/spec/support/platform_helper.rb +0 -0
  353. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/History.txt +49 -0
  354. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/Manifest.txt +1 -0
  355. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/README.txt +36 -7
  356. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/Rakefile +4 -0
  357. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/lib/composite_sexp_processor.rb +4 -4
  358. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/lib/pt_testcase.rb +21 -25
  359. data/bundle/ruby/2.3.0/gems/sexp_processor-4.10.0/lib/sexp.rb +1414 -0
  360. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/lib/sexp_processor.rb +127 -65
  361. data/bundle/ruby/2.3.0/gems/sexp_processor-4.10.0/lib/strict_sexp.rb +126 -0
  362. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/lib/unique.rb +7 -1
  363. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/test/test_composite_sexp_processor.rb +9 -12
  364. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/test/test_environment.rb +2 -2
  365. data/bundle/ruby/2.3.0/gems/sexp_processor-4.10.0/test/test_sexp.rb +1630 -0
  366. data/bundle/ruby/2.3.0/gems/{sexp_processor-4.9.0 → sexp_processor-4.10.0}/test/test_sexp_processor.rb +65 -52
  367. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/CHANGELOG.md +10 -0
  368. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/COPYING +0 -0
  369. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/Gemfile +3 -5
  370. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/HACKING +0 -0
  371. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/README.md +0 -0
  372. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/Rakefile +0 -0
  373. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/bin/tilt +0 -0
  374. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/docs/TEMPLATES.md +0 -0
  375. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/docs/common.css +0 -0
  376. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt.rb +2 -2
  377. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/asciidoc.rb +0 -0
  378. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/babel.rb +0 -0
  379. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/bluecloth.rb +0 -0
  380. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/builder.rb +0 -0
  381. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/coffee.rb +0 -0
  382. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/commonmarker.rb +1 -1
  383. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/creole.rb +0 -0
  384. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/csv.rb +0 -0
  385. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/dummy.rb +0 -0
  386. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/erb.rb +0 -0
  387. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/erubi.rb +0 -0
  388. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/erubis.rb +0 -0
  389. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/etanni.rb +0 -0
  390. data/bundle/ruby/2.3.0/gems/tilt-2.0.8/lib/tilt/haml.rb +86 -0
  391. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/kramdown.rb +0 -0
  392. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/less.rb +0 -0
  393. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/liquid.rb +0 -0
  394. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/livescript.rb +0 -0
  395. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/mapping.rb +0 -0
  396. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/markaby.rb +0 -0
  397. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/maruku.rb +0 -0
  398. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/nokogiri.rb +0 -0
  399. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/pandoc.rb +0 -0
  400. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/plain.rb +0 -0
  401. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/prawn.rb +0 -0
  402. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/radius.rb +0 -0
  403. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/rdiscount.rb +0 -0
  404. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/rdoc.rb +0 -0
  405. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/redcarpet.rb +0 -0
  406. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/redcloth.rb +0 -0
  407. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/rst-pandoc.rb +0 -0
  408. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/sass.rb +0 -0
  409. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/sigil.rb +0 -0
  410. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/string.rb +0 -0
  411. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/template.rb +1 -0
  412. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/typescript.rb +0 -0
  413. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/wikicloth.rb +0 -0
  414. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/lib/tilt/yajl.rb +0 -0
  415. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/man/index.txt +0 -0
  416. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/man/tilt.1.ronn +0 -0
  417. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/markaby/locals.mab +0 -0
  418. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/markaby/markaby.mab +0 -0
  419. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/markaby/markaby_other_static.mab +0 -0
  420. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/markaby/render_twice.mab +0 -0
  421. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/markaby/scope.mab +0 -0
  422. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/markaby/yielding.mab +0 -0
  423. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/mytemplate.rb +0 -0
  424. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/test_helper.rb +0 -0
  425. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_asciidoctor_test.rb +0 -0
  426. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_babeltemplate.rb +0 -0
  427. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_blueclothtemplate_test.rb +0 -0
  428. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_buildertemplate_test.rb +0 -0
  429. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_cache_test.rb +0 -0
  430. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_coffeescripttemplate_test.rb +0 -0
  431. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_commonmarkertemplate_test.rb +0 -0
  432. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_compilesite_test.rb +0 -0
  433. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_creoletemplate_test.rb +0 -0
  434. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_csv_test.rb +0 -0
  435. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_erbtemplate_test.rb +0 -0
  436. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_erubistemplate_test.rb +0 -0
  437. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_erubitemplate_test.rb +0 -0
  438. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_etannitemplate_test.rb +0 -0
  439. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_hamltemplate_test.rb +0 -0
  440. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_kramdown_test.rb +0 -0
  441. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_lesstemplate_test.less +0 -0
  442. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_lesstemplate_test.rb +0 -0
  443. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_liquidtemplate_test.rb +0 -0
  444. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_livescripttemplate_test.rb +0 -0
  445. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_mapping_test.rb +0 -0
  446. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_markaby_test.rb +0 -0
  447. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_markdown_test.rb +0 -0
  448. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_marukutemplate_test.rb +0 -0
  449. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_metadata_test.rb +0 -0
  450. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_nokogiritemplate_test.rb +0 -0
  451. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_pandoctemplate_test.rb +0 -0
  452. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_prawntemplate.prawn +0 -0
  453. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_prawntemplate_test.rb +0 -0
  454. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_radiustemplate_test.rb +0 -0
  455. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_rdiscounttemplate_test.rb +0 -0
  456. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_rdoctemplate_test.rb +0 -0
  457. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_redcarpettemplate_test.rb +0 -0
  458. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_redclothtemplate_test.rb +0 -0
  459. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_rstpandoctemplate_test.rb +0 -0
  460. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_sasstemplate_test.rb +0 -0
  461. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_sigil_test.rb +0 -0
  462. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_stringtemplate_test.rb +0 -0
  463. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_template_test.rb +0 -0
  464. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_test.rb +0 -0
  465. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_typescript_test.rb +4 -0
  466. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_wikiclothtemplate_test.rb +0 -0
  467. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/test/tilt_yajltemplate_test.rb +0 -0
  468. data/bundle/ruby/2.3.0/gems/{tilt-2.0.7 → tilt-2.0.8}/tilt.gemspec +2 -2
  469. data/lib/brakeman.rb +8 -0
  470. data/lib/brakeman/commandline.rb +179 -0
  471. data/lib/brakeman/options.rb +17 -13
  472. data/lib/brakeman/processors/alias_processor.rb +11 -1
  473. data/lib/brakeman/processors/output_processor.rb +15 -16
  474. data/lib/brakeman/processors/template_alias_processor.rb +3 -1
  475. data/lib/brakeman/version.rb +1 -1
  476. data/lib/ruby_parser/bm_sexp.rb +2 -2
  477. metadata +467 -464
  478. data/bundle/ruby/2.3.0/gems/sass-3.4.24/VERSION +0 -1
  479. data/bundle/ruby/2.3.0/gems/sass-3.4.24/VERSION_DATE +0 -1
  480. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/more_templates/more1.sass +0 -23
  481. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/_partial.sass +0 -2
  482. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/basic.sass +0 -23
  483. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/bork1.sass +0 -2
  484. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/compact.sass +0 -17
  485. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/complex.sass +0 -305
  486. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/compressed.sass +0 -15
  487. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/expanded.sass +0 -17
  488. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/nested.sass +0 -25
  489. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/parent_ref.sass +0 -25
  490. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/script.sass +0 -101
  491. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
  492. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
  493. data/bundle/ruby/2.3.0/gems/sass-3.4.24/test/sass/templates/units.sass +0 -11
  494. data/bundle/ruby/2.3.0/gems/sexp_processor-4.9.0/lib/sexp.rb +0 -371
  495. data/bundle/ruby/2.3.0/gems/sexp_processor-4.9.0/test/test_sexp.rb +0 -432
  496. data/bundle/ruby/2.3.0/gems/tilt-2.0.7/lib/tilt/haml.rb +0 -58
@@ -2,10 +2,16 @@
2
2
  # Unique creates unique variable names.
3
3
 
4
4
  class Unique
5
- def self.reset # mostly for testing
5
+ ##
6
+ # Reset current count back to zero. Mainly used for testing.
7
+
8
+ def self.reset
6
9
  @@curr = 0
7
10
  end
8
11
 
12
+ ##
13
+ # Get the next unique variable name.
14
+
9
15
  def self.next
10
16
  @@curr += 1
11
17
  "temp_#{@@curr}".intern
@@ -1,7 +1,7 @@
1
1
  $TESTING = true
2
2
 
3
- require 'composite_sexp_processor'
4
- require 'minitest/autorun'
3
+ require "composite_sexp_processor"
4
+ require "minitest/autorun"
5
5
 
6
6
  class FakeProcessor1 < SexpProcessor # ZenTest SKIP
7
7
 
@@ -9,16 +9,13 @@ class FakeProcessor1 < SexpProcessor # ZenTest SKIP
9
9
  super
10
10
  self.warn_on_default = false
11
11
  self.default_method = :default_processor
12
+ self.require_empty = false
12
13
  self.expected = Array
13
14
  end
14
15
 
15
- def default_processor(exp)
16
- result = []
17
- result << exp.shift
18
- until exp.empty? do
19
- result << exp.shift.to_s + " woot"
20
- end
21
- result
16
+ def default_processor exp
17
+ t, *rest = exp
18
+ s(t, *rest.map { |s| "#{s} woot" })
22
19
  end
23
20
  end
24
21
 
@@ -29,20 +26,20 @@ class TestCompositeSexpProcessor < Minitest::Test
29
26
  end
30
27
 
31
28
  def test_process_default
32
- data = [1, 2, 3]
29
+ data = s(1, 2, 3)
33
30
  result = @p.process(data.dup)
34
31
  assert_equal(data.dup, result)
35
32
  end
36
33
 
37
34
  def test_process_fake1
38
- data = [:x, 1, 2, 3]
35
+ data = s(:x, 1, 2, 3)
39
36
  @p << FakeProcessor1.new
40
37
  result = @p.process(data.dup)
41
38
  assert_equal [:x, "1 woot", "2 woot", "3 woot"], result
42
39
  end
43
40
 
44
41
  def test_process_fake1_twice
45
- data = [:x, 1, 2, 3]
42
+ data = s(:x, 1, 2, 3)
46
43
  @p << FakeProcessor1.new
47
44
  @p << FakeProcessor1.new
48
45
  result = @p.process(data.dup)
@@ -1,7 +1,7 @@
1
1
  $TESTING = true
2
2
 
3
- require 'minitest/autorun'
4
- require 'sexp_processor'
3
+ require "minitest/autorun"
4
+ require "sexp_processor"
5
5
 
6
6
  class TestEnvironment < Minitest::Test
7
7
 
@@ -0,0 +1,1630 @@
1
+ $TESTING = true
2
+
3
+ if ENV["COV"]
4
+ require "simplecov"
5
+ SimpleCov.start do
6
+ add_filter "lib/sexp_processor"
7
+ add_filter "test"
8
+ end
9
+ warn "Running simplecov"
10
+ end
11
+
12
+ require "minitest/autorun"
13
+ require "minitest/hell" # beat these up
14
+ require "minitest/benchmark" if ENV["BENCH"]
15
+ require "sexp_processor" # for deep_clone (TODO: why is that on SP and not S?)
16
+ require "sexp"
17
+
18
+ def pyramid_sexp max
19
+ # s(:array,
20
+ # s(:array, s(:s, 1)),
21
+ # s(:array, s(:s, 1), s(:s, 2)),
22
+ # ...
23
+ # s(:array, s(:s, 1), s(:s, 2), ... s(:s, max-1)))
24
+
25
+ s(:array,
26
+ *(1...max).map { |n|
27
+ s(:array, *(1..n).map { |m|
28
+ s(:s, m) })})
29
+ end
30
+
31
+ class SexpTestCase < Minitest::Test
32
+ M = Sexp::Matcher
33
+ MC = Sexp::MatchCollection
34
+ MR = Sexp # ::MatchResult
35
+
36
+ CLASS_SEXP = s(:class, :cake, nil,
37
+ s(:defn, :foo, s(:args), s(:add, :a, :b)),
38
+ s(:defn, :bar, s(:args), s(:sub, :a, :b)))
39
+
40
+ def skip_if_strict n = 1
41
+ strict = ENV["STRICT_SEXP"].to_i
42
+
43
+ skip "Can't pass on STRICT_SEXP mode" if strict >= n
44
+ end
45
+
46
+ # KEY for regex tests
47
+ # :a == no change
48
+ # :b == will change (but sometimes ONLY once)
49
+ # :c == change to
50
+
51
+ def assert_equal3 x, y
52
+ skip_if_strict
53
+
54
+ assert_operator x, :===, y
55
+ end
56
+
57
+ def refute_equal3 x, y
58
+ refute_operator x, :===, y
59
+ end
60
+
61
+ def assert_pretty_print expect, input
62
+ assert_equal expect, input.pretty_inspect.chomp
63
+ end
64
+
65
+ def assert_inspect expect, input
66
+ assert_equal expect, input.inspect
67
+ end
68
+
69
+ def assert_search count, sexp, pattern
70
+ assert_equal count, sexp.search_each(pattern).count
71
+ end
72
+
73
+ def assert_satisfy pattern, sexp
74
+ assert_operator pattern, :satisfy?, sexp
75
+ end
76
+
77
+ def refute_satisfy pattern, sexp
78
+ refute_operator pattern, :satisfy?, sexp
79
+ end
80
+ end # class SexpTestCase
81
+
82
+ class MatcherTestCase < SexpTestCase
83
+ def self.abstract_test_case! klass = self # REFACTOR: push this up to minitest
84
+ extend Module.new {
85
+ define_method :run do |*args|
86
+ super(*args) unless self == klass
87
+ end
88
+ }
89
+ end
90
+
91
+ abstract_test_case!
92
+
93
+ def matcher
94
+ raise "Subclass responsibility"
95
+ end
96
+
97
+ def inspect_str
98
+ raise "Subclass responsibility"
99
+ end
100
+
101
+ def pretty_str
102
+ inspect_str
103
+ end
104
+
105
+ def sexp
106
+ s(:a)
107
+ end
108
+
109
+ def bad_sexp
110
+ s(:b)
111
+ end
112
+
113
+ def test_satisfy_eh
114
+ assert_equal3 matcher, sexp
115
+ end
116
+
117
+ def test_satisfy_eh_fail
118
+ skip "not applicable" unless bad_sexp
119
+ refute_equal3 matcher, bad_sexp
120
+ end
121
+
122
+ def test_greedy
123
+ refute_operator matcher, :greedy?
124
+ end
125
+
126
+ def test_inspect
127
+ assert_inspect inspect_str, matcher
128
+ end
129
+
130
+ def test_pretty_print
131
+ assert_pretty_print pretty_str, matcher
132
+ end
133
+ end # class MatcherTestCase
134
+
135
+ class TestSexp < SexpTestCase # ZenTest FULL
136
+ def setup
137
+ super
138
+ @sexp_class = Object.const_get(self.class.name[4..-1])
139
+ @sexp = @sexp_class.new(1, 2, 3)
140
+ @basic_sexp = s(:lasgn, :var, s(:lit, 42).line(1)).line(1)
141
+ @basic_sexp.each_sexp do |s|
142
+ s.file = "file.rb"
143
+ end
144
+
145
+ @complex_sexp = s(:block,
146
+ s(:lasgn, :foo, s(:str, "foo").line(1)).line(1),
147
+ s(:if, s(:and, s(:true).line(2), s(:lit, 1).line(2)).line(2),
148
+ s(:if, s(:lvar, :foo).line(3),
149
+ s(:str, "bar").line(3),
150
+ nil).line(3),
151
+ s(:true).line(5)).line(2)).line(1)
152
+
153
+ @re = s(:lit, 42)
154
+ @bad1 = s(:lit, 24)
155
+ @bad1 = s(:blah, 42)
156
+ end
157
+
158
+ def assert_from_array exp, input
159
+ assert_equal exp, Sexp.from_array(input)
160
+ end
161
+
162
+ def test_class_from_array
163
+ assert_from_array s(), []
164
+ assert_from_array s(:s), [:s]
165
+ assert_from_array s(:s, s(:m)), [:s, [:m]]
166
+ assert_from_array s(:s, s(:m)), [:s, s(:m)]
167
+ assert_from_array s(:s, s(:m, [:not_converted])), [:s, s(:m, [:not_converted])]
168
+ end
169
+
170
+ def test_compact
171
+ input = s(:a, nil, :b)
172
+
173
+ actual = input.compact
174
+
175
+ assert_equal s(:a, :b), actual
176
+ assert_same input, actual # returns mutated result
177
+ end
178
+
179
+ def test_array_type_eh
180
+ capture_io do # HACK
181
+ assert_equal false, s(:lit, 42).array_type?
182
+ assert_equal true, s(:array, 42).array_type?
183
+ end
184
+ end
185
+
186
+ def test_each_of_type
187
+ # TODO: huh... this tests fails if top level sexp :b is removed
188
+ @sexp = s(:b, s(:a, s(:b, s(:a), :a, s(:b, :a), s(:b, s(:a)))))
189
+ count = 0
190
+ @sexp.each_of_type :a do
191
+ count += 1
192
+ end
193
+ assert_equal(3, count, "must find 3 a's in #{@sexp.inspect}")
194
+ end
195
+
196
+ def test_equals2_array
197
+ refute_equal @sexp, [1, 2, 3] # Sexp == Array
198
+ assert_raises Minitest::Assertion do # Array == Sexp.
199
+ refute_equal [1, 2, 3], @sexp # This is a bug in ruby:
200
+ end
201
+ # TODO: test if it is calling to_ary first? seems not to
202
+ end
203
+
204
+ def test_equals2_not_body
205
+ sexp2 = s(1, 2, 5)
206
+ refute_equal(@sexp, sexp2)
207
+ end
208
+
209
+ def test_equals2_sexp
210
+ sexp2 = s(1, 2, 3)
211
+ if @sexp.class == Sexp then
212
+ skip "Not applicable to this target."
213
+ else
214
+ refute_equal(@sexp, sexp2)
215
+ end
216
+ end
217
+
218
+ def test_equal3_full_match
219
+ assert_equal3 s(), s() # 0
220
+ assert_equal3 s(:blah), s(:blah) # 1
221
+ assert_equal3 s(:a, :b), s(:a, :b) # 2
222
+ assert_equal3 @basic_sexp, @basic_sexp.dup # deeper structure
223
+ end
224
+
225
+ def test_equal3_mismatch
226
+ refute_equal3 s(), s(:a)
227
+ refute_equal3 s(:a), s()
228
+ refute_equal3 s(:blah1), s(:blah2)
229
+ refute_equal3 s(:a), s(:a, :b)
230
+ refute_equal3 s(:a, :b), s(:a)
231
+ refute_equal3 s(:a1, :b), s(:a2, :b)
232
+ refute_equal3 s(:a, :b1), s(:a, :b2)
233
+ end
234
+
235
+ def test_equal3_subset_match
236
+ assert_match s{s(:a)}, s(s(:a), s(:b)) # left - =~
237
+ assert_equal3 s{s(:a)}, s(s(:a), s(:b)) # left - ===
238
+ assert_equal3 s{s(:a)}, s(:blah, s(:a ), s(:b)) # mid 1
239
+ assert_equal3 s{s(:a, 1)}, s(:blah, s(:a, 1), s(:b)) # mid 2
240
+ assert_equal3 s{s(:a)}, s(:blah, s(:blah, s(:a))) # left deeper
241
+ end
242
+
243
+ def test_equalstilde_fancy
244
+ assert_match s{ s(:b) }, s(:a, s(:b), :c)
245
+ assert_match s(:a, s(:b), :c), s{ s(:b) }
246
+
247
+ e = assert_raises ArgumentError do
248
+ s(:b) =~ s(:a, s(:b), :c)
249
+ end
250
+ assert_equal "Not a pattern: s(:a, s(:b), :c)", e.message
251
+
252
+ e = assert_raises ArgumentError do
253
+ s(:a, s(:b), :c) =~ s(:b)
254
+ end
255
+ assert_equal "Not a pattern: s(:b)", e.message
256
+ end
257
+
258
+ def test_equalstilde_plain
259
+ s{ s(:re) } =~ s(:data) # pattern on LHS
260
+ s(:data) =~ s{ s(:re) } # pattern on RHS
261
+
262
+ e = assert_raises ArgumentError do
263
+ s(:re) =~ s(:data) # no pattern
264
+ end
265
+
266
+ assert_equal "Not a pattern: s(:data)", e.message
267
+ end
268
+
269
+ def test_find_and_replace_all
270
+ skip_if_strict 2
271
+
272
+ @sexp = s(:a, s(:a, :b, s(:a, :b), s(:a), :b, s(:a, s(:a))))
273
+ expected = s(:a, s(:a, :a, s(:a, :a), s(:a), :a, s(:a, s(:a))))
274
+
275
+ @sexp.find_and_replace_all(:b, :a)
276
+
277
+ assert_equal(expected, @sexp)
278
+ end
279
+
280
+ def assert_gsub exp, sexp, from, to
281
+ assert_equal exp, sexp.gsub(from, to)
282
+ end
283
+
284
+ def test_gsub
285
+ assert_gsub s(:c), s(:b), s(:b), s(:c)
286
+ assert_gsub s(:a), s(:a), s(:b), s(:c)
287
+ assert_gsub s(:a, s(:c)), s(:a, s(:b)), s(:b), s(:c)
288
+ end
289
+
290
+ def test_gsub_empty
291
+ assert_gsub s(:c), s(), s(), s(:c)
292
+ end
293
+
294
+ def test_gsub_multiple
295
+ assert_gsub s(:a, s(:c), s(:c)), s(:a, s(:b), s(:b)), s(:b), s(:c)
296
+ assert_gsub s(:a, s(:c), s(:a, s(:c))), s(:a, s(:b), s(:a, s(:b))), s(:b), s(:c)
297
+ end
298
+
299
+ def test_gsub_matcher
300
+ assert_gsub s(:a, :b, :c), s(:a, s(:b, 42), :c), s{ s(:b, _) }, :b
301
+ assert_gsub s(:a, s(:b), :c), s(:a, s(:b), :c), s{ s(:b, _) }, :b
302
+ assert_gsub s(:a, s(:c, :b), :d), s(:a, s(:c, s(:b, 42)), :d), s{ s(:b, _) }, :b
303
+ assert_gsub s(:a, s(:q), :c), s(:a, s(:q), :c), s{ s(:b, _) }, :b
304
+ end
305
+
306
+ def with_env key
307
+ old_val, ENV[key] = ENV[key], "1"
308
+ yield
309
+ ensure
310
+ ENV[key] = old_val
311
+ end
312
+
313
+ def with_verbose &block
314
+ with_env "VERBOSE", &block
315
+ end
316
+
317
+ def with_debug &block
318
+ with_env "DEBUG", &block
319
+ end
320
+
321
+ def test_inspect
322
+ k = @sexp_class
323
+ n = k.name[0].chr.downcase
324
+ assert_equal("#{n}()",
325
+ k.new().inspect)
326
+ assert_equal("#{n}(:a)",
327
+ k.new(:a).inspect)
328
+ assert_equal("#{n}(:a, :b)",
329
+ k.new(:a, :b).inspect)
330
+ assert_equal("#{n}(:a, #{n}(:b))",
331
+ k.new(:a, k.new(:b)).inspect)
332
+
333
+ with_verbose do
334
+ assert_equal("#{n}().line(42)",
335
+ k.new().line(42).inspect)
336
+ assert_equal("#{n}(:a).line(42)",
337
+ k.new(:a).line(42).inspect)
338
+ assert_equal("#{n}(:a, :b).line(42)",
339
+ k.new(:a, :b).line(42).inspect)
340
+ assert_equal("#{n}(:a, #{n}(:b).line(43)).line(42)",
341
+ k.new(:a, k.new(:b).line(43)).line(42).inspect)
342
+ end
343
+ end
344
+
345
+ def test_line
346
+ assert_nil @sexp.line
347
+ assert_equal 1, @basic_sexp.line
348
+ assert_equal 1, @complex_sexp.line
349
+ end
350
+
351
+ def test_line_max
352
+ assert_nil @sexp.line_max
353
+ assert_equal 1, @basic_sexp.line_max
354
+ assert_equal 5, @complex_sexp.line_max
355
+ end
356
+
357
+ def test_new
358
+ file = "file.rb"
359
+
360
+ old = s(:lasgn, :var, s(:lit, 42).line(2)).line(1)
361
+ old.file = file
362
+ old.each_sexp do |x|
363
+ x.file = file
364
+ end
365
+ old.comments = "do the thing"
366
+
367
+ assert_same file, old.file
368
+ assert_equal 1, old.line
369
+ assert_same file, old.last.file
370
+ assert_equal 2, old.last.line
371
+
372
+ new = old.new(1, 2, 3)
373
+
374
+ assert_equal s(1, 2, 3), new
375
+
376
+ assert_same file, new.file
377
+ assert_equal 1, new.line
378
+ assert_same old.comments, new.comments
379
+ end
380
+
381
+ def test_map
382
+ file = "file.rb"
383
+
384
+ old = s(:lasgn, :var, s(:lit, 42).line(2)).line(1)
385
+ old.file = file
386
+ old.each_sexp do |x|
387
+ x.file = file
388
+ end
389
+ old.comments = "do the thing"
390
+
391
+ assert_same file, old.file
392
+ assert_equal 1, old.line
393
+ assert_same file, old.last.file
394
+ assert_equal 2, old.last.line
395
+
396
+ new = old.map { |x| x }
397
+
398
+ assert_same file, new.file
399
+ assert_equal 1, new.line
400
+ assert_same file, new.last.file
401
+ assert_equal 2, new.last.line
402
+ assert_same old.comments, new.comments
403
+ end
404
+
405
+ def test_mass
406
+ assert_equal 1, s(:a).mass
407
+ assert_equal 3, s(:a, s(:b), s(:c)).mass
408
+
409
+ s = s(:iter,
410
+ s(:call, nil, :a, s(:arglist, s(:lit, 1))),
411
+ s(:lasgn, :c),
412
+ s(:call, nil, :d, s(:arglist)))
413
+
414
+ assert_equal 7, s.mass
415
+ end
416
+
417
+ def test_mass_auto_shift
418
+ assert_equal 1, s(:a).mass
419
+ assert_equal 3, s(s(:b), s(:c)).mass
420
+
421
+ s = s(s(:call, nil, :a, s(:arglist, s(:lit, 1))),
422
+ s(:lasgn, :c),
423
+ s(:call, nil, :d, s(:arglist)))
424
+
425
+ assert_equal 7, s.mass
426
+ end
427
+
428
+ def test_mass_huge
429
+ max = 100
430
+ sexp = pyramid_sexp max
431
+
432
+ exp = (max*max + max)/2 # pyramid number 1+2+3+...+m
433
+
434
+ assert_equal exp, sexp.mass
435
+ end
436
+
437
+ def test_method_missing
438
+ skip_if_strict 3
439
+
440
+ capture_io do
441
+ assert_nil @sexp.not_there
442
+ assert_equal s(:lit, 42), @basic_sexp.lit
443
+ end
444
+ end
445
+
446
+ def test_method_missing_missing
447
+ skip_if_strict 3
448
+ skip "debugging for now" if ENV["DEBUG"]
449
+
450
+ assert_silent do
451
+ assert_nil @basic_sexp.missing
452
+ end
453
+ end
454
+
455
+ def test_method_missing_missing_debug
456
+ skip_if_strict 3
457
+
458
+ exp = /#{Regexp.escape @basic_sexp.to_s}.method_missing\(:missing\) => nil from/
459
+
460
+ with_debug do
461
+ assert_output "", exp do
462
+ assert_nil @basic_sexp.missing
463
+ end
464
+ end
465
+ end
466
+
467
+ def test_method_missing_hit_debug_verbose
468
+ skip_if_strict 3
469
+
470
+ with_debug do
471
+ with_verbose do
472
+ exp = /#{Regexp.escape @basic_sexp.to_s}.method_missing\(:lit\) from/
473
+
474
+ assert_output "", exp do
475
+ assert_equal s(:lit, 42), @basic_sexp.lit
476
+ end
477
+ end
478
+ end
479
+ end
480
+
481
+ def test_method_missing_ambigious
482
+ skip_if_strict 3
483
+
484
+ assert_raises NoMethodError do
485
+ pirate = s(:says, s(:arrr!), s(:arrr!), s(:arrr!))
486
+ pirate.arrr!
487
+ end
488
+ end
489
+
490
+ def test_method_missing_deep
491
+ skip_if_strict 3
492
+
493
+ capture_io do
494
+ sexp = s(:blah, s(:a, s(:b, s(:c, :yay!))))
495
+ assert_equal(s(:c, :yay!), sexp.a.b.c)
496
+ end
497
+ end
498
+
499
+ def test_method_missing_delete
500
+ skip_if_strict 3
501
+
502
+ sexp = s(:blah, s(:a, s(:b, s(:c, :yay!))))
503
+
504
+ capture_io do
505
+ assert_equal(s(:c, :yay!), sexp.a.b.c(true))
506
+ assert_equal(s(:blah, s(:a, s(:b))), sexp)
507
+ end
508
+ end
509
+
510
+ def test_pretty_print
511
+ assert_pretty_print("s()",
512
+ s())
513
+ assert_pretty_print("s(:a)",
514
+ s(:a))
515
+ assert_pretty_print("s(:a, :b)",
516
+ s(:a, :b))
517
+ assert_pretty_print("s(:a, s(:b))",
518
+ s(:a, s(:b)))
519
+ end
520
+
521
+ def test_sexp_body
522
+ assert_equal [2, 3], @sexp.sexp_body
523
+ end
524
+
525
+ def test_shift
526
+ skip_if_strict 5
527
+
528
+ skip "https://github.com/MagLev/maglev/issues/250" if maglev?
529
+
530
+ assert_equal(1, @sexp.shift)
531
+ assert_equal(2, @sexp.shift)
532
+ assert_equal(3, @sexp.shift)
533
+
534
+ assert_raises(RuntimeError) do
535
+ @sexp.shift
536
+ end
537
+ end
538
+
539
+ def test_deep_clone
540
+ @sexp = s(:a, 1, 2, s(:b, 3, 4), 5, 6)
541
+ backup = @sexp.deep_clone
542
+ refute_same @sexp, backup, "deep clone is broken again?"
543
+ assert_equal @sexp, backup, "deep clone is broken again?"
544
+ end
545
+
546
+ def test_structure
547
+ @sexp = s(:a, 1, 2, s(:b, 3, 4), 5, 6)
548
+ backup = @sexp.deep_clone
549
+ refute_same @sexp, backup, "deep clone is broken again?"
550
+ assert_equal @sexp, backup, "deep clone is broken again?"
551
+ expected = s(:a, s(:b))
552
+
553
+ assert_equal(expected, @sexp.structure)
554
+ assert_equal(backup, @sexp)
555
+ end
556
+
557
+ def test_structure_deprecated
558
+ exp_err = "NOTE: form s(s(:subsexp)).structure is deprecated. Removing in 5.0\n"
559
+
560
+ assert_output "", exp_err do
561
+ sexp = s(s(:subsexp))
562
+ act = sexp.structure
563
+
564
+ assert_equal s(:bogus, s(:subsexp)), act
565
+ end
566
+ end
567
+
568
+ def test_sub
569
+ assert_equal s(:c), s(:b). sub(s(:b), s(:c))
570
+ assert_equal s(:a, s(:c), s(:b)), s(:a, s(:b), s(:b)). sub(s(:b), s(:c))
571
+ assert_equal s(:a, s(:c), s(:a)), s(:a, s(:b), s(:a)). sub(s(:b), s(:c))
572
+ end
573
+
574
+ def test_sub_miss
575
+ assert_equal s(:a), s(:a). sub(s(:b), s(:c))
576
+ assert_equal s(:a, s(:c)), s(:a, s(:c)). sub(s(:b), s(:c))
577
+ end
578
+
579
+ def test_sub_empty
580
+ assert_equal s(:c), s(). sub(s(), s(:c))
581
+ end
582
+
583
+ def assert_sub exp, sexp, from, to
584
+ assert_equal exp, sexp.sub(from, to)
585
+ end
586
+
587
+ def test_sub_matcher
588
+ assert_sub s(:c), s(:b), s{ s(:b) }, s(:c)
589
+ assert_sub s(:a, s(:c), s(:b)), s(:a, s(:b), s(:b)), s{ s(:b) }, s(:c)
590
+ assert_sub s(:a, s(:c), s(:a)), s(:a, s(:b), s(:a)), s{ s(:b) }, s(:c)
591
+
592
+ assert_sub s(:a, :b, :c), s(:a, s(:b, 42), :c), s{ s(:b, _) }, :b
593
+ assert_sub s(:a, s(:b), :c), s(:a, s(:b), :c), s{ s(:b, _) }, :b
594
+ assert_sub s(:a, s(:c, :b), :d), s(:a, s(:c, s(:b, 42)), :d), s{ s(:b, _) }, :b
595
+ assert_sub s(:a, s(:q), :c), s(:a, s(:q), :c), s{ s(:b, _) }, :b
596
+ end
597
+
598
+ def test_sub_structure
599
+ assert_sub s(:a, s(:c, s(:b))), s(:a, s(:b)), s(:b), s(:c, s(:b))
600
+ end
601
+
602
+ def test_sexp_type_eq
603
+ sexp = s(:bad_type, 42)
604
+
605
+ sexp.sexp_type = :good_type
606
+
607
+ assert_equal s(:good_type, 42), sexp
608
+ end
609
+
610
+ def test_sexp_body_eq
611
+ sexp = s(:type, 42)
612
+
613
+ sexp.sexp_body = [1, 2, 3]
614
+
615
+ assert_equal s(:type, 1, 2, 3), sexp
616
+ end
617
+
618
+ def test_to_a
619
+ assert_equal([1, 2, 3], @sexp.to_a)
620
+ end
621
+
622
+ def test_to_s
623
+ test_inspect
624
+ end
625
+
626
+ def test_each_sexp
627
+ result = []
628
+ @basic_sexp.each_sexp { |_, val| result << val }
629
+ assert_equal [42], result
630
+ end
631
+
632
+ def test_each_sexp_without_block
633
+ assert_kind_of Enumerator, @basic_sexp.each_sexp
634
+ assert_equal [42], @basic_sexp.each_sexp.map { |_, n| n }
635
+ end
636
+
637
+ def test_depth
638
+ assert_equal 1, s(:a).depth
639
+ assert_equal 2, s(:a, s(:b)).depth
640
+ assert_equal 3, s(:a, s(:b1, s(:c)), s(:b2)).depth
641
+ assert_equal 5, s(:a, s(:b, s(:c, s(:d, s(:e))))).depth
642
+ end
643
+
644
+ def test_deep_each
645
+ result = []
646
+ @complex_sexp.deep_each { |s| result << s if s.sexp_type == :if }
647
+ assert_equal [:if, :if], result.map { |k, _| k }
648
+ end
649
+
650
+ def test_deep_each_without_block
651
+ assert_kind_of Enumerator, @complex_sexp.deep_each
652
+ assert_equal [:if, :if], @complex_sexp.deep_each.select { |s, _| s == :if }.map { |k, _| k }
653
+ end
654
+
655
+ def test_unary_not
656
+ skip "TODO?"
657
+ assert_equal M::Not.new(M.q(:a)), s{ !s(:a) }
658
+ end
659
+
660
+ def test_unary_not_outside
661
+ skip "TODO?"
662
+ assert_equal M::Not.new(s(:a)), !s(:a)
663
+ end
664
+ end # TestSexp
665
+
666
+ class TestSexpMatcher < SexpTestCase
667
+ def test_cls_s
668
+ assert_equal M.s(:x), s{ s(:x) }
669
+ end
670
+
671
+ def test_cls_underscore
672
+ assert_equal M::Wild.new, s{ _ }
673
+ end
674
+
675
+ def test_cls_underscore3
676
+ assert_equal M::Remaining.new, s{ ___ }
677
+ end
678
+
679
+ def test_cls_include
680
+ assert_equal M::Include.new(:a), s{ include(:a) }
681
+ end
682
+
683
+ def test_cls_atom
684
+ assert_equal M::Atom.new, s{ atom }
685
+ end
686
+
687
+ def test_cls_any
688
+ assert_equal M::Any.new(M.s(:a), M.s(:b)), s{ any(s(:a), s(:b)) }
689
+ end
690
+
691
+ def test_cls_all
692
+ assert_equal M::All.new(M.s(:a), M.s(:b)), s{ all(s(:a), s(:b)) }
693
+ end
694
+
695
+ def test_cls_not_eh
696
+ assert_equal M::Not.new(M.s(:a)), s{ not?(s(:a)) }
697
+ end
698
+
699
+ def test_cls_child
700
+ assert_equal M::Child.new(M.s(:a)), s{ child(s(:a)) }
701
+ end
702
+
703
+ def test_cls_t
704
+ assert_equal M::Type.new(:a), s{ t(:a) }
705
+ end
706
+
707
+ def test_cls_m
708
+ assert_equal M::Pattern.new(/a/), s{ m(/a/) }
709
+ assert_equal M::Pattern.new(/\Aa\Z/), s{ m(:a) }
710
+ assert_equal M::Pattern.new(/test_\w/), s{ m(/test_\w/) }
711
+ re = Regexp.union [/\w/, /\d/]
712
+ assert_equal M::Pattern.new(re), s{ m(/\w/,/\d/) }
713
+ end
714
+
715
+ def test_amp
716
+ m = s{ s(:a) & s(:b) }
717
+ e = M::All.new(M.s(:a), M.s(:b))
718
+
719
+ assert_equal e, m
720
+ end
721
+
722
+ def test_pipe
723
+ m = s{ s(:a) | s(:b) }
724
+ e = M::Any.new(M.s(:a), M.s(:b))
725
+
726
+ assert_equal e, m
727
+ end
728
+
729
+ def test_unary_minus
730
+ assert_equal M::Not.new(M.s(:a)), s{ -s(:a) }
731
+ end
732
+
733
+ def test_rchevron
734
+ assert_equal M::Sibling.new(M.s(:a), M.s(:b)), s{ s(:a) >> s(:b) }
735
+ end
736
+
737
+ def test_greedy_eh
738
+ refute_operator s{ s(:a) }, :greedy?
739
+ end
740
+
741
+ def test_inspect
742
+ assert_inspect "q(:a)", s{ s(:a) }
743
+ end
744
+
745
+ def test_pretty_print
746
+ assert_pretty_print "q(:a)", s{ s(:a) }
747
+ end
748
+ end # class TestSexpMatcher
749
+
750
+ class TestWild < MatcherTestCase
751
+ def matcher
752
+ s{ _ }
753
+ end
754
+
755
+ def bad_sexp
756
+ nil
757
+ end
758
+
759
+ def inspect_str
760
+ "_"
761
+ end
762
+
763
+ def test_wild_satisfy_eh # TODO: possibly remove
764
+ w = Sexp::Wild.new
765
+
766
+ assert_satisfy w, :a
767
+ assert_satisfy w, 1
768
+ assert_satisfy w, nil
769
+ assert_satisfy w, []
770
+ assert_satisfy w, s()
771
+ end
772
+
773
+ def test_wild_search # TODO: possibly remove
774
+ sexp = CLASS_SEXP.dup
775
+
776
+ assert_search 1, s(:add, :a, :b), s{ s(:add, _, :b) }
777
+ assert_search 1, sexp, s{ s(:defn, :bar, _, _) }
778
+ assert_search 2, sexp, s{ s(:defn, _, _, s(_, :a, :b) ) }
779
+ assert_search 1, s(:a, s()), s{ s(:a, _) }
780
+ assert_search 1, s(:a, :b, :c), s{ s(_, _, _) }
781
+ assert_search 7, sexp, s{ _ }
782
+ end
783
+ end
784
+
785
+ class TestRemaining < MatcherTestCase
786
+ def matcher
787
+ s{ ___ }
788
+ end
789
+
790
+ def bad_sexp
791
+ nil
792
+ end
793
+
794
+ def inspect_str
795
+ "___"
796
+ end
797
+
798
+ def test_remaining_satisfy_eh # TODO: possibly remove
799
+ assert_satisfy s{ ___ }, s(:a)
800
+ assert_satisfy s{ ___ }, s(:a, :b, :c)
801
+ assert_satisfy s{ s(:x, ___ ) }, s(:x, :y)
802
+ refute_satisfy s{ s(:y, ___ ) }, s(:x, :y)
803
+ end
804
+
805
+ def test_greedy
806
+ assert_operator matcher, :greedy?
807
+ end
808
+ end
809
+
810
+ class TestAny < MatcherTestCase
811
+ def matcher
812
+ s{ s(:a) | s(:c) }
813
+ end
814
+
815
+ def inspect_str
816
+ "q(:a) | q(:c)"
817
+ end
818
+
819
+ def pretty_str
820
+ "any(q(:a), q(:c))"
821
+ end
822
+
823
+ def test_any_search # TODO: possibly remove
824
+ assert_search 2, s(:foo, s(:a), s(:b)), s{ s(any(:a, :b)) }
825
+ assert_search 1, s(:foo, s(:a), s(:b)), s{ any( s(:a), s(:c)) }
826
+ end
827
+
828
+ def test_or_satisfy_eh # TODO: possibly remove
829
+ assert_satisfy s{ s(:a) | s(:b) }, s(:a)
830
+ refute_satisfy s{ s(:a) | s(:b) }, s(:c)
831
+ end
832
+
833
+ def test_or_search # TODO: possibly remove
834
+ sexp = CLASS_SEXP.dup
835
+
836
+ assert_search 2, s(:a, s(:b, :c), s(:b, :d)), s{ s(:b, :c) | s(:b, :d) }
837
+ assert_search 2, sexp, s{ s(:add, :a, :b) | s(:defn, :bar, _, _) }
838
+ end
839
+ end
840
+
841
+ class TestAll < MatcherTestCase
842
+ def matcher
843
+ s{ s(:a) & s(:a) }
844
+ end
845
+
846
+ def inspect_str
847
+ "q(:a) & q(:a)"
848
+ end
849
+
850
+ def pretty_str
851
+ "all(q(:a), q(:a))"
852
+ end
853
+
854
+ def test_and_satisfy_eh # TODO: possibly remove
855
+ refute_satisfy s{ s(:a) & s(:b) }, s(:a)
856
+ assert_satisfy s{ s(:a) & s(atom) }, s(:a)
857
+ end
858
+ end
859
+
860
+ class TestNot < MatcherTestCase
861
+ def matcher
862
+ s{ not? s(:b) } # TODO: test unary minus
863
+ end
864
+
865
+ def inspect_str
866
+ "not?(q(:b))" # TODO: change?
867
+ end
868
+
869
+ def pretty_str
870
+ "not?(q(:b))" # TODO: change?
871
+ end
872
+
873
+ def test_not_satisfy_eh # TODO: possibly remove
874
+ refute_satisfy s{ -_ }, s(:a)
875
+ assert_satisfy s{ -s(:b) }, s(:a)
876
+ assert_satisfy s{ not?(s(:b)) }, s(:a)
877
+ refute_satisfy s{ -s(atom) }, s(:a)
878
+ assert_satisfy s{ s(not?(:b)) }, s(:a)
879
+ end
880
+ end
881
+
882
+ class TestChild < MatcherTestCase
883
+ def matcher
884
+ s{ child(s(:a)) }
885
+ end
886
+
887
+ def sexp
888
+ s(:x, s(:a))
889
+ end
890
+
891
+ def bad_sexp
892
+ s(:x, s(:b))
893
+ end
894
+
895
+ def inspect_str
896
+ "child(q(:a))"
897
+ end
898
+
899
+ def test_child_search # TODO: possibly remove
900
+ sexp = CLASS_SEXP.dup
901
+
902
+ assert_search 1, sexp, s{ s(:class, :cake, _, _, child( s(:sub, :a, :b) ) ) }
903
+ assert_search 1, sexp, s{ s(:class, :cake, _, _, child(include(:a))) }
904
+ end
905
+
906
+ def test_satisfy_eh_by_child
907
+ assert_satisfy matcher, s(:a)
908
+ end
909
+ end
910
+
911
+ class TestAtom < MatcherTestCase
912
+ def matcher
913
+ s{ atom }
914
+ end
915
+
916
+ def sexp
917
+ 42
918
+ end
919
+
920
+ def bad_sexp
921
+ s(:a)
922
+ end
923
+
924
+ def inspect_str
925
+ "atom"
926
+ end
927
+
928
+ def test_atom_satisfy_eh # TODO: possibly remove
929
+ a = s{ atom }
930
+
931
+ assert_satisfy a, :a
932
+ assert_satisfy a, 1
933
+ assert_satisfy a, nil
934
+ refute_satisfy a, s()
935
+ end
936
+
937
+ def test_atom_search # TODO: possibly remove
938
+ sexp = CLASS_SEXP.dup
939
+
940
+ assert_search 1, s(:add, :a, :b), s{ s(:add, atom, :b) }
941
+ assert_search 2, sexp, s{ s(:defn, atom, _, s(atom, :a, :b) ) }
942
+ assert_search 0, s(:a, s()), s{ s(:a, atom) }
943
+ end
944
+ end
945
+
946
+ class TestPattern < MatcherTestCase
947
+ def matcher
948
+ s{ s(:a, m(/a/)) }
949
+ end
950
+
951
+ def sexp
952
+ s(:a, :blah)
953
+ end
954
+
955
+ def inspect_str
956
+ "q(:a, m(/a/))"
957
+ end
958
+
959
+ def test_pattern_satisfy_eh # TODO: possibly remove
960
+ assert_satisfy s{ m(/a/) }, :a
961
+ assert_satisfy s{ m(/^test/) }, :test_case
962
+ assert_satisfy s{ m("test") }, :test
963
+ refute_satisfy s{ m("test") }, :test_case
964
+ refute_satisfy s{ m(/a/) }, s(:a)
965
+ end
966
+
967
+ def test_pattern_search # TODO: possibly remove
968
+ sexp = CLASS_SEXP.dup
969
+
970
+ assert_search 2, sexp, s{ s(m(/\w{3}/), :a, :b) }
971
+
972
+ assert_search 0, s(:a), s{ m(/\w/) }
973
+ assert_search 1, s(:a), s{ s(m(/\w/)) }
974
+ assert_search 0, s(:a), s{ m(/\w/,/\d/) }
975
+ assert_search 1, s(:a), s{ s(m(/\w/,/\d/)) }
976
+
977
+ assert_search 0, s(:tests, s(s(:test_a), s(:test_b))), s{ m(/test_\w/) }
978
+ assert_search 2, s(:tests, s(s(:test_a), s(:test_b))), s{ s(m(/test_\w/)) }
979
+ end
980
+ end
981
+
982
+ class TestType < MatcherTestCase
983
+ def matcher
984
+ s{ t(:a) }
985
+ end
986
+
987
+ def test_type_satisfy_eh # TODO: possibly remove
988
+ assert_satisfy s{ t(:a) }, s(:a)
989
+ assert_satisfy s{ t(:a) }, s(:a, :b, s(:oh_hai), :d)
990
+ end
991
+
992
+ def test_type_search
993
+ assert_search 2, CLASS_SEXP.dup, s{ t(:defn) }
994
+ end
995
+
996
+ def inspect_str
997
+ "t(:a)"
998
+ end
999
+ end
1000
+
1001
+ class TestInclude < MatcherTestCase
1002
+ def sexp
1003
+ s(:x, s(:a))
1004
+ end
1005
+
1006
+ def matcher
1007
+ s{ include(s(:a)) }
1008
+ end
1009
+
1010
+ def inspect_str
1011
+ "include(q(:a))"
1012
+ end
1013
+
1014
+ def test_include_search # TODO: possibly remove
1015
+ sexp = CLASS_SEXP.dup
1016
+
1017
+ assert_search 1, s(:add, :a, :b), s{ include(:a) }
1018
+ assert_search 1, sexp, s{ include(:bar) }
1019
+ assert_search 2, sexp, s{ s(:defn, atom, _, include(:a)) }
1020
+ assert_search 2, sexp, s{ include(:a) }
1021
+ assert_search 0, s(:a, s(:b, s(:c))), s{ s(:a, include(:c)) }
1022
+ end
1023
+ end
1024
+
1025
+ class TestSibling < MatcherTestCase
1026
+ def sexp
1027
+ s(:x, s(:a), s(:x), s(:b))
1028
+ end
1029
+
1030
+ def matcher
1031
+ s{ s(:a) >> s(:b) }
1032
+ end
1033
+
1034
+ def inspect_str
1035
+ "q(:a) >> q(:b)"
1036
+ end
1037
+
1038
+ def test_pretty_print_distance
1039
+ m = s{ M::Sibling.new(s(:a), s(:b), 3) } # maybe s(:a) << s(:b) << 3 ?
1040
+ assert_pretty_print "sibling(q(:a), q(:b), 3)", m
1041
+ end
1042
+
1043
+ def test_sibling_satisfy_eh # TODO: possibly remove
1044
+ a_a = s{ s(:a) >> s(:a) }
1045
+ a_b = s{ s(:a) >> s(:b) }
1046
+ a_c = s{ s(:a) >> s(:c) }
1047
+ c_a = s{ s(:c) >> s(:a) }
1048
+
1049
+ assert_satisfy a_b, s(s(:a), s(:b))
1050
+ assert_satisfy a_b, s(s(:a), s(:b), s(:c))
1051
+ assert_satisfy a_c, s(s(:a), s(:b), s(:c))
1052
+ refute_satisfy c_a, s(s(:a), s(:b), s(:c))
1053
+ refute_satisfy a_a, s(s(:a))
1054
+ assert_satisfy a_a, s(s(:a), s(:b), s(:a))
1055
+ end
1056
+
1057
+ def test_sibling_search # TODO: possibly remove
1058
+ sexp = CLASS_SEXP.dup
1059
+
1060
+ assert_search 1, sexp, s{ t(:defn) >> t(:defn) }
1061
+ end
1062
+ end
1063
+
1064
+ class TestMatchCollection < SexpTestCase
1065
+ attr_accessor :sexp, :pat, :act
1066
+
1067
+ def setup
1068
+ self.sexp = s(:a, :b, :c)
1069
+ self.pat = s{ _ }
1070
+ self.act = sexp / pat
1071
+ end
1072
+
1073
+ def test_slash
1074
+ self.sexp =
1075
+ s(:class, :cake, nil,
1076
+ s(:defn, :foo, s(:args), s(:add, :a, :b)),
1077
+ s(:defn, :bar, s(:args), s(:sub, :a, :b)))
1078
+
1079
+ res = sexp / s{ s(:class, atom, _, ___) } # sexp / pat => MC
1080
+ act = res / s{ s(:defn, atom, ___) } # MC / pat => MC
1081
+
1082
+ _, _, _, defn1, defn2 = sexp
1083
+
1084
+ exp = MC.new
1085
+ exp << defn1.deep_clone
1086
+ exp << defn2.deep_clone
1087
+
1088
+ assert_equal exp, act
1089
+ end
1090
+
1091
+ def test_sanity
1092
+ act = sexp / pat
1093
+ exp = MC.new << sexp
1094
+
1095
+ assert_equal exp, act
1096
+ end
1097
+
1098
+ STR = "MatchCollection.new(s(:a, :b, :c))"
1099
+
1100
+ def test_to_s
1101
+ assert_equal STR, act.to_s
1102
+ end
1103
+
1104
+ def test_inspect
1105
+ assert_inspect STR, act
1106
+ end
1107
+
1108
+ def test_pretty_print
1109
+ assert_pretty_print STR, act
1110
+ end
1111
+ end
1112
+
1113
+ class TestSexpSearch < SexpTestCase
1114
+ attr_accessor :sexp
1115
+
1116
+ make_my_diffs_pretty!
1117
+
1118
+ def setup
1119
+ self.sexp = CLASS_SEXP.dup
1120
+ end
1121
+
1122
+ def coll *args
1123
+ exp = MC.new
1124
+
1125
+ args.each_slice 2 do |sexp, hash|
1126
+ exp << res(sexp, hash)
1127
+ end
1128
+
1129
+ exp
1130
+ end
1131
+
1132
+ def res sexp, hash
1133
+ MR.new sexp.deep_clone, hash
1134
+ end
1135
+
1136
+ def test_slash_simple
1137
+ act = sexp / s{ s(:class, atom, _, ___) }
1138
+
1139
+ exp = MC.new
1140
+ exp << sexp.deep_clone
1141
+
1142
+ assert_equal exp, act
1143
+ end
1144
+
1145
+ def test_slash_subsexp
1146
+ act = sexp / s{ s(:defn, atom, ___) }
1147
+
1148
+ exp = MC.new
1149
+ exp << s(:defn, :foo, s(:args), s(:add, :a, :b))
1150
+ exp << s(:defn, :bar, s(:args), s(:sub, :a, :b))
1151
+
1152
+ assert_equal exp, act
1153
+ end
1154
+
1155
+ def test_slash_data
1156
+ pat = s{ s(:defn, m(/^test_.+/), ___ ) }
1157
+
1158
+ _, _, (_klass, _, _, _setup, t1, t2, t3) = TestUseCase.sexp.deep_clone
1159
+ exp = [t1, t2, t3]
1160
+
1161
+ assert_equal exp, TestUseCase.sexp.deep_clone / pat
1162
+ end
1163
+
1164
+ def test_search_each_no_block
1165
+ assert_kind_of Enumerator, sexp.search_each(s{_})
1166
+ assert_equal 7, sexp.search_each(s{_}).count
1167
+ assert_equal 2, sexp.search_each(s{t(:defn)}).count
1168
+ assert_search 7, sexp, s{_}
1169
+ assert_search 2, sexp, s{t(:defn)}
1170
+
1171
+ _, _, _, defn1, defn2 = sexp
1172
+
1173
+ mc = []
1174
+ mc << defn1.deep_clone
1175
+ mc << defn2.deep_clone
1176
+
1177
+ assert_equal mc, sexp.search_each(s{t(:defn)}).map { |x| x }
1178
+ end
1179
+
1180
+ def test_searching_simple_examples # TODO: possibly remove
1181
+ assert_raises ArgumentError do
1182
+ assert_search 0, sexp, :class # non-pattern should raise
1183
+ end
1184
+
1185
+ assert_search 0, sexp, s{ s(:class) }
1186
+ assert_search 1, sexp, s{ s(:add, :a, :b) }
1187
+ assert_search 1, s(:a, s(:b, s(:c))), s{ s(:b, s(:c)) }
1188
+ assert_search 0, s(:a, s(:b, s(:c))), s{ s(:a, s(:c)) }
1189
+ assert_search 1, sexp, s{ s(:defn, :bar, _, s(:sub, :a, :b)) }
1190
+ end
1191
+
1192
+ def test_satisfy_eh_any_capture # TODO: remove
1193
+ sexp = s(:add, :a, :b)
1194
+ assert_satisfy s{ any(s(:add, :a, :b), s(:sub, :a, :b)) }, sexp
1195
+
1196
+ assert_satisfy s{ any(s(atom, :a, :b), s(:sub, :a, :b)) }, sexp
1197
+ end
1198
+
1199
+ def test_satisfy_eh_all_capture # TODO: remove
1200
+ sexp = s(:add, :a, :b)
1201
+ assert_satisfy s{ all(s(_, :a, :b), s(atom, :a, :b)) }, sexp
1202
+
1203
+ assert_satisfy s{ all(s(_, :a, :b), s(atom, :a, :b)) }, sexp
1204
+
1205
+ assert_search 1, sexp, s{ all(s(_, :a, :b), s(atom, :a, :b)) }
1206
+ end
1207
+ end
1208
+
1209
+ class TestSexpPath < Minitest::Test
1210
+ def test_global_s_block
1211
+ sexp = s(:a, :b, :c) # s called outside block
1212
+
1213
+ assert_instance_of Sexp, s{ sexp.deep_clone }
1214
+ assert_instance_of Sexp::Matcher, s{ s(:a, :b, :c) }
1215
+ assert_instance_of Sexp::Matcher, s{ s(:a, atom, :c) }
1216
+ end
1217
+ end
1218
+
1219
+ class TestSexpReplaceSexp < SexpTestCase
1220
+ def test_replace_sexp
1221
+ sexp = s(:a, s(:b), :c)
1222
+ actual = sexp.replace_sexp(s{ s(:b) }) { :b }
1223
+
1224
+ assert_equal s(:a, :b, :c), actual
1225
+ end
1226
+
1227
+ def test_replace_sexp_root
1228
+ sexp = s(:a, s(:b), :c)
1229
+ actual = sexp.replace_sexp(s{ t(:a) }) { s(:new) }
1230
+
1231
+ assert_equal s(:new), actual
1232
+ end
1233
+
1234
+ def test_replace_sexp_yields_match_result
1235
+ sexp = s(:a, s(:b), :c)
1236
+
1237
+ exp = sexp.deep_clone
1238
+
1239
+ sexp.replace_sexp(s{ t(:a) }) { |x|
1240
+ assert_equal exp, x
1241
+ }
1242
+ end
1243
+
1244
+ def test_replace_sexp_non_matcher
1245
+ e = assert_raises ArgumentError do
1246
+ s(:a, s(:b), :c).replace_sexp(42) { :b }
1247
+ end
1248
+
1249
+ assert_equal "Needs a pattern", e.message
1250
+ end
1251
+
1252
+ def test_search_each_yields_match_result
1253
+ sexp = s(:a, s(:b), :c)
1254
+
1255
+ exp = sexp.deep_clone
1256
+
1257
+ sexp.search_each(s{ t(:a) }) { |x|
1258
+ assert_equal exp, x
1259
+ }
1260
+ end
1261
+
1262
+ def test_search_each_no_pattern
1263
+ e = assert_raises ArgumentError do
1264
+ s(:a, s(:b), :c).search_each(42) { :b }
1265
+ end
1266
+
1267
+ assert_equal "Needs a pattern", e.message
1268
+ end
1269
+ end
1270
+
1271
+ # Here's a crazy idea, these tests actually use sexp_path on some "real"
1272
+ # code to see if it can satisfy my requirements.
1273
+ #
1274
+ # These tests are two fold:
1275
+ # 1. Make sure it works
1276
+ # 2. Make sure it's not painful to use
1277
+
1278
+ class TestUseCase < SexpTestCase
1279
+ @@sexp = eval File.read(__FILE__).split(/^__END__/).last
1280
+
1281
+ def self.sexp
1282
+ @@sexp
1283
+ end
1284
+
1285
+ def setup
1286
+ @sexp = @@sexp.deep_clone
1287
+ end
1288
+
1289
+ def test_finding_methods
1290
+ methods = @sexp / s{ t(:defn) }
1291
+ assert_equal 5, methods.length
1292
+ end
1293
+
1294
+ def test_finding_classes_and_methods
1295
+ res = @sexp / s{ s(:class, atom, ___ ) }
1296
+
1297
+ _klass, name, * = res.first
1298
+
1299
+ assert_equal 1, res.length
1300
+ assert_equal :ExampleTest, name
1301
+
1302
+ methods = res / s{ t(:defn) }
1303
+ assert_equal 5, methods.length
1304
+ end
1305
+
1306
+ def test_finding_empty_test_methods
1307
+ empty_test = s{ s(:defn, m(/^test_.+/), s(:args), s(:nil)) }
1308
+ res = @sexp / empty_test
1309
+
1310
+ _, _, (_klass, _, _, _setup, _t1, t2, _t3) = TestUseCase.sexp.deep_clone
1311
+
1312
+ assert_equal [t2], res
1313
+ end
1314
+
1315
+ def test_search_each_finding_duplicate_test_names
1316
+ pat = s{ s(:defn, m(/^test_.+/), ___ ) }
1317
+ counts = Hash.new { |h, k| h[k] = 0 }
1318
+
1319
+ @sexp.search_each pat do |x|
1320
+ _, name, * = x
1321
+ counts[name] += 1
1322
+ end
1323
+
1324
+ assert_equal 1, counts[:test_b], "Should have seen test_b once"
1325
+ assert_equal 2, counts[:test_a], "Should have caught test_a being repeated"
1326
+ end
1327
+
1328
+ def test_finding_duplicate_test_names_via_res
1329
+ pat = s{ s(:defn, m(/^test_.+/), ___ ) }
1330
+ res = @sexp / pat
1331
+ counts = Hash.new { |h, k| h[k] = 0 }
1332
+
1333
+ _, _, (_klass, _, _, _setup, t1, t2, t3) = TestUseCase.sexp.deep_clone
1334
+ exp = [t1, t2, t3]
1335
+
1336
+ assert_equal exp, res
1337
+
1338
+ res.each do |m|
1339
+ _, name, * = m
1340
+ counts[name] += 1
1341
+ end
1342
+
1343
+ assert_equal 1, counts[:test_b], "Should have seen test_b once"
1344
+ assert_equal 2, counts[:test_a], "Should have caught test_a being repeated"
1345
+ end
1346
+
1347
+ def test_rewriting_colon2s
1348
+ colon2 = s{ s(:colon2, s(:const, atom), atom) }
1349
+ expected = s{ s(:const, "Minitest::Test") }
1350
+
1351
+ new_sexp = @sexp.replace_sexp(colon2) { |r|
1352
+ (_, (_, a), b) = r
1353
+ s(:const, "%s::%s" % [a, b])
1354
+ }
1355
+
1356
+ assert_search 1, new_sexp, expected
1357
+ assert_search 0, @sexp, expected
1358
+ end
1359
+ end
1360
+
1361
+ ##
1362
+ # NOTE: this entire class is now redundant, but it illustrates usage
1363
+ # and edge cases well.
1364
+
1365
+ class TestSexpMatchers < SexpTestCase
1366
+ CLASS_LIT = s(:class, :X, nil,
1367
+ s(:lasgn, :x, s(:lit, 42)),
1368
+ s(:cdecl, :Y,
1369
+ s(:hash, s(:lit, :a), s(:lit, 1), s(:lit, :b), s(:lit, 2))))
1370
+
1371
+ SEXP = s(:class, :X, nil, s(:defn, :x, s(:args)))
1372
+
1373
+ def test_match_subset
1374
+ assert_match s{ child(s(:a)) }, s(:blah, s(:blah, s(:a)))
1375
+ assert_match s{ child(s(:a)) }, s(:a)
1376
+ end
1377
+
1378
+ def test_match_simple
1379
+ assert_match s{ s(:lit, _) }, s(:lit, 42)
1380
+ end
1381
+
1382
+ def test_match_mismatch_type
1383
+ refute_match s{ s(:xxx, 42) }, s(:lit, 42)
1384
+ end
1385
+
1386
+ def test_match_mismatch_data
1387
+ refute_match s{ s(:lit, 24) }, s(:lit, 42)
1388
+ end
1389
+
1390
+ def test_match_mismatch_length_shorter
1391
+ refute_match s{ s(:a, :b) }, s(:a, :b, :c)
1392
+ end
1393
+
1394
+ def test_match_mismatch_length_longer
1395
+ refute_match s{ s(:a, :b, :c) }, s(:a, :b)
1396
+ end
1397
+
1398
+ def test_match_wild
1399
+ assert_match s{ s(:class, _, _, _) }, SEXP
1400
+ end
1401
+
1402
+ def test_match_rest_same_length
1403
+ assert_match s{ s(:class, _, _, ___) }, SEXP
1404
+ end
1405
+
1406
+ def test_match_rest_diff_length
1407
+ skip_if_strict
1408
+
1409
+ assert_match s{ s(:class, ___) }, SEXP
1410
+ end
1411
+
1412
+ def test_match_reversed
1413
+ assert_match SEXP, s{ s(:class, _, _, ___) }
1414
+ end
1415
+
1416
+ def assert_match_case pat, data
1417
+ case data
1418
+ when pat then
1419
+ assert true
1420
+ else
1421
+ flunk "Expected %p to match %p" % [pat, data]
1422
+ end
1423
+ end
1424
+
1425
+ def test_match_case
1426
+ assert_match_case s{ s(:class, _, _, ___) }, SEXP
1427
+ end
1428
+
1429
+ # NOTE: eqt is =~ (equal-tilde)
1430
+
1431
+ # cmt = create_match_test
1432
+ def self.cmt e1, e2, e3, e4, lit, pat
1433
+ Class.new SexpTestCase do
1434
+ attr_accessor :lit, :pat
1435
+
1436
+ define_method :setup do
1437
+ self.lit = lit
1438
+ self.pat = pat
1439
+ end
1440
+
1441
+ define_method :test_match_lit_eqt_pat do
1442
+ skip_if_strict
1443
+
1444
+ if e1 then
1445
+ assert_match lit, pat
1446
+ else
1447
+ refute_match lit, pat
1448
+ end
1449
+ end
1450
+
1451
+ define_method :test_match_pat_eqt_lit do
1452
+ skip_if_strict
1453
+
1454
+ if e2 then
1455
+ assert_match pat, lit
1456
+ else
1457
+ refute_match pat, lit
1458
+ end
1459
+ end
1460
+
1461
+ define_method :test_match_lit_eq3_pat do
1462
+ if e3 then
1463
+ assert_equal3 lit, pat
1464
+ else
1465
+ refute_equal3 lit, pat
1466
+ end
1467
+ end
1468
+
1469
+ define_method :test_match_pat_eq3_lit do
1470
+ if e4 then
1471
+ assert_equal3 pat, lit
1472
+ else
1473
+ refute_equal3 pat, lit
1474
+ end
1475
+ end
1476
+ end
1477
+ end
1478
+
1479
+ l_a = s(:a)
1480
+ l_abc = s(:a, s(:b, s(:c)))
1481
+ l_cls = s(:class, :X, nil,
1482
+ s(:something_in_between),
1483
+ s(:cdecl, :Y, s(:hash, s(:lit, :a), s(:lit, 1))))
1484
+ p_cls1 = s{ s(:class, ___) & include(s(:cdecl, _, s(:hash, ___))) }
1485
+ p_cls2 = s{ s(:class, _, _, s(:cdecl, _, s(:hash, ___))) }
1486
+
1487
+ x, o = true, false
1488
+ TestMatcherDirectMatch = cmt x, x, o, x, l_a, s{ s(:a) }
1489
+ TestMatcherSubtree = cmt x, x, o, x, l_abc, s{ s(:c) }
1490
+ TestMatcherSubtreeType = cmt x, x, o, x, l_abc, s{ t(:c) }
1491
+ TestMatcherDisparateSubtree = cmt x, x, o, x, l_cls, p_cls1
1492
+ TestMatcherDisparateSubtree2 = cmt o, o, o, o, l_cls, p_cls2 # TODO: make pass
1493
+ end
1494
+
1495
+ class TestSexpMatcherParser < Minitest::Test
1496
+ def assert_parse exp, str
1497
+ act = Sexp::Matcher.parse str
1498
+
1499
+ if exp.nil? then
1500
+ assert_nil act
1501
+ else
1502
+ assert_equal exp, act
1503
+ end
1504
+ end
1505
+
1506
+ def self.test_parse name, exp_lambda, str
1507
+ define_method "test_parse_#{name}" do
1508
+ exp = exp_lambda && exp_lambda.call
1509
+ assert_parse exp, str
1510
+ end
1511
+ end
1512
+
1513
+ def self.test_bad_parse name, str
1514
+ define_method "test_parse_bad_#{name}" do
1515
+ assert_raises SyntaxError do
1516
+ assert_parse :whatever, str
1517
+ end
1518
+ end
1519
+ end
1520
+
1521
+ def self.delay &b
1522
+ lambda { s(&b) }
1523
+ end
1524
+
1525
+ test_parse "nothing", nil, ""
1526
+ test_parse "nil", delay{ nil }, "nil"
1527
+ test_parse "empty", delay{ s() }, "()"
1528
+ test_parse "simple", delay{ s(:a) }, "(a)"
1529
+ test_parse "number", delay{ s(:a, 42) }, "(a 42)"
1530
+ test_parse "string", delay{ s(:a, "s") }, "(a \"s\")"
1531
+ test_parse "compound", delay{ s(:b) }, "(a) (b)"
1532
+ test_parse "complex", delay{ s(:a, _, s(:b, :cde), ___) }, "(a _ (b cde) ___)"
1533
+ test_parse "type", delay{ s(:a, t(:b)) }, "(a [t b])"
1534
+ test_parse "match", delay{ s(:a, m(/b/)) }, "(a [m /b/])"
1535
+ test_parse "not_atom", delay{ s(:atom) }, "(atom)"
1536
+ test_parse "atom", delay{ atom }, "[atom]"
1537
+
1538
+ test_bad_parse "open_sexp", "(a"
1539
+ test_bad_parse "closed_sexp", "a)"
1540
+ test_bad_parse "open_cmd", "[a"
1541
+ test_bad_parse "closed_cmd", "a]"
1542
+ end # class TestSexpMatcherParser
1543
+
1544
+ class BenchSexp < Minitest::Benchmark
1545
+ def run
1546
+ GC.disable
1547
+ super
1548
+ ensure
1549
+ GC.enable
1550
+ end
1551
+
1552
+ def self.bench_range
1553
+ bench_linear 100, 500, 50
1554
+ end
1555
+
1556
+ @@data = Hash[bench_range.map { |n| [n, pyramid_sexp(n)] }]
1557
+
1558
+ def bench_pyramid
1559
+ assert_performance_power do |max|
1560
+ pyramid_sexp max
1561
+ end
1562
+ end
1563
+
1564
+ def bench_mass
1565
+ assert_performance_power do |max|
1566
+ @@data[max].mass
1567
+ end
1568
+ end
1569
+ end if ENV["BENCH"]
1570
+
1571
+ # class ExampleTest < Minitest::Test
1572
+ # def setup
1573
+ # 1 + 2
1574
+ # end
1575
+ #
1576
+ # def test_a
1577
+ # assert_equal 1+2, 4
1578
+ # end
1579
+ #
1580
+ # def test_b
1581
+ # # assert 1+1
1582
+ # end
1583
+ #
1584
+ # def test_a
1585
+ # assert_equal 1+2, 3
1586
+ # end
1587
+ #
1588
+ # private
1589
+ #
1590
+ # def helper_method apples, oranges, cakes = nil
1591
+ # [apples, oranges, cakes].compact.map { |food| food.to_s.upcase }
1592
+ # end
1593
+ # end
1594
+
1595
+ __END__
1596
+ s(:block,
1597
+ s(:call, nil, :require, s(:str, "minitest/autorun")),
1598
+ s(:class,
1599
+ :ExampleTest,
1600
+ s(:colon2, s(:const, :Minitest), :Test),
1601
+ s(:defn, :setup, s(:args), s(:call, s(:lit, 1), :+, s(:lit, 2))),
1602
+ s(:defn,
1603
+ :test_a,
1604
+ s(:args),
1605
+ s(:call,
1606
+ nil,
1607
+ :assert_equal,
1608
+ s(:call, s(:lit, 1), :+, s(:lit, 2)),
1609
+ s(:lit, 4))),
1610
+ s(:defn, :test_b, s(:args), s(:nil)),
1611
+ s(:defn,
1612
+ :test_a,
1613
+ s(:args),
1614
+ s(:call,
1615
+ nil,
1616
+ :assert_equal,
1617
+ s(:call, s(:lit, 1), :+, s(:lit, 2)),
1618
+ s(:lit, 3))),
1619
+ s(:call, nil, :private),
1620
+ s(:defn,
1621
+ :helper_method,
1622
+ s(:args, :apples, :oranges, s(:lasgn, :cakes, s(:nil))),
1623
+ s(:iter,
1624
+ s(:call,
1625
+ s(:call,
1626
+ s(:array, s(:lvar, :apples), s(:lvar, :oranges), s(:lvar, :cakes)),
1627
+ :compact),
1628
+ :map),
1629
+ s(:args, :food),
1630
+ s(:call, s(:call, s(:lvar, :food), :to_s), :upcase)))))