tdiary 5.0.14 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3660) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +12 -0
  3. data/Gemfile.lock +44 -42
  4. data/lib/aws/pa_api.rb +72 -0
  5. data/lib/aws/sig_v4.rb +45 -0
  6. data/lib/tdiary/comment_manager.rb +1 -1
  7. data/lib/tdiary/tasks/release.rake +2 -2
  8. data/lib/tdiary/version.rb +1 -1
  9. data/misc/paas/heroku/Gemfile.local +1 -1
  10. data/misc/paas/heroku/Gemfile.lock +55 -52
  11. data/misc/plugin/amazon.rb +63 -180
  12. data/misc/plugin/makerss.rb +1 -4
  13. data/public/assets/00default.js +104 -0
  14. data/public/assets/01conf.js +78 -0
  15. data/public/assets/02edit.js +15 -0
  16. data/public/assets/amazon.js +13 -0
  17. data/public/assets/amazon_bitly.js +43 -0
  18. data/public/assets/base.css +284 -0
  19. data/public/assets/calendar3.js +130 -0
  20. data/public/assets/caretposition.js +170 -0
  21. data/public/assets/category.js +29 -0
  22. data/public/assets/category_autocomplete.js +96 -0
  23. data/public/assets/comment_ajax.js +27 -0
  24. data/public/assets/comment_emoji_autocomplete.js +138 -0
  25. data/public/assets/conf.block.png +0 -0
  26. data/public/assets/conf.css +254 -0
  27. data/public/assets/default/README +11 -0
  28. data/public/assets/default/body.png +0 -0
  29. data/public/assets/default/default.css +753 -0
  30. data/public/assets/default/default/README +11 -0
  31. data/public/assets/default/default/body.png +0 -0
  32. data/public/assets/default/default/default.css +753 -0
  33. data/public/assets/draft.js +149 -0
  34. data/public/assets/help.png +0 -0
  35. data/public/assets/highlight.js +36 -0
  36. data/public/assets/image.js +181 -0
  37. data/public/assets/loading.gif +0 -0
  38. data/public/assets/ogimage.png +0 -0
  39. data/public/assets/preview.js +69 -0
  40. data/public/assets/tdiary1/README +7 -0
  41. data/public/assets/tdiary1/tdiary1.css +394 -0
  42. data/public/assets/tdiary1/tdiary1/README +7 -0
  43. data/public/assets/tdiary1/tdiary1/tdiary1.css +394 -0
  44. data/public/assets/tdiary2/README +19 -0
  45. data/public/assets/tdiary2/tdiary2.css +624 -0
  46. data/public/assets/tdiary2/tdiary2/README +19 -0
  47. data/public/assets/tdiary2/tdiary2/tdiary2.css +624 -0
  48. data/public/index.rdf +1 -3
  49. data/vendor/bundle/bin/coveralls +27 -0
  50. data/vendor/bundle/bin/emot +27 -0
  51. data/vendor/bundle/bin/hikidoc +27 -0
  52. data/vendor/bundle/bin/htmldiff +29 -0
  53. data/vendor/bundle/bin/jasmine +27 -0
  54. data/vendor/bundle/bin/launchy +27 -0
  55. data/vendor/bundle/bin/ldiff +29 -0
  56. data/vendor/bundle/bin/nokogiri +27 -0
  57. data/vendor/bundle/bin/pit +27 -0
  58. data/vendor/bundle/bin/racksh +27 -0
  59. data/vendor/bundle/bin/rackup +27 -0
  60. data/vendor/bundle/bin/rake +27 -0
  61. data/vendor/bundle/bin/redcarpet +27 -0
  62. data/vendor/bundle/bin/rspec +27 -0
  63. data/vendor/bundle/bin/sequel +27 -0
  64. data/vendor/bundle/bin/term_cdiff +27 -0
  65. data/vendor/bundle/bin/term_colortab +27 -0
  66. data/vendor/bundle/bin/term_decolor +27 -0
  67. data/vendor/bundle/bin/term_display +27 -0
  68. data/vendor/bundle/bin/term_mandel +27 -0
  69. data/vendor/bundle/bin/term_snow +27 -0
  70. data/vendor/bundle/bin/thor +27 -0
  71. data/vendor/bundle/cache/addressable-2.7.0.gem +0 -0
  72. data/vendor/bundle/cache/capybara-3.29.0.gem +0 -0
  73. data/vendor/bundle/cache/childprocess-3.0.0.gem +0 -0
  74. data/vendor/bundle/cache/coveralls-0.8.23.gem +0 -0
  75. data/vendor/bundle/cache/diff-lcs-1.3.gem +0 -0
  76. data/vendor/bundle/cache/docile-1.3.2.gem +0 -0
  77. data/vendor/bundle/cache/emot-0.0.4.gem +0 -0
  78. data/vendor/bundle/cache/faraday-0.17.1.gem +0 -0
  79. data/vendor/bundle/cache/fastimage-2.1.7.gem +0 -0
  80. data/vendor/bundle/cache/hikidoc-0.1.0.gem +0 -0
  81. data/vendor/bundle/cache/jasmine-2.99.0.gem +0 -0
  82. data/vendor/bundle/cache/jasmine-core-2.99.2.gem +0 -0
  83. data/vendor/bundle/cache/json-2.2.0.gem +0 -0
  84. data/vendor/bundle/cache/launchy-2.4.3.gem +0 -0
  85. data/vendor/bundle/cache/mail-2.7.1.gem +0 -0
  86. data/vendor/bundle/cache/mime-types-3.3.gem +0 -0
  87. data/vendor/bundle/cache/mime-types-data-3.2019.1009.gem +0 -0
  88. data/vendor/bundle/cache/mini_mime-1.0.2.gem +0 -0
  89. data/vendor/bundle/cache/mini_portile2-2.4.0.gem +0 -0
  90. data/vendor/bundle/cache/multipart-post-2.1.1.gem +0 -0
  91. data/vendor/bundle/cache/nokogiri-1.10.5.gem +0 -0
  92. data/vendor/bundle/cache/octokit-4.14.0.gem +0 -0
  93. data/vendor/bundle/cache/phantomjs-2.1.1.0.gem +0 -0
  94. data/vendor/bundle/cache/pit-0.0.7.gem +0 -0
  95. data/vendor/bundle/cache/power_assert-1.1.5.gem +0 -0
  96. data/vendor/bundle/cache/public_suffix-4.0.1.gem +0 -0
  97. data/vendor/bundle/cache/rack-2.0.7.gem +0 -0
  98. data/vendor/bundle/cache/rack-test-1.1.0.gem +0 -0
  99. data/vendor/bundle/cache/racksh-1.0.0.gem +0 -0
  100. data/vendor/bundle/cache/rake-13.0.1.gem +0 -0
  101. data/vendor/bundle/cache/redcarpet-3.5.0.gem +0 -0
  102. data/vendor/bundle/cache/regexp_parser-1.6.0.gem +0 -0
  103. data/vendor/bundle/cache/rspec-3.9.0.gem +0 -0
  104. data/vendor/bundle/cache/rspec-core-3.9.0.gem +0 -0
  105. data/vendor/bundle/cache/rspec-expectations-3.9.0.gem +0 -0
  106. data/vendor/bundle/cache/rspec-mocks-3.9.0.gem +0 -0
  107. data/vendor/bundle/cache/rspec-support-3.9.0.gem +0 -0
  108. data/vendor/bundle/cache/rubyzip-2.0.0.gem +0 -0
  109. data/vendor/bundle/cache/sawyer-0.8.2.gem +0 -0
  110. data/vendor/bundle/cache/selenium-webdriver-3.142.6.gem +0 -0
  111. data/vendor/bundle/cache/sequel-5.26.0.gem +0 -0
  112. data/vendor/bundle/cache/simplecov-0.16.1.gem +0 -0
  113. data/vendor/bundle/cache/simplecov-html-0.10.2.gem +0 -0
  114. data/vendor/bundle/cache/sqlite3-1.4.1.gem +0 -0
  115. data/vendor/bundle/cache/term-ansicolor-1.7.1.gem +0 -0
  116. data/vendor/bundle/cache/test-unit-3.3.4.gem +0 -0
  117. data/vendor/bundle/cache/thor-0.20.3.gem +0 -0
  118. data/vendor/bundle/cache/tins-1.22.2.gem +0 -0
  119. data/vendor/bundle/cache/xpath-3.2.0.gem +0 -0
  120. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/json-2.2.0/gem.build_complete +0 -0
  121. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/json-2.2.0/gem_make.out +13 -0
  122. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/json-2.2.0/json/ext/generator.so +0 -0
  123. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/json-2.2.0/json/ext/parser.so +0 -0
  124. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/json-2.2.0/mkmf.log +69 -0
  125. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/nokogiri-1.10.5/gem.build_complete +0 -0
  126. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/nokogiri-1.10.5/gem_make.out +449 -0
  127. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/nokogiri-1.10.5/mkmf.log +566 -0
  128. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/nokogiri-1.10.5/nokogiri/nokogiri.so +0 -0
  129. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/redcarpet-3.5.0/gem.build_complete +0 -0
  130. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/redcarpet-3.5.0/gem_make.out +119 -0
  131. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/redcarpet-3.5.0/redcarpet.so +0 -0
  132. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/sqlite3-1.4.1/gem.build_complete +0 -0
  133. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/sqlite3-1.4.1/gem_make.out +77 -0
  134. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/sqlite3-1.4.1/mkmf.log +631 -0
  135. data/vendor/bundle/extensions/x86_64-linux/2.6.0-static/sqlite3-1.4.1/sqlite3/sqlite3_native.so +0 -0
  136. data/vendor/bundle/gems/addressable-2.7.0/CHANGELOG.md +235 -0
  137. data/vendor/bundle/gems/addressable-2.7.0/Gemfile +32 -0
  138. data/vendor/bundle/gems/addressable-2.7.0/LICENSE.txt +202 -0
  139. data/vendor/bundle/gems/addressable-2.7.0/README.md +121 -0
  140. data/vendor/bundle/gems/addressable-2.7.0/Rakefile +34 -0
  141. data/vendor/bundle/gems/addressable-2.7.0/data/unicode.data +0 -0
  142. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable.rb +4 -0
  143. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable/idna.rb +27 -0
  144. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable/idna/native.rb +61 -0
  145. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable/idna/pure.rb +676 -0
  146. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable/template.rb +1045 -0
  147. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable/uri.rb +2529 -0
  148. data/vendor/bundle/gems/addressable-2.7.0/lib/addressable/version.rb +32 -0
  149. data/vendor/bundle/gems/addressable-2.7.0/spec/addressable/idna_spec.rb +300 -0
  150. data/vendor/bundle/gems/addressable-2.7.0/spec/addressable/net_http_compat_spec.rb +30 -0
  151. data/vendor/bundle/gems/addressable-2.7.0/spec/addressable/rack_mount_compat_spec.rb +106 -0
  152. data/vendor/bundle/gems/addressable-2.7.0/spec/addressable/security_spec.rb +59 -0
  153. data/vendor/bundle/gems/addressable-2.7.0/spec/addressable/template_spec.rb +1451 -0
  154. data/vendor/bundle/gems/addressable-2.7.0/spec/addressable/uri_spec.rb +6603 -0
  155. data/vendor/bundle/gems/addressable-2.7.0/spec/spec_helper.rb +24 -0
  156. data/vendor/bundle/gems/addressable-2.7.0/tasks/clobber.rake +4 -0
  157. data/vendor/bundle/gems/addressable-2.7.0/tasks/gem.rake +93 -0
  158. data/vendor/bundle/gems/addressable-2.7.0/tasks/git.rake +47 -0
  159. data/vendor/bundle/gems/addressable-2.7.0/tasks/metrics.rake +24 -0
  160. data/vendor/bundle/gems/addressable-2.7.0/tasks/rspec.rake +23 -0
  161. data/vendor/bundle/gems/addressable-2.7.0/tasks/yard.rake +29 -0
  162. data/vendor/bundle/gems/capybara-3.29.0/History.md +1743 -0
  163. data/vendor/bundle/gems/capybara-3.29.0/License.txt +22 -0
  164. data/vendor/bundle/gems/capybara-3.29.0/README.md +1099 -0
  165. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara.rb +511 -0
  166. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/config.rb +90 -0
  167. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/cucumber.rb +27 -0
  168. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/driver/base.rb +170 -0
  169. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/driver/node.rb +139 -0
  170. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/dsl.rb +57 -0
  171. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/helpers.rb +106 -0
  172. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/minitest.rb +297 -0
  173. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/minitest/spec.rb +208 -0
  174. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/actions.rb +416 -0
  175. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/base.rb +143 -0
  176. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/document.rb +48 -0
  177. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/document_matchers.rb +67 -0
  178. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/element.rb +599 -0
  179. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/finders.rb +319 -0
  180. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/matchers.rb +868 -0
  181. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/node/simple.rb +206 -0
  182. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/ancestor_query.rb +27 -0
  183. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/base_query.rb +105 -0
  184. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/current_path_query.rb +51 -0
  185. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/match_query.rb +26 -0
  186. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/selector_query.rb +697 -0
  187. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/sibling_query.rb +26 -0
  188. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/style_query.rb +45 -0
  189. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/text_query.rb +110 -0
  190. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/queries/title_query.rb +39 -0
  191. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rack_test/browser.rb +135 -0
  192. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rack_test/css_handlers.rb +13 -0
  193. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rack_test/driver.rb +109 -0
  194. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rack_test/errors.rb +6 -0
  195. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rack_test/form.rb +127 -0
  196. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rack_test/node.rb +300 -0
  197. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rails.rb +16 -0
  198. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/registrations/drivers.rb +36 -0
  199. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/registrations/patches/puma_ssl.rb +27 -0
  200. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/registrations/servers.rb +44 -0
  201. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/result.rb +166 -0
  202. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec.rb +29 -0
  203. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/features.rb +23 -0
  204. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matcher_proxies.rb +82 -0
  205. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers.rb +201 -0
  206. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/base.rb +105 -0
  207. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/become_closed.rb +33 -0
  208. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/compound.rb +88 -0
  209. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/count_sugar.rb +36 -0
  210. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_ancestor.rb +27 -0
  211. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_current_path.rb +29 -0
  212. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_selector.rb +69 -0
  213. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_sibling.rb +27 -0
  214. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_text.rb +33 -0
  215. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/have_title.rb +29 -0
  216. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/match_selector.rb +27 -0
  217. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/match_style.rb +38 -0
  218. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/rspec/matchers/spatial_sugar.rb +38 -0
  219. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector.rb +225 -0
  220. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/builders/css_builder.rb +84 -0
  221. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/builders/xpath_builder.rb +69 -0
  222. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/css.rb +102 -0
  223. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition.rb +276 -0
  224. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/button.rb +46 -0
  225. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/checkbox.rb +26 -0
  226. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/css.rb +8 -0
  227. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/datalist_input.rb +35 -0
  228. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/datalist_option.rb +25 -0
  229. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/element.rb +27 -0
  230. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/field.rb +40 -0
  231. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/fieldset.rb +14 -0
  232. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/file_field.rb +13 -0
  233. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/fillable_field.rb +33 -0
  234. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/frame.rb +17 -0
  235. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/id.rb +6 -0
  236. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/label.rb +60 -0
  237. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/link.rb +46 -0
  238. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/link_or_button.rb +16 -0
  239. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/option.rb +27 -0
  240. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/radio_button.rb +27 -0
  241. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/select.rb +62 -0
  242. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/table.rb +106 -0
  243. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/table_row.rb +21 -0
  244. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/definition/xpath.rb +5 -0
  245. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/filter.rb +5 -0
  246. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/filter_set.rb +122 -0
  247. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/filters/base.rb +72 -0
  248. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/filters/expression_filter.rb +22 -0
  249. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/filters/locator_filter.rb +29 -0
  250. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/filters/node_filter.rb +31 -0
  251. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/regexp_disassembler.rb +214 -0
  252. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/selector.rb +145 -0
  253. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selector/xpath_extensions.rb +17 -0
  254. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/atoms/getAttribute.min.js +1 -0
  255. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/atoms/isDisplayed.min.js +1 -0
  256. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/atoms/src/getAttribute.js +161 -0
  257. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/atoms/src/isDisplayed.js +454 -0
  258. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/driver.rb +487 -0
  259. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/driver_specializations/chrome_driver.rb +119 -0
  260. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/driver_specializations/edge_driver.rb +126 -0
  261. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/driver_specializations/firefox_driver.rb +89 -0
  262. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/driver_specializations/internet_explorer_driver.rb +26 -0
  263. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/driver_specializations/safari_driver.rb +24 -0
  264. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/extensions/file_input_click_emulation.rb +34 -0
  265. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/extensions/find.rb +110 -0
  266. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/extensions/html5_drag.rb +211 -0
  267. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/extensions/modifier_keys_stack.rb +28 -0
  268. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/extensions/scroll.rb +78 -0
  269. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/logger_suppressor.rb +34 -0
  270. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/node.rb +532 -0
  271. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/nodes/chrome_node.rb +122 -0
  272. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/nodes/edge_node.rb +102 -0
  273. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/nodes/firefox_node.rb +131 -0
  274. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/nodes/ie_node.rb +22 -0
  275. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/nodes/safari_node.rb +118 -0
  276. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/patches/atoms.rb +18 -0
  277. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/patches/is_displayed.rb +16 -0
  278. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/patches/logs.rb +47 -0
  279. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/patches/pause_duration_fix.rb +9 -0
  280. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/selenium/patches/persistent_client.rb +20 -0
  281. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/server.rb +114 -0
  282. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/server/animation_disabler.rb +58 -0
  283. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/server/checker.rb +44 -0
  284. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/server/middleware.rb +59 -0
  285. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/session.rb +925 -0
  286. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/session/config.rb +120 -0
  287. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/session/matchers.rb +87 -0
  288. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/fixtures/another_test_file.txt +1 -0
  289. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/fixtures/capybara.jpg +3 -0
  290. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/fixtures/no_extension +1 -0
  291. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/fixtures/test_file.txt +1 -0
  292. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/public/jquery-ui.js +13 -0
  293. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/public/jquery.js +5 -0
  294. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/public/offset.js +6 -0
  295. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/public/test.js +212 -0
  296. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/accept_alert_spec.rb +81 -0
  297. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/accept_confirm_spec.rb +32 -0
  298. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/accept_prompt_spec.rb +78 -0
  299. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/all_spec.rb +223 -0
  300. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/ancestor_spec.rb +83 -0
  301. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/assert_all_of_selectors_spec.rb +140 -0
  302. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/assert_current_path_spec.rb +75 -0
  303. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/assert_selector_spec.rb +143 -0
  304. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/assert_style_spec.rb +26 -0
  305. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/assert_text_spec.rb +254 -0
  306. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/assert_title_spec.rb +93 -0
  307. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/attach_file_spec.rb +216 -0
  308. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/body_spec.rb +23 -0
  309. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/check_spec.rb +235 -0
  310. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/choose_spec.rb +121 -0
  311. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/click_button_spec.rb +501 -0
  312. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/click_link_or_button_spec.rb +129 -0
  313. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/click_link_spec.rb +229 -0
  314. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/current_scope_spec.rb +31 -0
  315. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/current_url_spec.rb +115 -0
  316. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/dismiss_confirm_spec.rb +36 -0
  317. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/dismiss_prompt_spec.rb +21 -0
  318. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/element/assert_match_selector_spec.rb +38 -0
  319. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/element/match_css_spec.rb +31 -0
  320. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/element/match_xpath_spec.rb +25 -0
  321. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/element/matches_selector_spec.rb +120 -0
  322. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/evaluate_async_script_spec.rb +23 -0
  323. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/evaluate_script_spec.rb +49 -0
  324. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/execute_script_spec.rb +28 -0
  325. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/fill_in_spec.rb +257 -0
  326. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/find_button_spec.rb +74 -0
  327. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/find_by_id_spec.rb +33 -0
  328. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/find_field_spec.rb +113 -0
  329. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/find_link_spec.rb +70 -0
  330. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/find_spec.rb +508 -0
  331. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/first_spec.rb +156 -0
  332. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/frame/frame_title_spec.rb +23 -0
  333. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/frame/frame_url_spec.rb +23 -0
  334. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/frame/switch_to_frame_spec.rb +116 -0
  335. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/frame/within_frame_spec.rb +112 -0
  336. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/go_back_spec.rb +12 -0
  337. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/go_forward_spec.rb +14 -0
  338. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_all_selectors_spec.rb +69 -0
  339. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_ancestor_spec.rb +46 -0
  340. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_any_selectors_spec.rb +25 -0
  341. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_button_spec.rb +69 -0
  342. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_css_spec.rb +371 -0
  343. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_current_path_spec.rb +138 -0
  344. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_field_spec.rb +349 -0
  345. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_link_spec.rb +39 -0
  346. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_none_selectors_spec.rb +78 -0
  347. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_select_spec.rb +282 -0
  348. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_selector_spec.rb +202 -0
  349. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_sibling_spec.rb +50 -0
  350. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_table_spec.rb +152 -0
  351. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_text_spec.rb +359 -0
  352. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_title_spec.rb +71 -0
  353. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/has_xpath_spec.rb +149 -0
  354. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/headers_spec.rb +8 -0
  355. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/html_spec.rb +47 -0
  356. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/matches_style_spec.rb +35 -0
  357. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/node_spec.rb +1161 -0
  358. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/node_wrapper_spec.rb +39 -0
  359. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/refresh_spec.rb +33 -0
  360. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/reset_session_spec.rb +148 -0
  361. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/response_code_spec.rb +8 -0
  362. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/save_and_open_page_spec.rb +21 -0
  363. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/save_and_open_screenshot_spec.rb +43 -0
  364. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/save_page_spec.rb +110 -0
  365. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/save_screenshot_spec.rb +55 -0
  366. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/screenshot_spec.rb +18 -0
  367. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/scroll_spec.rb +117 -0
  368. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/select_spec.rb +229 -0
  369. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/selectors_spec.rb +85 -0
  370. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/sibling_spec.rb +52 -0
  371. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/source_spec.rb +0 -0
  372. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/text_spec.rb +74 -0
  373. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/title_spec.rb +29 -0
  374. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/uncheck_spec.rb +100 -0
  375. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/unselect_spec.rb +116 -0
  376. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/visit_spec.rb +204 -0
  377. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/become_closed_spec.rb +89 -0
  378. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/current_window_spec.rb +28 -0
  379. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/open_new_window_spec.rb +31 -0
  380. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/switch_to_window_spec.rb +132 -0
  381. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/window_opened_by_spec.rb +99 -0
  382. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/window_spec.rb +203 -0
  383. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/windows_spec.rb +34 -0
  384. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/window/within_window_spec.rb +157 -0
  385. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/session/within_spec.rb +199 -0
  386. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/spec_helper.rb +135 -0
  387. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/test_app.rb +226 -0
  388. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/animated.erb +49 -0
  389. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/buttons.erb +5 -0
  390. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/fieldsets.erb +30 -0
  391. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/form.erb +670 -0
  392. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/frame_child.erb +18 -0
  393. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/frame_one.erb +10 -0
  394. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/frame_parent.erb +9 -0
  395. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/frame_two.erb +9 -0
  396. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/header_links.erb +8 -0
  397. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/host_links.erb +13 -0
  398. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/initial_alert.erb +10 -0
  399. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/obscured.erb +47 -0
  400. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/offset.erb +32 -0
  401. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/path.erb +13 -0
  402. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/popup_one.erb +9 -0
  403. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/popup_two.erb +9 -0
  404. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/postback.erb +14 -0
  405. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/react.erb +45 -0
  406. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/scroll.erb +20 -0
  407. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/spatial.erb +31 -0
  408. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/tables.erb +130 -0
  409. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_animation.erb +74 -0
  410. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_base_tag.erb +11 -0
  411. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_count.erb +8 -0
  412. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_dragula.erb +22 -0
  413. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_fixed_header_footer.erb +17 -0
  414. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_hover.erb +24 -0
  415. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_hover1.erb +10 -0
  416. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_html.erb +208 -0
  417. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_html5_svg.erb +20 -0
  418. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_html_entities.erb +2 -0
  419. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_js.erb +160 -0
  420. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_jstree.erb +26 -0
  421. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_namespace.erb +20 -0
  422. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_scope.erb +42 -0
  423. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_scope_other.erb +6 -0
  424. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_simple_html.erb +2 -0
  425. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_slow_unload.erb +17 -0
  426. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_sortable_js.erb +21 -0
  427. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_title.erb +5 -0
  428. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_unload_alert.erb +14 -0
  429. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/with_windows.erb +54 -0
  430. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/within_frames.erb +15 -0
  431. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/version.rb +5 -0
  432. data/vendor/bundle/gems/capybara-3.29.0/lib/capybara/window.rb +146 -0
  433. data/vendor/bundle/gems/capybara-3.29.0/spec/basic_node_spec.rb +154 -0
  434. data/vendor/bundle/gems/capybara-3.29.0/spec/capybara_spec.rb +112 -0
  435. data/vendor/bundle/gems/capybara-3.29.0/spec/css_builder_spec.rb +101 -0
  436. data/vendor/bundle/gems/capybara-3.29.0/spec/css_splitter_spec.rb +38 -0
  437. data/vendor/bundle/gems/capybara-3.29.0/spec/dsl_spec.rb +276 -0
  438. data/vendor/bundle/gems/capybara-3.29.0/spec/filter_set_spec.rb +46 -0
  439. data/vendor/bundle/gems/capybara-3.29.0/spec/fixtures/capybara.csv +1 -0
  440. data/vendor/bundle/gems/capybara-3.29.0/spec/fixtures/certificate.pem +25 -0
  441. data/vendor/bundle/gems/capybara-3.29.0/spec/fixtures/key.pem +27 -0
  442. data/vendor/bundle/gems/capybara-3.29.0/spec/fixtures/selenium_driver_rspec_failure.rb +13 -0
  443. data/vendor/bundle/gems/capybara-3.29.0/spec/fixtures/selenium_driver_rspec_success.rb +13 -0
  444. data/vendor/bundle/gems/capybara-3.29.0/spec/minitest_spec.rb +163 -0
  445. data/vendor/bundle/gems/capybara-3.29.0/spec/minitest_spec_spec.rb +162 -0
  446. data/vendor/bundle/gems/capybara-3.29.0/spec/per_session_config_spec.rb +68 -0
  447. data/vendor/bundle/gems/capybara-3.29.0/spec/rack_test_spec.rb +257 -0
  448. data/vendor/bundle/gems/capybara-3.29.0/spec/regexp_dissassembler_spec.rb +246 -0
  449. data/vendor/bundle/gems/capybara-3.29.0/spec/result_spec.rb +185 -0
  450. data/vendor/bundle/gems/capybara-3.29.0/spec/rspec/features_spec.rb +98 -0
  451. data/vendor/bundle/gems/capybara-3.29.0/spec/rspec/scenarios_spec.rb +19 -0
  452. data/vendor/bundle/gems/capybara-3.29.0/spec/rspec/shared_spec_matchers.rb +947 -0
  453. data/vendor/bundle/gems/capybara-3.29.0/spec/rspec/views_spec.rb +14 -0
  454. data/vendor/bundle/gems/capybara-3.29.0/spec/rspec_matchers_spec.rb +62 -0
  455. data/vendor/bundle/gems/capybara-3.29.0/spec/rspec_spec.rb +145 -0
  456. data/vendor/bundle/gems/capybara-3.29.0/spec/sauce_spec_chrome.rb +43 -0
  457. data/vendor/bundle/gems/capybara-3.29.0/spec/selector_spec.rb +513 -0
  458. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_chrome.rb +183 -0
  459. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_chrome_remote.rb +94 -0
  460. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_edge.rb +47 -0
  461. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_firefox.rb +203 -0
  462. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_firefox_remote.rb +80 -0
  463. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_ie.rb +150 -0
  464. data/vendor/bundle/gems/capybara-3.29.0/spec/selenium_spec_safari.rb +148 -0
  465. data/vendor/bundle/gems/capybara-3.29.0/spec/server_spec.rb +250 -0
  466. data/vendor/bundle/gems/capybara-3.29.0/spec/session_spec.rb +91 -0
  467. data/vendor/bundle/gems/capybara-3.29.0/spec/shared_selenium_node.rb +65 -0
  468. data/vendor/bundle/gems/capybara-3.29.0/spec/shared_selenium_session.rb +466 -0
  469. data/vendor/bundle/gems/capybara-3.29.0/spec/spec_helper.rb +100 -0
  470. data/vendor/bundle/gems/capybara-3.29.0/spec/xpath_builder_spec.rb +93 -0
  471. data/vendor/bundle/gems/childprocess-3.0.0/CHANGELOG.md +73 -0
  472. data/vendor/bundle/gems/childprocess-3.0.0/Gemfile +21 -0
  473. data/vendor/bundle/gems/childprocess-3.0.0/LICENSE +20 -0
  474. data/vendor/bundle/gems/childprocess-3.0.0/README.md +218 -0
  475. data/vendor/bundle/gems/childprocess-3.0.0/Rakefile +61 -0
  476. data/vendor/bundle/gems/childprocess-3.0.0/appveyor.yml +42 -0
  477. data/vendor/bundle/gems/childprocess-3.0.0/childprocess.gemspec +26 -0
  478. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess.rb +210 -0
  479. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/abstract_io.rb +36 -0
  480. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/abstract_process.rb +192 -0
  481. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/errors.rb +37 -0
  482. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/jruby.rb +56 -0
  483. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/jruby/io.rb +16 -0
  484. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/jruby/process.rb +184 -0
  485. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/jruby/pump.rb +53 -0
  486. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/tools/generator.rb +146 -0
  487. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix.rb +9 -0
  488. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/fork_exec_process.rb +78 -0
  489. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/io.rb +21 -0
  490. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/lib.rb +186 -0
  491. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/platform/i386-linux.rb +12 -0
  492. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/platform/i386-solaris.rb +11 -0
  493. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/platform/x86_64-linux.rb +12 -0
  494. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/platform/x86_64-macosx.rb +11 -0
  495. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/posix_spawn_process.rb +134 -0
  496. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/unix/process.rb +90 -0
  497. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/version.rb +3 -0
  498. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows.rb +38 -0
  499. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows/handle.rb +91 -0
  500. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows/io.rb +25 -0
  501. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows/lib.rb +416 -0
  502. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows/process.rb +130 -0
  503. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows/process_builder.rb +178 -0
  504. data/vendor/bundle/gems/childprocess-3.0.0/lib/childprocess/windows/structs.rb +149 -0
  505. data/vendor/bundle/gems/childprocess-3.0.0/spec/abstract_io_spec.rb +12 -0
  506. data/vendor/bundle/gems/childprocess-3.0.0/spec/childprocess_spec.rb +447 -0
  507. data/vendor/bundle/gems/childprocess-3.0.0/spec/get_env.ps1 +13 -0
  508. data/vendor/bundle/gems/childprocess-3.0.0/spec/io_spec.rb +228 -0
  509. data/vendor/bundle/gems/childprocess-3.0.0/spec/jruby_spec.rb +24 -0
  510. data/vendor/bundle/gems/childprocess-3.0.0/spec/pid_behavior.rb +12 -0
  511. data/vendor/bundle/gems/childprocess-3.0.0/spec/platform_detection_spec.rb +86 -0
  512. data/vendor/bundle/gems/childprocess-3.0.0/spec/spec_helper.rb +270 -0
  513. data/vendor/bundle/gems/childprocess-3.0.0/spec/unix_spec.rb +57 -0
  514. data/vendor/bundle/gems/childprocess-3.0.0/spec/windows_spec.rb +23 -0
  515. data/vendor/bundle/gems/coveralls-0.8.23/CHANGELOG.md +21 -0
  516. data/vendor/bundle/gems/coveralls-0.8.23/Gemfile +41 -0
  517. data/vendor/bundle/gems/coveralls-0.8.23/LICENSE +22 -0
  518. data/vendor/bundle/gems/coveralls-0.8.23/README.md +3 -0
  519. data/vendor/bundle/gems/coveralls-0.8.23/Rakefile +14 -0
  520. data/vendor/bundle/gems/coveralls-0.8.23/bin/coveralls +9 -0
  521. data/vendor/bundle/gems/coveralls-0.8.23/coveralls-ruby.gemspec +29 -0
  522. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls.rb +101 -0
  523. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/api.rb +128 -0
  524. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/command.rb +69 -0
  525. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/configuration.rb +233 -0
  526. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/output.rb +114 -0
  527. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/rake/task.rb +19 -0
  528. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/simplecov.rb +101 -0
  529. data/vendor/bundle/gems/coveralls-0.8.23/lib/coveralls/version.rb +3 -0
  530. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/configuration_spec.rb +368 -0
  531. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/coveralls_spec.rb +106 -0
  532. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/controllers/sample.rb +12 -0
  533. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/models/airplane.rb +10 -0
  534. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/models/dog.rb +10 -0
  535. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/models/house.rb +10 -0
  536. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/models/robot.rb +10 -0
  537. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/models/user.rb +10 -0
  538. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/app/vendor/vendored_gem.rb +1 -0
  539. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/fixtures/sample.rb +12 -0
  540. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/output_spec.rb +92 -0
  541. data/vendor/bundle/gems/coveralls-0.8.23/spec/coveralls/simplecov_spec.rb +82 -0
  542. data/vendor/bundle/gems/coveralls-0.8.23/spec/spec_helper.rb +82 -0
  543. data/vendor/bundle/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
  544. data/vendor/bundle/gems/diff-lcs-1.3/Contributing.md +83 -0
  545. data/vendor/bundle/gems/diff-lcs-1.3/History.md +220 -0
  546. data/vendor/bundle/gems/diff-lcs-1.3/License.md +39 -0
  547. data/vendor/bundle/gems/diff-lcs-1.3/Manifest.txt +37 -0
  548. data/vendor/bundle/gems/diff-lcs-1.3/README.rdoc +84 -0
  549. data/vendor/bundle/gems/diff-lcs-1.3/Rakefile +57 -0
  550. data/vendor/bundle/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
  551. data/vendor/bundle/gems/diff-lcs-1.3/bin/htmldiff +32 -0
  552. data/vendor/bundle/gems/diff-lcs-1.3/bin/ldiff +6 -0
  553. data/vendor/bundle/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
  554. data/vendor/bundle/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
  555. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
  556. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
  557. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
  558. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
  559. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
  560. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
  561. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
  562. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
  563. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
  564. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
  565. data/vendor/bundle/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
  566. data/vendor/bundle/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
  567. data/vendor/bundle/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
  568. data/vendor/bundle/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
  569. data/vendor/bundle/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
  570. data/vendor/bundle/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
  571. data/vendor/bundle/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
  572. data/vendor/bundle/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
  573. data/vendor/bundle/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
  574. data/vendor/bundle/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
  575. data/vendor/bundle/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
  576. data/vendor/bundle/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
  577. data/vendor/bundle/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
  578. data/vendor/bundle/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
  579. data/vendor/bundle/gems/docile-1.3.2/Gemfile +12 -0
  580. data/vendor/bundle/gems/docile-1.3.2/HISTORY.md +89 -0
  581. data/vendor/bundle/gems/docile-1.3.2/LICENSE +21 -0
  582. data/vendor/bundle/gems/docile-1.3.2/README.md +381 -0
  583. data/vendor/bundle/gems/docile-1.3.2/Rakefile +28 -0
  584. data/vendor/bundle/gems/docile-1.3.2/docile.gemspec +55 -0
  585. data/vendor/bundle/gems/docile-1.3.2/lib/docile.rb +123 -0
  586. data/vendor/bundle/gems/docile-1.3.2/lib/docile/chaining_fallback_context_proxy.rb +20 -0
  587. data/vendor/bundle/gems/docile-1.3.2/lib/docile/execution.rb +41 -0
  588. data/vendor/bundle/gems/docile-1.3.2/lib/docile/fallback_context_proxy.rb +93 -0
  589. data/vendor/bundle/gems/docile-1.3.2/lib/docile/version.rb +4 -0
  590. data/vendor/bundle/gems/docile-1.3.2/on_what.rb +26 -0
  591. data/vendor/bundle/gems/emot-0.0.4/Gemfile +4 -0
  592. data/vendor/bundle/gems/emot-0.0.4/LICENSE.txt +22 -0
  593. data/vendor/bundle/gems/emot-0.0.4/README.md +87 -0
  594. data/vendor/bundle/gems/emot-0.0.4/Rakefile +7 -0
  595. data/vendor/bundle/gems/emot-0.0.4/bin/emot +5 -0
  596. data/vendor/bundle/gems/emot-0.0.4/emot.gemspec +26 -0
  597. data/vendor/bundle/gems/emot-0.0.4/lib/emot.rb +34 -0
  598. data/vendor/bundle/gems/emot-0.0.4/lib/emot/cli.rb +62 -0
  599. data/vendor/bundle/gems/emot-0.0.4/lib/emot/map.rb +894 -0
  600. data/vendor/bundle/gems/emot-0.0.4/lib/emot/symbol_ext.rb +11 -0
  601. data/vendor/bundle/gems/emot-0.0.4/lib/emot/version.rb +3 -0
  602. data/vendor/bundle/gems/emot-0.0.4/spec/cli_spec.rb +56 -0
  603. data/vendor/bundle/gems/emot-0.0.4/spec/emot_spec.rb +50 -0
  604. data/vendor/bundle/gems/emot-0.0.4/spec/spec_helper.rb +2 -0
  605. data/vendor/bundle/gems/faraday-0.17.1/CHANGELOG.md +216 -0
  606. data/vendor/bundle/gems/faraday-0.17.1/LICENSE.md +20 -0
  607. data/vendor/bundle/gems/faraday-0.17.1/README.md +384 -0
  608. data/vendor/bundle/gems/faraday-0.17.1/Rakefile +13 -0
  609. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday.rb +248 -0
  610. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter.rb +55 -0
  611. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/em_http.rb +243 -0
  612. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/em_http_ssl_patch.rb +56 -0
  613. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/em_synchrony.rb +106 -0
  614. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/em_synchrony/parallel_manager.rb +66 -0
  615. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/excon.rb +82 -0
  616. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/httpclient.rb +128 -0
  617. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/net_http.rb +152 -0
  618. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/net_http_persistent.rb +68 -0
  619. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/patron.rb +95 -0
  620. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/rack.rb +58 -0
  621. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/test.rb +213 -0
  622. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/adapter/typhoeus.rb +12 -0
  623. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/autoload.rb +84 -0
  624. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/connection.rb +484 -0
  625. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/deprecate.rb +101 -0
  626. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/error.rb +119 -0
  627. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/middleware.rb +37 -0
  628. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/options.rb +373 -0
  629. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/parameters.rb +198 -0
  630. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/rack_builder.rb +237 -0
  631. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request.rb +114 -0
  632. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/authorization.rb +41 -0
  633. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/basic_authentication.rb +13 -0
  634. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/instrumentation.rb +36 -0
  635. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/multipart.rb +68 -0
  636. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/retry.rb +213 -0
  637. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/token_authentication.rb +15 -0
  638. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/request/url_encoded.rb +36 -0
  639. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/response.rb +97 -0
  640. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/response/logger.rb +80 -0
  641. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/response/raise_error.rb +25 -0
  642. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/upload_io.rb +67 -0
  643. data/vendor/bundle/gems/faraday-0.17.1/lib/faraday/utils.rb +326 -0
  644. data/vendor/bundle/gems/faraday-0.17.1/spec/faraday/deprecate_spec.rb +69 -0
  645. data/vendor/bundle/gems/faraday-0.17.1/spec/faraday/error_spec.rb +102 -0
  646. data/vendor/bundle/gems/faraday-0.17.1/spec/faraday/response/raise_error_spec.rb +95 -0
  647. data/vendor/bundle/gems/faraday-0.17.1/spec/spec_helper.rb +104 -0
  648. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/default_test.rb +14 -0
  649. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/em_http_test.rb +30 -0
  650. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/em_synchrony_test.rb +32 -0
  651. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/excon_test.rb +30 -0
  652. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/httpclient_test.rb +34 -0
  653. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/integration.rb +263 -0
  654. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/logger_test.rb +136 -0
  655. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/net_http_persistent_test.rb +114 -0
  656. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/net_http_test.rb +79 -0
  657. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/patron_test.rb +40 -0
  658. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/rack_test.rb +38 -0
  659. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/test_middleware_test.rb +157 -0
  660. data/vendor/bundle/gems/faraday-0.17.1/test/adapters/typhoeus_test.rb +38 -0
  661. data/vendor/bundle/gems/faraday-0.17.1/test/authentication_middleware_test.rb +65 -0
  662. data/vendor/bundle/gems/faraday-0.17.1/test/composite_read_io_test.rb +109 -0
  663. data/vendor/bundle/gems/faraday-0.17.1/test/connection_test.rb +738 -0
  664. data/vendor/bundle/gems/faraday-0.17.1/test/env_test.rb +268 -0
  665. data/vendor/bundle/gems/faraday-0.17.1/test/helper.rb +75 -0
  666. data/vendor/bundle/gems/faraday-0.17.1/test/live_server.rb +67 -0
  667. data/vendor/bundle/gems/faraday-0.17.1/test/middleware/instrumentation_test.rb +88 -0
  668. data/vendor/bundle/gems/faraday-0.17.1/test/middleware/retry_test.rb +282 -0
  669. data/vendor/bundle/gems/faraday-0.17.1/test/middleware_stack_test.rb +260 -0
  670. data/vendor/bundle/gems/faraday-0.17.1/test/multibyte.txt +1 -0
  671. data/vendor/bundle/gems/faraday-0.17.1/test/options_test.rb +333 -0
  672. data/vendor/bundle/gems/faraday-0.17.1/test/parameters_test.rb +157 -0
  673. data/vendor/bundle/gems/faraday-0.17.1/test/request_middleware_test.rb +126 -0
  674. data/vendor/bundle/gems/faraday-0.17.1/test/response_middleware_test.rb +72 -0
  675. data/vendor/bundle/gems/faraday-0.17.1/test/strawberry.rb +2 -0
  676. data/vendor/bundle/gems/faraday-0.17.1/test/utils_test.rb +98 -0
  677. data/vendor/bundle/gems/fastimage-2.1.7/MIT-LICENSE +20 -0
  678. data/vendor/bundle/gems/fastimage-2.1.7/README.textile +162 -0
  679. data/vendor/bundle/gems/fastimage-2.1.7/lib/fastimage.rb +788 -0
  680. data/vendor/bundle/gems/hikidoc-0.1.0/COPYING +28 -0
  681. data/vendor/bundle/gems/hikidoc-0.1.0/Gemfile +4 -0
  682. data/vendor/bundle/gems/hikidoc-0.1.0/NEWS +30 -0
  683. data/vendor/bundle/gems/hikidoc-0.1.0/NEWS.ja +30 -0
  684. data/vendor/bundle/gems/hikidoc-0.1.0/README +87 -0
  685. data/vendor/bundle/gems/hikidoc-0.1.0/README.ja +84 -0
  686. data/vendor/bundle/gems/hikidoc-0.1.0/Rakefile +8 -0
  687. data/vendor/bundle/gems/hikidoc-0.1.0/TextFormattingRules +320 -0
  688. data/vendor/bundle/gems/hikidoc-0.1.0/TextFormattingRules.ja +318 -0
  689. data/vendor/bundle/gems/hikidoc-0.1.0/bin/hikidoc +66 -0
  690. data/vendor/bundle/gems/hikidoc-0.1.0/hikidoc.gemspec +23 -0
  691. data/vendor/bundle/gems/hikidoc-0.1.0/lib/hikidoc.rb +912 -0
  692. data/vendor/bundle/gems/hikidoc-0.1.0/test/hikidoc_test.rb +506 -0
  693. data/vendor/bundle/gems/jasmine-2.99.0/Gemfile +30 -0
  694. data/vendor/bundle/gems/jasmine-2.99.0/HOW_TO_TEST.markdown +10 -0
  695. data/vendor/bundle/gems/jasmine-2.99.0/MIT.LICENSE +20 -0
  696. data/vendor/bundle/gems/jasmine-2.99.0/README.markdown +96 -0
  697. data/vendor/bundle/gems/jasmine-2.99.0/RELEASE.markdown +15 -0
  698. data/vendor/bundle/gems/jasmine-2.99.0/Rakefile +49 -0
  699. data/vendor/bundle/gems/jasmine-2.99.0/bin/jasmine +6 -0
  700. data/vendor/bundle/gems/jasmine-2.99.0/jasmine.gemspec +48 -0
  701. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/examples/USAGE +11 -0
  702. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/examples/examples_generator.rb +19 -0
  703. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/examples/templates/app/assets/javascripts/jasmine_examples/Player.js +22 -0
  704. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/examples/templates/app/assets/javascripts/jasmine_examples/Song.js +7 -0
  705. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/examples/templates/spec/javascripts/helpers/jasmine_examples/SpecHelper.js +15 -0
  706. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/examples/templates/spec/javascripts/jasmine_examples/PlayerSpec.js +58 -0
  707. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/install/USAGE +9 -0
  708. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/install/install_generator.rb +18 -0
  709. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine.yml +145 -0
  710. data/vendor/bundle/gems/jasmine-2.99.0/lib/generators/jasmine/install/templates/spec/javascripts/support/jasmine_helper.rb +16 -0
  711. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine.rb +32 -0
  712. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/application.rb +21 -0
  713. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/asset_expander.rb +66 -0
  714. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/asset_pipeline_mapper.rb +17 -0
  715. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/base.rb +54 -0
  716. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/ci_runner.rb +50 -0
  717. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/command_line_install.txt +13 -0
  718. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/command_line_tool.rb +125 -0
  719. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/config.rb +135 -0
  720. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/configuration.rb +114 -0
  721. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/core_configuration.rb +31 -0
  722. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/dependencies.rb +28 -0
  723. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/formatters/console.rb +118 -0
  724. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/formatters/exit_code.rb +23 -0
  725. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/formatters/multi.rb +17 -0
  726. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/page.rb +11 -0
  727. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/path_expander.rb +22 -0
  728. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/path_mapper.rb +38 -0
  729. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/railtie.rb +22 -0
  730. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/result.rb +58 -0
  731. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/ruby_versions.rb +11 -0
  732. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/run.html.erb +20 -0
  733. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/runners/phantom_boot.js +15 -0
  734. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/runners/phantom_jasmine_run.js +50 -0
  735. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/runners/phantom_js.rb +74 -0
  736. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/server.rb +17 -0
  737. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/tasks/jasmine.rake +71 -0
  738. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/tasks/jasmine_rails.rake +1 -0
  739. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/version.rb +3 -0
  740. data/vendor/bundle/gems/jasmine-2.99.0/lib/jasmine/yaml_config_parser.rb +95 -0
  741. data/vendor/bundle/gems/jasmine-2.99.0/lib/rack/jasmine/cache_control.rb +20 -0
  742. data/vendor/bundle/gems/jasmine-2.99.0/lib/rack/jasmine/focused_suite.rb +17 -0
  743. data/vendor/bundle/gems/jasmine-2.99.0/lib/rack/jasmine/runner.rb +27 -0
  744. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v1.2.1.md +6 -0
  745. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v1.3.2.md +32 -0
  746. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.0.0.md +78 -0
  747. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.0.1.md +31 -0
  748. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.0.2.md +17 -0
  749. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.0.3.md +31 -0
  750. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.1.0.md +11 -0
  751. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.2.0.md +31 -0
  752. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.3.0.md +27 -0
  753. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.3.1.md +14 -0
  754. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.4.0.md +20 -0
  755. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.5.0.md +35 -0
  756. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.5.1.md +12 -0
  757. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.5.2.md +22 -0
  758. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.6.0.md +17 -0
  759. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.6.1.md +11 -0
  760. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.7.0.md +28 -0
  761. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.8.0.md +21 -0
  762. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.9.0.md +22 -0
  763. data/vendor/bundle/gems/jasmine-2.99.0/release_notes/v2.99.md +13 -0
  764. data/vendor/bundle/gems/jasmine-2.99.0/spec/application_integration_spec.rb +15 -0
  765. data/vendor/bundle/gems/jasmine-2.99.0/spec/application_spec.rb +55 -0
  766. data/vendor/bundle/gems/jasmine-2.99.0/spec/base_spec.rb +35 -0
  767. data/vendor/bundle/gems/jasmine-2.99.0/spec/ci_runner_spec.rb +137 -0
  768. data/vendor/bundle/gems/jasmine-2.99.0/spec/configuration_spec.rb +219 -0
  769. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/Rakefile +4 -0
  770. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/afterall_spec.js +8 -0
  771. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/coffee_spec.coffee +3 -0
  772. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/console_log_spec.js +5 -0
  773. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/exception_test.js +1 -0
  774. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/failing_runner.rb +9 -0
  775. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/failing_test.js +5 -0
  776. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/large_test_suite_spec.js +20 -0
  777. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/non_asset_pipeline.js +1 -0
  778. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/non_asset_pipeline_test.js +5 -0
  779. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/phantomConfig.js +6 -0
  780. data/vendor/bundle/gems/jasmine-2.99.0/spec/fixture/viewport_spec.js +6 -0
  781. data/vendor/bundle/gems/jasmine-2.99.0/spec/jasmine_command_line_tool_spec.rb +142 -0
  782. data/vendor/bundle/gems/jasmine-2.99.0/spec/jasmine_pojs_spec.rb +124 -0
  783. data/vendor/bundle/gems/jasmine-2.99.0/spec/jasmine_rails_spec.rb +217 -0
  784. data/vendor/bundle/gems/jasmine-2.99.0/spec/lib/jasmine/formatters/console_spec.rb +205 -0
  785. data/vendor/bundle/gems/jasmine-2.99.0/spec/lib/jasmine/formatters/exit_code_spec.rb +34 -0
  786. data/vendor/bundle/gems/jasmine-2.99.0/spec/lib/jasmine/formatters/multi_spec.rb +27 -0
  787. data/vendor/bundle/gems/jasmine-2.99.0/spec/page_spec.rb +23 -0
  788. data/vendor/bundle/gems/jasmine-2.99.0/spec/path_expander_spec.rb +138 -0
  789. data/vendor/bundle/gems/jasmine-2.99.0/spec/path_mapper_spec.rb +38 -0
  790. data/vendor/bundle/gems/jasmine-2.99.0/spec/performance/phantom_js_runner_performance_spec.rb +23 -0
  791. data/vendor/bundle/gems/jasmine-2.99.0/spec/phantom_js_spec.rb +14 -0
  792. data/vendor/bundle/gems/jasmine-2.99.0/spec/rack/jasmine/runner_spec.rb +25 -0
  793. data/vendor/bundle/gems/jasmine-2.99.0/spec/result_spec.rb +44 -0
  794. data/vendor/bundle/gems/jasmine-2.99.0/spec/server_spec.rb +22 -0
  795. data/vendor/bundle/gems/jasmine-2.99.0/spec/spec_helper.rb +145 -0
  796. data/vendor/bundle/gems/jasmine-2.99.0/spec/yaml_config_parser_spec.rb +239 -0
  797. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/console/console.js +190 -0
  798. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core.js +37 -0
  799. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core.rb +53 -0
  800. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/__init__.py +1 -0
  801. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/boot.js +155 -0
  802. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/boot/boot.js +133 -0
  803. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/boot/node_boot.js +19 -0
  804. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/core.py +60 -0
  805. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/node_example/lib/jasmine_examples/Player.js +24 -0
  806. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/node_example/lib/jasmine_examples/Song.js +9 -0
  807. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples/SpecHelper.js +15 -0
  808. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/node_example/spec/jasmine_examples/PlayerSpec.js +60 -0
  809. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/spec/PlayerSpec.js +58 -0
  810. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/spec/SpecHelper.js +15 -0
  811. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/src/Player.js +22 -0
  812. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/example/src/Song.js +7 -0
  813. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/jasmine-html.js +545 -0
  814. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/jasmine.css +59 -0
  815. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/jasmine.js +5586 -0
  816. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/json2.js +489 -0
  817. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/node_boot.js +41 -0
  818. data/vendor/bundle/gems/jasmine-core-2.99.2/lib/jasmine-core/version.rb +9 -0
  819. data/vendor/bundle/gems/json-2.2.0/CHANGES.md +391 -0
  820. data/vendor/bundle/gems/json-2.2.0/Gemfile +14 -0
  821. data/vendor/bundle/gems/json-2.2.0/README-json-jruby.md +33 -0
  822. data/vendor/bundle/gems/json-2.2.0/README.md +409 -0
  823. data/vendor/bundle/gems/json-2.2.0/Rakefile +408 -0
  824. data/vendor/bundle/gems/json-2.2.0/VERSION +1 -0
  825. data/vendor/bundle/gems/json-2.2.0/ext/json/Makefile +202 -0
  826. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/fbuffer/fbuffer.h +187 -0
  827. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/Makefile +267 -0
  828. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/depend +1 -0
  829. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/extconf.rb +4 -0
  830. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/generator.c +1444 -0
  831. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/generator.h +171 -0
  832. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/generator.o +0 -0
  833. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/generator/generator.so +0 -0
  834. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/Makefile +267 -0
  835. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/depend +1 -0
  836. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/extconf.rb +6 -0
  837. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/parser.c +2131 -0
  838. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/parser.h +91 -0
  839. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/parser.o +0 -0
  840. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/parser.rl +891 -0
  841. data/vendor/bundle/gems/json-2.2.0/ext/json/ext/parser/parser.so +0 -0
  842. data/vendor/bundle/gems/json-2.2.0/ext/json/extconf.rb +2 -0
  843. data/vendor/bundle/gems/json-2.2.0/install.rb +23 -0
  844. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/ByteListTranscoder.java +166 -0
  845. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/Generator.java +443 -0
  846. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/GeneratorMethods.java +231 -0
  847. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/GeneratorService.java +42 -0
  848. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/GeneratorState.java +490 -0
  849. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/OptionsReader.java +113 -0
  850. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/Parser.java +2362 -0
  851. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/Parser.rl +893 -0
  852. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/ParserService.java +34 -0
  853. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/RuntimeInfo.java +116 -0
  854. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/StringDecoder.java +166 -0
  855. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/StringEncoder.java +111 -0
  856. data/vendor/bundle/gems/json-2.2.0/java/src/json/ext/Utils.java +88 -0
  857. data/vendor/bundle/gems/json-2.2.0/json-java.gemspec +38 -0
  858. data/vendor/bundle/gems/json-2.2.0/json.gemspec +0 -0
  859. data/vendor/bundle/gems/json-2.2.0/json_pure.gemspec +38 -0
  860. data/vendor/bundle/gems/json-2.2.0/lib/json.rb +63 -0
  861. data/vendor/bundle/gems/json-2.2.0/lib/json/add/bigdecimal.rb +29 -0
  862. data/vendor/bundle/gems/json-2.2.0/lib/json/add/complex.rb +29 -0
  863. data/vendor/bundle/gems/json-2.2.0/lib/json/add/core.rb +12 -0
  864. data/vendor/bundle/gems/json-2.2.0/lib/json/add/date.rb +34 -0
  865. data/vendor/bundle/gems/json-2.2.0/lib/json/add/date_time.rb +50 -0
  866. data/vendor/bundle/gems/json-2.2.0/lib/json/add/exception.rb +31 -0
  867. data/vendor/bundle/gems/json-2.2.0/lib/json/add/ostruct.rb +31 -0
  868. data/vendor/bundle/gems/json-2.2.0/lib/json/add/range.rb +29 -0
  869. data/vendor/bundle/gems/json-2.2.0/lib/json/add/rational.rb +28 -0
  870. data/vendor/bundle/gems/json-2.2.0/lib/json/add/regexp.rb +30 -0
  871. data/vendor/bundle/gems/json-2.2.0/lib/json/add/set.rb +29 -0
  872. data/vendor/bundle/gems/json-2.2.0/lib/json/add/struct.rb +30 -0
  873. data/vendor/bundle/gems/json-2.2.0/lib/json/add/symbol.rb +25 -0
  874. data/vendor/bundle/gems/json-2.2.0/lib/json/add/time.rb +38 -0
  875. data/vendor/bundle/gems/json-2.2.0/lib/json/common.rb +456 -0
  876. data/vendor/bundle/gems/json-2.2.0/lib/json/ext.rb +15 -0
  877. data/vendor/bundle/gems/json-2.2.0/lib/json/ext/generator.so +0 -0
  878. data/vendor/bundle/gems/json-2.2.0/lib/json/ext/parser.so +0 -0
  879. data/vendor/bundle/gems/json-2.2.0/lib/json/generic_object.rb +71 -0
  880. data/vendor/bundle/gems/json-2.2.0/lib/json/pure.rb +15 -0
  881. data/vendor/bundle/gems/json-2.2.0/lib/json/pure/generator.rb +458 -0
  882. data/vendor/bundle/gems/json-2.2.0/lib/json/pure/parser.rb +311 -0
  883. data/vendor/bundle/gems/json-2.2.0/lib/json/version.rb +9 -0
  884. data/vendor/bundle/gems/json-2.2.0/references/rfc7159.txt +899 -0
  885. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail10.json +1 -0
  886. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail11.json +1 -0
  887. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail12.json +1 -0
  888. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail13.json +1 -0
  889. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail14.json +1 -0
  890. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail18.json +1 -0
  891. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail19.json +1 -0
  892. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail2.json +1 -0
  893. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail20.json +1 -0
  894. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail21.json +1 -0
  895. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail22.json +1 -0
  896. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail23.json +1 -0
  897. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail24.json +1 -0
  898. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail25.json +1 -0
  899. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail27.json +2 -0
  900. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail28.json +2 -0
  901. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail3.json +1 -0
  902. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail4.json +1 -0
  903. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail5.json +1 -0
  904. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail6.json +1 -0
  905. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail7.json +1 -0
  906. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail8.json +1 -0
  907. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/fail9.json +1 -0
  908. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/obsolete_fail1.json +1 -0
  909. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass1.json +56 -0
  910. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass15.json +1 -0
  911. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass16.json +1 -0
  912. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass17.json +1 -0
  913. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass2.json +1 -0
  914. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass26.json +1 -0
  915. data/vendor/bundle/gems/json-2.2.0/tests/fixtures/pass3.json +6 -0
  916. data/vendor/bundle/gems/json-2.2.0/tests/json_addition_test.rb +203 -0
  917. data/vendor/bundle/gems/json-2.2.0/tests/json_common_interface_test.rb +126 -0
  918. data/vendor/bundle/gems/json-2.2.0/tests/json_encoding_test.rb +107 -0
  919. data/vendor/bundle/gems/json-2.2.0/tests/json_ext_parser_test.rb +15 -0
  920. data/vendor/bundle/gems/json-2.2.0/tests/json_fixtures_test.rb +32 -0
  921. data/vendor/bundle/gems/json-2.2.0/tests/json_generator_test.rb +377 -0
  922. data/vendor/bundle/gems/json-2.2.0/tests/json_generic_object_test.rb +82 -0
  923. data/vendor/bundle/gems/json-2.2.0/tests/json_parser_test.rb +472 -0
  924. data/vendor/bundle/gems/json-2.2.0/tests/json_string_matching_test.rb +38 -0
  925. data/vendor/bundle/gems/json-2.2.0/tests/test_helper.rb +17 -0
  926. data/vendor/bundle/gems/json-2.2.0/tools/diff.sh +18 -0
  927. data/vendor/bundle/gems/json-2.2.0/tools/fuzz.rb +131 -0
  928. data/vendor/bundle/gems/json-2.2.0/tools/server.rb +62 -0
  929. data/vendor/bundle/gems/launchy-2.4.3/CONTRIBUTING.md +59 -0
  930. data/vendor/bundle/gems/launchy-2.4.3/HISTORY.md +160 -0
  931. data/vendor/bundle/gems/launchy-2.4.3/LICENSE +16 -0
  932. data/vendor/bundle/gems/launchy-2.4.3/Manifest.txt +38 -0
  933. data/vendor/bundle/gems/launchy-2.4.3/README.md +136 -0
  934. data/vendor/bundle/gems/launchy-2.4.3/Rakefile +25 -0
  935. data/vendor/bundle/gems/launchy-2.4.3/bin/launchy +4 -0
  936. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy.rb +152 -0
  937. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/application.rb +62 -0
  938. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/applications/browser.rb +82 -0
  939. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/argv.rb +36 -0
  940. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/cli.rb +89 -0
  941. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/deprecated.rb +52 -0
  942. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/descendant_tracker.rb +49 -0
  943. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/detect.rb +10 -0
  944. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/detect/host_os.rb +32 -0
  945. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/detect/host_os_family.rb +71 -0
  946. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/detect/nix_desktop_environment.rb +92 -0
  947. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/detect/ruby_engine.rb +78 -0
  948. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/detect/runner.rb +152 -0
  949. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/error.rb +6 -0
  950. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/os_family.rb +8 -0
  951. data/vendor/bundle/gems/launchy-2.4.3/lib/launchy/version.rb +18 -0
  952. data/vendor/bundle/gems/launchy-2.4.3/spec/application_spec.rb +43 -0
  953. data/vendor/bundle/gems/launchy-2.4.3/spec/applications/browser_spec.rb +68 -0
  954. data/vendor/bundle/gems/launchy-2.4.3/spec/cli_spec.rb +75 -0
  955. data/vendor/bundle/gems/launchy-2.4.3/spec/detect/host_os_family_spec.rb +40 -0
  956. data/vendor/bundle/gems/launchy-2.4.3/spec/detect/host_os_spec.rb +19 -0
  957. data/vendor/bundle/gems/launchy-2.4.3/spec/detect/nix_desktop_environment_spec.rb +36 -0
  958. data/vendor/bundle/gems/launchy-2.4.3/spec/detect/ruby_engine_spec.rb +37 -0
  959. data/vendor/bundle/gems/launchy-2.4.3/spec/detect/runner_spec.rb +103 -0
  960. data/vendor/bundle/gems/launchy-2.4.3/spec/launchy_spec.rb +110 -0
  961. data/vendor/bundle/gems/launchy-2.4.3/spec/mock_application.rb +9 -0
  962. data/vendor/bundle/gems/launchy-2.4.3/spec/spec_helper.rb +11 -0
  963. data/vendor/bundle/gems/launchy-2.4.3/spec/tattle-host-os.yaml +427 -0
  964. data/vendor/bundle/gems/launchy-2.4.3/spec/version_spec.rb +11 -0
  965. data/vendor/bundle/gems/launchy-2.4.3/tasks/default.rake +272 -0
  966. data/vendor/bundle/gems/launchy-2.4.3/tasks/this.rb +209 -0
  967. data/vendor/bundle/gems/mail-2.7.1/MIT-LICENSE +20 -0
  968. data/vendor/bundle/gems/mail-2.7.1/README.md +695 -0
  969. data/vendor/bundle/gems/mail-2.7.1/lib/mail.rb +85 -0
  970. data/vendor/bundle/gems/mail-2.7.1/lib/mail/attachments_list.rb +110 -0
  971. data/vendor/bundle/gems/mail-2.7.1/lib/mail/body.rb +328 -0
  972. data/vendor/bundle/gems/mail-2.7.1/lib/mail/check_delivery_params.rb +60 -0
  973. data/vendor/bundle/gems/mail-2.7.1/lib/mail/configuration.rb +78 -0
  974. data/vendor/bundle/gems/mail-2.7.1/lib/mail/constants.rb +57 -0
  975. data/vendor/bundle/gems/mail-2.7.1/lib/mail/core_extensions/smtp.rb +28 -0
  976. data/vendor/bundle/gems/mail-2.7.1/lib/mail/core_extensions/string.rb +17 -0
  977. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements.rb +15 -0
  978. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/address.rb +258 -0
  979. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/address_list.rb +34 -0
  980. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/content_disposition_element.rb +20 -0
  981. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/content_location_element.rb +17 -0
  982. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/content_transfer_encoding_element.rb +13 -0
  983. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/content_type_element.rb +21 -0
  984. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/date_time_element.rb +15 -0
  985. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/envelope_from_element.rb +33 -0
  986. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/message_ids_element.rb +22 -0
  987. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/mime_version_element.rb +15 -0
  988. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/phrase_list.rb +14 -0
  989. data/vendor/bundle/gems/mail-2.7.1/lib/mail/elements/received_element.rb +21 -0
  990. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings.rb +343 -0
  991. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/7bit.rb +22 -0
  992. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/8bit.rb +18 -0
  993. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/base64.rb +38 -0
  994. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/binary.rb +13 -0
  995. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/identity.rb +24 -0
  996. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/quoted_printable.rb +45 -0
  997. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/transfer_encoding.rb +77 -0
  998. data/vendor/bundle/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb +20 -0
  999. data/vendor/bundle/gems/mail-2.7.1/lib/mail/envelope.rb +31 -0
  1000. data/vendor/bundle/gems/mail-2.7.1/lib/mail/field.rb +299 -0
  1001. data/vendor/bundle/gems/mail-2.7.1/lib/mail/field_list.rb +34 -0
  1002. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields.rb +36 -0
  1003. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/bcc_field.rb +68 -0
  1004. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/cc_field.rb +55 -0
  1005. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/comments_field.rb +42 -0
  1006. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/common/address_container.rb +17 -0
  1007. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/common/common_address.rb +161 -0
  1008. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/common/common_date.rb +36 -0
  1009. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/common/common_field.rb +52 -0
  1010. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/common/common_message_id.rb +49 -0
  1011. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/common/parameter_hash.rb +59 -0
  1012. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/content_description_field.rb +20 -0
  1013. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/content_disposition_field.rb +71 -0
  1014. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/content_id_field.rb +63 -0
  1015. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/content_location_field.rb +43 -0
  1016. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/content_transfer_encoding_field.rb +45 -0
  1017. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/content_type_field.rb +197 -0
  1018. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/date_field.rb +57 -0
  1019. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/from_field.rb +55 -0
  1020. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/in_reply_to_field.rb +57 -0
  1021. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/keywords_field.rb +44 -0
  1022. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/message_id_field.rb +83 -0
  1023. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/mime_version_field.rb +54 -0
  1024. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/optional_field.rb +17 -0
  1025. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/received_field.rb +76 -0
  1026. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/references_field.rb +57 -0
  1027. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/reply_to_field.rb +55 -0
  1028. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_bcc_field.rb +55 -0
  1029. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_cc_field.rb +55 -0
  1030. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_date_field.rb +35 -0
  1031. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_from_field.rb +55 -0
  1032. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_message_id_field.rb +35 -0
  1033. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_sender_field.rb +62 -0
  1034. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/resent_to_field.rb +55 -0
  1035. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/return_path_field.rb +65 -0
  1036. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/sender_field.rb +67 -0
  1037. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/structured_field.rb +52 -0
  1038. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/subject_field.rb +17 -0
  1039. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/to_field.rb +55 -0
  1040. data/vendor/bundle/gems/mail-2.7.1/lib/mail/fields/unstructured_field.rb +222 -0
  1041. data/vendor/bundle/gems/mail-2.7.1/lib/mail/header.rb +278 -0
  1042. data/vendor/bundle/gems/mail-2.7.1/lib/mail/indifferent_hash.rb +147 -0
  1043. data/vendor/bundle/gems/mail-2.7.1/lib/mail/mail.rb +262 -0
  1044. data/vendor/bundle/gems/mail-2.7.1/lib/mail/matchers/attachment_matchers.rb +29 -0
  1045. data/vendor/bundle/gems/mail-2.7.1/lib/mail/matchers/has_sent_mail.rb +201 -0
  1046. data/vendor/bundle/gems/mail-2.7.1/lib/mail/message.rb +2170 -0
  1047. data/vendor/bundle/gems/mail-2.7.1/lib/mail/multibyte.rb +92 -0
  1048. data/vendor/bundle/gems/mail-2.7.1/lib/mail/multibyte/chars.rb +476 -0
  1049. data/vendor/bundle/gems/mail-2.7.1/lib/mail/multibyte/unicode.rb +405 -0
  1050. data/vendor/bundle/gems/mail-2.7.1/lib/mail/multibyte/utils.rb +61 -0
  1051. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network.rb +16 -0
  1052. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/exim.rb +49 -0
  1053. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/file_delivery.rb +42 -0
  1054. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/logger_delivery.rb +37 -0
  1055. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/sendmail.rb +95 -0
  1056. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb +149 -0
  1057. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp_connection.rb +66 -0
  1058. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/test_mailer.rb +42 -0
  1059. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/retriever_methods/base.rb +64 -0
  1060. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/retriever_methods/imap.rb +187 -0
  1061. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb +143 -0
  1062. data/vendor/bundle/gems/mail-2.7.1/lib/mail/network/retriever_methods/test_retriever.rb +44 -0
  1063. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parser_tools.rb +15 -0
  1064. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers.rb +19 -0
  1065. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/address_lists_parser.rb +33236 -0
  1066. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/address_lists_parser.rl +172 -0
  1067. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_disposition_parser.rb +895 -0
  1068. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_disposition_parser.rl +82 -0
  1069. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_location_parser.rb +816 -0
  1070. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_location_parser.rl +71 -0
  1071. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_transfer_encoding_parser.rb +516 -0
  1072. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_transfer_encoding_parser.rl +64 -0
  1073. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_type_parser.rb +1042 -0
  1074. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/content_type_parser.rl +83 -0
  1075. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/date_time_parser.rb +885 -0
  1076. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/date_time_parser.rl +62 -0
  1077. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/envelope_from_parser.rb +3581 -0
  1078. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/envelope_from_parser.rl +82 -0
  1079. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/message_ids_parser.rb +2854 -0
  1080. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/message_ids_parser.rl +82 -0
  1081. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/mime_version_parser.rb +507 -0
  1082. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/mime_version_parser.rl +61 -0
  1083. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/phrase_lists_parser.rb +878 -0
  1084. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/phrase_lists_parser.rl +83 -0
  1085. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/received_parser.rb +8776 -0
  1086. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/received_parser.rl +84 -0
  1087. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc2045_content_transfer_encoding.rl +13 -0
  1088. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc2045_content_type.rl +25 -0
  1089. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc2045_mime.rl +16 -0
  1090. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc2183_content_disposition.rl +15 -0
  1091. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc3629_utf8.rl +19 -0
  1092. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc5234_abnf_core_rules.rl +22 -0
  1093. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc5322.rl +59 -0
  1094. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc5322_address.rl +72 -0
  1095. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc5322_date_time.rl +37 -0
  1096. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parsers/rfc5322_lexical_tokens.rl +60 -0
  1097. data/vendor/bundle/gems/mail-2.7.1/lib/mail/part.rb +123 -0
  1098. data/vendor/bundle/gems/mail-2.7.1/lib/mail/parts_list.rb +74 -0
  1099. data/vendor/bundle/gems/mail-2.7.1/lib/mail/utilities.rb +324 -0
  1100. data/vendor/bundle/gems/mail-2.7.1/lib/mail/values/unicode_tables.dat +0 -0
  1101. data/vendor/bundle/gems/mail-2.7.1/lib/mail/version.rb +17 -0
  1102. data/vendor/bundle/gems/mail-2.7.1/lib/mail/version_specific/ruby_1_8.rb +163 -0
  1103. data/vendor/bundle/gems/mail-2.7.1/lib/mail/version_specific/ruby_1_9.rb +278 -0
  1104. data/vendor/bundle/gems/mime-types-3.3/Code-of-Conduct.md +73 -0
  1105. data/vendor/bundle/gems/mime-types-3.3/Contributing.md +141 -0
  1106. data/vendor/bundle/gems/mime-types-3.3/History.md +223 -0
  1107. data/vendor/bundle/gems/mime-types-3.3/Licence.md +25 -0
  1108. data/vendor/bundle/gems/mime-types-3.3/Manifest.txt +31 -0
  1109. data/vendor/bundle/gems/mime-types-3.3/README.rdoc +200 -0
  1110. data/vendor/bundle/gems/mime-types-3.3/Rakefile +284 -0
  1111. data/vendor/bundle/gems/mime-types-3.3/lib/mime-types.rb +3 -0
  1112. data/vendor/bundle/gems/mime-types-3.3/lib/mime/type.rb +587 -0
  1113. data/vendor/bundle/gems/mime-types-3.3/lib/mime/type/columnar.rb +57 -0
  1114. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types.rb +231 -0
  1115. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/_columnar.rb +136 -0
  1116. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/cache.rb +58 -0
  1117. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/columnar.rb +3 -0
  1118. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/container.rb +96 -0
  1119. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/deprecations.rb +32 -0
  1120. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/full.rb +19 -0
  1121. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/loader.rb +146 -0
  1122. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/logger.rb +39 -0
  1123. data/vendor/bundle/gems/mime-types-3.3/lib/mime/types/registry.rb +90 -0
  1124. data/vendor/bundle/gems/mime-types-3.3/test/bad-fixtures/malformed +9 -0
  1125. data/vendor/bundle/gems/mime-types-3.3/test/fixture/json.json +1 -0
  1126. data/vendor/bundle/gems/mime-types-3.3/test/fixture/old-data +9 -0
  1127. data/vendor/bundle/gems/mime-types-3.3/test/fixture/yaml.yaml +55 -0
  1128. data/vendor/bundle/gems/mime-types-3.3/test/minitest_helper.rb +13 -0
  1129. data/vendor/bundle/gems/mime-types-3.3/test/test_mime_type.rb +610 -0
  1130. data/vendor/bundle/gems/mime-types-3.3/test/test_mime_types.rb +169 -0
  1131. data/vendor/bundle/gems/mime-types-3.3/test/test_mime_types_cache.rb +118 -0
  1132. data/vendor/bundle/gems/mime-types-3.3/test/test_mime_types_class.rb +159 -0
  1133. data/vendor/bundle/gems/mime-types-3.3/test/test_mime_types_lazy.rb +49 -0
  1134. data/vendor/bundle/gems/mime-types-3.3/test/test_mime_types_loader.rb +32 -0
  1135. data/vendor/bundle/gems/mime-types-data-3.2019.1009/Code-of-Conduct.md +75 -0
  1136. data/vendor/bundle/gems/mime-types-data-3.2019.1009/Contributing.md +162 -0
  1137. data/vendor/bundle/gems/mime-types-data-3.2019.1009/History.md +406 -0
  1138. data/vendor/bundle/gems/mime-types-data-3.2019.1009/Licence.md +25 -0
  1139. data/vendor/bundle/gems/mime-types-data-3.2019.1009/Manifest.txt +31 -0
  1140. data/vendor/bundle/gems/mime-types-data-3.2019.1009/README.md +63 -0
  1141. data/vendor/bundle/gems/mime-types-data-3.2019.1009/Rakefile +94 -0
  1142. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime-types.json +1 -0
  1143. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.content_type.column +2215 -0
  1144. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.docs.column +2215 -0
  1145. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.encoding.column +2215 -0
  1146. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.flags.column +2215 -0
  1147. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.friendly.column +2215 -0
  1148. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.pext.column +2215 -0
  1149. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.use_instead.column +2215 -0
  1150. data/vendor/bundle/gems/mime-types-data-3.2019.1009/data/mime.xrefs.column +2215 -0
  1151. data/vendor/bundle/gems/mime-types-data-3.2019.1009/lib/mime-types-data.rb +3 -0
  1152. data/vendor/bundle/gems/mime-types-data-3.2019.1009/lib/mime/types/data.rb +21 -0
  1153. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/application.yaml +16361 -0
  1154. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/audio.yaml +1644 -0
  1155. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/chemical.yaml +71 -0
  1156. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/conference.yaml +9 -0
  1157. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/drawing.yaml +15 -0
  1158. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/font.yaml +65 -0
  1159. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/image.yaml +1069 -0
  1160. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/message.yaml +200 -0
  1161. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/model.yaml +302 -0
  1162. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/multipart.yaml +179 -0
  1163. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/text.yaml +1055 -0
  1164. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/video.yaml +1070 -0
  1165. data/vendor/bundle/gems/mime-types-data-3.2019.1009/types/world.yaml +8 -0
  1166. data/vendor/bundle/gems/mini_mime-1.0.2/CHANGELOG +37 -0
  1167. data/vendor/bundle/gems/mini_mime-1.0.2/CODE_OF_CONDUCT.md +74 -0
  1168. data/vendor/bundle/gems/mini_mime-1.0.2/Gemfile +8 -0
  1169. data/vendor/bundle/gems/mini_mime-1.0.2/LICENSE.txt +21 -0
  1170. data/vendor/bundle/gems/mini_mime-1.0.2/README.md +111 -0
  1171. data/vendor/bundle/gems/mini_mime-1.0.2/Rakefile +96 -0
  1172. data/vendor/bundle/gems/mini_mime-1.0.2/bench/bench.rb +52 -0
  1173. data/vendor/bundle/gems/mini_mime-1.0.2/bin/console +14 -0
  1174. data/vendor/bundle/gems/mini_mime-1.0.2/bin/setup +8 -0
  1175. data/vendor/bundle/gems/mini_mime-1.0.2/lib/db/content_type_mime.db +853 -0
  1176. data/vendor/bundle/gems/mini_mime-1.0.2/lib/db/ext_mime.db +1172 -0
  1177. data/vendor/bundle/gems/mini_mime-1.0.2/lib/mini_mime.rb +166 -0
  1178. data/vendor/bundle/gems/mini_mime-1.0.2/lib/mini_mime/version.rb +3 -0
  1179. data/vendor/bundle/gems/mini_mime-1.0.2/mini_mime.gemspec +28 -0
  1180. data/vendor/bundle/gems/mini_portile2-2.4.0/CHANGELOG.md +209 -0
  1181. data/vendor/bundle/gems/mini_portile2-2.4.0/Gemfile +4 -0
  1182. data/vendor/bundle/gems/mini_portile2-2.4.0/LICENSE.txt +20 -0
  1183. data/vendor/bundle/gems/mini_portile2-2.4.0/README.md +245 -0
  1184. data/vendor/bundle/gems/mini_portile2-2.4.0/Rakefile +29 -0
  1185. data/vendor/bundle/gems/mini_portile2-2.4.0/appveyor.yml +25 -0
  1186. data/vendor/bundle/gems/mini_portile2-2.4.0/concourse/mini_portile.yml +141 -0
  1187. data/vendor/bundle/gems/mini_portile2-2.4.0/concourse/tasks/rake-test/task.ps1 +11 -0
  1188. data/vendor/bundle/gems/mini_portile2-2.4.0/concourse/tasks/rake-test/task.sh +13 -0
  1189. data/vendor/bundle/gems/mini_portile2-2.4.0/lib/mini_portile2.rb +3 -0
  1190. data/vendor/bundle/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb +556 -0
  1191. data/vendor/bundle/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile_cmake.rb +40 -0
  1192. data/vendor/bundle/gems/mini_portile2-2.4.0/lib/mini_portile2/version.rb +3 -0
  1193. data/vendor/bundle/gems/mini_portile2-2.4.0/mini_portile2.gemspec +42 -0
  1194. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/git/config +4 -0
  1195. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/gpg-fixtures/data +1 -0
  1196. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/gpg-fixtures/data.asc +9 -0
  1197. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/gpg-fixtures/data.invalid.asc +9 -0
  1198. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/patch 1.diff +7 -0
  1199. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/test mini portile-1.0.0/configure +11 -0
  1200. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/test-cmake-1.0/CMakeLists.txt +7 -0
  1201. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/test-cmake-1.0/hello.c +4 -0
  1202. data/vendor/bundle/gems/mini_portile2-2.4.0/test/assets/test-download-archive.tar.gz +1 -0
  1203. data/vendor/bundle/gems/mini_portile2-2.4.0/test/helper.rb +60 -0
  1204. data/vendor/bundle/gems/mini_portile2-2.4.0/test/test_cmake.rb +64 -0
  1205. data/vendor/bundle/gems/mini_portile2-2.4.0/test/test_cook.rb +115 -0
  1206. data/vendor/bundle/gems/mini_portile2-2.4.0/test/test_digest.rb +215 -0
  1207. data/vendor/bundle/gems/mini_portile2-2.4.0/test/test_download.rb +71 -0
  1208. data/vendor/bundle/gems/mini_portile2-2.4.0/test/test_proxy.rb +121 -0
  1209. data/vendor/bundle/gems/multipart-post-2.1.1/Gemfile +6 -0
  1210. data/vendor/bundle/gems/multipart-post-2.1.1/History.txt +64 -0
  1211. data/vendor/bundle/gems/multipart-post-2.1.1/LICENSE +21 -0
  1212. data/vendor/bundle/gems/multipart-post-2.1.1/Manifest.txt +9 -0
  1213. data/vendor/bundle/gems/multipart-post-2.1.1/README.md +127 -0
  1214. data/vendor/bundle/gems/multipart-post-2.1.1/Rakefile +6 -0
  1215. data/vendor/bundle/gems/multipart-post-2.1.1/lib/composite_io.rb +108 -0
  1216. data/vendor/bundle/gems/multipart-post-2.1.1/lib/multipart_post.rb +9 -0
  1217. data/vendor/bundle/gems/multipart-post-2.1.1/lib/multipartable.rb +48 -0
  1218. data/vendor/bundle/gems/multipart-post-2.1.1/lib/net/http/post/multipart.rb +28 -0
  1219. data/vendor/bundle/gems/multipart-post-2.1.1/lib/parts.rb +126 -0
  1220. data/vendor/bundle/gems/multipart-post-2.1.1/multipart-post.gemspec +23 -0
  1221. data/vendor/bundle/gems/multipart-post-2.1.1/spec/composite_io_spec.rb +138 -0
  1222. data/vendor/bundle/gems/multipart-post-2.1.1/spec/multibyte.txt +1 -0
  1223. data/vendor/bundle/gems/multipart-post-2.1.1/spec/net/http/post/multipart_spec.rb +123 -0
  1224. data/vendor/bundle/gems/multipart-post-2.1.1/spec/parts_spec.rb +102 -0
  1225. data/vendor/bundle/gems/multipart-post-2.1.1/spec/spec_helper.rb +29 -0
  1226. data/vendor/bundle/gems/nokogiri-1.10.5/LICENSE-DEPENDENCIES.md +1614 -0
  1227. data/vendor/bundle/gems/nokogiri-1.10.5/LICENSE.md +9 -0
  1228. data/vendor/bundle/gems/nokogiri-1.10.5/README.md +198 -0
  1229. data/vendor/bundle/gems/nokogiri-1.10.5/bin/nokogiri +118 -0
  1230. data/vendor/bundle/gems/nokogiri-1.10.5/dependencies.yml +74 -0
  1231. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/Makefile +628 -0
  1232. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/depend +358 -0
  1233. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/extconf.rb +686 -0
  1234. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_document.c +170 -0
  1235. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_document.h +10 -0
  1236. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_document.o +0 -0
  1237. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_element_description.c +279 -0
  1238. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_element_description.h +10 -0
  1239. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_element_description.o +0 -0
  1240. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_entity_lookup.c +32 -0
  1241. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_entity_lookup.h +8 -0
  1242. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_entity_lookup.o +0 -0
  1243. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_parser_context.c +116 -0
  1244. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_parser_context.h +11 -0
  1245. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_parser_context.o +0 -0
  1246. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_push_parser.c +87 -0
  1247. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_push_parser.h +9 -0
  1248. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_push_parser.o +0 -0
  1249. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/nokogiri.c +141 -0
  1250. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/nokogiri.h +121 -0
  1251. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/nokogiri.o +0 -0
  1252. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/nokogiri.so +0 -0
  1253. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_attr.c +103 -0
  1254. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_attr.h +9 -0
  1255. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_attr.o +0 -0
  1256. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_attribute_decl.c +70 -0
  1257. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_attribute_decl.h +9 -0
  1258. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_attribute_decl.o +0 -0
  1259. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_cdata.c +62 -0
  1260. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_cdata.h +9 -0
  1261. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_cdata.o +0 -0
  1262. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_comment.c +69 -0
  1263. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_comment.h +9 -0
  1264. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_comment.o +0 -0
  1265. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_document.c +608 -0
  1266. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_document.h +23 -0
  1267. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_document.o +0 -0
  1268. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_document_fragment.c +48 -0
  1269. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_document_fragment.h +10 -0
  1270. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_document_fragment.o +0 -0
  1271. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_dtd.c +202 -0
  1272. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_dtd.h +10 -0
  1273. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_dtd.o +0 -0
  1274. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_content.c +123 -0
  1275. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_content.h +10 -0
  1276. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_content.o +0 -0
  1277. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_decl.c +69 -0
  1278. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_decl.h +9 -0
  1279. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_decl.o +0 -0
  1280. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_encoding_handler.c +79 -0
  1281. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_encoding_handler.h +8 -0
  1282. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_encoding_handler.o +0 -0
  1283. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_decl.c +110 -0
  1284. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_decl.h +10 -0
  1285. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_decl.o +0 -0
  1286. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_reference.c +52 -0
  1287. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_reference.h +9 -0
  1288. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_reference.o +0 -0
  1289. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_io.c +61 -0
  1290. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_io.h +11 -0
  1291. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_io.o +0 -0
  1292. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_libxml2_hacks.c +112 -0
  1293. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_libxml2_hacks.h +12 -0
  1294. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_libxml2_hacks.o +0 -0
  1295. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_namespace.c +111 -0
  1296. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_namespace.h +14 -0
  1297. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_namespace.o +0 -0
  1298. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_node.c +1753 -0
  1299. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_node.h +13 -0
  1300. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_node.o +0 -0
  1301. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_node_set.c +486 -0
  1302. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_node_set.h +12 -0
  1303. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_node_set.o +0 -0
  1304. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_processing_instruction.c +56 -0
  1305. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_processing_instruction.h +9 -0
  1306. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_processing_instruction.o +0 -0
  1307. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_reader.c +668 -0
  1308. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_reader.h +10 -0
  1309. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_reader.o +0 -0
  1310. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_relax_ng.c +161 -0
  1311. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_relax_ng.h +9 -0
  1312. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_relax_ng.o +0 -0
  1313. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser.c +310 -0
  1314. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser.h +39 -0
  1315. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser.o +0 -0
  1316. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser_context.c +262 -0
  1317. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser_context.h +10 -0
  1318. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser_context.o +0 -0
  1319. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_push_parser.c +159 -0
  1320. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_push_parser.h +9 -0
  1321. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_push_parser.o +0 -0
  1322. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_schema.c +205 -0
  1323. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_schema.h +9 -0
  1324. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_schema.o +0 -0
  1325. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_syntax_error.c +64 -0
  1326. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_syntax_error.h +13 -0
  1327. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_syntax_error.o +0 -0
  1328. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_text.c +52 -0
  1329. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_text.h +9 -0
  1330. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_text.o +0 -0
  1331. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_xpath_context.c +298 -0
  1332. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_xpath_context.h +10 -0
  1333. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xml_xpath_context.o +0 -0
  1334. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xslt_stylesheet.c +270 -0
  1335. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xslt_stylesheet.h +14 -0
  1336. data/vendor/bundle/gems/nokogiri-1.10.5/ext/nokogiri/xslt_stylesheet.o +0 -0
  1337. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri.rb +144 -0
  1338. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css.rb +27 -0
  1339. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/node.rb +52 -0
  1340. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/parser.rb +750 -0
  1341. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/parser.y +272 -0
  1342. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/parser_extras.rb +91 -0
  1343. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/syntax_error.rb +7 -0
  1344. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/tokenizer.rb +153 -0
  1345. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/tokenizer.rex +55 -0
  1346. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/css/xpath_visitor.rb +230 -0
  1347. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/decorators/slop.rb +42 -0
  1348. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html.rb +37 -0
  1349. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/builder.rb +35 -0
  1350. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/document.rb +335 -0
  1351. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/document_fragment.rb +49 -0
  1352. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/element_description.rb +23 -0
  1353. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/element_description_defaults.rb +671 -0
  1354. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/entity_lookup.rb +13 -0
  1355. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/sax/parser.rb +62 -0
  1356. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/sax/parser_context.rb +16 -0
  1357. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/html/sax/push_parser.rb +36 -0
  1358. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/nokogiri.so +0 -0
  1359. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/syntax_error.rb +4 -0
  1360. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/version.rb +109 -0
  1361. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml.rb +75 -0
  1362. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/attr.rb +14 -0
  1363. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/attribute_decl.rb +18 -0
  1364. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/builder.rb +446 -0
  1365. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/cdata.rb +11 -0
  1366. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/character_data.rb +7 -0
  1367. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/document.rb +285 -0
  1368. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/document_fragment.rb +160 -0
  1369. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/dtd.rb +32 -0
  1370. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/element_content.rb +36 -0
  1371. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/element_decl.rb +13 -0
  1372. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/entity_decl.rb +19 -0
  1373. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/entity_reference.rb +18 -0
  1374. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/namespace.rb +13 -0
  1375. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/node.rb +902 -0
  1376. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/node/save_options.rb +61 -0
  1377. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/node_set.rb +371 -0
  1378. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/notation.rb +6 -0
  1379. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/parse_options.rb +120 -0
  1380. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/pp.rb +2 -0
  1381. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/pp/character_data.rb +18 -0
  1382. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/pp/node.rb +56 -0
  1383. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/processing_instruction.rb +8 -0
  1384. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/reader.rb +112 -0
  1385. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/relax_ng.rb +32 -0
  1386. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax.rb +4 -0
  1387. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/document.rb +171 -0
  1388. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/parser.rb +122 -0
  1389. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/parser_context.rb +16 -0
  1390. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/push_parser.rb +60 -0
  1391. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/schema.rb +63 -0
  1392. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/searchable.rb +230 -0
  1393. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/syntax_error.rb +70 -0
  1394. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/text.rb +9 -0
  1395. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/xpath.rb +10 -0
  1396. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
  1397. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xml/xpath_context.rb +16 -0
  1398. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xslt.rb +56 -0
  1399. data/vendor/bundle/gems/nokogiri-1.10.5/lib/nokogiri/xslt/stylesheet.rb +25 -0
  1400. data/vendor/bundle/gems/nokogiri-1.10.5/lib/xsd/xmlparser/nokogiri.rb +102 -0
  1401. data/vendor/bundle/gems/nokogiri-1.10.5/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +78 -0
  1402. data/vendor/bundle/gems/nokogiri-1.10.5/patches/libxml2/0002-Remove-script-macro-support.patch +40 -0
  1403. data/vendor/bundle/gems/nokogiri-1.10.5/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch +44 -0
  1404. data/vendor/bundle/gems/octokit-4.14.0/CONTRIBUTING.md +22 -0
  1405. data/vendor/bundle/gems/octokit-4.14.0/LICENSE.md +20 -0
  1406. data/vendor/bundle/gems/octokit-4.14.0/README.md +790 -0
  1407. data/vendor/bundle/gems/octokit-4.14.0/Rakefile +22 -0
  1408. data/vendor/bundle/gems/octokit-4.14.0/lib/ext/sawyer/relation.rb +10 -0
  1409. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit.rb +59 -0
  1410. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/arguments.rb +14 -0
  1411. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/authentication.rb +82 -0
  1412. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client.rb +242 -0
  1413. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/apps.rb +209 -0
  1414. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/authorizations.rb +250 -0
  1415. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/checks.rb +211 -0
  1416. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/commit_comments.rb +95 -0
  1417. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/commits.rb +239 -0
  1418. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/community_profile.rb +22 -0
  1419. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/contents.rb +164 -0
  1420. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/deployments.rb +72 -0
  1421. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/downloads.rb +50 -0
  1422. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/emojis.rb +18 -0
  1423. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/events.rb +151 -0
  1424. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/feeds.rb +33 -0
  1425. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/gists.rb +234 -0
  1426. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/gitignore.rb +43 -0
  1427. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/hooks.rb +297 -0
  1428. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/issues.rb +363 -0
  1429. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/labels.rb +156 -0
  1430. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/legacy_search.rb +42 -0
  1431. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/licenses.rb +45 -0
  1432. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/markdown.rb +27 -0
  1433. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/marketplace.rb +56 -0
  1434. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/meta.rb +21 -0
  1435. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/milestones.rb +87 -0
  1436. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/notifications.rb +167 -0
  1437. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/objects.rb +141 -0
  1438. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/organizations.rb +792 -0
  1439. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/pages.rb +63 -0
  1440. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/projects.rb +314 -0
  1441. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/pub_sub_hubbub.rb +111 -0
  1442. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/pull_requests.rb +303 -0
  1443. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/rate_limit.rb +54 -0
  1444. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/reactions.rb +158 -0
  1445. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/refs.rb +118 -0
  1446. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/releases.rb +164 -0
  1447. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/repositories.rb +701 -0
  1448. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/repository_invitations.rb +96 -0
  1449. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/reviews.rb +209 -0
  1450. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/say.rb +19 -0
  1451. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/search.rb +91 -0
  1452. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/service_status.rb +38 -0
  1453. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/source_import.rb +161 -0
  1454. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/stats.rb +107 -0
  1455. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/statuses.rb +47 -0
  1456. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/traffic.rb +69 -0
  1457. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/client/users.rb +355 -0
  1458. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/configurable.rb +151 -0
  1459. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/connection.rb +208 -0
  1460. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/default.rb +176 -0
  1461. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_admin_client.rb +40 -0
  1462. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_admin_client/admin_stats.rb +120 -0
  1463. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_admin_client/license.rb +18 -0
  1464. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_admin_client/orgs.rb +27 -0
  1465. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_admin_client/search_indexing.rb +83 -0
  1466. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_admin_client/users.rb +128 -0
  1467. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_management_console_client.rb +50 -0
  1468. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/enterprise_management_console_client/management_console.rb +176 -0
  1469. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/error.rb +300 -0
  1470. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/gist.rb +36 -0
  1471. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb +131 -0
  1472. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/organization.rb +17 -0
  1473. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/preview.rb +42 -0
  1474. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/rate_limit.rb +33 -0
  1475. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/repo_arguments.rb +19 -0
  1476. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/repository.rb +95 -0
  1477. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/response/feed_parser.rb +21 -0
  1478. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/response/raise_error.rb +21 -0
  1479. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/user.rb +19 -0
  1480. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/version.rb +17 -0
  1481. data/vendor/bundle/gems/octokit-4.14.0/lib/octokit/warnable.rb +17 -0
  1482. data/vendor/bundle/gems/octokit-4.14.0/octokit.gemspec +22 -0
  1483. data/vendor/bundle/gems/phantomjs-2.1.1.0/Gemfile +4 -0
  1484. data/vendor/bundle/gems/phantomjs-2.1.1.0/LICENSE +27 -0
  1485. data/vendor/bundle/gems/phantomjs-2.1.1.0/README.md +78 -0
  1486. data/vendor/bundle/gems/phantomjs-2.1.1.0/Rakefile +2 -0
  1487. data/vendor/bundle/gems/phantomjs-2.1.1.0/lib/phantomjs.rb +61 -0
  1488. data/vendor/bundle/gems/phantomjs-2.1.1.0/lib/phantomjs/platform.rb +162 -0
  1489. data/vendor/bundle/gems/phantomjs-2.1.1.0/lib/phantomjs/poltergeist.rb +13 -0
  1490. data/vendor/bundle/gems/phantomjs-2.1.1.0/lib/phantomjs/version.rb +3 -0
  1491. data/vendor/bundle/gems/phantomjs-2.1.1.0/phantomjs.gemspec +27 -0
  1492. data/vendor/bundle/gems/phantomjs-2.1.1.0/spec/phantomjs_spec.rb +50 -0
  1493. data/vendor/bundle/gems/phantomjs-2.1.1.0/spec/platform_spec.rb +203 -0
  1494. data/vendor/bundle/gems/phantomjs-2.1.1.0/spec/runner.js +5 -0
  1495. data/vendor/bundle/gems/phantomjs-2.1.1.0/spec/spec_helper.rb +11 -0
  1496. data/vendor/bundle/gems/pit-0.0.7/ChangeLog +87 -0
  1497. data/vendor/bundle/gems/pit-0.0.7/Gemfile +6 -0
  1498. data/vendor/bundle/gems/pit-0.0.7/README +59 -0
  1499. data/vendor/bundle/gems/pit-0.0.7/Rakefile +9 -0
  1500. data/vendor/bundle/gems/pit-0.0.7/bin/pit +137 -0
  1501. data/vendor/bundle/gems/pit-0.0.7/lib/pit.rb +97 -0
  1502. data/vendor/bundle/gems/pit-0.0.7/lib/pit/version.rb +4 -0
  1503. data/vendor/bundle/gems/pit-0.0.7/pit.gemspec +19 -0
  1504. data/vendor/bundle/gems/pit-0.0.7/test/pit_test.rb +112 -0
  1505. data/vendor/bundle/gems/pit-0.0.7/test/test_helper.rb +3 -0
  1506. data/vendor/bundle/gems/power_assert-1.1.5/BSDL +22 -0
  1507. data/vendor/bundle/gems/power_assert-1.1.5/COPYING +57 -0
  1508. data/vendor/bundle/gems/power_assert-1.1.5/Gemfile +9 -0
  1509. data/vendor/bundle/gems/power_assert-1.1.5/LEGAL +4 -0
  1510. data/vendor/bundle/gems/power_assert-1.1.5/README.rdoc +81 -0
  1511. data/vendor/bundle/gems/power_assert-1.1.5/Rakefile +59 -0
  1512. data/vendor/bundle/gems/power_assert-1.1.5/bin/console +12 -0
  1513. data/vendor/bundle/gems/power_assert-1.1.5/bin/setup +6 -0
  1514. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert.rb +98 -0
  1515. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/colorize.rb +9 -0
  1516. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/configuration.rb +46 -0
  1517. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/context.rb +235 -0
  1518. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/enable_tracepoint_events.rb +91 -0
  1519. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/inspector.rb +61 -0
  1520. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/parser.rb +251 -0
  1521. data/vendor/bundle/gems/power_assert-1.1.5/lib/power_assert/version.rb +3 -0
  1522. data/vendor/bundle/gems/power_assert-1.1.5/power_assert.gemspec +31 -0
  1523. data/vendor/bundle/gems/public_suffix-4.0.1/2.0-Upgrade.md +52 -0
  1524. data/vendor/bundle/gems/public_suffix-4.0.1/CHANGELOG.md +365 -0
  1525. data/vendor/bundle/gems/public_suffix-4.0.1/Gemfile +12 -0
  1526. data/vendor/bundle/gems/public_suffix-4.0.1/LICENSE.txt +22 -0
  1527. data/vendor/bundle/gems/public_suffix-4.0.1/README.md +202 -0
  1528. data/vendor/bundle/gems/public_suffix-4.0.1/Rakefile +51 -0
  1529. data/vendor/bundle/gems/public_suffix-4.0.1/bin/console +15 -0
  1530. data/vendor/bundle/gems/public_suffix-4.0.1/data/list.txt +13001 -0
  1531. data/vendor/bundle/gems/public_suffix-4.0.1/lib/public_suffix.rb +179 -0
  1532. data/vendor/bundle/gems/public_suffix-4.0.1/lib/public_suffix/domain.rb +235 -0
  1533. data/vendor/bundle/gems/public_suffix-4.0.1/lib/public_suffix/errors.rb +41 -0
  1534. data/vendor/bundle/gems/public_suffix-4.0.1/lib/public_suffix/list.rb +247 -0
  1535. data/vendor/bundle/gems/public_suffix-4.0.1/lib/public_suffix/rule.rb +350 -0
  1536. data/vendor/bundle/gems/public_suffix-4.0.1/lib/public_suffix/version.rb +13 -0
  1537. data/vendor/bundle/gems/public_suffix-4.0.1/public_suffix.gemspec +25 -0
  1538. data/vendor/bundle/gems/public_suffix-4.0.1/test/acceptance_test.rb +129 -0
  1539. data/vendor/bundle/gems/public_suffix-4.0.1/test/benchmarks/bm_find.rb +66 -0
  1540. data/vendor/bundle/gems/public_suffix-4.0.1/test/benchmarks/bm_find_all.rb +102 -0
  1541. data/vendor/bundle/gems/public_suffix-4.0.1/test/benchmarks/bm_names.rb +91 -0
  1542. data/vendor/bundle/gems/public_suffix-4.0.1/test/benchmarks/bm_select.rb +26 -0
  1543. data/vendor/bundle/gems/public_suffix-4.0.1/test/benchmarks/bm_select_incremental.rb +25 -0
  1544. data/vendor/bundle/gems/public_suffix-4.0.1/test/benchmarks/bm_valid.rb +101 -0
  1545. data/vendor/bundle/gems/public_suffix-4.0.1/test/profilers/domain_profiler.rb +12 -0
  1546. data/vendor/bundle/gems/public_suffix-4.0.1/test/profilers/find_profiler.rb +12 -0
  1547. data/vendor/bundle/gems/public_suffix-4.0.1/test/profilers/find_profiler_jp.rb +12 -0
  1548. data/vendor/bundle/gems/public_suffix-4.0.1/test/profilers/initialization_profiler.rb +11 -0
  1549. data/vendor/bundle/gems/public_suffix-4.0.1/test/profilers/list_profsize.rb +11 -0
  1550. data/vendor/bundle/gems/public_suffix-4.0.1/test/profilers/object_binsize.rb +57 -0
  1551. data/vendor/bundle/gems/public_suffix-4.0.1/test/psl_test.rb +52 -0
  1552. data/vendor/bundle/gems/public_suffix-4.0.1/test/test_helper.rb +18 -0
  1553. data/vendor/bundle/gems/public_suffix-4.0.1/test/tests.txt +98 -0
  1554. data/vendor/bundle/gems/public_suffix-4.0.1/test/unit/domain_test.rb +106 -0
  1555. data/vendor/bundle/gems/public_suffix-4.0.1/test/unit/errors_test.rb +25 -0
  1556. data/vendor/bundle/gems/public_suffix-4.0.1/test/unit/list_test.rb +241 -0
  1557. data/vendor/bundle/gems/public_suffix-4.0.1/test/unit/public_suffix_test.rb +188 -0
  1558. data/vendor/bundle/gems/public_suffix-4.0.1/test/unit/rule_test.rb +222 -0
  1559. data/vendor/bundle/gems/rack-2.0.7/COPYING +18 -0
  1560. data/vendor/bundle/gems/rack-2.0.7/HISTORY.md +505 -0
  1561. data/vendor/bundle/gems/rack-2.0.7/README.rdoc +302 -0
  1562. data/vendor/bundle/gems/rack-2.0.7/Rakefile +116 -0
  1563. data/vendor/bundle/gems/rack-2.0.7/SPEC +263 -0
  1564. data/vendor/bundle/gems/rack-2.0.7/bin/rackup +4 -0
  1565. data/vendor/bundle/gems/rack-2.0.7/contrib/rack.png +0 -0
  1566. data/vendor/bundle/gems/rack-2.0.7/contrib/rack.svg +150 -0
  1567. data/vendor/bundle/gems/rack-2.0.7/contrib/rack_logo.svg +164 -0
  1568. data/vendor/bundle/gems/rack-2.0.7/contrib/rdoc.css +412 -0
  1569. data/vendor/bundle/gems/rack-2.0.7/example/lobster.ru +4 -0
  1570. data/vendor/bundle/gems/rack-2.0.7/example/protectedlobster.rb +14 -0
  1571. data/vendor/bundle/gems/rack-2.0.7/example/protectedlobster.ru +8 -0
  1572. data/vendor/bundle/gems/rack-2.0.7/lib/rack.rb +147 -0
  1573. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/abstract/handler.rb +37 -0
  1574. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/abstract/request.rb +47 -0
  1575. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/basic.rb +58 -0
  1576. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/digest/md5.rb +129 -0
  1577. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/digest/nonce.rb +51 -0
  1578. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/digest/params.rb +52 -0
  1579. data/vendor/bundle/gems/rack-2.0.7/lib/rack/auth/digest/request.rb +41 -0
  1580. data/vendor/bundle/gems/rack-2.0.7/lib/rack/body_proxy.rb +44 -0
  1581. data/vendor/bundle/gems/rack-2.0.7/lib/rack/builder.rb +164 -0
  1582. data/vendor/bundle/gems/rack-2.0.7/lib/rack/cascade.rb +52 -0
  1583. data/vendor/bundle/gems/rack-2.0.7/lib/rack/chunked.rb +69 -0
  1584. data/vendor/bundle/gems/rack-2.0.7/lib/rack/common_logger.rb +72 -0
  1585. data/vendor/bundle/gems/rack-2.0.7/lib/rack/conditional_get.rb +79 -0
  1586. data/vendor/bundle/gems/rack-2.0.7/lib/rack/config.rb +20 -0
  1587. data/vendor/bundle/gems/rack-2.0.7/lib/rack/content_length.rb +37 -0
  1588. data/vendor/bundle/gems/rack-2.0.7/lib/rack/content_type.rb +29 -0
  1589. data/vendor/bundle/gems/rack-2.0.7/lib/rack/deflater.rb +119 -0
  1590. data/vendor/bundle/gems/rack-2.0.7/lib/rack/directory.rb +179 -0
  1591. data/vendor/bundle/gems/rack-2.0.7/lib/rack/etag.rb +74 -0
  1592. data/vendor/bundle/gems/rack-2.0.7/lib/rack/events.rb +154 -0
  1593. data/vendor/bundle/gems/rack-2.0.7/lib/rack/file.rb +176 -0
  1594. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler.rb +99 -0
  1595. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler/cgi.rb +60 -0
  1596. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler/fastcgi.rb +100 -0
  1597. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler/lsws.rb +61 -0
  1598. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler/scgi.rb +70 -0
  1599. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler/thin.rb +36 -0
  1600. data/vendor/bundle/gems/rack-2.0.7/lib/rack/handler/webrick.rb +120 -0
  1601. data/vendor/bundle/gems/rack-2.0.7/lib/rack/head.rb +25 -0
  1602. data/vendor/bundle/gems/rack-2.0.7/lib/rack/lint.rb +760 -0
  1603. data/vendor/bundle/gems/rack-2.0.7/lib/rack/lobster.rb +70 -0
  1604. data/vendor/bundle/gems/rack-2.0.7/lib/rack/lock.rb +31 -0
  1605. data/vendor/bundle/gems/rack-2.0.7/lib/rack/logger.rb +18 -0
  1606. data/vendor/bundle/gems/rack-2.0.7/lib/rack/media_type.rb +38 -0
  1607. data/vendor/bundle/gems/rack-2.0.7/lib/rack/method_override.rb +50 -0
  1608. data/vendor/bundle/gems/rack-2.0.7/lib/rack/mime.rb +677 -0
  1609. data/vendor/bundle/gems/rack-2.0.7/lib/rack/mock.rb +196 -0
  1610. data/vendor/bundle/gems/rack-2.0.7/lib/rack/multipart.rb +63 -0
  1611. data/vendor/bundle/gems/rack-2.0.7/lib/rack/multipart/generator.rb +93 -0
  1612. data/vendor/bundle/gems/rack-2.0.7/lib/rack/multipart/parser.rb +366 -0
  1613. data/vendor/bundle/gems/rack-2.0.7/lib/rack/multipart/uploaded_file.rb +33 -0
  1614. data/vendor/bundle/gems/rack-2.0.7/lib/rack/null_logger.rb +37 -0
  1615. data/vendor/bundle/gems/rack-2.0.7/lib/rack/query_parser.rb +192 -0
  1616. data/vendor/bundle/gems/rack-2.0.7/lib/rack/recursive.rb +62 -0
  1617. data/vendor/bundle/gems/rack-2.0.7/lib/rack/reloader.rb +110 -0
  1618. data/vendor/bundle/gems/rack-2.0.7/lib/rack/request.rb +500 -0
  1619. data/vendor/bundle/gems/rack-2.0.7/lib/rack/response.rb +235 -0
  1620. data/vendor/bundle/gems/rack-2.0.7/lib/rack/rewindable_input.rb +93 -0
  1621. data/vendor/bundle/gems/rack-2.0.7/lib/rack/runtime.rb +32 -0
  1622. data/vendor/bundle/gems/rack-2.0.7/lib/rack/sendfile.rb +158 -0
  1623. data/vendor/bundle/gems/rack-2.0.7/lib/rack/server.rb +395 -0
  1624. data/vendor/bundle/gems/rack-2.0.7/lib/rack/session/abstract/id.rb +445 -0
  1625. data/vendor/bundle/gems/rack-2.0.7/lib/rack/session/cookie.rb +195 -0
  1626. data/vendor/bundle/gems/rack-2.0.7/lib/rack/session/memcache.rb +93 -0
  1627. data/vendor/bundle/gems/rack-2.0.7/lib/rack/session/pool.rb +76 -0
  1628. data/vendor/bundle/gems/rack-2.0.7/lib/rack/show_exceptions.rb +386 -0
  1629. data/vendor/bundle/gems/rack-2.0.7/lib/rack/show_status.rb +113 -0
  1630. data/vendor/bundle/gems/rack-2.0.7/lib/rack/static.rb +175 -0
  1631. data/vendor/bundle/gems/rack-2.0.7/lib/rack/tempfile_reaper.rb +22 -0
  1632. data/vendor/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb +91 -0
  1633. data/vendor/bundle/gems/rack-2.0.7/lib/rack/utils.rb +620 -0
  1634. data/vendor/bundle/gems/rack-2.0.7/rack.gemspec +34 -0
  1635. data/vendor/bundle/gems/rack-2.0.7/test/builder/an_underscore_app.rb +5 -0
  1636. data/vendor/bundle/gems/rack-2.0.7/test/builder/anything.rb +5 -0
  1637. data/vendor/bundle/gems/rack-2.0.7/test/builder/comment.ru +4 -0
  1638. data/vendor/bundle/gems/rack-2.0.7/test/builder/end.ru +5 -0
  1639. data/vendor/bundle/gems/rack-2.0.7/test/builder/line.ru +1 -0
  1640. data/vendor/bundle/gems/rack-2.0.7/test/builder/options.ru +2 -0
  1641. data/vendor/bundle/gems/rack-2.0.7/test/cgi/assets/folder/test.js +1 -0
  1642. data/vendor/bundle/gems/rack-2.0.7/test/cgi/assets/fonts/font.eot +1 -0
  1643. data/vendor/bundle/gems/rack-2.0.7/test/cgi/assets/images/image.png +1 -0
  1644. data/vendor/bundle/gems/rack-2.0.7/test/cgi/assets/index.html +1 -0
  1645. data/vendor/bundle/gems/rack-2.0.7/test/cgi/assets/javascripts/app.js +1 -0
  1646. data/vendor/bundle/gems/rack-2.0.7/test/cgi/assets/stylesheets/app.css +1 -0
  1647. data/vendor/bundle/gems/rack-2.0.7/test/cgi/lighttpd.conf +26 -0
  1648. data/vendor/bundle/gems/rack-2.0.7/test/cgi/rackup_stub.rb +6 -0
  1649. data/vendor/bundle/gems/rack-2.0.7/test/cgi/sample_rackup.ru +5 -0
  1650. data/vendor/bundle/gems/rack-2.0.7/test/cgi/test +9 -0
  1651. data/vendor/bundle/gems/rack-2.0.7/test/cgi/test+directory/test+file +1 -0
  1652. data/vendor/bundle/gems/rack-2.0.7/test/cgi/test.fcgi +9 -0
  1653. data/vendor/bundle/gems/rack-2.0.7/test/cgi/test.gz +0 -0
  1654. data/vendor/bundle/gems/rack-2.0.7/test/cgi/test.ru +5 -0
  1655. data/vendor/bundle/gems/rack-2.0.7/test/gemloader.rb +10 -0
  1656. data/vendor/bundle/gems/rack-2.0.7/test/helper.rb +34 -0
  1657. data/vendor/bundle/gems/rack-2.0.7/test/multipart/bad_robots +259 -0
  1658. data/vendor/bundle/gems/rack-2.0.7/test/multipart/binary +0 -0
  1659. data/vendor/bundle/gems/rack-2.0.7/test/multipart/content_type_and_no_filename +6 -0
  1660. data/vendor/bundle/gems/rack-2.0.7/test/multipart/empty +10 -0
  1661. data/vendor/bundle/gems/rack-2.0.7/test/multipart/fail_16384_nofile +814 -0
  1662. data/vendor/bundle/gems/rack-2.0.7/test/multipart/file1.txt +1 -0
  1663. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_and_modification_param +7 -0
  1664. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_and_no_name +6 -0
  1665. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_encoded_words +7 -0
  1666. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_escaped_quotes +6 -0
  1667. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_escaped_quotes_and_modification_param +7 -0
  1668. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_null_byte +7 -0
  1669. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_percent_escaped_quotes +6 -0
  1670. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_single_quote +7 -0
  1671. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_unescaped_percentages +6 -0
  1672. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_unescaped_percentages2 +6 -0
  1673. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_unescaped_percentages3 +6 -0
  1674. data/vendor/bundle/gems/rack-2.0.7/test/multipart/filename_with_unescaped_quotes +6 -0
  1675. data/vendor/bundle/gems/rack-2.0.7/test/multipart/ie +6 -0
  1676. data/vendor/bundle/gems/rack-2.0.7/test/multipart/invalid_character +6 -0
  1677. data/vendor/bundle/gems/rack-2.0.7/test/multipart/mixed_files +21 -0
  1678. data/vendor/bundle/gems/rack-2.0.7/test/multipart/nested +10 -0
  1679. data/vendor/bundle/gems/rack-2.0.7/test/multipart/none +9 -0
  1680. data/vendor/bundle/gems/rack-2.0.7/test/multipart/quoted +15 -0
  1681. data/vendor/bundle/gems/rack-2.0.7/test/multipart/rack-logo.png +0 -0
  1682. data/vendor/bundle/gems/rack-2.0.7/test/multipart/semicolon +6 -0
  1683. data/vendor/bundle/gems/rack-2.0.7/test/multipart/text +15 -0
  1684. data/vendor/bundle/gems/rack-2.0.7/test/multipart/three_files_three_fields +31 -0
  1685. data/vendor/bundle/gems/rack-2.0.7/test/multipart/unity3d_wwwform +11 -0
  1686. data/vendor/bundle/gems/rack-2.0.7/test/multipart/webkit +32 -0
  1687. data/vendor/bundle/gems/rack-2.0.7/test/rackup/config.ru +31 -0
  1688. data/vendor/bundle/gems/rack-2.0.7/test/registering_handler/rack/handler/registering_myself.rb +8 -0
  1689. data/vendor/bundle/gems/rack-2.0.7/test/spec_auth_basic.rb +89 -0
  1690. data/vendor/bundle/gems/rack-2.0.7/test/spec_auth_digest.rb +260 -0
  1691. data/vendor/bundle/gems/rack-2.0.7/test/spec_body_proxy.rb +85 -0
  1692. data/vendor/bundle/gems/rack-2.0.7/test/spec_builder.rb +233 -0
  1693. data/vendor/bundle/gems/rack-2.0.7/test/spec_cascade.rb +63 -0
  1694. data/vendor/bundle/gems/rack-2.0.7/test/spec_cgi.rb +84 -0
  1695. data/vendor/bundle/gems/rack-2.0.7/test/spec_chunked.rb +103 -0
  1696. data/vendor/bundle/gems/rack-2.0.7/test/spec_common_logger.rb +95 -0
  1697. data/vendor/bundle/gems/rack-2.0.7/test/spec_conditional_get.rb +103 -0
  1698. data/vendor/bundle/gems/rack-2.0.7/test/spec_config.rb +23 -0
  1699. data/vendor/bundle/gems/rack-2.0.7/test/spec_content_length.rb +86 -0
  1700. data/vendor/bundle/gems/rack-2.0.7/test/spec_content_type.rb +46 -0
  1701. data/vendor/bundle/gems/rack-2.0.7/test/spec_deflater.rb +375 -0
  1702. data/vendor/bundle/gems/rack-2.0.7/test/spec_directory.rb +148 -0
  1703. data/vendor/bundle/gems/rack-2.0.7/test/spec_etag.rb +108 -0
  1704. data/vendor/bundle/gems/rack-2.0.7/test/spec_events.rb +133 -0
  1705. data/vendor/bundle/gems/rack-2.0.7/test/spec_fastcgi.rb +85 -0
  1706. data/vendor/bundle/gems/rack-2.0.7/test/spec_file.rb +264 -0
  1707. data/vendor/bundle/gems/rack-2.0.7/test/spec_handler.rb +57 -0
  1708. data/vendor/bundle/gems/rack-2.0.7/test/spec_head.rb +46 -0
  1709. data/vendor/bundle/gems/rack-2.0.7/test/spec_lint.rb +515 -0
  1710. data/vendor/bundle/gems/rack-2.0.7/test/spec_lobster.rb +59 -0
  1711. data/vendor/bundle/gems/rack-2.0.7/test/spec_lock.rb +204 -0
  1712. data/vendor/bundle/gems/rack-2.0.7/test/spec_logger.rb +24 -0
  1713. data/vendor/bundle/gems/rack-2.0.7/test/spec_media_type.rb +42 -0
  1714. data/vendor/bundle/gems/rack-2.0.7/test/spec_method_override.rb +110 -0
  1715. data/vendor/bundle/gems/rack-2.0.7/test/spec_mime.rb +51 -0
  1716. data/vendor/bundle/gems/rack-2.0.7/test/spec_mock.rb +359 -0
  1717. data/vendor/bundle/gems/rack-2.0.7/test/spec_multipart.rb +722 -0
  1718. data/vendor/bundle/gems/rack-2.0.7/test/spec_null_logger.rb +21 -0
  1719. data/vendor/bundle/gems/rack-2.0.7/test/spec_recursive.rb +75 -0
  1720. data/vendor/bundle/gems/rack-2.0.7/test/spec_request.rb +1407 -0
  1721. data/vendor/bundle/gems/rack-2.0.7/test/spec_response.rb +510 -0
  1722. data/vendor/bundle/gems/rack-2.0.7/test/spec_rewindable_input.rb +128 -0
  1723. data/vendor/bundle/gems/rack-2.0.7/test/spec_runtime.rb +50 -0
  1724. data/vendor/bundle/gems/rack-2.0.7/test/spec_sendfile.rb +125 -0
  1725. data/vendor/bundle/gems/rack-2.0.7/test/spec_server.rb +193 -0
  1726. data/vendor/bundle/gems/rack-2.0.7/test/spec_session_abstract_id.rb +31 -0
  1727. data/vendor/bundle/gems/rack-2.0.7/test/spec_session_abstract_session_hash.rb +45 -0
  1728. data/vendor/bundle/gems/rack-2.0.7/test/spec_session_cookie.rb +442 -0
  1729. data/vendor/bundle/gems/rack-2.0.7/test/spec_session_memcache.rb +320 -0
  1730. data/vendor/bundle/gems/rack-2.0.7/test/spec_session_pool.rb +210 -0
  1731. data/vendor/bundle/gems/rack-2.0.7/test/spec_show_exceptions.rb +93 -0
  1732. data/vendor/bundle/gems/rack-2.0.7/test/spec_show_status.rb +104 -0
  1733. data/vendor/bundle/gems/rack-2.0.7/test/spec_static.rb +184 -0
  1734. data/vendor/bundle/gems/rack-2.0.7/test/spec_tempfile_reaper.rb +64 -0
  1735. data/vendor/bundle/gems/rack-2.0.7/test/spec_thin.rb +96 -0
  1736. data/vendor/bundle/gems/rack-2.0.7/test/spec_urlmap.rb +237 -0
  1737. data/vendor/bundle/gems/rack-2.0.7/test/spec_utils.rb +742 -0
  1738. data/vendor/bundle/gems/rack-2.0.7/test/spec_version.rb +11 -0
  1739. data/vendor/bundle/gems/rack-2.0.7/test/spec_webrick.rb +206 -0
  1740. data/vendor/bundle/gems/rack-2.0.7/test/static/another/index.html +1 -0
  1741. data/vendor/bundle/gems/rack-2.0.7/test/static/foo.html +1 -0
  1742. data/vendor/bundle/gems/rack-2.0.7/test/static/index.html +1 -0
  1743. data/vendor/bundle/gems/rack-2.0.7/test/testrequest.rb +78 -0
  1744. data/vendor/bundle/gems/rack-2.0.7/test/unregistered_handler/rack/handler/unregistered.rb +7 -0
  1745. data/vendor/bundle/gems/rack-2.0.7/test/unregistered_handler/rack/handler/unregistered_long_one.rb +7 -0
  1746. data/vendor/bundle/gems/rack-test-1.1.0/History.md +256 -0
  1747. data/vendor/bundle/gems/rack-test-1.1.0/MIT-LICENSE.txt +19 -0
  1748. data/vendor/bundle/gems/rack-test-1.1.0/README.md +150 -0
  1749. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/mock_session.rb +63 -0
  1750. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test.rb +334 -0
  1751. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test/cookie_jar.rb +194 -0
  1752. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test/methods.rb +83 -0
  1753. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test/mock_digest_request.rb +25 -0
  1754. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test/uploaded_file.rb +85 -0
  1755. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test/utils.rb +144 -0
  1756. data/vendor/bundle/gems/rack-test-1.1.0/lib/rack/test/version.rb +5 -0
  1757. data/vendor/bundle/gems/racksh-1.0.0/CHANGELOG.txt +34 -0
  1758. data/vendor/bundle/gems/racksh-1.0.0/README.markdown +150 -0
  1759. data/vendor/bundle/gems/racksh-1.0.0/bin/racksh +25 -0
  1760. data/vendor/bundle/gems/racksh-1.0.0/lib/racksh/init.rb +53 -0
  1761. data/vendor/bundle/gems/racksh-1.0.0/lib/racksh/irb.rb +2 -0
  1762. data/vendor/bundle/gems/racksh-1.0.0/lib/racksh/session.rb +18 -0
  1763. data/vendor/bundle/gems/racksh-1.0.0/lib/racksh/version.rb +5 -0
  1764. data/vendor/bundle/gems/rake-13.0.1/CONTRIBUTING.rdoc +43 -0
  1765. data/vendor/bundle/gems/rake-13.0.1/Gemfile +10 -0
  1766. data/vendor/bundle/gems/rake-13.0.1/History.rdoc +2368 -0
  1767. data/vendor/bundle/gems/rake-13.0.1/MIT-LICENSE +21 -0
  1768. data/vendor/bundle/gems/rake-13.0.1/README.rdoc +155 -0
  1769. data/vendor/bundle/gems/rake-13.0.1/Rakefile +41 -0
  1770. data/vendor/bundle/gems/rake-13.0.1/bin/bundle +105 -0
  1771. data/vendor/bundle/gems/rake-13.0.1/bin/console +7 -0
  1772. data/vendor/bundle/gems/rake-13.0.1/bin/rake +29 -0
  1773. data/vendor/bundle/gems/rake-13.0.1/bin/rdoc +29 -0
  1774. data/vendor/bundle/gems/rake-13.0.1/bin/rubocop +29 -0
  1775. data/vendor/bundle/gems/rake-13.0.1/bin/setup +6 -0
  1776. data/vendor/bundle/gems/rake-13.0.1/doc/command_line_usage.rdoc +158 -0
  1777. data/vendor/bundle/gems/rake-13.0.1/doc/example/Rakefile1 +38 -0
  1778. data/vendor/bundle/gems/rake-13.0.1/doc/example/Rakefile2 +35 -0
  1779. data/vendor/bundle/gems/rake-13.0.1/doc/example/a.c +6 -0
  1780. data/vendor/bundle/gems/rake-13.0.1/doc/example/b.c +6 -0
  1781. data/vendor/bundle/gems/rake-13.0.1/doc/example/main.c +11 -0
  1782. data/vendor/bundle/gems/rake-13.0.1/doc/glossary.rdoc +42 -0
  1783. data/vendor/bundle/gems/rake-13.0.1/doc/jamis.rb +592 -0
  1784. data/vendor/bundle/gems/rake-13.0.1/doc/proto_rake.rdoc +127 -0
  1785. data/vendor/bundle/gems/rake-13.0.1/doc/rake.1 +156 -0
  1786. data/vendor/bundle/gems/rake-13.0.1/doc/rakefile.rdoc +622 -0
  1787. data/vendor/bundle/gems/rake-13.0.1/doc/rational.rdoc +151 -0
  1788. data/vendor/bundle/gems/rake-13.0.1/exe/rake +27 -0
  1789. data/vendor/bundle/gems/rake-13.0.1/lib/rake.rb +71 -0
  1790. data/vendor/bundle/gems/rake-13.0.1/lib/rake/application.rb +824 -0
  1791. data/vendor/bundle/gems/rake-13.0.1/lib/rake/backtrace.rb +24 -0
  1792. data/vendor/bundle/gems/rake-13.0.1/lib/rake/clean.rb +78 -0
  1793. data/vendor/bundle/gems/rake-13.0.1/lib/rake/cloneable.rb +17 -0
  1794. data/vendor/bundle/gems/rake-13.0.1/lib/rake/cpu_counter.rb +107 -0
  1795. data/vendor/bundle/gems/rake-13.0.1/lib/rake/default_loader.rb +15 -0
  1796. data/vendor/bundle/gems/rake-13.0.1/lib/rake/dsl_definition.rb +195 -0
  1797. data/vendor/bundle/gems/rake-13.0.1/lib/rake/early_time.rb +22 -0
  1798. data/vendor/bundle/gems/rake-13.0.1/lib/rake/ext/core.rb +26 -0
  1799. data/vendor/bundle/gems/rake-13.0.1/lib/rake/ext/string.rb +176 -0
  1800. data/vendor/bundle/gems/rake-13.0.1/lib/rake/file_creation_task.rb +25 -0
  1801. data/vendor/bundle/gems/rake-13.0.1/lib/rake/file_list.rb +435 -0
  1802. data/vendor/bundle/gems/rake-13.0.1/lib/rake/file_task.rb +54 -0
  1803. data/vendor/bundle/gems/rake-13.0.1/lib/rake/file_utils.rb +134 -0
  1804. data/vendor/bundle/gems/rake-13.0.1/lib/rake/file_utils_ext.rb +134 -0
  1805. data/vendor/bundle/gems/rake-13.0.1/lib/rake/invocation_chain.rb +57 -0
  1806. data/vendor/bundle/gems/rake-13.0.1/lib/rake/invocation_exception_mixin.rb +17 -0
  1807. data/vendor/bundle/gems/rake-13.0.1/lib/rake/late_time.rb +18 -0
  1808. data/vendor/bundle/gems/rake-13.0.1/lib/rake/linked_list.rb +112 -0
  1809. data/vendor/bundle/gems/rake-13.0.1/lib/rake/loaders/makefile.rb +54 -0
  1810. data/vendor/bundle/gems/rake-13.0.1/lib/rake/multi_task.rb +14 -0
  1811. data/vendor/bundle/gems/rake-13.0.1/lib/rake/name_space.rb +38 -0
  1812. data/vendor/bundle/gems/rake-13.0.1/lib/rake/packagetask.rb +222 -0
  1813. data/vendor/bundle/gems/rake-13.0.1/lib/rake/phony.rb +16 -0
  1814. data/vendor/bundle/gems/rake-13.0.1/lib/rake/private_reader.rb +21 -0
  1815. data/vendor/bundle/gems/rake-13.0.1/lib/rake/promise.rb +100 -0
  1816. data/vendor/bundle/gems/rake-13.0.1/lib/rake/pseudo_status.rb +30 -0
  1817. data/vendor/bundle/gems/rake-13.0.1/lib/rake/rake_module.rb +67 -0
  1818. data/vendor/bundle/gems/rake-13.0.1/lib/rake/rake_test_loader.rb +27 -0
  1819. data/vendor/bundle/gems/rake-13.0.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
  1820. data/vendor/bundle/gems/rake-13.0.1/lib/rake/scope.rb +43 -0
  1821. data/vendor/bundle/gems/rake-13.0.1/lib/rake/task.rb +434 -0
  1822. data/vendor/bundle/gems/rake-13.0.1/lib/rake/task_argument_error.rb +8 -0
  1823. data/vendor/bundle/gems/rake-13.0.1/lib/rake/task_arguments.rb +109 -0
  1824. data/vendor/bundle/gems/rake-13.0.1/lib/rake/task_manager.rb +331 -0
  1825. data/vendor/bundle/gems/rake-13.0.1/lib/rake/tasklib.rb +12 -0
  1826. data/vendor/bundle/gems/rake-13.0.1/lib/rake/testtask.rb +224 -0
  1827. data/vendor/bundle/gems/rake-13.0.1/lib/rake/thread_history_display.rb +49 -0
  1828. data/vendor/bundle/gems/rake-13.0.1/lib/rake/thread_pool.rb +163 -0
  1829. data/vendor/bundle/gems/rake-13.0.1/lib/rake/trace_output.rb +23 -0
  1830. data/vendor/bundle/gems/rake-13.0.1/lib/rake/version.rb +10 -0
  1831. data/vendor/bundle/gems/rake-13.0.1/lib/rake/win32.rb +51 -0
  1832. data/vendor/bundle/gems/rake-13.0.1/rake.gemspec +43 -0
  1833. data/vendor/bundle/gems/redcarpet-3.5.0/COPYING +20 -0
  1834. data/vendor/bundle/gems/redcarpet-3.5.0/Gemfile +9 -0
  1835. data/vendor/bundle/gems/redcarpet-3.5.0/README.markdown +405 -0
  1836. data/vendor/bundle/gems/redcarpet-3.5.0/Rakefile +60 -0
  1837. data/vendor/bundle/gems/redcarpet-3.5.0/bin/redcarpet +7 -0
  1838. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/Makefile +266 -0
  1839. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/autolink.c +308 -0
  1840. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/autolink.h +55 -0
  1841. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/autolink.o +0 -0
  1842. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/buffer.c +203 -0
  1843. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/buffer.h +88 -0
  1844. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/buffer.o +0 -0
  1845. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/extconf.rb +6 -0
  1846. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/houdini.h +51 -0
  1847. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/houdini_href_e.c +124 -0
  1848. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/houdini_href_e.o +0 -0
  1849. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/houdini_html_e.c +104 -0
  1850. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/houdini_html_e.o +0 -0
  1851. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/html.c +845 -0
  1852. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/html.h +83 -0
  1853. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/html.o +0 -0
  1854. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/html_blocks.h +227 -0
  1855. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/html_smartypants.c +472 -0
  1856. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/html_smartypants.o +0 -0
  1857. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/markdown.c +2915 -0
  1858. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/markdown.h +143 -0
  1859. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/markdown.o +0 -0
  1860. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/rc_markdown.c +183 -0
  1861. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/rc_markdown.o +0 -0
  1862. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/rc_render.c +568 -0
  1863. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/rc_render.o +0 -0
  1864. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/redcarpet.h +52 -0
  1865. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/redcarpet.so +0 -0
  1866. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/stack.c +84 -0
  1867. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/stack.h +48 -0
  1868. data/vendor/bundle/gems/redcarpet-3.5.0/ext/redcarpet/stack.o +0 -0
  1869. data/vendor/bundle/gems/redcarpet-3.5.0/lib/redcarpet.rb +92 -0
  1870. data/vendor/bundle/gems/redcarpet-3.5.0/lib/redcarpet.so +0 -0
  1871. data/vendor/bundle/gems/redcarpet-3.5.0/lib/redcarpet/cli.rb +86 -0
  1872. data/vendor/bundle/gems/redcarpet-3.5.0/lib/redcarpet/compat.rb +71 -0
  1873. data/vendor/bundle/gems/redcarpet-3.5.0/lib/redcarpet/render_man.rb +65 -0
  1874. data/vendor/bundle/gems/redcarpet-3.5.0/lib/redcarpet/render_strip.rb +60 -0
  1875. data/vendor/bundle/gems/redcarpet-3.5.0/redcarpet.gemspec +71 -0
  1876. data/vendor/bundle/gems/redcarpet-3.5.0/test/benchmark.rb +24 -0
  1877. data/vendor/bundle/gems/redcarpet-3.5.0/test/custom_render_test.rb +67 -0
  1878. data/vendor/bundle/gems/redcarpet-3.5.0/test/fixtures/benchmark.md +232 -0
  1879. data/vendor/bundle/gems/redcarpet-3.5.0/test/html5_test.rb +82 -0
  1880. data/vendor/bundle/gems/redcarpet-3.5.0/test/html_render_test.rb +274 -0
  1881. data/vendor/bundle/gems/redcarpet-3.5.0/test/html_toc_render_test.rb +112 -0
  1882. data/vendor/bundle/gems/redcarpet-3.5.0/test/markdown_test.rb +406 -0
  1883. data/vendor/bundle/gems/redcarpet-3.5.0/test/pathological_inputs_test.rb +34 -0
  1884. data/vendor/bundle/gems/redcarpet-3.5.0/test/redcarpet_bin_test.rb +80 -0
  1885. data/vendor/bundle/gems/redcarpet-3.5.0/test/redcarpet_compat_test.rb +38 -0
  1886. data/vendor/bundle/gems/redcarpet-3.5.0/test/safe_render_test.rb +35 -0
  1887. data/vendor/bundle/gems/redcarpet-3.5.0/test/smarty_html_test.rb +51 -0
  1888. data/vendor/bundle/gems/redcarpet-3.5.0/test/smarty_pants_test.rb +58 -0
  1889. data/vendor/bundle/gems/redcarpet-3.5.0/test/stripdown_render_test.rb +69 -0
  1890. data/vendor/bundle/gems/redcarpet-3.5.0/test/test_helper.rb +47 -0
  1891. data/vendor/bundle/gems/regexp_parser-1.6.0/CHANGELOG.md +337 -0
  1892. data/vendor/bundle/gems/regexp_parser-1.6.0/Gemfile +9 -0
  1893. data/vendor/bundle/gems/regexp_parser-1.6.0/LICENSE +22 -0
  1894. data/vendor/bundle/gems/regexp_parser-1.6.0/README.md +470 -0
  1895. data/vendor/bundle/gems/regexp_parser-1.6.0/Rakefile +87 -0
  1896. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser.rb +8 -0
  1897. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression.rb +163 -0
  1898. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/alternation.rb +10 -0
  1899. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/anchor.rb +26 -0
  1900. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/backref.rb +55 -0
  1901. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/conditional.rb +58 -0
  1902. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/escape.rb +94 -0
  1903. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/free_space.rb +17 -0
  1904. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/group.rb +60 -0
  1905. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/keep.rb +5 -0
  1906. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/literal.rb +7 -0
  1907. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/posix_class.rb +11 -0
  1908. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/property.rb +120 -0
  1909. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/root.rb +24 -0
  1910. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/set.rb +27 -0
  1911. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/set/intersection.rb +9 -0
  1912. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/set/range.rb +23 -0
  1913. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/classes/type.rb +19 -0
  1914. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match.rb +13 -0
  1915. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/match_length.rb +172 -0
  1916. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/options.rb +35 -0
  1917. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/strfregexp.rb +114 -0
  1918. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/tests.rb +97 -0
  1919. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/methods/traverse.rb +62 -0
  1920. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/quantifier.rb +44 -0
  1921. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/sequence.rb +67 -0
  1922. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/sequence_operation.rb +25 -0
  1923. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/expression/subexpression.rb +59 -0
  1924. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/lexer.rb +127 -0
  1925. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/parser.rb +653 -0
  1926. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/scanner.rb +2765 -0
  1927. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/scanner/char_type.rl +28 -0
  1928. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/scanner/properties/long.yml +594 -0
  1929. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/scanner/properties/short.yml +237 -0
  1930. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/scanner/property.rl +30 -0
  1931. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/scanner/scanner.rl +893 -0
  1932. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax.rb +9 -0
  1933. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/any.rb +15 -0
  1934. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/base.rb +95 -0
  1935. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens.rb +45 -0
  1936. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/anchor.rb +15 -0
  1937. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/assertion.rb +13 -0
  1938. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/backref.rb +24 -0
  1939. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/character_set.rb +13 -0
  1940. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/character_type.rb +16 -0
  1941. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/conditional.rb +16 -0
  1942. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/escape.rb +30 -0
  1943. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/group.rb +23 -0
  1944. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/keep.rb +12 -0
  1945. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/meta.rb +13 -0
  1946. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/posix_class.rb +17 -0
  1947. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/quantifier.rb +35 -0
  1948. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/tokens/unicode_property.rb +675 -0
  1949. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/version_lookup.rb +82 -0
  1950. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions.rb +6 -0
  1951. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/1.8.6.rb +21 -0
  1952. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/1.9.1.rb +18 -0
  1953. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/1.9.3.rb +11 -0
  1954. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.0.0.rb +17 -0
  1955. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.2.0.rb +10 -0
  1956. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.3.0.rb +10 -0
  1957. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.4.0.rb +10 -0
  1958. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.4.1.rb +9 -0
  1959. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.5.0.rb +10 -0
  1960. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.6.0.rb +10 -0
  1961. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.6.2.rb +10 -0
  1962. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/syntax/versions/2.6.3.rb +10 -0
  1963. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/token.rb +35 -0
  1964. data/vendor/bundle/gems/regexp_parser-1.6.0/lib/regexp_parser/version.rb +5 -0
  1965. data/vendor/bundle/gems/regexp_parser-1.6.0/regexp_parser.gemspec +36 -0
  1966. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/base_spec.rb +94 -0
  1967. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/clone_spec.rb +120 -0
  1968. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/conditional_spec.rb +89 -0
  1969. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/free_space_spec.rb +27 -0
  1970. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/methods/match_length_spec.rb +154 -0
  1971. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/methods/match_spec.rb +25 -0
  1972. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/methods/strfregexp_spec.rb +224 -0
  1973. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/methods/tests_spec.rb +99 -0
  1974. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/methods/traverse_spec.rb +140 -0
  1975. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/options_spec.rb +128 -0
  1976. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/root_spec.rb +9 -0
  1977. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/sequence_spec.rb +9 -0
  1978. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/subexpression_spec.rb +50 -0
  1979. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/to_h_spec.rb +26 -0
  1980. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/expression/to_s_spec.rb +100 -0
  1981. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/all_spec.rb +22 -0
  1982. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/conditionals_spec.rb +53 -0
  1983. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/escapes_spec.rb +14 -0
  1984. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/keep_spec.rb +10 -0
  1985. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/literals_spec.rb +89 -0
  1986. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/nesting_spec.rb +99 -0
  1987. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/lexer/refcalls_spec.rb +55 -0
  1988. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/all_spec.rb +43 -0
  1989. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/alternation_spec.rb +88 -0
  1990. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/anchors_spec.rb +17 -0
  1991. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/conditionals_spec.rb +179 -0
  1992. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/errors_spec.rb +30 -0
  1993. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/escapes_spec.rb +121 -0
  1994. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/free_space_spec.rb +130 -0
  1995. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/groups_spec.rb +108 -0
  1996. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/keep_spec.rb +6 -0
  1997. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/posix_classes_spec.rb +8 -0
  1998. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/properties_spec.rb +115 -0
  1999. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/quantifiers_spec.rb +51 -0
  2000. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/refcalls_spec.rb +112 -0
  2001. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/set/intersections_spec.rb +127 -0
  2002. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/set/ranges_spec.rb +111 -0
  2003. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/sets_spec.rb +178 -0
  2004. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/parser/types_spec.rb +18 -0
  2005. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/all_spec.rb +18 -0
  2006. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/anchors_spec.rb +21 -0
  2007. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/conditionals_spec.rb +128 -0
  2008. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/errors_spec.rb +68 -0
  2009. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/escapes_spec.rb +53 -0
  2010. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/free_space_spec.rb +133 -0
  2011. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/groups_spec.rb +52 -0
  2012. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/keep_spec.rb +10 -0
  2013. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/literals_spec.rb +49 -0
  2014. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/meta_spec.rb +18 -0
  2015. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/properties_spec.rb +64 -0
  2016. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/quantifiers_spec.rb +20 -0
  2017. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/refcalls_spec.rb +36 -0
  2018. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/sets_spec.rb +102 -0
  2019. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/scanner/types_spec.rb +14 -0
  2020. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/spec_helper.rb +15 -0
  2021. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/support/runner.rb +42 -0
  2022. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/support/shared_examples.rb +77 -0
  2023. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/support/warning_extractor.rb +60 -0
  2024. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/syntax_spec.rb +48 -0
  2025. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/syntax_token_map_spec.rb +23 -0
  2026. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/versions/1.8.6_spec.rb +17 -0
  2027. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/versions/1.9.1_spec.rb +10 -0
  2028. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/versions/1.9.3_spec.rb +9 -0
  2029. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/versions/2.0.0_spec.rb +13 -0
  2030. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/versions/2.2.0_spec.rb +9 -0
  2031. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/syntax/versions/aliases_spec.rb +37 -0
  2032. data/vendor/bundle/gems/regexp_parser-1.6.0/spec/token/token_spec.rb +85 -0
  2033. data/vendor/bundle/gems/rspec-3.9.0/LICENSE.md +27 -0
  2034. data/vendor/bundle/gems/rspec-3.9.0/README.md +43 -0
  2035. data/vendor/bundle/gems/rspec-3.9.0/lib/rspec.rb +3 -0
  2036. data/vendor/bundle/gems/rspec-3.9.0/lib/rspec/version.rb +5 -0
  2037. data/vendor/bundle/gems/rspec-core-3.9.0/Changelog.md +2265 -0
  2038. data/vendor/bundle/gems/rspec-core-3.9.0/LICENSE.md +26 -0
  2039. data/vendor/bundle/gems/rspec-core-3.9.0/README.md +384 -0
  2040. data/vendor/bundle/gems/rspec-core-3.9.0/exe/rspec +4 -0
  2041. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/autorun.rb +3 -0
  2042. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core.rb +186 -0
  2043. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  2044. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/coordinator.rb +62 -0
  2045. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  2046. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
  2047. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/server.rb +61 -0
  2048. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/shell_command.rb +126 -0
  2049. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
  2050. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/bisect/utilities.rb +58 -0
  2051. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/configuration.rb +2336 -0
  2052. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/configuration_options.rb +233 -0
  2053. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/did_you_mean.rb +46 -0
  2054. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/drb.rb +113 -0
  2055. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/dsl.rb +98 -0
  2056. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/example.rb +656 -0
  2057. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/example_group.rb +889 -0
  2058. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/example_status_persister.rb +235 -0
  2059. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/filter_manager.rb +231 -0
  2060. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/flat_map.rb +20 -0
  2061. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters.rb +272 -0
  2062. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  2063. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  2064. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  2065. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  2066. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  2067. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/console_codes.rb +68 -0
  2068. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  2069. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
  2070. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/exception_presenter.rb +508 -0
  2071. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
  2072. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  2073. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/helpers.rb +110 -0
  2074. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  2075. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/html_printer.rb +414 -0
  2076. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  2077. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  2078. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  2079. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  2080. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/protocol.rb +182 -0
  2081. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  2082. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  2083. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/hooks.rb +632 -0
  2084. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/invocations.rb +87 -0
  2085. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/memoized_helpers.rb +554 -0
  2086. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/metadata.rb +498 -0
  2087. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/metadata_filter.rb +255 -0
  2088. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  2089. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  2090. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  2091. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  2092. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  2093. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  2094. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/notifications.rb +521 -0
  2095. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/option_parser.rb +317 -0
  2096. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/ordering.rb +158 -0
  2097. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/output_wrapper.rb +29 -0
  2098. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/pending.rb +165 -0
  2099. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/profiler.rb +34 -0
  2100. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/project_initializer.rb +48 -0
  2101. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
  2102. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/rake_task.rb +188 -0
  2103. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/reporter.rb +265 -0
  2104. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/ruby_project.rb +53 -0
  2105. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/runner.rb +204 -0
  2106. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/sandbox.rb +37 -0
  2107. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/set.rb +54 -0
  2108. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/shared_context.rb +55 -0
  2109. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/shared_example_group.rb +269 -0
  2110. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/shell_escape.rb +49 -0
  2111. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  2112. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/version.rb +9 -0
  2113. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/warnings.rb +40 -0
  2114. data/vendor/bundle/gems/rspec-core-3.9.0/lib/rspec/core/world.rb +275 -0
  2115. data/vendor/bundle/gems/rspec-expectations-3.9.0/Changelog.md +1170 -0
  2116. data/vendor/bundle/gems/rspec-expectations-3.9.0/LICENSE.md +25 -0
  2117. data/vendor/bundle/gems/rspec-expectations-3.9.0/README.md +320 -0
  2118. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations.rb +82 -0
  2119. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  2120. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/configuration.rb +215 -0
  2121. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/expectation_target.rb +127 -0
  2122. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/fail_with.rb +39 -0
  2123. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/failure_aggregator.rb +194 -0
  2124. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/handler.rb +170 -0
  2125. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/minitest_integration.rb +58 -0
  2126. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/syntax.rb +132 -0
  2127. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/expectations/version.rb +8 -0
  2128. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers.rb +1038 -0
  2129. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/aliased_matcher.rb +116 -0
  2130. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in.rb +52 -0
  2131. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/all.rb +86 -0
  2132. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  2133. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be.rb +288 -0
  2134. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_between.rb +77 -0
  2135. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
  2136. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
  2137. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_within.rb +72 -0
  2138. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/change.rb +428 -0
  2139. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/compound.rb +276 -0
  2140. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  2141. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/cover.rb +24 -0
  2142. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/eq.rb +40 -0
  2143. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/eql.rb +34 -0
  2144. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/equal.rb +81 -0
  2145. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/exist.rb +90 -0
  2146. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/has.rb +103 -0
  2147. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  2148. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/include.rb +149 -0
  2149. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/match.rb +106 -0
  2150. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/operators.rb +128 -0
  2151. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/output.rb +200 -0
  2152. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  2153. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/respond_to.rb +174 -0
  2154. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  2155. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  2156. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  2157. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/yield.rb +432 -0
  2158. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/composable.rb +171 -0
  2159. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/dsl.rb +534 -0
  2160. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/english_phrasing.rb +58 -0
  2161. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
  2162. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/fail_matchers.rb +42 -0
  2163. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/generated_descriptions.rb +41 -0
  2164. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/matcher_delegator.rb +35 -0
  2165. data/vendor/bundle/gems/rspec-expectations-3.9.0/lib/rspec/matchers/matcher_protocol.rb +99 -0
  2166. data/vendor/bundle/gems/rspec-mocks-3.9.0/Changelog.md +1125 -0
  2167. data/vendor/bundle/gems/rspec-mocks-3.9.0/LICENSE.md +25 -0
  2168. data/vendor/bundle/gems/rspec-mocks-3.9.0/README.md +463 -0
  2169. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks.rb +130 -0
  2170. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance.rb +11 -0
  2171. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/chain.rb +111 -0
  2172. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  2173. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  2174. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  2175. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  2176. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  2177. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
  2178. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  2179. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  2180. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  2181. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/argument_matchers.rb +322 -0
  2182. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/configuration.rb +212 -0
  2183. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/error_generator.rb +369 -0
  2184. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/example_methods.rb +434 -0
  2185. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  2186. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  2187. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  2188. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
  2189. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/receive.rb +132 -0
  2190. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  2191. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  2192. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/message_chain.rb +87 -0
  2193. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/message_expectation.rb +751 -0
  2194. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/method_double.rb +287 -0
  2195. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/method_reference.rb +202 -0
  2196. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/minitest_integration.rb +68 -0
  2197. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/mutate_const.rb +339 -0
  2198. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/object_reference.rb +149 -0
  2199. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/order_group.rb +81 -0
  2200. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/proxy.rb +503 -0
  2201. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/space.rb +238 -0
  2202. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/standalone.rb +3 -0
  2203. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/syntax.rb +325 -0
  2204. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/targets.rb +124 -0
  2205. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/test_double.rb +171 -0
  2206. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/verifying_double.rb +129 -0
  2207. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  2208. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
  2209. data/vendor/bundle/gems/rspec-mocks-3.9.0/lib/rspec/mocks/version.rb +9 -0
  2210. data/vendor/bundle/gems/rspec-support-3.9.0/Changelog.md +275 -0
  2211. data/vendor/bundle/gems/rspec-support-3.9.0/LICENSE.md +23 -0
  2212. data/vendor/bundle/gems/rspec-support-3.9.0/README.md +40 -0
  2213. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support.rb +149 -0
  2214. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/caller_filter.rb +83 -0
  2215. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/comparable_version.rb +46 -0
  2216. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/differ.rb +215 -0
  2217. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/directory_maker.rb +63 -0
  2218. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/encoded_string.rb +165 -0
  2219. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  2220. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/hunk_generator.rb +47 -0
  2221. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/matcher_definition.rb +42 -0
  2222. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/method_signature_verifier.rb +438 -0
  2223. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/mutex.rb +73 -0
  2224. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/object_formatter.rb +275 -0
  2225. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  2226. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/reentrant_mutex.rb +53 -0
  2227. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/ruby_features.rb +176 -0
  2228. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/source.rb +75 -0
  2229. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/source/location.rb +21 -0
  2230. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/source/node.rb +110 -0
  2231. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/source/token.rb +87 -0
  2232. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec.rb +81 -0
  2233. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  2234. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  2235. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
  2236. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  2237. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/shell_out.rb +89 -0
  2238. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  2239. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  2240. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  2241. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  2242. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/version.rb +7 -0
  2243. data/vendor/bundle/gems/rspec-support-3.9.0/lib/rspec/support/warnings.rb +39 -0
  2244. data/vendor/bundle/gems/rubyzip-2.0.0/README.md +354 -0
  2245. data/vendor/bundle/gems/rubyzip-2.0.0/Rakefile +18 -0
  2246. data/vendor/bundle/gems/rubyzip-2.0.0/TODO +15 -0
  2247. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip.rb +71 -0
  2248. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/central_directory.rb +208 -0
  2249. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/compressor.rb +9 -0
  2250. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/constants.rb +63 -0
  2251. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/crypto/encryption.rb +11 -0
  2252. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/crypto/null_encryption.rb +43 -0
  2253. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/crypto/traditional_encryption.rb +99 -0
  2254. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/decompressor.rb +13 -0
  2255. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/deflater.rb +34 -0
  2256. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/dos_time.rb +48 -0
  2257. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/entry.rb +700 -0
  2258. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/entry_set.rb +86 -0
  2259. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/errors.rb +18 -0
  2260. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field.rb +101 -0
  2261. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/generic.rb +43 -0
  2262. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/ntfs.rb +90 -0
  2263. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/old_unix.rb +44 -0
  2264. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/universal_time.rb +47 -0
  2265. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/unix.rb +37 -0
  2266. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/zip64.rb +68 -0
  2267. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/extra_field/zip64_placeholder.rb +15 -0
  2268. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/file.rb +443 -0
  2269. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/filesystem.rb +627 -0
  2270. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/inflater.rb +66 -0
  2271. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/input_stream.rb +173 -0
  2272. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/ioextras.rb +36 -0
  2273. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/ioextras/abstract_input_stream.rb +111 -0
  2274. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/ioextras/abstract_output_stream.rb +43 -0
  2275. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/null_compressor.rb +15 -0
  2276. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/null_decompressor.rb +27 -0
  2277. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/null_input_stream.rb +10 -0
  2278. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/output_stream.rb +189 -0
  2279. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/pass_thru_compressor.rb +23 -0
  2280. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/pass_thru_decompressor.rb +40 -0
  2281. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/streamable_directory.rb +15 -0
  2282. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/streamable_stream.rb +56 -0
  2283. data/vendor/bundle/gems/rubyzip-2.0.0/lib/zip/version.rb +3 -0
  2284. data/vendor/bundle/gems/rubyzip-2.0.0/samples/example.rb +81 -0
  2285. data/vendor/bundle/gems/rubyzip-2.0.0/samples/example_filesystem.rb +31 -0
  2286. data/vendor/bundle/gems/rubyzip-2.0.0/samples/example_recursive.rb +54 -0
  2287. data/vendor/bundle/gems/rubyzip-2.0.0/samples/gtk_ruby_zip.rb +84 -0
  2288. data/vendor/bundle/gems/rubyzip-2.0.0/samples/qtzip.rb +92 -0
  2289. data/vendor/bundle/gems/rubyzip-2.0.0/samples/write_simple.rb +12 -0
  2290. data/vendor/bundle/gems/rubyzip-2.0.0/samples/zipfind.rb +66 -0
  2291. data/vendor/bundle/gems/sawyer-0.8.2/Gemfile +8 -0
  2292. data/vendor/bundle/gems/sawyer-0.8.2/LICENSE.md +20 -0
  2293. data/vendor/bundle/gems/sawyer-0.8.2/README.md +62 -0
  2294. data/vendor/bundle/gems/sawyer-0.8.2/Rakefile +12 -0
  2295. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer.rb +17 -0
  2296. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/agent.rb +158 -0
  2297. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/link_parsers/hal.rb +15 -0
  2298. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/link_parsers/simple.rb +29 -0
  2299. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/relation.rb +272 -0
  2300. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/resource.rb +155 -0
  2301. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/response.rb +72 -0
  2302. data/vendor/bundle/gems/sawyer-0.8.2/lib/sawyer/serializer.rb +129 -0
  2303. data/vendor/bundle/gems/sawyer-0.8.2/sawyer.gemspec +31 -0
  2304. data/vendor/bundle/gems/sawyer-0.8.2/script/bootstrap +5 -0
  2305. data/vendor/bundle/gems/sawyer-0.8.2/script/console +8 -0
  2306. data/vendor/bundle/gems/sawyer-0.8.2/script/package +8 -0
  2307. data/vendor/bundle/gems/sawyer-0.8.2/script/release +16 -0
  2308. data/vendor/bundle/gems/sawyer-0.8.2/script/test +6 -0
  2309. data/vendor/bundle/gems/selenium-webdriver-3.142.6/CHANGES +1641 -0
  2310. data/vendor/bundle/gems/selenium-webdriver-3.142.6/Gemfile +4 -0
  2311. data/vendor/bundle/gems/selenium-webdriver-3.142.6/LICENSE +202 -0
  2312. data/vendor/bundle/gems/selenium-webdriver-3.142.6/README.md +35 -0
  2313. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium-webdriver.rb +20 -0
  2314. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/server.rb +272 -0
  2315. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver.rb +101 -0
  2316. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/atoms.rb +37 -0
  2317. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/atoms/getAttribute.js +7 -0
  2318. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/atoms/isDisplayed.js +102 -0
  2319. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome.rb +54 -0
  2320. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome/bridge.rb +68 -0
  2321. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome/driver.rb +114 -0
  2322. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome/options.rb +186 -0
  2323. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome/profile.rb +110 -0
  2324. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome/service.rb +59 -0
  2325. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common.rb +76 -0
  2326. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/action_builder.rb +365 -0
  2327. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/alert.rb +47 -0
  2328. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/bridge_helper.rb +82 -0
  2329. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver.rb +308 -0
  2330. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/downloads_files.rb +45 -0
  2331. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_addons.rb +50 -0
  2332. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_debugger.rb +42 -0
  2333. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_location.rb +40 -0
  2334. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb +51 -0
  2335. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +58 -0
  2336. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_permissions.rb +51 -0
  2337. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb +30 -0
  2338. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_session_id.rb +39 -0
  2339. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_touch_screen.rb +36 -0
  2340. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/has_web_storage.rb +38 -0
  2341. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/rotatable.rb +61 -0
  2342. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +64 -0
  2343. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/driver_extensions/uploads_files.rb +60 -0
  2344. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/element.rb +335 -0
  2345. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/error.rb +383 -0
  2346. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/file_reaper.rb +65 -0
  2347. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/html5/local_storage.rb +59 -0
  2348. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/html5/session_storage.rb +61 -0
  2349. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/html5/shared_web_storage.rb +53 -0
  2350. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/input_device.rb +54 -0
  2351. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/interaction.rb +53 -0
  2352. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/interactions.rb +43 -0
  2353. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/key_actions.rb +145 -0
  2354. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/key_input.rb +66 -0
  2355. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/none_input.rb +36 -0
  2356. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/pointer_actions.rb +363 -0
  2357. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/interactions/pointer_input.rb +139 -0
  2358. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/keyboard.rb +70 -0
  2359. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/keys.rb +146 -0
  2360. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/log_entry.rb +48 -0
  2361. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/logger.rb +115 -0
  2362. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/logs.rb +40 -0
  2363. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/manager.rb +177 -0
  2364. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/mouse.rb +89 -0
  2365. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/navigation.rb +60 -0
  2366. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/platform.rb +222 -0
  2367. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/port_prober.rb +49 -0
  2368. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/profile_helper.rb +83 -0
  2369. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/proxy.rb +162 -0
  2370. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/search_context.rb +108 -0
  2371. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/service.rb +219 -0
  2372. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/socket_lock.rb +82 -0
  2373. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/socket_poller.rb +126 -0
  2374. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/target_locator.rb +111 -0
  2375. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/timeouts.rb +55 -0
  2376. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/touch_action_builder.rb +78 -0
  2377. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/touch_screen.rb +123 -0
  2378. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/w3c_action_builder.rb +212 -0
  2379. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/w3c_manager.rb +45 -0
  2380. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/wait.rb +83 -0
  2381. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/window.rb +163 -0
  2382. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/common/zipper.rb +97 -0
  2383. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/edge.rb +44 -0
  2384. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/edge/bridge.rb +76 -0
  2385. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/edge/driver.rb +66 -0
  2386. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/edge/options.rb +80 -0
  2387. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/edge/service.rb +52 -0
  2388. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox.rb +66 -0
  2389. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/binary.rb +187 -0
  2390. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/driver.rb +50 -0
  2391. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/extension.rb +95 -0
  2392. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/extension/prefs.json +69 -0
  2393. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
  2394. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/launcher.rb +111 -0
  2395. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/legacy/driver.rb +83 -0
  2396. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/marionette/bridge.rb +49 -0
  2397. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/marionette/driver.rb +90 -0
  2398. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so +0 -0
  2399. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so +0 -0
  2400. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/options.rb +162 -0
  2401. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/profile.rb +281 -0
  2402. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/profiles_ini.rb +74 -0
  2403. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/service.rb +52 -0
  2404. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/firefox/util.rb +46 -0
  2405. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/ie.rb +41 -0
  2406. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/ie/driver.rb +85 -0
  2407. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/ie/options.rb +138 -0
  2408. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/ie/service.rb +54 -0
  2409. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote.rb +35 -0
  2410. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/bridge.rb +195 -0
  2411. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/capabilities.rb +285 -0
  2412. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/driver.rb +51 -0
  2413. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/http/common.rb +105 -0
  2414. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/http/curb.rb +97 -0
  2415. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/http/default.rb +182 -0
  2416. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/http/persistent.rb +60 -0
  2417. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/oss/bridge.rb +594 -0
  2418. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/oss/commands.rb +223 -0
  2419. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/response.rb +136 -0
  2420. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/server_error.rb +34 -0
  2421. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/w3c/bridge.rb +605 -0
  2422. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/w3c/capabilities.rb +310 -0
  2423. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/w3c/commands.rb +157 -0
  2424. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/safari.rb +65 -0
  2425. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/safari/bridge.rb +51 -0
  2426. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/safari/driver.rb +68 -0
  2427. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/safari/options.rb +60 -0
  2428. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/safari/service.rb +38 -0
  2429. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support.rb +25 -0
  2430. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support/abstract_event_listener.rb +87 -0
  2431. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support/block_event_listener.rb +34 -0
  2432. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support/color.rb +146 -0
  2433. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support/escaper.rb +43 -0
  2434. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support/event_firing_bridge.rb +129 -0
  2435. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/support/select.rb +270 -0
  2436. data/vendor/bundle/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/version.rb +24 -0
  2437. data/vendor/bundle/gems/selenium-webdriver-3.142.6/selenium-webdriver.gemspec +47 -0
  2438. data/vendor/bundle/gems/sequel-5.26.0/CHANGELOG +2571 -0
  2439. data/vendor/bundle/gems/sequel-5.26.0/MIT-LICENSE +19 -0
  2440. data/vendor/bundle/gems/sequel-5.26.0/README.rdoc +902 -0
  2441. data/vendor/bundle/gems/sequel-5.26.0/Rakefile +151 -0
  2442. data/vendor/bundle/gems/sequel-5.26.0/bin/sequel +267 -0
  2443. data/vendor/bundle/gems/sequel-5.26.0/doc/advanced_associations.rdoc +882 -0
  2444. data/vendor/bundle/gems/sequel-5.26.0/doc/association_basics.rdoc +1759 -0
  2445. data/vendor/bundle/gems/sequel-5.26.0/doc/bin_sequel.rdoc +146 -0
  2446. data/vendor/bundle/gems/sequel-5.26.0/doc/cheat_sheet.rdoc +246 -0
  2447. data/vendor/bundle/gems/sequel-5.26.0/doc/code_order.rdoc +104 -0
  2448. data/vendor/bundle/gems/sequel-5.26.0/doc/core_extensions.rdoc +405 -0
  2449. data/vendor/bundle/gems/sequel-5.26.0/doc/dataset_basics.rdoc +96 -0
  2450. data/vendor/bundle/gems/sequel-5.26.0/doc/dataset_filtering.rdoc +222 -0
  2451. data/vendor/bundle/gems/sequel-5.26.0/doc/extensions.rdoc +77 -0
  2452. data/vendor/bundle/gems/sequel-5.26.0/doc/mass_assignment.rdoc +98 -0
  2453. data/vendor/bundle/gems/sequel-5.26.0/doc/migration.rdoc +639 -0
  2454. data/vendor/bundle/gems/sequel-5.26.0/doc/model_dataset_method_design.rdoc +129 -0
  2455. data/vendor/bundle/gems/sequel-5.26.0/doc/model_hooks.rdoc +254 -0
  2456. data/vendor/bundle/gems/sequel-5.26.0/doc/model_plugins.rdoc +270 -0
  2457. data/vendor/bundle/gems/sequel-5.26.0/doc/mssql_stored_procedures.rdoc +43 -0
  2458. data/vendor/bundle/gems/sequel-5.26.0/doc/object_model.rdoc +563 -0
  2459. data/vendor/bundle/gems/sequel-5.26.0/doc/opening_databases.rdoc +414 -0
  2460. data/vendor/bundle/gems/sequel-5.26.0/doc/postgresql.rdoc +532 -0
  2461. data/vendor/bundle/gems/sequel-5.26.0/doc/prepared_statements.rdoc +144 -0
  2462. data/vendor/bundle/gems/sequel-5.26.0/doc/querying.rdoc +1063 -0
  2463. data/vendor/bundle/gems/sequel-5.26.0/doc/reflection.rdoc +120 -0
  2464. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.0.0.txt +262 -0
  2465. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.1.0.txt +85 -0
  2466. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.10.0.txt +226 -0
  2467. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.11.0.txt +147 -0
  2468. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.12.0.txt +105 -0
  2469. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.13.0.txt +169 -0
  2470. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.14.0.txt +68 -0
  2471. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.15.0.txt +56 -0
  2472. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.16.0.txt +36 -0
  2473. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.17.0.txt +38 -0
  2474. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.18.0.txt +36 -0
  2475. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.19.0.txt +45 -0
  2476. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.2.0.txt +129 -0
  2477. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.20.0.txt +79 -0
  2478. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.21.0.txt +94 -0
  2479. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.22.0.txt +72 -0
  2480. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.23.0.txt +65 -0
  2481. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.24.0.txt +99 -0
  2482. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.25.0.txt +181 -0
  2483. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.26.0.txt +44 -0
  2484. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.27.0.txt +78 -0
  2485. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.28.0.txt +57 -0
  2486. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.29.0.txt +41 -0
  2487. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.3.0.txt +40 -0
  2488. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.30.0.txt +37 -0
  2489. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.31.0.txt +57 -0
  2490. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.32.0.txt +132 -0
  2491. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.33.0.txt +88 -0
  2492. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.34.0.txt +86 -0
  2493. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.35.0.txt +130 -0
  2494. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.36.0.txt +116 -0
  2495. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.37.0.txt +50 -0
  2496. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.38.0.txt +67 -0
  2497. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.39.0.txt +127 -0
  2498. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.4.0.txt +92 -0
  2499. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.40.0.txt +179 -0
  2500. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.41.0.txt +77 -0
  2501. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.42.0.txt +221 -0
  2502. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.43.0.txt +87 -0
  2503. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.44.0.txt +125 -0
  2504. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.45.0.txt +370 -0
  2505. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.46.0.txt +404 -0
  2506. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.47.0.txt +56 -0
  2507. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.48.0.txt +293 -0
  2508. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.49.0.txt +222 -0
  2509. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.5.0.txt +34 -0
  2510. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.6.0.txt +30 -0
  2511. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.7.0.txt +103 -0
  2512. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.8.0.txt +175 -0
  2513. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/4.9.0.txt +190 -0
  2514. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.0.0.txt +159 -0
  2515. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.1.0.txt +31 -0
  2516. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.10.0.txt +84 -0
  2517. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.11.0.txt +83 -0
  2518. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.12.0.txt +141 -0
  2519. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.13.0.txt +27 -0
  2520. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.14.0.txt +63 -0
  2521. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.15.0.txt +39 -0
  2522. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.16.0.txt +110 -0
  2523. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.17.0.txt +31 -0
  2524. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.18.0.txt +69 -0
  2525. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.19.0.txt +28 -0
  2526. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.2.0.txt +33 -0
  2527. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.20.0.txt +89 -0
  2528. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.21.0.txt +87 -0
  2529. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.22.0.txt +48 -0
  2530. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.23.0.txt +56 -0
  2531. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.24.0.txt +56 -0
  2532. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.25.0.txt +32 -0
  2533. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.26.0.txt +35 -0
  2534. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.3.0.txt +121 -0
  2535. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.4.0.txt +80 -0
  2536. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.5.0.txt +61 -0
  2537. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.6.0.txt +31 -0
  2538. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.7.0.txt +108 -0
  2539. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.8.0.txt +170 -0
  2540. data/vendor/bundle/gems/sequel-5.26.0/doc/release_notes/5.9.0.txt +99 -0
  2541. data/vendor/bundle/gems/sequel-5.26.0/doc/schema_modification.rdoc +679 -0
  2542. data/vendor/bundle/gems/sequel-5.26.0/doc/security.rdoc +443 -0
  2543. data/vendor/bundle/gems/sequel-5.26.0/doc/sharding.rdoc +284 -0
  2544. data/vendor/bundle/gems/sequel-5.26.0/doc/sql.rdoc +636 -0
  2545. data/vendor/bundle/gems/sequel-5.26.0/doc/testing.rdoc +172 -0
  2546. data/vendor/bundle/gems/sequel-5.26.0/doc/thread_safety.rdoc +15 -0
  2547. data/vendor/bundle/gems/sequel-5.26.0/doc/transactions.rdoc +258 -0
  2548. data/vendor/bundle/gems/sequel-5.26.0/doc/validations.rdoc +558 -0
  2549. data/vendor/bundle/gems/sequel-5.26.0/doc/virtual_rows.rdoc +265 -0
  2550. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel.rb +3 -0
  2551. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/ado.rb +283 -0
  2552. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/ado/access.rb +335 -0
  2553. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/ado/mssql.rb +62 -0
  2554. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/amalgalite.rb +171 -0
  2555. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/ibmdb.rb +422 -0
  2556. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc.rb +822 -0
  2557. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/db2.rb +83 -0
  2558. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/derby.rb +310 -0
  2559. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/h2.rb +237 -0
  2560. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/hsqldb.rb +220 -0
  2561. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/jtds.rb +39 -0
  2562. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/mssql.rb +30 -0
  2563. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/mysql.rb +89 -0
  2564. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/oracle.rb +146 -0
  2565. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/postgresql.rb +230 -0
  2566. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/sqlanywhere.rb +72 -0
  2567. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/sqlite.rb +133 -0
  2568. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/sqlserver.rb +88 -0
  2569. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/jdbc/transactions.rb +95 -0
  2570. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/mock.rb +381 -0
  2571. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/mysql.rb +355 -0
  2572. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/mysql2.rb +295 -0
  2573. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/odbc.rb +148 -0
  2574. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/odbc/db2.rb +11 -0
  2575. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/odbc/mssql.rb +57 -0
  2576. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/odbc/oracle.rb +11 -0
  2577. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/oracle.rb +409 -0
  2578. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/postgres.rb +814 -0
  2579. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/postgresql.rb +3 -0
  2580. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/access.rb +290 -0
  2581. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/db2.rb +462 -0
  2582. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/mssql.rb +1086 -0
  2583. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/mysql.rb +1061 -0
  2584. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/oracle.rb +646 -0
  2585. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/postgres.rb +1991 -0
  2586. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/sqlanywhere.rb +454 -0
  2587. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/shared/sqlite.rb +911 -0
  2588. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/sqlanywhere.rb +192 -0
  2589. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/sqlite.rb +376 -0
  2590. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/tinytds.rb +258 -0
  2591. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/emulate_offset_with_reverse_and_count.rb +74 -0
  2592. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb +93 -0
  2593. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/mysql_mysql2.rb +86 -0
  2594. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/mysql_prepared_statements.rb +56 -0
  2595. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/replace.rb +35 -0
  2596. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/split_alter_table.rb +46 -0
  2597. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/stored_procedures.rb +61 -0
  2598. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/adapters/utils/unmodified_identifiers.rb +28 -0
  2599. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/ast_transformer.rb +124 -0
  2600. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/connection_pool.rb +143 -0
  2601. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/connection_pool/sharded_single.rb +112 -0
  2602. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/connection_pool/sharded_threaded.rb +371 -0
  2603. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/connection_pool/single.rb +59 -0
  2604. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/connection_pool/threaded.rb +285 -0
  2605. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/core.rb +434 -0
  2606. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database.rb +37 -0
  2607. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/connecting.rb +332 -0
  2608. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/dataset.rb +79 -0
  2609. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/dataset_defaults.rb +93 -0
  2610. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/features.rb +150 -0
  2611. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/logging.rb +91 -0
  2612. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/misc.rb +551 -0
  2613. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/query.rb +363 -0
  2614. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/schema_generator.rb +652 -0
  2615. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/schema_methods.rb +1056 -0
  2616. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/database/transactions.rb +547 -0
  2617. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset.rb +56 -0
  2618. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/actions.rb +1240 -0
  2619. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/dataset_module.rb +46 -0
  2620. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/features.rb +249 -0
  2621. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/graph.rb +296 -0
  2622. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/misc.rb +371 -0
  2623. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/placeholder_literalizer.rb +223 -0
  2624. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/prepared_statements.rb +427 -0
  2625. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/query.rb +1369 -0
  2626. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/dataset/sql.rb +1672 -0
  2627. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/deprecated.rb +68 -0
  2628. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/exceptions.rb +123 -0
  2629. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/_model_constraint_validations.rb +16 -0
  2630. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/_model_pg_row.rb +43 -0
  2631. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/_pretty_table.rb +86 -0
  2632. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/arbitrary_servers.rb +114 -0
  2633. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/auto_literal_strings.rb +74 -0
  2634. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/blank.rb +49 -0
  2635. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/caller_logging.rb +79 -0
  2636. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/columns_introspection.rb +89 -0
  2637. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/connection_expiration.rb +99 -0
  2638. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/connection_validator.rb +123 -0
  2639. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/constant_sql_override.rb +65 -0
  2640. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/constraint_validations.rb +510 -0
  2641. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/core_extensions.rb +222 -0
  2642. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/core_refinements.rb +217 -0
  2643. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/current_datetime_timestamp.rb +59 -0
  2644. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/dataset_source_alias.rb +95 -0
  2645. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/date_arithmetic.rb +214 -0
  2646. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/datetime_parse_to_time.rb +37 -0
  2647. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/duplicate_columns_handler.rb +92 -0
  2648. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/empty_array_consider_nulls.rb +39 -0
  2649. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/error_sql.rb +76 -0
  2650. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/escaped_like.rb +100 -0
  2651. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/eval_inspect.rb +181 -0
  2652. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/freeze_datasets.rb +3 -0
  2653. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/from_block.rb +3 -0
  2654. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/graph_each.rb +88 -0
  2655. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/identifier_mangling.rb +180 -0
  2656. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/implicit_subquery.rb +48 -0
  2657. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/index_caching.rb +107 -0
  2658. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/inflector.rb +250 -0
  2659. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/integer64.rb +30 -0
  2660. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/looser_typecasting.rb +54 -0
  2661. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/migration.rb +786 -0
  2662. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/mssql_emulate_lateral_with_apply.rb +84 -0
  2663. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/named_timezones.rb +164 -0
  2664. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/no_auto_literal_strings.rb +4 -0
  2665. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/null_dataset.rb +109 -0
  2666. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pagination.rb +140 -0
  2667. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_array.rb +526 -0
  2668. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_array_ops.rb +328 -0
  2669. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_enum.rb +192 -0
  2670. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_extended_date_support.rb +250 -0
  2671. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_hstore.rb +342 -0
  2672. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_hstore_ops.rb +361 -0
  2673. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_inet.rb +127 -0
  2674. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_inet_ops.rb +204 -0
  2675. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_interval.rb +196 -0
  2676. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_json.rb +646 -0
  2677. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_json_ops.rb +637 -0
  2678. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_loose_count.rb +37 -0
  2679. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_range.rb +575 -0
  2680. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_range_ops.rb +165 -0
  2681. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_row.rb +582 -0
  2682. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_row_ops.rb +193 -0
  2683. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_static_cache_updater.rb +144 -0
  2684. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pg_timestamptz.rb +26 -0
  2685. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/pretty_table.rb +40 -0
  2686. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/query.rb +82 -0
  2687. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/round_timestamps.rb +49 -0
  2688. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/s.rb +57 -0
  2689. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/schema_caching.rb +88 -0
  2690. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/schema_dumper.rb +498 -0
  2691. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/select_remove.rb +52 -0
  2692. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/sequel_4_dataset_methods.rb +85 -0
  2693. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/server_block.rb +182 -0
  2694. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/server_logging.rb +61 -0
  2695. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/split_array_nil.rb +70 -0
  2696. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/sql_comments.rb +96 -0
  2697. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/sql_expr.rb +23 -0
  2698. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/string_agg.rb +181 -0
  2699. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/string_date_time.rb +52 -0
  2700. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/symbol_aref.rb +53 -0
  2701. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/symbol_aref_refinement.rb +41 -0
  2702. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/symbol_as.rb +23 -0
  2703. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/symbol_as_refinement.rb +35 -0
  2704. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/synchronize_sql.rb +45 -0
  2705. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/thread_local_timezones.rb +59 -0
  2706. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/to_dot.rb +158 -0
  2707. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/extensions/virtual_row_method_block.rb +44 -0
  2708. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model.rb +83 -0
  2709. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/associations.rb +3761 -0
  2710. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/base.rb +2232 -0
  2711. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/dataset_module.rb +33 -0
  2712. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/default_inflections.rb +47 -0
  2713. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/errors.rb +58 -0
  2714. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/exceptions.rb +55 -0
  2715. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/inflections.rb +151 -0
  2716. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/model/plugins.rb +159 -0
  2717. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/accessed_columns.rb +63 -0
  2718. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/active_model.rb +124 -0
  2719. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/after_initialize.rb +39 -0
  2720. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/association_dependencies.rb +106 -0
  2721. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/association_multi_add_remove.rb +83 -0
  2722. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/association_pks.rb +274 -0
  2723. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/association_proxies.rb +126 -0
  2724. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/auto_validations.rb +230 -0
  2725. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/before_after_save.rb +8 -0
  2726. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/blacklist_security.rb +105 -0
  2727. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/boolean_readers.rb +59 -0
  2728. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/boolean_subsets.rb +61 -0
  2729. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/caching.rb +164 -0
  2730. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/class_table_inheritance.rb +444 -0
  2731. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/column_conflicts.rb +108 -0
  2732. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/column_select.rb +61 -0
  2733. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/columns_updated.rb +42 -0
  2734. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/composition.rb +199 -0
  2735. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/constraint_validations.rb +250 -0
  2736. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/csv_serializer.rb +194 -0
  2737. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/dataset_associations.rb +149 -0
  2738. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/def_dataset_method.rb +90 -0
  2739. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/defaults_setter.rb +130 -0
  2740. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/delay_add_association.rb +53 -0
  2741. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/dirty.rb +232 -0
  2742. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/eager_each.rb +88 -0
  2743. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/eager_graph_eager.rb +139 -0
  2744. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/error_splitter.rb +61 -0
  2745. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/finder.rb +246 -0
  2746. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/force_encoding.rb +78 -0
  2747. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/hook_class_methods.rb +110 -0
  2748. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/input_transformer.rb +89 -0
  2749. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/insert_conflict.rb +72 -0
  2750. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/insert_returning_select.rb +72 -0
  2751. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/instance_filters.rb +135 -0
  2752. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/instance_hooks.rb +115 -0
  2753. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/inverted_subsets.rb +59 -0
  2754. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/json_serializer.rb +429 -0
  2755. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/lazy_attributes.rb +123 -0
  2756. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/list.rb +203 -0
  2757. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/many_through_many.rb +338 -0
  2758. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/modification_detection.rb +102 -0
  2759. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/mssql_optimistic_locking.rb +95 -0
  2760. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/nested_attributes.rb +330 -0
  2761. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/optimistic_locking.rb +85 -0
  2762. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/pg_array_associations.rb +563 -0
  2763. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/pg_auto_constraint_validations.rb +348 -0
  2764. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/pg_row.rb +79 -0
  2765. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/prepared_statements.rb +192 -0
  2766. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/prepared_statements_safe.rb +83 -0
  2767. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/rcte_tree.rb +338 -0
  2768. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/serialization.rb +230 -0
  2769. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/serialization_modification_detection.rb +86 -0
  2770. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/sharding.rb +126 -0
  2771. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/single_table_inheritance.rb +256 -0
  2772. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/singular_table_names.rb +33 -0
  2773. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/skip_create_refresh.rb +37 -0
  2774. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/split_values.rb +71 -0
  2775. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/static_cache.rb +264 -0
  2776. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/static_cache_cache.rb +53 -0
  2777. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/string_stripper.rb +59 -0
  2778. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/subclasses.rb +77 -0
  2779. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/subset_conditions.rb +48 -0
  2780. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/table_select.rb +43 -0
  2781. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/tactical_eager_loading.rb +199 -0
  2782. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/throw_failures.rb +110 -0
  2783. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/timestamps.rb +109 -0
  2784. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/touch.rb +153 -0
  2785. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/tree.rb +183 -0
  2786. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/typecast_on_load.rb +90 -0
  2787. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/unlimited_update.rb +27 -0
  2788. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/update_or_create.rb +64 -0
  2789. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/update_primary_key.rb +72 -0
  2790. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/update_refresh.rb +88 -0
  2791. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/uuid.rb +70 -0
  2792. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/validate_associated.rb +75 -0
  2793. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/validation_class_methods.rb +456 -0
  2794. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/validation_contexts.rb +49 -0
  2795. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/validation_helpers.rb +317 -0
  2796. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/whitelist_security.rb +122 -0
  2797. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/plugins/xml_serializer.rb +411 -0
  2798. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/sql.rb +2048 -0
  2799. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/timezones.rb +249 -0
  2800. data/vendor/bundle/gems/sequel-5.26.0/lib/sequel/version.rb +25 -0
  2801. data/vendor/bundle/gems/sequel-5.26.0/spec/adapter_spec.rb +4 -0
  2802. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/db2_spec.rb +170 -0
  2803. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/mssql_spec.rb +828 -0
  2804. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/mysql_spec.rb +1060 -0
  2805. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/oracle_spec.rb +371 -0
  2806. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/postgres_spec.rb +4478 -0
  2807. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/spec_helper.rb +44 -0
  2808. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/sqlanywhere_spec.rb +97 -0
  2809. data/vendor/bundle/gems/sequel-5.26.0/spec/adapters/sqlite_spec.rb +652 -0
  2810. data/vendor/bundle/gems/sequel-5.26.0/spec/bin_spec.rb +278 -0
  2811. data/vendor/bundle/gems/sequel-5.26.0/spec/core/connection_pool_spec.rb +1250 -0
  2812. data/vendor/bundle/gems/sequel-5.26.0/spec/core/database_spec.rb +2915 -0
  2813. data/vendor/bundle/gems/sequel-5.26.0/spec/core/dataset_spec.rb +5547 -0
  2814. data/vendor/bundle/gems/sequel-5.26.0/spec/core/deprecated_spec.rb +70 -0
  2815. data/vendor/bundle/gems/sequel-5.26.0/spec/core/expression_filters_spec.rb +1484 -0
  2816. data/vendor/bundle/gems/sequel-5.26.0/spec/core/mock_adapter_spec.rb +722 -0
  2817. data/vendor/bundle/gems/sequel-5.26.0/spec/core/object_graph_spec.rb +336 -0
  2818. data/vendor/bundle/gems/sequel-5.26.0/spec/core/placeholder_literalizer_spec.rb +166 -0
  2819. data/vendor/bundle/gems/sequel-5.26.0/spec/core/schema_generator_spec.rb +214 -0
  2820. data/vendor/bundle/gems/sequel-5.26.0/spec/core/schema_spec.rb +1844 -0
  2821. data/vendor/bundle/gems/sequel-5.26.0/spec/core/spec_helper.rb +24 -0
  2822. data/vendor/bundle/gems/sequel-5.26.0/spec/core/version_spec.rb +14 -0
  2823. data/vendor/bundle/gems/sequel-5.26.0/spec/core_extensions_spec.rb +763 -0
  2824. data/vendor/bundle/gems/sequel-5.26.0/spec/core_model_spec.rb +2 -0
  2825. data/vendor/bundle/gems/sequel-5.26.0/spec/core_spec.rb +1 -0
  2826. data/vendor/bundle/gems/sequel-5.26.0/spec/deprecation_helper.rb +30 -0
  2827. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/accessed_columns_spec.rb +51 -0
  2828. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/active_model_spec.rb +99 -0
  2829. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/after_initialize_spec.rb +28 -0
  2830. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/arbitrary_servers_spec.rb +109 -0
  2831. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/association_dependencies_spec.rb +125 -0
  2832. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/association_multi_add_remove_spec.rb +1041 -0
  2833. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/association_pks_spec.rb +423 -0
  2834. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/association_proxies_spec.rb +100 -0
  2835. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/auto_literal_strings_spec.rb +205 -0
  2836. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/auto_validations_spec.rb +229 -0
  2837. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/blacklist_security_spec.rb +95 -0
  2838. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/blank_spec.rb +69 -0
  2839. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/boolean_readers_spec.rb +93 -0
  2840. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/boolean_subsets_spec.rb +47 -0
  2841. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/caching_spec.rb +273 -0
  2842. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/caller_logging_spec.rb +52 -0
  2843. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/class_table_inheritance_spec.rb +750 -0
  2844. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/column_conflicts_spec.rb +75 -0
  2845. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/column_select_spec.rb +129 -0
  2846. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/columns_introspection_spec.rb +90 -0
  2847. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/columns_updated_spec.rb +35 -0
  2848. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/composition_spec.rb +248 -0
  2849. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/connection_expiration_spec.rb +151 -0
  2850. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/connection_validator_spec.rb +144 -0
  2851. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/constant_sql_override_spec.rb +24 -0
  2852. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/constraint_validations_plugin_spec.rb +300 -0
  2853. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/constraint_validations_spec.rb +439 -0
  2854. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/core_refinements_spec.rb +528 -0
  2855. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/csv_serializer_spec.rb +183 -0
  2856. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/current_datetime_timestamp_spec.rb +27 -0
  2857. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/dataset_associations_spec.rb +365 -0
  2858. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/dataset_source_alias_spec.rb +51 -0
  2859. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/date_arithmetic_spec.rb +181 -0
  2860. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/datetime_parse_to_time_spec.rb +169 -0
  2861. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/def_dataset_method_spec.rb +100 -0
  2862. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/defaults_setter_spec.rb +150 -0
  2863. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/delay_add_association_spec.rb +73 -0
  2864. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/dirty_spec.rb +222 -0
  2865. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/duplicate_columns_handler_spec.rb +104 -0
  2866. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/eager_each_spec.rb +62 -0
  2867. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/eager_graph_eager_spec.rb +100 -0
  2868. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/empty_array_consider_nulls_spec.rb +24 -0
  2869. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/error_splitter_spec.rb +18 -0
  2870. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/error_sql_spec.rb +20 -0
  2871. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/escaped_like_spec.rb +40 -0
  2872. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/eval_inspect_spec.rb +81 -0
  2873. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/finder_spec.rb +260 -0
  2874. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/force_encoding_spec.rb +126 -0
  2875. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/freeze_datasets_spec.rb +31 -0
  2876. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/graph_each_spec.rb +113 -0
  2877. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/hook_class_methods_spec.rb +402 -0
  2878. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/identifier_mangling_spec.rb +201 -0
  2879. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/implicit_subquery_spec.rb +58 -0
  2880. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/index_caching_spec.rb +66 -0
  2881. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/inflector_spec.rb +183 -0
  2882. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/input_transformer_spec.rb +69 -0
  2883. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/insert_conflict_spec.rb +103 -0
  2884. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/insert_returning_select_spec.rb +72 -0
  2885. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/instance_filters_spec.rb +79 -0
  2886. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/instance_hooks_spec.rb +246 -0
  2887. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/integer64_spec.rb +22 -0
  2888. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/inverted_subsets_spec.rb +33 -0
  2889. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/json_serializer_spec.rb +336 -0
  2890. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/lazy_attributes_spec.rb +183 -0
  2891. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/list_spec.rb +291 -0
  2892. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/looser_typecasting_spec.rb +43 -0
  2893. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/many_through_many_spec.rb +2177 -0
  2894. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/migration_spec.rb +864 -0
  2895. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/modification_detection_spec.rb +93 -0
  2896. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/mssql_optimistic_locking_spec.rb +92 -0
  2897. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/named_timezones_spec.rb +218 -0
  2898. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/nested_attributes_spec.rb +815 -0
  2899. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/null_dataset_spec.rb +85 -0
  2900. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/optimistic_locking_spec.rb +127 -0
  2901. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pagination_spec.rb +116 -0
  2902. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_array_associations_spec.rb +802 -0
  2903. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_array_ops_spec.rb +144 -0
  2904. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_array_spec.rb +398 -0
  2905. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_auto_constraint_validations_spec.rb +209 -0
  2906. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_enum_spec.rb +118 -0
  2907. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_extended_date_support_spec.rb +126 -0
  2908. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_hstore_ops_spec.rb +238 -0
  2909. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_hstore_spec.rb +219 -0
  2910. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_inet_ops_spec.rb +102 -0
  2911. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_inet_spec.rb +72 -0
  2912. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_interval_spec.rb +103 -0
  2913. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_json_ops_spec.rb +356 -0
  2914. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_json_spec.rb +451 -0
  2915. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_loose_count_spec.rb +23 -0
  2916. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_range_ops_spec.rb +60 -0
  2917. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_range_spec.rb +600 -0
  2918. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_row_ops_spec.rb +61 -0
  2919. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_row_plugin_spec.rb +60 -0
  2920. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_row_spec.rb +363 -0
  2921. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_static_cache_updater_spec.rb +93 -0
  2922. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pg_timestamptz_spec.rb +17 -0
  2923. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/prepared_statements_safe_spec.rb +66 -0
  2924. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/prepared_statements_spec.rb +177 -0
  2925. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/pretty_table_spec.rb +123 -0
  2926. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/query_spec.rb +94 -0
  2927. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/rcte_tree_spec.rb +387 -0
  2928. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/round_timestamps_spec.rb +39 -0
  2929. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/s_spec.rb +60 -0
  2930. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/schema_caching_spec.rb +64 -0
  2931. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/schema_dumper_spec.rb +870 -0
  2932. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/select_remove_spec.rb +38 -0
  2933. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/sequel_4_dataset_methods_spec.rb +121 -0
  2934. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/serialization_modification_detection_spec.rb +98 -0
  2935. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/serialization_spec.rb +365 -0
  2936. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/server_block_spec.rb +135 -0
  2937. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/server_logging_spec.rb +45 -0
  2938. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/sharding_spec.rb +197 -0
  2939. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/shared_caching_spec.rb +151 -0
  2940. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/single_table_inheritance_spec.rb +347 -0
  2941. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/singular_table_names_spec.rb +22 -0
  2942. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/skip_create_refresh_spec.rb +18 -0
  2943. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/spec_helper.rb +70 -0
  2944. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/split_array_nil_spec.rb +24 -0
  2945. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/split_values_spec.rb +57 -0
  2946. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/sql_comments_spec.rb +33 -0
  2947. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/sql_expr_spec.rb +59 -0
  2948. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/static_cache_cache_spec.rb +35 -0
  2949. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/static_cache_spec.rb +471 -0
  2950. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/string_agg_spec.rb +90 -0
  2951. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/string_date_time_spec.rb +95 -0
  2952. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/string_stripper_spec.rb +68 -0
  2953. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/subclasses_spec.rb +79 -0
  2954. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/subset_conditions_spec.rb +38 -0
  2955. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/symbol_aref_refinement_spec.rb +28 -0
  2956. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/symbol_as_refinement_spec.rb +21 -0
  2957. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/synchronize_sql_spec.rb +124 -0
  2958. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/table_select_spec.rb +83 -0
  2959. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/tactical_eager_loading_spec.rb +402 -0
  2960. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/thread_local_timezones_spec.rb +67 -0
  2961. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/throw_failures_spec.rb +74 -0
  2962. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/timestamps_spec.rb +209 -0
  2963. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/to_dot_spec.rb +153 -0
  2964. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/touch_spec.rb +226 -0
  2965. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/tree_spec.rb +334 -0
  2966. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/typecast_on_load_spec.rb +86 -0
  2967. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/unlimited_update_spec.rb +21 -0
  2968. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/update_or_create_spec.rb +83 -0
  2969. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/update_primary_key_spec.rb +105 -0
  2970. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/update_refresh_spec.rb +59 -0
  2971. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/uuid_spec.rb +101 -0
  2972. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/validate_associated_spec.rb +52 -0
  2973. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/validation_class_methods_spec.rb +1040 -0
  2974. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/validation_contexts_spec.rb +31 -0
  2975. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/validation_helpers_spec.rb +525 -0
  2976. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/whitelist_security_spec.rb +157 -0
  2977. data/vendor/bundle/gems/sequel-5.26.0/spec/extensions/xml_serializer_spec.rb +213 -0
  2978. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_down_migration/001_create_alt_basic.rb +4 -0
  2979. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_down_migration/002_create_alt_advanced.rb +4 -0
  2980. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  2981. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_timestamped_migrations/1273253851_create_nodes.rb +9 -0
  2982. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_timestamped_migrations/1273253853_3_create_users.rb +3 -0
  2983. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_up_migration/001_create_alt_basic.rb +4 -0
  2984. data/vendor/bundle/gems/sequel-5.26.0/spec/files/bad_up_migration/002_create_alt_advanced.rb +3 -0
  2985. data/vendor/bundle/gems/sequel-5.26.0/spec/files/convert_to_timestamp_migrations/001_create_sessions.rb +9 -0
  2986. data/vendor/bundle/gems/sequel-5.26.0/spec/files/convert_to_timestamp_migrations/002_create_nodes.rb +9 -0
  2987. data/vendor/bundle/gems/sequel-5.26.0/spec/files/convert_to_timestamp_migrations/003_3_create_users.rb +4 -0
  2988. data/vendor/bundle/gems/sequel-5.26.0/spec/files/convert_to_timestamp_migrations/1273253850_create_artists.rb +9 -0
  2989. data/vendor/bundle/gems/sequel-5.26.0/spec/files/convert_to_timestamp_migrations/1273253852_create_albums.rb +9 -0
  2990. data/vendor/bundle/gems/sequel-5.26.0/spec/files/double_migration/001_create_sessions.rb +9 -0
  2991. data/vendor/bundle/gems/sequel-5.26.0/spec/files/double_migration/002_create_nodes.rb +19 -0
  2992. data/vendor/bundle/gems/sequel-5.26.0/spec/files/double_migration/003_3_create_users.rb +4 -0
  2993. data/vendor/bundle/gems/sequel-5.26.0/spec/files/duplicate_integer_migrations/001_create_alt_advanced.rb +4 -0
  2994. data/vendor/bundle/gems/sequel-5.26.0/spec/files/duplicate_integer_migrations/001_create_alt_basic.rb +4 -0
  2995. data/vendor/bundle/gems/sequel-5.26.0/spec/files/duplicate_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  2996. data/vendor/bundle/gems/sequel-5.26.0/spec/files/duplicate_timestamped_migrations/1273253853_create_nodes.rb +9 -0
  2997. data/vendor/bundle/gems/sequel-5.26.0/spec/files/duplicate_timestamped_migrations/1273253853_create_users.rb +4 -0
  2998. data/vendor/bundle/gems/sequel-5.26.0/spec/files/empty_migration/001_create_sessions.rb +9 -0
  2999. data/vendor/bundle/gems/sequel-5.26.0/spec/files/empty_migration/002_create_nodes.rb +0 -0
  3000. data/vendor/bundle/gems/sequel-5.26.0/spec/files/empty_migration/003_3_create_users.rb +4 -0
  3001. data/vendor/bundle/gems/sequel-5.26.0/spec/files/integer_migrations/001_create_sessions.rb +9 -0
  3002. data/vendor/bundle/gems/sequel-5.26.0/spec/files/integer_migrations/002_create_nodes.rb +9 -0
  3003. data/vendor/bundle/gems/sequel-5.26.0/spec/files/integer_migrations/003_3_create_users.rb +4 -0
  3004. data/vendor/bundle/gems/sequel-5.26.0/spec/files/interleaved_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  3005. data/vendor/bundle/gems/sequel-5.26.0/spec/files/interleaved_timestamped_migrations/1273253850_create_artists.rb +9 -0
  3006. data/vendor/bundle/gems/sequel-5.26.0/spec/files/interleaved_timestamped_migrations/1273253851_create_nodes.rb +9 -0
  3007. data/vendor/bundle/gems/sequel-5.26.0/spec/files/interleaved_timestamped_migrations/1273253852_create_albums.rb +9 -0
  3008. data/vendor/bundle/gems/sequel-5.26.0/spec/files/interleaved_timestamped_migrations/1273253853_3_create_users.rb +4 -0
  3009. data/vendor/bundle/gems/sequel-5.26.0/spec/files/missing_integer_migrations/001_create_alt_basic.rb +4 -0
  3010. data/vendor/bundle/gems/sequel-5.26.0/spec/files/missing_integer_migrations/003_create_alt_advanced.rb +4 -0
  3011. data/vendor/bundle/gems/sequel-5.26.0/spec/files/missing_timestamped_migrations/1273253849_create_sessions.rb +9 -0
  3012. data/vendor/bundle/gems/sequel-5.26.0/spec/files/missing_timestamped_migrations/1273253853_3_create_users.rb +4 -0
  3013. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/001_reversible.rb +5 -0
  3014. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/002_reversible.rb +5 -0
  3015. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/003_reversible.rb +5 -0
  3016. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/004_reversible.rb +5 -0
  3017. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/005_reversible.rb +10 -0
  3018. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/006_reversible.rb +10 -0
  3019. data/vendor/bundle/gems/sequel-5.26.0/spec/files/reversible_migrations/007_reversible.rb +10 -0
  3020. data/vendor/bundle/gems/sequel-5.26.0/spec/files/timestamped_migrations/1273253849_create_sessions.rb +9 -0
  3021. data/vendor/bundle/gems/sequel-5.26.0/spec/files/timestamped_migrations/1273253851_create_nodes.rb +9 -0
  3022. data/vendor/bundle/gems/sequel-5.26.0/spec/files/timestamped_migrations/1273253853_3_create_users.rb +4 -0
  3023. data/vendor/bundle/gems/sequel-5.26.0/spec/files/transaction_specified_migrations/001_create_alt_basic.rb +4 -0
  3024. data/vendor/bundle/gems/sequel-5.26.0/spec/files/transaction_specified_migrations/002_create_basic.rb +4 -0
  3025. data/vendor/bundle/gems/sequel-5.26.0/spec/files/transaction_unspecified_migrations/001_create_alt_basic.rb +3 -0
  3026. data/vendor/bundle/gems/sequel-5.26.0/spec/files/transaction_unspecified_migrations/002_create_basic.rb +3 -0
  3027. data/vendor/bundle/gems/sequel-5.26.0/spec/files/uppercase_timestamped_migrations/1273253849_CREATE_SESSIONS.RB +9 -0
  3028. data/vendor/bundle/gems/sequel-5.26.0/spec/files/uppercase_timestamped_migrations/1273253851_CREATE_NODES.RB +9 -0
  3029. data/vendor/bundle/gems/sequel-5.26.0/spec/files/uppercase_timestamped_migrations/1273253853_3_CREATE_USERS.RB +4 -0
  3030. data/vendor/bundle/gems/sequel-5.26.0/spec/guards_helper.rb +59 -0
  3031. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/associations_test.rb +2597 -0
  3032. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/database_test.rb +113 -0
  3033. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/dataset_test.rb +1997 -0
  3034. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/eager_loader_test.rb +687 -0
  3035. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/migrator_test.rb +262 -0
  3036. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/model_test.rb +203 -0
  3037. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/plugin_test.rb +2423 -0
  3038. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/prepared_statement_test.rb +405 -0
  3039. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/schema_test.rb +903 -0
  3040. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/spec_helper.rb +65 -0
  3041. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/timezone_test.rb +86 -0
  3042. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/transaction_test.rb +603 -0
  3043. data/vendor/bundle/gems/sequel-5.26.0/spec/integration/type_test.rb +127 -0
  3044. data/vendor/bundle/gems/sequel-5.26.0/spec/model/association_reflection_spec.rb +803 -0
  3045. data/vendor/bundle/gems/sequel-5.26.0/spec/model/associations_spec.rb +4738 -0
  3046. data/vendor/bundle/gems/sequel-5.26.0/spec/model/base_spec.rb +875 -0
  3047. data/vendor/bundle/gems/sequel-5.26.0/spec/model/class_dataset_methods_spec.rb +146 -0
  3048. data/vendor/bundle/gems/sequel-5.26.0/spec/model/dataset_methods_spec.rb +198 -0
  3049. data/vendor/bundle/gems/sequel-5.26.0/spec/model/eager_loading_spec.rb +2377 -0
  3050. data/vendor/bundle/gems/sequel-5.26.0/spec/model/hooks_spec.rb +370 -0
  3051. data/vendor/bundle/gems/sequel-5.26.0/spec/model/inflector_spec.rb +26 -0
  3052. data/vendor/bundle/gems/sequel-5.26.0/spec/model/model_spec.rb +956 -0
  3053. data/vendor/bundle/gems/sequel-5.26.0/spec/model/plugins_spec.rb +429 -0
  3054. data/vendor/bundle/gems/sequel-5.26.0/spec/model/record_spec.rb +2118 -0
  3055. data/vendor/bundle/gems/sequel-5.26.0/spec/model/spec_helper.rb +46 -0
  3056. data/vendor/bundle/gems/sequel-5.26.0/spec/model/validations_spec.rb +220 -0
  3057. data/vendor/bundle/gems/sequel-5.26.0/spec/model_no_assoc_spec.rb +1 -0
  3058. data/vendor/bundle/gems/sequel-5.26.0/spec/model_spec.rb +1 -0
  3059. data/vendor/bundle/gems/sequel-5.26.0/spec/plugin_spec.rb +1 -0
  3060. data/vendor/bundle/gems/sequel-5.26.0/spec/sequel_coverage.rb +15 -0
  3061. data/vendor/bundle/gems/sequel-5.26.0/spec/sequel_warning.rb +4 -0
  3062. data/vendor/bundle/gems/sequel-5.26.0/spec/spec_config.rb +12 -0
  3063. data/vendor/bundle/gems/simplecov-0.16.1/CHANGELOG.md +481 -0
  3064. data/vendor/bundle/gems/simplecov-0.16.1/CONTRIBUTING.md +51 -0
  3065. data/vendor/bundle/gems/simplecov-0.16.1/ISSUE_TEMPLATE.md +23 -0
  3066. data/vendor/bundle/gems/simplecov-0.16.1/LICENSE +20 -0
  3067. data/vendor/bundle/gems/simplecov-0.16.1/README.md +710 -0
  3068. data/vendor/bundle/gems/simplecov-0.16.1/doc/alternate-formatters.md +51 -0
  3069. data/vendor/bundle/gems/simplecov-0.16.1/doc/commercial-services.md +20 -0
  3070. data/vendor/bundle/gems/simplecov-0.16.1/doc/editor-integration.md +18 -0
  3071. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov.rb +281 -0
  3072. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/command_guesser.rb +61 -0
  3073. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/configuration.rb +305 -0
  3074. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/defaults.rb +50 -0
  3075. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/exit_codes.rb +10 -0
  3076. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/file_list.rb +61 -0
  3077. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/filter.rb +91 -0
  3078. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter.rb +10 -0
  3079. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/multi_formatter.rb +34 -0
  3080. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb +25 -0
  3081. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/jruby_fix.rb +44 -0
  3082. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/last_run.rb +26 -0
  3083. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/lines_classifier.rb +48 -0
  3084. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/load_global_config.rb +8 -0
  3085. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/no_defaults.rb +4 -0
  3086. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/profiles.rb +33 -0
  3087. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/profiles/bundler_filter.rb +5 -0
  3088. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/profiles/rails.rb +18 -0
  3089. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/profiles/root_filter.rb +10 -0
  3090. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/profiles/test_frameworks.rb +8 -0
  3091. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/railtie.rb +9 -0
  3092. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/railties/tasks.rake +13 -0
  3093. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/raw_coverage.rb +41 -0
  3094. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/result.rb +88 -0
  3095. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/result_merger.rb +123 -0
  3096. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/source_file.rb +203 -0
  3097. data/vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/version.rb +5 -0
  3098. data/vendor/bundle/gems/simplecov-html-0.10.2/CHANGELOG.md +13 -0
  3099. data/vendor/bundle/gems/simplecov-html-0.10.2/Gemfile +34 -0
  3100. data/vendor/bundle/gems/simplecov-html-0.10.2/Guardfile +12 -0
  3101. data/vendor/bundle/gems/simplecov-html-0.10.2/LICENSE +20 -0
  3102. data/vendor/bundle/gems/simplecov-html-0.10.2/README.md +30 -0
  3103. data/vendor/bundle/gems/simplecov-html-0.10.2/Rakefile +41 -0
  3104. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/application.js +127 -0
  3105. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/libraries/jquery-1.6.2.min.js +18 -0
  3106. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/plugins/highlight.pack.js +1 -0
  3107. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.colorbox.js +1090 -0
  3108. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.dataTables.min.js +152 -0
  3109. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.timeago.js +141 -0
  3110. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.url.js +174 -0
  3111. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/stylesheets/application.css +3 -0
  3112. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/stylesheets/plugins/highlight.css +129 -0
  3113. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css +295 -0
  3114. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/stylesheets/plugins/jquery.colorbox.css +52 -0
  3115. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/stylesheets/reset.css +103 -0
  3116. data/vendor/bundle/gems/simplecov-html-0.10.2/assets/stylesheets/screen.css.sass +220 -0
  3117. data/vendor/bundle/gems/simplecov-html-0.10.2/lib/simplecov-html.rb +110 -0
  3118. data/vendor/bundle/gems/simplecov-html-0.10.2/lib/simplecov-html/version.rb +7 -0
  3119. data/vendor/bundle/gems/simplecov-html-0.10.2/public/application.css +799 -0
  3120. data/vendor/bundle/gems/simplecov-html-0.10.2/public/application.js +1707 -0
  3121. data/vendor/bundle/gems/simplecov-html-0.10.2/public/colorbox/border.png +0 -0
  3122. data/vendor/bundle/gems/simplecov-html-0.10.2/public/colorbox/controls.png +0 -0
  3123. data/vendor/bundle/gems/simplecov-html-0.10.2/public/colorbox/loading.gif +0 -0
  3124. data/vendor/bundle/gems/simplecov-html-0.10.2/public/colorbox/loading_background.png +0 -0
  3125. data/vendor/bundle/gems/simplecov-html-0.10.2/public/favicon_green.png +0 -0
  3126. data/vendor/bundle/gems/simplecov-html-0.10.2/public/favicon_red.png +0 -0
  3127. data/vendor/bundle/gems/simplecov-html-0.10.2/public/favicon_yellow.png +0 -0
  3128. data/vendor/bundle/gems/simplecov-html-0.10.2/public/loading.gif +0 -0
  3129. data/vendor/bundle/gems/simplecov-html-0.10.2/public/magnify.png +0 -0
  3130. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  3131. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  3132. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  3133. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  3134. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  3135. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  3136. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  3137. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  3138. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_222222_256x240.png +0 -0
  3139. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  3140. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_454545_256x240.png +0 -0
  3141. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_888888_256x240.png +0 -0
  3142. data/vendor/bundle/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  3143. data/vendor/bundle/gems/simplecov-html-0.10.2/simplecov-html.gemspec +22 -0
  3144. data/vendor/bundle/gems/simplecov-html-0.10.2/test/helper.rb +4 -0
  3145. data/vendor/bundle/gems/simplecov-html-0.10.2/test/test_simple_cov-html.rb +8 -0
  3146. data/vendor/bundle/gems/simplecov-html-0.10.2/views/file_list.erb +45 -0
  3147. data/vendor/bundle/gems/simplecov-html-0.10.2/views/layout.erb +41 -0
  3148. data/vendor/bundle/gems/simplecov-html-0.10.2/views/source_file.erb +23 -0
  3149. data/vendor/bundle/gems/sqlite3-1.4.1/API_CHANGES.rdoc +50 -0
  3150. data/vendor/bundle/gems/sqlite3-1.4.1/CHANGELOG.rdoc +306 -0
  3151. data/vendor/bundle/gems/sqlite3-1.4.1/ChangeLog.cvs +88 -0
  3152. data/vendor/bundle/gems/sqlite3-1.4.1/Gemfile +17 -0
  3153. data/vendor/bundle/gems/sqlite3-1.4.1/LICENSE +27 -0
  3154. data/vendor/bundle/gems/sqlite3-1.4.1/Manifest.txt +60 -0
  3155. data/vendor/bundle/gems/sqlite3-1.4.1/README.rdoc +118 -0
  3156. data/vendor/bundle/gems/sqlite3-1.4.1/Rakefile +8 -0
  3157. data/vendor/bundle/gems/sqlite3-1.4.1/appveyor.yml +36 -0
  3158. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/Makefile +266 -0
  3159. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/aggregator.c +273 -0
  3160. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/aggregator.h +12 -0
  3161. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/aggregator.o +0 -0
  3162. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/backup.c +168 -0
  3163. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/backup.h +15 -0
  3164. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/backup.o +0 -0
  3165. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/database.c +823 -0
  3166. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/database.h +17 -0
  3167. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/database.o +0 -0
  3168. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/exception.c +98 -0
  3169. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/exception.h +8 -0
  3170. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/exception.o +0 -0
  3171. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/extconf.rb +96 -0
  3172. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/sqlite3.c +161 -0
  3173. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/sqlite3.o +0 -0
  3174. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/sqlite3_native.so +0 -0
  3175. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/sqlite3_ruby.h +45 -0
  3176. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/statement.c +442 -0
  3177. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/statement.h +16 -0
  3178. data/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3/statement.o +0 -0
  3179. data/vendor/bundle/gems/sqlite3-1.4.1/faq/faq.rb +145 -0
  3180. data/vendor/bundle/gems/sqlite3-1.4.1/faq/faq.yml +426 -0
  3181. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3.rb +15 -0
  3182. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/constants.rb +50 -0
  3183. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/database.rb +736 -0
  3184. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/errors.rb +35 -0
  3185. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/pragmas.rb +588 -0
  3186. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/resultset.rb +187 -0
  3187. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so +0 -0
  3188. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/statement.rb +144 -0
  3189. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/translator.rb +118 -0
  3190. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/value.rb +57 -0
  3191. data/vendor/bundle/gems/sqlite3-1.4.1/lib/sqlite3/version.rb +25 -0
  3192. data/vendor/bundle/gems/sqlite3-1.4.1/rakelib/faq.rake +9 -0
  3193. data/vendor/bundle/gems/sqlite3-1.4.1/rakelib/gem.rake +40 -0
  3194. data/vendor/bundle/gems/sqlite3-1.4.1/rakelib/native.rake +56 -0
  3195. data/vendor/bundle/gems/sqlite3-1.4.1/rakelib/vendor_sqlite3.rake +97 -0
  3196. data/vendor/bundle/gems/sqlite3-1.4.1/setup.rb +1333 -0
  3197. data/vendor/bundle/gems/sqlite3-1.4.1/test/helper.rb +18 -0
  3198. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_backup.rb +33 -0
  3199. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_collation.rb +82 -0
  3200. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_database.rb +503 -0
  3201. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_database_flags.rb +95 -0
  3202. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_database_readonly.rb +36 -0
  3203. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_database_readwrite.rb +41 -0
  3204. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_deprecated.rb +44 -0
  3205. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_encoding.rb +155 -0
  3206. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_integration.rb +507 -0
  3207. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_integration_aggregate.rb +336 -0
  3208. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_integration_open_close.rb +30 -0
  3209. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_integration_pending.rb +115 -0
  3210. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_integration_resultset.rb +159 -0
  3211. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_integration_statement.rb +194 -0
  3212. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_result_set.rb +37 -0
  3213. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_sqlite3.rb +21 -0
  3214. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_statement.rb +268 -0
  3215. data/vendor/bundle/gems/sqlite3-1.4.1/test/test_statement_execute.rb +35 -0
  3216. data/vendor/bundle/gems/term-ansicolor-1.7.1/CHANGES +69 -0
  3217. data/vendor/bundle/gems/term-ansicolor-1.7.1/COPYING +202 -0
  3218. data/vendor/bundle/gems/term-ansicolor-1.7.1/Gemfile +5 -0
  3219. data/vendor/bundle/gems/term-ansicolor-1.7.1/README.md +42 -0
  3220. data/vendor/bundle/gems/term-ansicolor-1.7.1/Rakefile +28 -0
  3221. data/vendor/bundle/gems/term-ansicolor-1.7.1/VERSION +1 -0
  3222. data/vendor/bundle/gems/term-ansicolor-1.7.1/bin/term_cdiff +19 -0
  3223. data/vendor/bundle/gems/term-ansicolor-1.7.1/bin/term_colortab +49 -0
  3224. data/vendor/bundle/gems/term-ansicolor-1.7.1/bin/term_decolor +12 -0
  3225. data/vendor/bundle/gems/term-ansicolor-1.7.1/bin/term_display +91 -0
  3226. data/vendor/bundle/gems/term-ansicolor-1.7.1/bin/term_mandel +52 -0
  3227. data/vendor/bundle/gems/term-ansicolor-1.7.1/bin/term_snow +72 -0
  3228. data/vendor/bundle/gems/term-ansicolor-1.7.1/examples/example.rb +90 -0
  3229. data/vendor/bundle/gems/term-ansicolor-1.7.1/examples/lambda-red-plain.ppm +135 -0
  3230. data/vendor/bundle/gems/term-ansicolor-1.7.1/examples/lambda-red.png +0 -0
  3231. data/vendor/bundle/gems/term-ansicolor-1.7.1/examples/lambda-red.ppm +4 -0
  3232. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor.rb +127 -0
  3233. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/attribute.rb +142 -0
  3234. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/attribute/color256.rb +69 -0
  3235. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/attribute/color8.rb +25 -0
  3236. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/attribute/intense_color8.rb +43 -0
  3237. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/attribute/text.rb +23 -0
  3238. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/hsl_triple.rb +169 -0
  3239. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/movement.rb +108 -0
  3240. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/ppm_reader.rb +96 -0
  3241. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/rgb_color_metrics.rb +161 -0
  3242. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/rgb_triple.rb +179 -0
  3243. data/vendor/bundle/gems/term-ansicolor-1.7.1/lib/term/ansicolor/version.rb +8 -0
  3244. data/vendor/bundle/gems/term-ansicolor-1.7.1/term-ansicolor.gemspec +45 -0
  3245. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/ansicolor_test.rb +160 -0
  3246. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/attribute_test.rb +73 -0
  3247. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/hsl_triple_test.rb +85 -0
  3248. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/ppm_reader_test.rb +46 -0
  3249. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/rgb_color_metrics_test.rb +100 -0
  3250. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/rgb_triple_test.rb +101 -0
  3251. data/vendor/bundle/gems/term-ansicolor-1.7.1/tests/test_helper.rb +8 -0
  3252. data/vendor/bundle/gems/test-unit-3.3.4/COPYING +67 -0
  3253. data/vendor/bundle/gems/test-unit-3.3.4/GPL +339 -0
  3254. data/vendor/bundle/gems/test-unit-3.3.4/LGPL +502 -0
  3255. data/vendor/bundle/gems/test-unit-3.3.4/PSFL +271 -0
  3256. data/vendor/bundle/gems/test-unit-3.3.4/README.md +101 -0
  3257. data/vendor/bundle/gems/test-unit-3.3.4/Rakefile +80 -0
  3258. data/vendor/bundle/gems/test-unit-3.3.4/doc/text/getting-started.md +246 -0
  3259. data/vendor/bundle/gems/test-unit-3.3.4/doc/text/how-to.md +90 -0
  3260. data/vendor/bundle/gems/test-unit-3.3.4/doc/text/news.md +1453 -0
  3261. data/vendor/bundle/gems/test-unit-3.3.4/lib/test-unit.rb +34 -0
  3262. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit.rb +514 -0
  3263. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/assertion-failed-error.rb +25 -0
  3264. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/assertions.rb +2256 -0
  3265. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/attribute-matcher.rb +26 -0
  3266. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/attribute.rb +227 -0
  3267. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/auto-runner-loader.rb +17 -0
  3268. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/autorunner.rb +537 -0
  3269. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/code-snippet-fetcher.rb +56 -0
  3270. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/collector.rb +73 -0
  3271. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/collector/descendant.rb +19 -0
  3272. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/collector/dir.rb +108 -0
  3273. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/collector/load.rb +197 -0
  3274. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/collector/objectspace.rb +34 -0
  3275. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/collector/xml.rb +249 -0
  3276. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/color-scheme.rb +198 -0
  3277. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/color.rb +134 -0
  3278. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/data-sets.rb +116 -0
  3279. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/data.rb +371 -0
  3280. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/diff.rb +746 -0
  3281. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/error.rb +158 -0
  3282. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/exception-handler.rb +82 -0
  3283. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/failure.rb +169 -0
  3284. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/fault-location-detector.rb +100 -0
  3285. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/fixture.rb +298 -0
  3286. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/notification.rb +138 -0
  3287. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/omission.rb +198 -0
  3288. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/pending.rb +155 -0
  3289. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/priority.rb +196 -0
  3290. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/runner/console.rb +84 -0
  3291. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/runner/emacs.rb +8 -0
  3292. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/runner/xml.rb +15 -0
  3293. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/test-suite-creator.rb +103 -0
  3294. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/testcase.rb +899 -0
  3295. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/testresult.rb +132 -0
  3296. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/testsuite.rb +175 -0
  3297. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/console/outputlevel.rb +15 -0
  3298. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/console/testrunner.rb +750 -0
  3299. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  3300. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/testrunner.rb +53 -0
  3301. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/testrunnermediator.rb +114 -0
  3302. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  3303. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/ui/xml/testrunner.rb +224 -0
  3304. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/util/backtracefilter.rb +59 -0
  3305. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/util/method-owner-finder.rb +28 -0
  3306. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/util/observable.rb +90 -0
  3307. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/util/output.rb +32 -0
  3308. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/util/procwrapper.rb +48 -0
  3309. data/vendor/bundle/gems/test-unit-3.3.4/lib/test/unit/version.rb +5 -0
  3310. data/vendor/bundle/gems/test-unit-3.3.4/sample/adder.rb +13 -0
  3311. data/vendor/bundle/gems/test-unit-3.3.4/sample/subtracter.rb +12 -0
  3312. data/vendor/bundle/gems/test-unit-3.3.4/sample/test_adder.rb +20 -0
  3313. data/vendor/bundle/gems/test-unit-3.3.4/sample/test_subtracter.rb +20 -0
  3314. data/vendor/bundle/gems/test-unit-3.3.4/sample/test_user.rb +23 -0
  3315. data/vendor/bundle/gems/test-unit-3.3.4/test/collector/test-descendant.rb +182 -0
  3316. data/vendor/bundle/gems/test-unit-3.3.4/test/collector/test-load.rb +475 -0
  3317. data/vendor/bundle/gems/test-unit-3.3.4/test/collector/test_dir.rb +407 -0
  3318. data/vendor/bundle/gems/test-unit-3.3.4/test/collector/test_objectspace.rb +102 -0
  3319. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/header-label.csv +3 -0
  3320. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/header-label.tsv +3 -0
  3321. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/header.csv +3 -0
  3322. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/header.tsv +3 -0
  3323. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/no-header.csv +2 -0
  3324. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/no-header.tsv +2 -0
  3325. data/vendor/bundle/gems/test-unit-3.3.4/test/fixtures/plus.csv +3 -0
  3326. data/vendor/bundle/gems/test-unit-3.3.4/test/run-test.rb +22 -0
  3327. data/vendor/bundle/gems/test-unit-3.3.4/test/test-assertions.rb +2187 -0
  3328. data/vendor/bundle/gems/test-unit-3.3.4/test/test-attribute-matcher.rb +38 -0
  3329. data/vendor/bundle/gems/test-unit-3.3.4/test/test-attribute.rb +123 -0
  3330. data/vendor/bundle/gems/test-unit-3.3.4/test/test-code-snippet.rb +79 -0
  3331. data/vendor/bundle/gems/test-unit-3.3.4/test/test-color-scheme.rb +82 -0
  3332. data/vendor/bundle/gems/test-unit-3.3.4/test/test-color.rb +47 -0
  3333. data/vendor/bundle/gems/test-unit-3.3.4/test/test-data.rb +419 -0
  3334. data/vendor/bundle/gems/test-unit-3.3.4/test/test-diff.rb +518 -0
  3335. data/vendor/bundle/gems/test-unit-3.3.4/test/test-emacs-runner.rb +60 -0
  3336. data/vendor/bundle/gems/test-unit-3.3.4/test/test-error.rb +26 -0
  3337. data/vendor/bundle/gems/test-unit-3.3.4/test/test-failure.rb +33 -0
  3338. data/vendor/bundle/gems/test-unit-3.3.4/test/test-fault-location-detector.rb +163 -0
  3339. data/vendor/bundle/gems/test-unit-3.3.4/test/test-fixture.rb +713 -0
  3340. data/vendor/bundle/gems/test-unit-3.3.4/test/test-notification.rb +33 -0
  3341. data/vendor/bundle/gems/test-unit-3.3.4/test/test-omission.rb +81 -0
  3342. data/vendor/bundle/gems/test-unit-3.3.4/test/test-pending.rb +70 -0
  3343. data/vendor/bundle/gems/test-unit-3.3.4/test/test-priority.rb +184 -0
  3344. data/vendor/bundle/gems/test-unit-3.3.4/test/test-test-case.rb +1279 -0
  3345. data/vendor/bundle/gems/test-unit-3.3.4/test/test-test-result.rb +113 -0
  3346. data/vendor/bundle/gems/test-unit-3.3.4/test/test-test-suite-creator.rb +97 -0
  3347. data/vendor/bundle/gems/test-unit-3.3.4/test/test-test-suite.rb +151 -0
  3348. data/vendor/bundle/gems/test-unit-3.3.4/test/testunit-test-util.rb +33 -0
  3349. data/vendor/bundle/gems/test-unit-3.3.4/test/ui/test_testrunmediator.rb +20 -0
  3350. data/vendor/bundle/gems/test-unit-3.3.4/test/util/test-method-owner-finder.rb +38 -0
  3351. data/vendor/bundle/gems/test-unit-3.3.4/test/util/test-output.rb +11 -0
  3352. data/vendor/bundle/gems/test-unit-3.3.4/test/util/test_backtracefilter.rb +52 -0
  3353. data/vendor/bundle/gems/test-unit-3.3.4/test/util/test_observable.rb +102 -0
  3354. data/vendor/bundle/gems/test-unit-3.3.4/test/util/test_procwrapper.rb +36 -0
  3355. data/vendor/bundle/gems/thor-0.20.3/CHANGELOG.md +204 -0
  3356. data/vendor/bundle/gems/thor-0.20.3/CONTRIBUTING.md +15 -0
  3357. data/vendor/bundle/gems/thor-0.20.3/LICENSE.md +20 -0
  3358. data/vendor/bundle/gems/thor-0.20.3/README.md +51 -0
  3359. data/vendor/bundle/gems/thor-0.20.3/bin/thor +6 -0
  3360. data/vendor/bundle/gems/thor-0.20.3/lib/thor.rb +509 -0
  3361. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions.rb +331 -0
  3362. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/create_file.rb +104 -0
  3363. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/create_link.rb +60 -0
  3364. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/directory.rb +118 -0
  3365. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/empty_directory.rb +143 -0
  3366. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/file_manipulation.rb +373 -0
  3367. data/vendor/bundle/gems/thor-0.20.3/lib/thor/actions/inject_into_file.rb +109 -0
  3368. data/vendor/bundle/gems/thor-0.20.3/lib/thor/base.rb +678 -0
  3369. data/vendor/bundle/gems/thor-0.20.3/lib/thor/command.rb +135 -0
  3370. data/vendor/bundle/gems/thor-0.20.3/lib/thor/core_ext/hash_with_indifferent_access.rb +97 -0
  3371. data/vendor/bundle/gems/thor-0.20.3/lib/thor/core_ext/io_binary_read.rb +12 -0
  3372. data/vendor/bundle/gems/thor-0.20.3/lib/thor/core_ext/ordered_hash.rb +129 -0
  3373. data/vendor/bundle/gems/thor-0.20.3/lib/thor/error.rb +114 -0
  3374. data/vendor/bundle/gems/thor-0.20.3/lib/thor/group.rb +281 -0
  3375. data/vendor/bundle/gems/thor-0.20.3/lib/thor/invocation.rb +177 -0
  3376. data/vendor/bundle/gems/thor-0.20.3/lib/thor/line_editor.rb +17 -0
  3377. data/vendor/bundle/gems/thor-0.20.3/lib/thor/line_editor/basic.rb +37 -0
  3378. data/vendor/bundle/gems/thor-0.20.3/lib/thor/line_editor/readline.rb +88 -0
  3379. data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser.rb +4 -0
  3380. data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/argument.rb +70 -0
  3381. data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/arguments.rb +175 -0
  3382. data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/option.rb +146 -0
  3383. data/vendor/bundle/gems/thor-0.20.3/lib/thor/parser/options.rb +226 -0
  3384. data/vendor/bundle/gems/thor-0.20.3/lib/thor/rake_compat.rb +71 -0
  3385. data/vendor/bundle/gems/thor-0.20.3/lib/thor/runner.rb +324 -0
  3386. data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell.rb +81 -0
  3387. data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell/basic.rb +482 -0
  3388. data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell/color.rb +149 -0
  3389. data/vendor/bundle/gems/thor-0.20.3/lib/thor/shell/html.rb +126 -0
  3390. data/vendor/bundle/gems/thor-0.20.3/lib/thor/util.rb +268 -0
  3391. data/vendor/bundle/gems/thor-0.20.3/lib/thor/version.rb +3 -0
  3392. data/vendor/bundle/gems/thor-0.20.3/thor.gemspec +21 -0
  3393. data/vendor/bundle/gems/tins-1.22.2/COPYING +18 -0
  3394. data/vendor/bundle/gems/tins-1.22.2/Gemfile +10 -0
  3395. data/vendor/bundle/gems/tins-1.22.2/README.md +107 -0
  3396. data/vendor/bundle/gems/tins-1.22.2/Rakefile +23 -0
  3397. data/vendor/bundle/gems/tins-1.22.2/TODO +3 -0
  3398. data/vendor/bundle/gems/tins-1.22.2/VERSION +1 -0
  3399. data/vendor/bundle/gems/tins-1.22.2/examples/add_one.png +0 -0
  3400. data/vendor/bundle/gems/tins-1.22.2/examples/add_one.stm +13 -0
  3401. data/vendor/bundle/gems/tins-1.22.2/examples/bb3.png +0 -0
  3402. data/vendor/bundle/gems/tins-1.22.2/examples/bb3.stm +26 -0
  3403. data/vendor/bundle/gems/tins-1.22.2/examples/concatenate_compare.mtm +31 -0
  3404. data/vendor/bundle/gems/tins-1.22.2/examples/concatenate_compare.png +0 -0
  3405. data/vendor/bundle/gems/tins-1.22.2/examples/length_difference.mtm +17 -0
  3406. data/vendor/bundle/gems/tins-1.22.2/examples/length_difference.png +0 -0
  3407. data/vendor/bundle/gems/tins-1.22.2/examples/let.rb +62 -0
  3408. data/vendor/bundle/gems/tins-1.22.2/examples/mail.rb +73 -0
  3409. data/vendor/bundle/gems/tins-1.22.2/examples/minsky.rb +145 -0
  3410. data/vendor/bundle/gems/tins-1.22.2/examples/multiply.reg +42 -0
  3411. data/vendor/bundle/gems/tins-1.22.2/examples/null_pattern.rb +52 -0
  3412. data/vendor/bundle/gems/tins-1.22.2/examples/ones_difference-mtm.png +0 -0
  3413. data/vendor/bundle/gems/tins-1.22.2/examples/ones_difference-stm.png +0 -0
  3414. data/vendor/bundle/gems/tins-1.22.2/examples/ones_difference.mtm +12 -0
  3415. data/vendor/bundle/gems/tins-1.22.2/examples/ones_difference.stm +25 -0
  3416. data/vendor/bundle/gems/tins-1.22.2/examples/prefix-equals-suffix-reversed-with-infix.png +0 -0
  3417. data/vendor/bundle/gems/tins-1.22.2/examples/prefix-equals-suffix-reversed-with-infix.stm +38 -0
  3418. data/vendor/bundle/gems/tins-1.22.2/examples/recipe.rb +81 -0
  3419. data/vendor/bundle/gems/tins-1.22.2/examples/recipe2.rb +82 -0
  3420. data/vendor/bundle/gems/tins-1.22.2/examples/recipe_common.rb +65 -0
  3421. data/vendor/bundle/gems/tins-1.22.2/examples/subtract.reg +9 -0
  3422. data/vendor/bundle/gems/tins-1.22.2/examples/turing-graph.rb +17 -0
  3423. data/vendor/bundle/gems/tins-1.22.2/examples/turing.rb +310 -0
  3424. data/vendor/bundle/gems/tins-1.22.2/lib/dslkit.rb +2 -0
  3425. data/vendor/bundle/gems/tins-1.22.2/lib/dslkit/polite.rb +1 -0
  3426. data/vendor/bundle/gems/tins-1.22.2/lib/dslkit/rude.rb +1 -0
  3427. data/vendor/bundle/gems/tins-1.22.2/lib/spruz.rb +2 -0
  3428. data/vendor/bundle/gems/tins-1.22.2/lib/tins.rb +61 -0
  3429. data/vendor/bundle/gems/tins-1.22.2/lib/tins/alias.rb +1 -0
  3430. data/vendor/bundle/gems/tins-1.22.2/lib/tins/annotate.rb +38 -0
  3431. data/vendor/bundle/gems/tins-1.22.2/lib/tins/ask_and_send.rb +31 -0
  3432. data/vendor/bundle/gems/tins-1.22.2/lib/tins/attempt.rb +99 -0
  3433. data/vendor/bundle/gems/tins-1.22.2/lib/tins/bijection.rb +46 -0
  3434. data/vendor/bundle/gems/tins-1.22.2/lib/tins/case_predicate.rb +7 -0
  3435. data/vendor/bundle/gems/tins-1.22.2/lib/tins/complete.rb +18 -0
  3436. data/vendor/bundle/gems/tins-1.22.2/lib/tins/concern.rb +30 -0
  3437. data/vendor/bundle/gems/tins-1.22.2/lib/tins/count_by.rb +8 -0
  3438. data/vendor/bundle/gems/tins-1.22.2/lib/tins/date_dummy.rb +53 -0
  3439. data/vendor/bundle/gems/tins-1.22.2/lib/tins/date_time_dummy.rb +51 -0
  3440. data/vendor/bundle/gems/tins-1.22.2/lib/tins/deep_const_get.rb +42 -0
  3441. data/vendor/bundle/gems/tins-1.22.2/lib/tins/deep_dup.rb +11 -0
  3442. data/vendor/bundle/gems/tins-1.22.2/lib/tins/dslkit.rb +636 -0
  3443. data/vendor/bundle/gems/tins-1.22.2/lib/tins/duration.rb +95 -0
  3444. data/vendor/bundle/gems/tins-1.22.2/lib/tins/expose.rb +27 -0
  3445. data/vendor/bundle/gems/tins-1.22.2/lib/tins/extract_last_argument_options.rb +14 -0
  3446. data/vendor/bundle/gems/tins-1.22.2/lib/tins/file_binary.rb +83 -0
  3447. data/vendor/bundle/gems/tins-1.22.2/lib/tins/find.rb +149 -0
  3448. data/vendor/bundle/gems/tins-1.22.2/lib/tins/generator.rb +68 -0
  3449. data/vendor/bundle/gems/tins-1.22.2/lib/tins/go.rb +96 -0
  3450. data/vendor/bundle/gems/tins-1.22.2/lib/tins/hash_symbolize_keys_recursive.rb +48 -0
  3451. data/vendor/bundle/gems/tins-1.22.2/lib/tins/hash_union.rb +15 -0
  3452. data/vendor/bundle/gems/tins-1.22.2/lib/tins/if_predicate.rb +7 -0
  3453. data/vendor/bundle/gems/tins-1.22.2/lib/tins/implement.rb +40 -0
  3454. data/vendor/bundle/gems/tins-1.22.2/lib/tins/limited.rb +38 -0
  3455. data/vendor/bundle/gems/tins-1.22.2/lib/tins/lines_file.rb +123 -0
  3456. data/vendor/bundle/gems/tins-1.22.2/lib/tins/memoize.rb +91 -0
  3457. data/vendor/bundle/gems/tins-1.22.2/lib/tins/method_description.rb +143 -0
  3458. data/vendor/bundle/gems/tins-1.22.2/lib/tins/minimize.rb +55 -0
  3459. data/vendor/bundle/gems/tins-1.22.2/lib/tins/module_group.rb +13 -0
  3460. data/vendor/bundle/gems/tins-1.22.2/lib/tins/named_set.rb +12 -0
  3461. data/vendor/bundle/gems/tins-1.22.2/lib/tins/null.rb +101 -0
  3462. data/vendor/bundle/gems/tins-1.22.2/lib/tins/once.rb +25 -0
  3463. data/vendor/bundle/gems/tins-1.22.2/lib/tins/p.rb +23 -0
  3464. data/vendor/bundle/gems/tins-1.22.2/lib/tins/partial_application.rb +31 -0
  3465. data/vendor/bundle/gems/tins-1.22.2/lib/tins/proc_compose.rb +15 -0
  3466. data/vendor/bundle/gems/tins-1.22.2/lib/tins/proc_prelude.rb +73 -0
  3467. data/vendor/bundle/gems/tins-1.22.2/lib/tins/range_plus.rb +9 -0
  3468. data/vendor/bundle/gems/tins-1.22.2/lib/tins/require_maybe.rb +9 -0
  3469. data/vendor/bundle/gems/tins-1.22.2/lib/tins/responding.rb +19 -0
  3470. data/vendor/bundle/gems/tins-1.22.2/lib/tins/secure_write.rb +27 -0
  3471. data/vendor/bundle/gems/tins-1.22.2/lib/tins/sexy_singleton.rb +39 -0
  3472. data/vendor/bundle/gems/tins-1.22.2/lib/tins/string_byte_order_mark.rb +20 -0
  3473. data/vendor/bundle/gems/tins-1.22.2/lib/tins/string_camelize.rb +16 -0
  3474. data/vendor/bundle/gems/tins-1.22.2/lib/tins/string_underscore.rb +15 -0
  3475. data/vendor/bundle/gems/tins-1.22.2/lib/tins/string_version.rb +104 -0
  3476. data/vendor/bundle/gems/tins-1.22.2/lib/tins/subhash.rb +42 -0
  3477. data/vendor/bundle/gems/tins-1.22.2/lib/tins/temp_io.rb +26 -0
  3478. data/vendor/bundle/gems/tins-1.22.2/lib/tins/temp_io_enum.rb +26 -0
  3479. data/vendor/bundle/gems/tins-1.22.2/lib/tins/terminal.rb +42 -0
  3480. data/vendor/bundle/gems/tins-1.22.2/lib/tins/thread_local.rb +57 -0
  3481. data/vendor/bundle/gems/tins-1.22.2/lib/tins/time_dummy.rb +57 -0
  3482. data/vendor/bundle/gems/tins-1.22.2/lib/tins/to.rb +8 -0
  3483. data/vendor/bundle/gems/tins-1.22.2/lib/tins/to_proc.rb +12 -0
  3484. data/vendor/bundle/gems/tins-1.22.2/lib/tins/token.rb +36 -0
  3485. data/vendor/bundle/gems/tins-1.22.2/lib/tins/uniq_by.rb +10 -0
  3486. data/vendor/bundle/gems/tins-1.22.2/lib/tins/unit.rb +179 -0
  3487. data/vendor/bundle/gems/tins-1.22.2/lib/tins/version.rb +8 -0
  3488. data/vendor/bundle/gems/tins-1.22.2/lib/tins/write.rb +19 -0
  3489. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt.rb +45 -0
  3490. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/annotate.rb +5 -0
  3491. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/ask_and_send.rb +7 -0
  3492. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/attempt.rb +7 -0
  3493. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/blank.rb +67 -0
  3494. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/case_predicate.rb +8 -0
  3495. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/complete.rb +7 -0
  3496. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/concern.rb +20 -0
  3497. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/count_by.rb +11 -0
  3498. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/date_dummy.rb +7 -0
  3499. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/date_time_dummy.rb +7 -0
  3500. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/deep_const_get.rb +7 -0
  3501. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/deep_dup.rb +7 -0
  3502. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/dslkit.rb +22 -0
  3503. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/expose.rb +5 -0
  3504. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/extract_last_argument_options.rb +7 -0
  3505. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/file_binary.rb +7 -0
  3506. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/full.rb +39 -0
  3507. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/hash_symbolize_keys_recursive.rb +7 -0
  3508. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/hash_union.rb +11 -0
  3509. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/if_predicate.rb +7 -0
  3510. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/implement.rb +5 -0
  3511. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/irb.rb +23 -0
  3512. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/method_description.rb +23 -0
  3513. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/named.rb +23 -0
  3514. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/null.rb +9 -0
  3515. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/p.rb +7 -0
  3516. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/partial_application.rb +11 -0
  3517. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/proc_compose.rb +7 -0
  3518. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/proc_prelude.rb +7 -0
  3519. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/range_plus.rb +12 -0
  3520. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/require_maybe.rb +7 -0
  3521. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/responding.rb +7 -0
  3522. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/secure_write.rb +11 -0
  3523. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/sexy_singleton.rb +3 -0
  3524. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/string.rb +6 -0
  3525. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/string_byte_order_mark.rb +7 -0
  3526. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/string_camelize.rb +6 -0
  3527. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/string_underscore.rb +6 -0
  3528. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/string_version.rb +7 -0
  3529. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/subhash.rb +11 -0
  3530. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/temp_io.rb +5 -0
  3531. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/time_dummy.rb +7 -0
  3532. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/time_freezer.rb +15 -0
  3533. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/to.rb +5 -0
  3534. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/uniq_by.rb +15 -0
  3535. data/vendor/bundle/gems/tins-1.22.2/lib/tins/xt/write.rb +11 -0
  3536. data/vendor/bundle/gems/tins-1.22.2/tests/annotate_test.rb +68 -0
  3537. data/vendor/bundle/gems/tins-1.22.2/tests/ask_and_send_test.rb +46 -0
  3538. data/vendor/bundle/gems/tins-1.22.2/tests/attempt_test.rb +109 -0
  3539. data/vendor/bundle/gems/tins-1.22.2/tests/bijection_test.rb +19 -0
  3540. data/vendor/bundle/gems/tins-1.22.2/tests/blank_full_test.rb +77 -0
  3541. data/vendor/bundle/gems/tins-1.22.2/tests/case_predicate_test.rb +29 -0
  3542. data/vendor/bundle/gems/tins-1.22.2/tests/concern_test.rb +35 -0
  3543. data/vendor/bundle/gems/tins-1.22.2/tests/count_by_test.rb +17 -0
  3544. data/vendor/bundle/gems/tins-1.22.2/tests/date_dummy_test.rb +31 -0
  3545. data/vendor/bundle/gems/tins-1.22.2/tests/date_time_dummy_test.rb +31 -0
  3546. data/vendor/bundle/gems/tins-1.22.2/tests/deep_const_get_test.rb +37 -0
  3547. data/vendor/bundle/gems/tins-1.22.2/tests/deep_dup_test.rb +20 -0
  3548. data/vendor/bundle/gems/tins-1.22.2/tests/delegate_test.rb +49 -0
  3549. data/vendor/bundle/gems/tins-1.22.2/tests/dslkit_test.rb +314 -0
  3550. data/vendor/bundle/gems/tins-1.22.2/tests/duration_test.rb +81 -0
  3551. data/vendor/bundle/gems/tins-1.22.2/tests/dynamic_scope_test.rb +31 -0
  3552. data/vendor/bundle/gems/tins-1.22.2/tests/expose_test.rb +43 -0
  3553. data/vendor/bundle/gems/tins-1.22.2/tests/extract_last_argument_options_test.rb +30 -0
  3554. data/vendor/bundle/gems/tins-1.22.2/tests/file_binary_test.rb +65 -0
  3555. data/vendor/bundle/gems/tins-1.22.2/tests/find_test.rb +135 -0
  3556. data/vendor/bundle/gems/tins-1.22.2/tests/from_module_test.rb +61 -0
  3557. data/vendor/bundle/gems/tins-1.22.2/tests/generator_test.rb +47 -0
  3558. data/vendor/bundle/gems/tins-1.22.2/tests/go_test.rb +80 -0
  3559. data/vendor/bundle/gems/tins-1.22.2/tests/hash_symbolize_keys_recursive_test.rb +64 -0
  3560. data/vendor/bundle/gems/tins-1.22.2/tests/hash_union_test.rb +42 -0
  3561. data/vendor/bundle/gems/tins-1.22.2/tests/if_predicate_test.rb +12 -0
  3562. data/vendor/bundle/gems/tins-1.22.2/tests/implement_test.rb +75 -0
  3563. data/vendor/bundle/gems/tins-1.22.2/tests/limited_test.rb +21 -0
  3564. data/vendor/bundle/gems/tins-1.22.2/tests/lines_file_test.rb +82 -0
  3565. data/vendor/bundle/gems/tins-1.22.2/tests/memoize_test.rb +115 -0
  3566. data/vendor/bundle/gems/tins-1.22.2/tests/method_description_test.rb +104 -0
  3567. data/vendor/bundle/gems/tins-1.22.2/tests/minimize_test.rb +54 -0
  3568. data/vendor/bundle/gems/tins-1.22.2/tests/module_group_test.rb +29 -0
  3569. data/vendor/bundle/gems/tins-1.22.2/tests/named_set_test.rb +18 -0
  3570. data/vendor/bundle/gems/tins-1.22.2/tests/named_test.rb +30 -0
  3571. data/vendor/bundle/gems/tins-1.22.2/tests/null_test.rb +64 -0
  3572. data/vendor/bundle/gems/tins-1.22.2/tests/p_test.rb +14 -0
  3573. data/vendor/bundle/gems/tins-1.22.2/tests/partial_application_test.rb +30 -0
  3574. data/vendor/bundle/gems/tins-1.22.2/tests/proc_compose_test.rb +21 -0
  3575. data/vendor/bundle/gems/tins-1.22.2/tests/proc_prelude_test.rb +81 -0
  3576. data/vendor/bundle/gems/tins-1.22.2/tests/range_plus_test.rb +14 -0
  3577. data/vendor/bundle/gems/tins-1.22.2/tests/require_maybe_test.rb +24 -0
  3578. data/vendor/bundle/gems/tins-1.22.2/tests/responding_test.rb +24 -0
  3579. data/vendor/bundle/gems/tins-1.22.2/tests/rotate_test.rb +65 -0
  3580. data/vendor/bundle/gems/tins-1.22.2/tests/scope_test.rb +31 -0
  3581. data/vendor/bundle/gems/tins-1.22.2/tests/secure_write_test.rb +42 -0
  3582. data/vendor/bundle/gems/tins-1.22.2/tests/sexy_singleton_test.rb +16 -0
  3583. data/vendor/bundle/gems/tins-1.22.2/tests/string_byte_order_mark_test.rb +40 -0
  3584. data/vendor/bundle/gems/tins-1.22.2/tests/string_camelize_test.rb +21 -0
  3585. data/vendor/bundle/gems/tins-1.22.2/tests/string_underscore_test.rb +11 -0
  3586. data/vendor/bundle/gems/tins-1.22.2/tests/string_version_test.rb +60 -0
  3587. data/vendor/bundle/gems/tins-1.22.2/tests/subhash_test.rb +37 -0
  3588. data/vendor/bundle/gems/tins-1.22.2/tests/temp_io_test.rb +51 -0
  3589. data/vendor/bundle/gems/tins-1.22.2/tests/test_helper.rb +11 -0
  3590. data/vendor/bundle/gems/tins-1.22.2/tests/time_dummy_test.rb +31 -0
  3591. data/vendor/bundle/gems/tins-1.22.2/tests/time_freezer_test.rb +45 -0
  3592. data/vendor/bundle/gems/tins-1.22.2/tests/to_test.rb +32 -0
  3593. data/vendor/bundle/gems/tins-1.22.2/tests/token_test.rb +38 -0
  3594. data/vendor/bundle/gems/tins-1.22.2/tests/uniq_by_test.rb +31 -0
  3595. data/vendor/bundle/gems/tins-1.22.2/tests/unit_test.rb +63 -0
  3596. data/vendor/bundle/gems/tins-1.22.2/tins.gemspec +41 -0
  3597. data/vendor/bundle/gems/xpath-3.2.0/README.md +78 -0
  3598. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath.rb +18 -0
  3599. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath/dsl.rb +174 -0
  3600. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath/expression.rb +22 -0
  3601. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath/literal.rb +10 -0
  3602. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath/renderer.rb +126 -0
  3603. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath/union.rb +31 -0
  3604. data/vendor/bundle/gems/xpath-3.2.0/lib/xpath/version.rb +5 -0
  3605. data/vendor/bundle/gems/xpath-3.2.0/spec/fixtures/form.html +201 -0
  3606. data/vendor/bundle/gems/xpath-3.2.0/spec/fixtures/simple.html +53 -0
  3607. data/vendor/bundle/gems/xpath-3.2.0/spec/fixtures/stuff.html +54 -0
  3608. data/vendor/bundle/gems/xpath-3.2.0/spec/spec_helper.rb +8 -0
  3609. data/vendor/bundle/gems/xpath-3.2.0/spec/union_spec.rb +63 -0
  3610. data/vendor/bundle/gems/xpath-3.2.0/spec/xpath_spec.rb +562 -0
  3611. data/vendor/bundle/specifications/addressable-2.7.0.gemspec +39 -0
  3612. data/vendor/bundle/specifications/capybara-3.29.0.gemspec +116 -0
  3613. data/vendor/bundle/specifications/childprocess-3.0.0.gemspec +39 -0
  3614. data/vendor/bundle/specifications/coveralls-0.8.23.gemspec +50 -0
  3615. data/vendor/bundle/specifications/diff-lcs-1.3.gemspec +61 -0
  3616. data/vendor/bundle/specifications/docile-1.3.2.gemspec +48 -0
  3617. data/vendor/bundle/specifications/emot-0.0.4.gemspec +44 -0
  3618. data/vendor/bundle/specifications/faraday-0.17.1.gemspec +33 -0
  3619. data/vendor/bundle/specifications/fastimage-2.1.7.gemspec +45 -0
  3620. data/vendor/bundle/specifications/hikidoc-0.1.0.gemspec +37 -0
  3621. data/vendor/bundle/specifications/jasmine-2.99.0.gemspec +59 -0
  3622. data/vendor/bundle/specifications/jasmine-core-2.99.2.gemspec +41 -0
  3623. data/vendor/bundle/specifications/json-2.2.0.gemspec +0 -0
  3624. data/vendor/bundle/specifications/launchy-2.4.3.gemspec +45 -0
  3625. data/vendor/bundle/specifications/mail-2.7.1.gemspec +50 -0
  3626. data/vendor/bundle/specifications/mime-types-3.3.gemspec +84 -0
  3627. data/vendor/bundle/specifications/mime-types-data-3.2019.1009.gemspec +60 -0
  3628. data/vendor/bundle/specifications/mini_mime-1.0.2.gemspec +39 -0
  3629. data/vendor/bundle/specifications/mini_portile2-2.4.0.gemspec +48 -0
  3630. data/vendor/bundle/specifications/multipart-post-2.1.1.gemspec +38 -0
  3631. data/vendor/bundle/specifications/nokogiri-1.10.5.gemspec +83 -0
  3632. data/vendor/bundle/specifications/octokit-4.14.0.gemspec +36 -0
  3633. data/vendor/bundle/specifications/phantomjs-2.1.1.0.gemspec +44 -0
  3634. data/vendor/bundle/specifications/pit-0.0.7.gemspec +21 -0
  3635. data/vendor/bundle/specifications/power_assert-1.1.5.gemspec +54 -0
  3636. data/vendor/bundle/specifications/public_suffix-4.0.1.gemspec +41 -0
  3637. data/vendor/bundle/specifications/rack-2.0.7.gemspec +42 -0
  3638. data/vendor/bundle/specifications/rack-test-1.1.0.gemspec +54 -0
  3639. data/vendor/bundle/specifications/racksh-1.0.0.gemspec +35 -0
  3640. data/vendor/bundle/specifications/rake-13.0.1.gemspec +26 -0
  3641. data/vendor/bundle/specifications/redcarpet-3.5.0.gemspec +44 -0
  3642. data/vendor/bundle/specifications/regexp_parser-1.6.0.gemspec +23 -0
  3643. data/vendor/bundle/specifications/rspec-3.9.0.gemspec +43 -0
  3644. data/vendor/bundle/specifications/rspec-core-3.9.0.gemspec +63 -0
  3645. data/vendor/bundle/specifications/rspec-expectations-3.9.0.gemspec +51 -0
  3646. data/vendor/bundle/specifications/rspec-mocks-3.9.0.gemspec +51 -0
  3647. data/vendor/bundle/specifications/rspec-support-3.9.0.gemspec +39 -0
  3648. data/vendor/bundle/specifications/rubyzip-2.0.0.gemspec +45 -0
  3649. data/vendor/bundle/specifications/sawyer-0.8.2.gemspec +34 -0
  3650. data/vendor/bundle/specifications/selenium-webdriver-3.142.6.gemspec +64 -0
  3651. data/vendor/bundle/specifications/sequel-5.26.0.gemspec +56 -0
  3652. data/vendor/bundle/specifications/simplecov-0.16.1.gemspec +42 -0
  3653. data/vendor/bundle/specifications/simplecov-html-0.10.2.gemspec +33 -0
  3654. data/vendor/bundle/specifications/sqlite3-1.4.1.gemspec +60 -0
  3655. data/vendor/bundle/specifications/term-ansicolor-1.7.1.gemspec +46 -0
  3656. data/vendor/bundle/specifications/test-unit-3.3.4.gemspec +48 -0
  3657. data/vendor/bundle/specifications/thor-0.20.3.gemspec +35 -0
  3658. data/vendor/bundle/specifications/tins-1.22.2.gemspec +42 -0
  3659. data/vendor/bundle/specifications/xpath-3.2.0.gemspec +46 -0
  3660. metadata +3650 -2
@@ -0,0 +1,291 @@
1
+ require_relative "spec_helper"
2
+
3
+ describe "List plugin" do
4
+ def klass(opts={})
5
+ @db = DB
6
+ c = Class.new(Sequel::Model(@db[:items]))
7
+ c.class_eval do
8
+ columns :id, :position, :scope_id, :pos
9
+ plugin :list, opts
10
+ self.use_transactions = false
11
+ end
12
+ c
13
+ end
14
+
15
+ before do
16
+ @c = klass
17
+ @o = @c.load(:id=>7, :position=>3)
18
+ @sc = klass(:scope=>:scope_id)
19
+ @so = @sc.load(:id=>7, :position=>3, :scope_id=>5)
20
+ @tc = klass(:top=>0)
21
+ @to = @tc.load(:id=>7, :position=>3)
22
+ @db.reset
23
+ end
24
+
25
+ it "should default to using :position as the position field" do
26
+ @c.position_field.must_equal :position
27
+ @c.new.list_dataset.sql.must_equal 'SELECT * FROM items ORDER BY position'
28
+ end
29
+
30
+ it "should accept a :field option to modify the position field" do
31
+ klass(:field=>:pos).position_field.must_equal :pos
32
+ end
33
+
34
+ it "should accept a :scope option with a symbol for a single scope column" do
35
+ @sc.new(:scope_id=>4).list_dataset.sql.must_equal 'SELECT * FROM items WHERE (scope_id = 4) ORDER BY scope_id, position'
36
+ end
37
+
38
+ it "should accept a :scope option with an array of symbols for multiple scope columns" do
39
+ ['SELECT * FROM items WHERE ((scope_id = 4) AND (pos = 3)) ORDER BY scope_id, pos, position',
40
+ 'SELECT * FROM items WHERE ((pos = 3) AND (scope_id = 4)) ORDER BY scope_id, pos, position'].
41
+ must_include(klass(:scope=>[:scope_id, :pos]).new(:scope_id=>4, :pos=>3).list_dataset.sql)
42
+ end
43
+
44
+ it "should accept a :scope option with a proc for a custom list scope" do
45
+ klass(:scope=>proc{|o| o.model.dataset.filter(:active).filter(:scope_id=>o.scope_id)}).new(:scope_id=>4).list_dataset.sql.must_equal 'SELECT * FROM items WHERE (active AND (scope_id = 4)) ORDER BY position'
46
+ end
47
+
48
+ it "should default top of the list to 1" do
49
+ @c.top_of_list.must_equal 1
50
+ end
51
+
52
+ it "should accept a :top option to set top of the list" do
53
+ @tc.top_of_list.must_equal 0
54
+ end
55
+
56
+ it "should modify the order when using the plugin" do
57
+ c = Class.new(Sequel::Model(:items))
58
+ c.dataset.sql.must_equal 'SELECT * FROM items'
59
+ c.plugin :list
60
+ c.dataset.sql.must_equal 'SELECT * FROM items ORDER BY position'
61
+ end
62
+
63
+ it "should be able to access the position field as a class attribute" do
64
+ @c.position_field.must_equal :position
65
+ klass(:field=>:pos).position_field.must_equal :pos
66
+ end
67
+
68
+ it "should be able to access the scope proc as a class attribute" do
69
+ @c.scope_proc.must_be_nil
70
+ @sc.scope_proc[@sc.new(:scope_id=>4)].sql.must_equal 'SELECT * FROM items WHERE (scope_id = 4) ORDER BY scope_id, position'
71
+ end
72
+
73
+ it "should work correctly in subclasses" do
74
+ c = Class.new(klass(:scope=>:scope_id))
75
+ c.position_field.must_equal :position
76
+ c.scope_proc[c.new(:scope_id=>4)].sql.must_equal 'SELECT * FROM items WHERE (scope_id = 4) ORDER BY scope_id, position'
77
+ end
78
+
79
+ it "should have at_position return the model object at the given position" do
80
+ @c.dataset = @c.dataset.with_fetch(:id=>1, :position=>1)
81
+ @o.at_position(10).must_equal @c.load(:id=>1, :position=>1)
82
+ @sc.dataset = @sc.dataset.with_fetch(:id=>2, :position=>2, :scope_id=>5)
83
+ @so.at_position(20).must_equal @sc.load(:id=>2, :position=>2, :scope_id=>5)
84
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 10) ORDER BY position LIMIT 1",
85
+ "SELECT * FROM items WHERE ((scope_id = 5) AND (position = 20)) ORDER BY scope_id, position LIMIT 1"]
86
+ end
87
+
88
+ it "should have position field set to max+1 when creating if not already set" do
89
+ @c.dataset = @c.dataset.with_autoid(1).with_fetch([[{:pos=>nil}], [{:id=>1, :position=>1}], [{:pos=>1}], [{:id=>2, :position=>2}]])
90
+ @c.create.values.must_equal(:id=>1, :position=>1)
91
+ @c.create.values.must_equal(:id=>2, :position=>2)
92
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1",
93
+ "INSERT INTO items (position) VALUES (1)",
94
+ "SELECT * FROM items WHERE (id = 1) ORDER BY position LIMIT 1",
95
+ "SELECT max(position) AS max FROM items LIMIT 1",
96
+ "INSERT INTO items (position) VALUES (2)",
97
+ "SELECT * FROM items WHERE (id = 2) ORDER BY position LIMIT 1"]
98
+ end
99
+
100
+ it "should have position field set to max+1 in scope when creating if not already set" do
101
+ @sc.dataset = @sc.dataset.with_autoid(1).with_fetch([[{:pos=>nil}], [{:id=>1, :scope_id=>1, :position=>1}], [{:pos=>1}], [{:id=>2, :scope_id=>1, :position=>2}], [{:pos=>nil}], [{:id=>3, :scope_id=>2, :position=>1}]])
102
+ @sc.create(:scope_id=>1).values.must_equal(:id=>1, :scope_id=>1, :position=>1)
103
+ @sc.create(:scope_id=>1).values.must_equal(:id=>2, :scope_id=>1, :position=>2)
104
+ @sc.create(:scope_id=>2).values.must_equal(:id=>3, :scope_id=>2, :position=>1)
105
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items WHERE (scope_id = 1) LIMIT 1",
106
+ 'INSERT INTO items (scope_id, position) VALUES (1, 1)',
107
+ "SELECT * FROM items WHERE (id = 1) ORDER BY scope_id, position LIMIT 1",
108
+ "SELECT max(position) AS max FROM items WHERE (scope_id = 1) LIMIT 1",
109
+ 'INSERT INTO items (scope_id, position) VALUES (1, 2)',
110
+ "SELECT * FROM items WHERE (id = 2) ORDER BY scope_id, position LIMIT 1",
111
+ "SELECT max(position) AS max FROM items WHERE (scope_id = 2) LIMIT 1",
112
+ 'INSERT INTO items (scope_id, position) VALUES (2, 1)',
113
+ "SELECT * FROM items WHERE (id = 3) ORDER BY scope_id, position LIMIT 1"]
114
+ end
115
+
116
+ it "should update positions automatically on deletion" do
117
+ @o.destroy
118
+ @db.sqls.must_equal ["DELETE FROM items WHERE (id = 7)", "UPDATE items SET position = (position - 1) WHERE (position > 3)"]
119
+ end
120
+
121
+ it "should have last_position return the last position in the list" do
122
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
123
+ @o.last_position.must_equal 10
124
+ @sc.dataset = @sc.dataset.with_fetch(:max=>20)
125
+ @so.last_position.must_equal 20
126
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1",
127
+ "SELECT max(position) AS max FROM items WHERE (scope_id = 5) LIMIT 1"]
128
+ end
129
+
130
+ it "should have list_dataset return the model's dataset for non scoped lists" do
131
+ @o.list_dataset.sql.must_equal 'SELECT * FROM items ORDER BY position'
132
+ end
133
+
134
+ it "should have list dataset return a scoped dataset for scoped lists" do
135
+ @so.list_dataset.sql.must_equal 'SELECT * FROM items WHERE (scope_id = 5) ORDER BY scope_id, position'
136
+ end
137
+
138
+ it "should have move_down without an argument move down a single position" do
139
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
140
+ @o.move_down.must_equal @o
141
+ @o.position.must_equal 4
142
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1",
143
+ "UPDATE items SET position = (position - 1) WHERE ((position >= 4) AND (position <= 4))",
144
+ "UPDATE items SET position = 4 WHERE (id = 7)"]
145
+ end
146
+
147
+ it "should have move_down with an argument move down the given number of positions" do
148
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
149
+ @o.move_down(3).must_equal @o
150
+ @o.position.must_equal 6
151
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1",
152
+ "UPDATE items SET position = (position - 1) WHERE ((position >= 4) AND (position <= 6))",
153
+ "UPDATE items SET position = 6 WHERE (id = 7)"]
154
+ end
155
+
156
+ it "should have move_down with a negative argument move up the given number of positions" do
157
+ @o.move_down(-1).must_equal @o
158
+ @o.position.must_equal 2
159
+ @db.sqls.must_equal ["UPDATE items SET position = (position + 1) WHERE ((position >= 2) AND (position < 3))",
160
+ "UPDATE items SET position = 2 WHERE (id = 7)"]
161
+ end
162
+
163
+ it "should have move_to handle out of range targets" do
164
+ @o.move_to(0)
165
+ @o.position.must_equal 1
166
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
167
+ @o.move_to(11)
168
+ @o.position.must_equal 10
169
+ end
170
+
171
+ it "should have move_to use a transaction if the instance is configured to use transactions" do
172
+ @o.use_transactions = true
173
+ @o.move_to(2)
174
+ @db.sqls.must_equal ["BEGIN",
175
+ "UPDATE items SET position = (position + 1) WHERE ((position >= 2) AND (position < 3))",
176
+ "UPDATE items SET position = 2 WHERE (id = 7)",
177
+ "COMMIT"]
178
+ end
179
+
180
+ it "should have move_to do nothing if the target position is the same as the current position" do
181
+ @o.use_transactions = true
182
+ @o.move_to(@o.position).must_equal @o
183
+ @o.position.must_equal 3
184
+ @db.sqls.must_equal []
185
+ end
186
+
187
+ it "should have move to shift entries correctly between current and target if moving up" do
188
+ @o.move_to(2)
189
+ @db.sqls.first.must_equal "UPDATE items SET position = (position + 1) WHERE ((position >= 2) AND (position < 3))"
190
+ end
191
+
192
+ it "should have move to shift entries correctly between current and target if moving down" do
193
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
194
+ @o.move_to(4)
195
+ @db.sqls[1].must_equal "UPDATE items SET position = (position - 1) WHERE ((position >= 4) AND (position <= 4))"
196
+ end
197
+
198
+ it "should have move_to_bottom move the item to the last position" do
199
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
200
+ @o.move_to_bottom
201
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1",
202
+ "UPDATE items SET position = (position - 1) WHERE ((position >= 4) AND (position <= 10))",
203
+ "UPDATE items SET position = 10 WHERE (id = 7)"]
204
+ end
205
+
206
+ it "should have move_to_top move the item to the first position" do
207
+ @o.move_to_top
208
+ @db.sqls.must_equal ["UPDATE items SET position = (position + 1) WHERE ((position >= 1) AND (position < 3))",
209
+ "UPDATE items SET position = 1 WHERE (id = 7)"]
210
+ end
211
+
212
+ it "should have move_to_top use position 0 when :top_of_list is 0" do
213
+ @to.move_to_top
214
+ @db.sqls.must_equal ["UPDATE items SET position = (position + 1) WHERE ((position >= 0) AND (position < 3))",
215
+ "UPDATE items SET position = 0 WHERE (id = 7)"]
216
+ end
217
+
218
+ it "should have move_up without an argument move up a single position" do
219
+ @o.move_up.must_equal @o
220
+ @o.position.must_equal 2
221
+ @db.sqls.must_equal ["UPDATE items SET position = (position + 1) WHERE ((position >= 2) AND (position < 3))",
222
+ "UPDATE items SET position = 2 WHERE (id = 7)"]
223
+ end
224
+
225
+ it "should have move_up with an argument move up the given number of positions" do
226
+ @o.move_up(2).must_equal @o
227
+ @o.position.must_equal 1
228
+ @db.sqls.must_equal ["UPDATE items SET position = (position + 1) WHERE ((position >= 1) AND (position < 3))",
229
+ "UPDATE items SET position = 1 WHERE (id = 7)"]
230
+ end
231
+
232
+ it "should have move_up with a negative argument move down the given number of positions" do
233
+ @c.dataset = @c.dataset.with_fetch(:max=>10)
234
+ @o.move_up(-1).must_equal @o
235
+ @o.position.must_equal 4
236
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1",
237
+ "UPDATE items SET position = (position - 1) WHERE ((position >= 4) AND (position <= 4))",
238
+ "UPDATE items SET position = 4 WHERE (id = 7)"]
239
+ end
240
+
241
+ it "should have next return the next entry in the list if not given an argument" do
242
+ @c.dataset = @c.dataset.with_fetch(:id=>9, :position=>4)
243
+ @o.next.must_equal @c.load(:id=>9, :position=>4)
244
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 4) ORDER BY position LIMIT 1"]
245
+ end
246
+
247
+ it "should have next return the entry the given number of positions below the instance if given an argument" do
248
+ @c.dataset = @c.dataset.with_fetch(:id=>9, :position=>5)
249
+ @o.next(2).must_equal @c.load(:id=>9, :position=>5)
250
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 5) ORDER BY position LIMIT 1"]
251
+ end
252
+
253
+ it "should have next return a previous entry if given a negative argument" do
254
+ @c.dataset = @c.dataset.with_fetch(:id=>9, :position=>2)
255
+ @o.next(-1).must_equal @c.load(:id=>9, :position=>2)
256
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 2) ORDER BY position LIMIT 1"]
257
+ end
258
+
259
+ it "should have position_value return the value of the position field" do
260
+ @o.position_value.must_equal 3
261
+ end
262
+
263
+ it "should have prev return the previous entry in the list if not given an argument" do
264
+ @c.dataset = @c.dataset.with_fetch(:id=>9, :position=>2)
265
+ @o.prev.must_equal @c.load(:id=>9, :position=>2)
266
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 2) ORDER BY position LIMIT 1"]
267
+ end
268
+
269
+ it "should have prev return the entry the given number of positions above the instance if given an argument" do
270
+ @c.dataset = @c.dataset.with_fetch(:id=>9, :position=>1)
271
+ @o.prev(2).must_equal @c.load(:id=>9, :position=>1)
272
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 1) ORDER BY position LIMIT 1"]
273
+ end
274
+
275
+ it "should have prev return a following entry if given a negative argument" do
276
+ @c.dataset = @c.dataset.with_fetch(:id=>9, :position=>4)
277
+ @o.prev(-1).must_equal @c.load(:id=>9, :position=>4)
278
+ @db.sqls.must_equal ["SELECT * FROM items WHERE (position = 4) ORDER BY position LIMIT 1"]
279
+ end
280
+
281
+ it "should work correctly with validation on position" do
282
+ @c.class_eval do
283
+ def validate
284
+ super
285
+ errors.add(:position, "not set") unless position
286
+ end
287
+ end
288
+ @c.create
289
+ @db.sqls.must_equal ["SELECT max(position) AS max FROM items LIMIT 1", "INSERT INTO items (position) VALUES (2)", "SELECT * FROM items WHERE (id = 10) ORDER BY position LIMIT 1"]
290
+ end
291
+ end
@@ -0,0 +1,43 @@
1
+ require_relative "spec_helper"
2
+
3
+ describe "LooserTypecasting Extension" do
4
+ before do
5
+ @db = Sequel.mock
6
+ def @db.supports_schema_parsing?() true end
7
+ def @db.schema(*args)
8
+ [[:id, {}], [:z, {:type=>:float}], [:b, {:type=>:integer}], [:d, {:type=>:decimal}], [:s, {:type=>:string}]]
9
+ end
10
+ @c = Class.new(Sequel::Model(@db[:items]))
11
+ @db.extension(:looser_typecasting)
12
+ @c.instance_eval do
13
+ @columns = [:id, :b, :z, :d, :s]
14
+ def columns; @columns; end
15
+ end
16
+ end
17
+
18
+ it "should not raise errors for invalid strings in integer columns" do
19
+ @c.new(:b=>'a').b.must_equal 0
20
+ @c.new(:b=>'a').b.must_be_kind_of(Integer)
21
+ end
22
+
23
+ it "should not raise errors for invalid strings in float columns" do
24
+ @c.new(:z=>'a').z.must_equal 0.0
25
+ @c.new(:z=>'a').z.must_be_kind_of(Float)
26
+ end
27
+
28
+ it "should not raise errors for hash or array input to string columns" do
29
+ @c.new(:s=>'a').s.must_equal 'a'
30
+ @c.new(:s=>[]).s.must_be_kind_of(String)
31
+ @c.new(:s=>{}).s.must_be_kind_of(String)
32
+ end
33
+
34
+ it "should not raise errors for invalid strings in decimal columns" do
35
+ @c.new(:d=>'a').d.must_equal 0.0
36
+ @c.new(:d=>'a').d.must_be_kind_of(BigDecimal)
37
+ end
38
+
39
+ it "should not affect conversions of other types in decimal columns" do
40
+ @c.new(:d=>1).d.must_equal 1
41
+ @c.new(:d=>1).d.must_be_kind_of(BigDecimal)
42
+ end
43
+ end
@@ -0,0 +1,2177 @@
1
+ require_relative "spec_helper"
2
+
3
+ describe Sequel::Model, "many_through_many" do
4
+ before do
5
+ class ::Artist < Sequel::Model
6
+ attr_accessor :yyy
7
+ columns :id
8
+ plugin :many_through_many
9
+ end
10
+ class ::Tag < Sequel::Model
11
+ columns :id, :h1, :h2
12
+ end
13
+ @c1 = Artist
14
+ @c2 = Tag
15
+ @dataset = @c2.dataset = @c2.dataset.with_fetch(:id=>1)
16
+ DB.reset
17
+ end
18
+ after do
19
+ Object.send(:remove_const, :Artist)
20
+ Object.send(:remove_const, :Tag)
21
+ end
22
+
23
+ it "should raise an error if current class does not have a primary key, and :left_primary_key is not specified" do
24
+ @c1.no_primary_key
25
+ proc{@c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]}.must_raise(Sequel::Error)
26
+ DB.sqls.must_equal []
27
+ end
28
+
29
+ it "should raise an error if associated class does not have a primary key, and :right_primary_key is not specified" do
30
+ @c2.no_primary_key
31
+ @c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
32
+ n = @c1.load(:id => 1234)
33
+ proc{n.tags}.must_raise(Sequel::Error)
34
+ DB.sqls.must_equal []
35
+ end
36
+
37
+ it "should populate :key_hash and :id_map option correctly for custom eager loaders" do
38
+ khs = []
39
+ pr = proc{|h| khs << [h[:key_hash], h[:id_map]]}
40
+ @c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_loader=>pr
41
+ @c1.eager(:tags).all
42
+ khs.must_equal [[{:id=>{1=>[Artist.load(:x=>1, :id=>1)]}}, {1=>[Artist.load(:x=>1, :id=>1)]}]]
43
+
44
+ khs.clear
45
+ @c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:id, :left_primary_key_column=>:i, :eager_loader=>pr
46
+ @c1.eager(:tags).all
47
+ khs.must_equal [[{:id=>{1=>[Artist.load(:x=>1, :id=>1)]}}, {1=>[Artist.load(:x=>1, :id=>1)]}]]
48
+ end
49
+
50
+ it "should support using a custom :left_primary_key option when eager loading many_to_many associations" do
51
+ @c1.send(:define_method, :id3){id*3}
52
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1)
53
+ @c2.dataset = @c2.dataset.with_fetch(:id=>4, :x_foreign_key_x=>3)
54
+ @c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:id3
55
+ a = @c1.eager(:tags).all
56
+ a.must_equal [@c1.load(:id => 1)]
57
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (3))"]
58
+ a.first.tags.must_equal [@c2.load(:id=>4)]
59
+ DB.sqls.must_equal []
60
+ end
61
+
62
+ it "should handle a :predicate_key option to change the SQL used in the lookup" do
63
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1)
64
+ @c2.dataset = @c2.dataset.with_fetch(:id=>4, :x_foreign_key_x=>1)
65
+ @c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :predicate_key=>(Sequel[:albums_artists][:artist_id] / 3)
66
+ a = @c1.eager(:tags).all
67
+ a.must_equal [@c1.load(:id => 1)]
68
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT tags.*, (albums_artists.artist_id / 3) AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id / 3) IN (1))"]
69
+ a.first.tags.must_equal [@c2.load(:id=>4)]
70
+ end
71
+
72
+ it "should handle schema qualified tables" do
73
+ @c1.many_through_many :tags, :through=>[[Sequel[:myschema][:albums_artists], :artist_id, :album_id], [Sequel[:myschema][:albums], :id, :id], [Sequel[:myschema][:albums_tags], :album_id, :tag_id]]
74
+ @c1.load(:id=>1).tags_dataset.sql.must_equal "SELECT tags.* FROM tags INNER JOIN myschema.albums_tags ON (myschema.albums_tags.tag_id = tags.id) INNER JOIN myschema.albums ON (myschema.albums.id = myschema.albums_tags.album_id) INNER JOIN myschema.albums_artists ON (myschema.albums_artists.album_id = myschema.albums.id) WHERE (myschema.albums_artists.artist_id = 1)"
75
+
76
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1)
77
+ @c2.dataset = @c2.dataset.with_fetch(:id=>4, :x_foreign_key_x=>1)
78
+ a = @c1.eager(:tags).all
79
+ a.must_equal [@c1.load(:id => 1)]
80
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT tags.*, myschema.albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN myschema.albums_tags ON (myschema.albums_tags.tag_id = tags.id) INNER JOIN myschema.albums ON (myschema.albums.id = myschema.albums_tags.album_id) INNER JOIN myschema.albums_artists ON (myschema.albums_artists.album_id = myschema.albums.id) WHERE (myschema.albums_artists.artist_id IN (1))"]
81
+
82
+ Tag.dataset.columns(:id, :h1, :h2)
83
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id, tags.h1, tags.h2 FROM artists LEFT OUTER JOIN myschema.albums_artists AS albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN myschema.albums AS albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN myschema.albums_tags AS albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)'
84
+ end
85
+
86
+ with_symbol_splitting "should handle schema qualified table symbols" do
87
+ @c1.many_through_many :tags, :through=>[[:myschema__albums_artists, :artist_id, :album_id], [:myschema__albums, :id, :id], [:myschema__albums_tags, :album_id, :tag_id]]
88
+ @c1.load(:id=>1).tags_dataset.sql.must_equal "SELECT tags.* FROM tags INNER JOIN myschema.albums_tags ON (myschema.albums_tags.tag_id = tags.id) INNER JOIN myschema.albums ON (myschema.albums.id = myschema.albums_tags.album_id) INNER JOIN myschema.albums_artists ON (myschema.albums_artists.album_id = myschema.albums.id) WHERE (myschema.albums_artists.artist_id = 1)"
89
+
90
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1)
91
+ @c2.dataset = @c2.dataset.with_fetch(:id=>4, :x_foreign_key_x=>1)
92
+ a = @c1.eager(:tags).all
93
+ a.must_equal [@c1.load(:id => 1)]
94
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT tags.*, myschema.albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN myschema.albums_tags ON (myschema.albums_tags.tag_id = tags.id) INNER JOIN myschema.albums ON (myschema.albums.id = myschema.albums_tags.album_id) INNER JOIN myschema.albums_artists ON (myschema.albums_artists.album_id = myschema.albums.id) WHERE (myschema.albums_artists.artist_id IN (1))"]
95
+
96
+ Tag.dataset.columns(:id, :h1, :h2)
97
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id, tags.h1, tags.h2 FROM artists LEFT OUTER JOIN myschema.albums_artists AS albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN myschema.albums AS albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN myschema.albums_tags AS albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)'
98
+ end
99
+
100
+ it "should default to associating to other models in the same scope" do
101
+ begin
102
+ class ::AssociationModuleTest
103
+ class Artist < Sequel::Model
104
+ plugin :many_through_many
105
+ many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
106
+ end
107
+ class Tag < Sequel::Model
108
+ end
109
+ end
110
+
111
+ ::AssociationModuleTest::Artist.association_reflection(:tags).associated_class.must_equal ::AssociationModuleTest::Tag
112
+ ensure
113
+ Object.send(:remove_const, :AssociationModuleTest)
114
+ end
115
+ end
116
+
117
+ it "should raise an error if in invalid form of through is used" do
118
+ proc{@c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id]]}.must_raise(Sequel::Error)
119
+ proc{@c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], {:table=>:album_tags, :left=>:album_id}]}.must_raise(Sequel::Error)
120
+ proc{@c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], :album_tags]}.must_raise(Sequel::Error)
121
+ end
122
+
123
+ it "should allow only two arguments with the :through option" do
124
+ @c1.many_through_many :tags, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
125
+ n = @c1.load(:id => 1234)
126
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)'
127
+ n.tags.must_equal [@c2.load(:id=>1)]
128
+ end
129
+
130
+ it "should be clonable" do
131
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
132
+ @c1.many_through_many :other_tags, :clone=>:tags
133
+ n = @c1.load(:id => 1234)
134
+ n.other_tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)'
135
+ n.tags.must_equal [@c2.load(:id=>1)]
136
+ end
137
+
138
+ it "should use join tables given" do
139
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
140
+ n = @c1.load(:id => 1234)
141
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)'
142
+ n.tags.must_equal [@c2.load(:id=>1)]
143
+ end
144
+
145
+ it "should handle multiple aliasing of tables" do
146
+ begin
147
+ class ::Album < Sequel::Model
148
+ end
149
+ @c1.many_through_many :albums, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_artists, :album_id, :artist_id], [:artists, :id, :id], [:albums_artists, :artist_id, :album_id]]
150
+ n = @c1.load(:id => 1234)
151
+ n.albums_dataset.sql.must_equal 'SELECT albums.* FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) INNER JOIN artists ON (artists.id = albums_artists.artist_id) INNER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) INNER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) INNER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.album_id = albums_0.id) WHERE (albums_artists_1.artist_id = 1234)'
152
+ n.albums.must_equal [Album.load(:id=>1, :x=>1)]
153
+ ensure
154
+ Object.send(:remove_const, :Album)
155
+ end
156
+ end
157
+
158
+ it "should use explicit class if given" do
159
+ @c1.many_through_many :albums_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag
160
+ n = @c1.load(:id => 1234)
161
+ n.albums_tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)'
162
+ n.albums_tags.must_equal [@c2.load(:id=>1)]
163
+ end
164
+
165
+ it "should accept :left_primary_key and :right_primary_key option for primary keys to use in current and associated table" do
166
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :right_primary_key=>:tag_id, :left_primary_key=>:yyy
167
+ n = @c1.load(:id => 1234)
168
+ n.yyy = 85
169
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.tag_id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 85)'
170
+ n.tags.must_equal [@c2.load(:id=>1)]
171
+ end
172
+
173
+ it "should handle composite keys" do
174
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
175
+ n = @c1.load(:id => 1234)
176
+ n.yyy = 85
177
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((albums_artists.b1 = 1234) AND (albums_artists.b2 = 85))'
178
+ n.tags.must_equal [@c2.load(:id=>1)]
179
+ end
180
+
181
+ it "should allowing filtering by many_through_many associations" do
182
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
183
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id = 1234) AND (albums_artists.artist_id IS NOT NULL))))'
184
+ end
185
+
186
+ it "should allowing filtering by many_through_many associations with a single through table" do
187
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id]]
188
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists WHERE ((albums_artists.album_id = 1234) AND (albums_artists.artist_id IS NOT NULL))))'
189
+ end
190
+
191
+ it "should allowing filtering by many_through_many associations with aliased tables" do
192
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums_artists, :id, :id], [:albums_artists, :album_id, :tag_id]]
193
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.id = albums_artists.album_id) INNER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.album_id = albums_artists_0.id) WHERE ((albums_artists_1.tag_id = 1234) AND (albums_artists.artist_id IS NOT NULL))))'
194
+ end
195
+
196
+ it "should allowing filtering by many_through_many associations with composite keys" do
197
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
198
+ @c1.filter(:tags=>@c2.load(:h1=>1234, :h2=>85)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE ((albums_tags.g1 = 1234) AND (albums_tags.g2 = 85) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL))))'
199
+ end
200
+
201
+ it "should allowing filtering by many_through_many associations with :conditions" do
202
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
203
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id = 1234))))"
204
+ end
205
+
206
+ it "should allowing filtering by many_through_many associations with :conditions with a single through table" do
207
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id]], :conditions=>{:name=>'A'}
208
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_artists ON (albums_artists.album_id = tags.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id = 1234))))"
209
+ end
210
+
211
+ it "should allowing filtering by many_through_many associations with :conditions and composite keys" do
212
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
213
+ @c1.filter(:tags=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id = 1))))"
214
+ end
215
+
216
+ it "should allowing filtering by many_through_many associations with :limit" do
217
+ @c2.dataset = @c2.dataset.with_extend{def supports_window_functions?; true end}
218
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :limit=>10
219
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id IS NOT NULL) AND ((albums_artists.artist_id, tags.id) IN (SELECT b, c FROM (SELECT albums_artists.artist_id AS b, tags.id AS c, row_number() OVER (PARTITION BY albums_artists.artist_id) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id)) AS t1 WHERE (x_sequel_row_number_x <= 10))) AND (tags.id = 1234))))'
220
+ end
221
+
222
+ it "should allowing filtering by many_through_many associations with :limit and composite keys" do
223
+ @c2.dataset = @c2.dataset.with_extend{def supports_window_functions?; true end}
224
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :limit=>10
225
+ @c1.filter(:tags=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND ((albums_artists.b1, albums_artists.b2, tags.id) IN (SELECT b, c, d FROM (SELECT albums_artists.b1 AS b, albums_artists.b2 AS c, tags.id AS d, row_number() OVER (PARTITION BY albums_artists.b1, albums_artists.b2) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2))) AS t1 WHERE (x_sequel_row_number_x <= 10))) AND (tags.id = 1))))'
226
+ end
227
+
228
+ it "should allowing filtering by many_through_many associations with :limit and :conditions" do
229
+ @c2.dataset = @c2.dataset.with_extend{def supports_window_functions?; true end}
230
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}, :limit=>10
231
+ @c1.filter(:tags=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND ((albums_artists.artist_id, tags.id) IN (SELECT b, c FROM (SELECT albums_artists.artist_id AS b, tags.id AS c, row_number() OVER (PARTITION BY albums_artists.artist_id) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (name = 'A')) AS t1 WHERE (x_sequel_row_number_x <= 10))) AND (tags.id = 1234))))"
232
+ end
233
+
234
+ it "should allowing filtering by many_through_many associations with :limit and :conditions and composite keys" do
235
+ @c2.dataset = @c2.dataset.with_extend{def supports_window_functions?; true end}
236
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}, :limit=>10
237
+ @c1.filter(:tags=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND ((albums_artists.b1, albums_artists.b2, tags.id) IN (SELECT b, c, d FROM (SELECT albums_artists.b1 AS b, albums_artists.b2 AS c, tags.id AS d, row_number() OVER (PARTITION BY albums_artists.b1, albums_artists.b2) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE (name = 'A')) AS t1 WHERE (x_sequel_row_number_x <= 10))) AND (tags.id = 1))))"
238
+ end
239
+
240
+ it "should allowing excluding by many_through_many associations" do
241
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
242
+ @c1.exclude(:tags=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id = 1234) AND (albums_artists.artist_id IS NOT NULL)))) OR (artists.id IS NULL))'
243
+ end
244
+
245
+ it "should allowing excluding by many_through_many associations with composite keys" do
246
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
247
+ @c1.exclude(:tags=>@c2.load(:h1=>1234, :h2=>85)).sql.must_equal 'SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE ((albums_tags.g1 = 1234) AND (albums_tags.g2 = 85) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))'
248
+ end
249
+
250
+ it "should allowing excluding by many_through_many associations with :conditions" do
251
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
252
+ @c1.exclude(:tags=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id = 1234)))) OR (artists.id IS NULL))"
253
+ end
254
+
255
+ it "should allowing excluding by many_through_many associations with :conditions and composite keys" do
256
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
257
+ @c1.exclude(:tags=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal "SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id = 1)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))"
258
+ end
259
+
260
+ it "should allowing filtering by multiple many_through_many associations" do
261
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
262
+ @c1.filter(:tags=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (1234, 2345)) AND (albums_artists.artist_id IS NOT NULL))))'
263
+ end
264
+
265
+ it "should allowing filtering by multiple many_through_many associations with composite keys" do
266
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
267
+ @c1.filter(:tags=>[@c2.load(:h1=>1234, :h2=>85), @c2.load(:h1=>2345, :h2=>95)]).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN ((1234, 85), (2345, 95))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL))))'
268
+ end
269
+
270
+ it "should allowing filtering by multiple many_through_many associations with :conditions" do
271
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
272
+ @c1.filter(:tags=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (1234, 2345)))))"
273
+ end
274
+
275
+ it "should allowing filtering by multiple many_through_many associations with :conditions and composite keys" do
276
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
277
+ @c1.filter(:tags=>[@c2.load(:id=>1, :h1=>1234, :h2=>85), @c2.load(:id=>2, :h1=>2345, :h2=>95)]).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (1, 2)))))"
278
+ end
279
+
280
+ it "should allowing excluding by multiple many_through_many associations" do
281
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
282
+ @c1.exclude(:tags=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (1234, 2345)) AND (albums_artists.artist_id IS NOT NULL)))) OR (artists.id IS NULL))'
283
+ end
284
+
285
+ it "should allowing excluding by multiple many_through_many associations with composite keys" do
286
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
287
+ @c1.exclude(:tags=>[@c2.load(:h1=>1234, :h2=>85), @c2.load(:h1=>2345, :h2=>95)]).sql.must_equal 'SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN ((1234, 85), (2345, 95))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))'
288
+ end
289
+
290
+ it "should allowing excluding by multiple many_through_many associations with :conditions" do
291
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
292
+ @c1.exclude(:tags=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal "SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (1234, 2345))))) OR (artists.id IS NULL))"
293
+ end
294
+
295
+ it "should allowing excluding by multiple many_through_many associations with :conditions and composite keys" do
296
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
297
+ @c1.exclude(:tags=>[@c2.load(:id=>1, :h1=>1234, :h2=>85), @c2.load(:id=>2, :h1=>2345, :h2=>95)]).sql.must_equal "SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (1, 2))))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))"
298
+ end
299
+
300
+ it "should allowing filtering/excluding many_through_many associations with NULL values" do
301
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
302
+ @c1.filter(:tags=>@c2.new).sql.must_equal 'SELECT * FROM artists WHERE \'f\''
303
+ @c1.exclude(:tags=>@c2.new).sql.must_equal 'SELECT * FROM artists WHERE \'t\''
304
+ end
305
+
306
+ it "should allowing filtering by many_through_many association datasets" do
307
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
308
+ @c1.filter(:tags=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (SELECT tags.id FROM tags WHERE ((x = 1) AND (tags.id IS NOT NULL)))) AND (albums_artists.artist_id IS NOT NULL))))'
309
+ end
310
+
311
+ it "should allowing filtering by many_through_many association datasets with composite keys" do
312
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
313
+ @c1.filter(:tags=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN (SELECT tags.h1, tags.h2 FROM tags WHERE ((x = 1) AND (tags.h1 IS NOT NULL) AND (tags.h2 IS NOT NULL)))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL))))'
314
+ end
315
+
316
+ it "should allowing filtering by many_through_many association datasets with :conditions" do
317
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
318
+ @c1.filter(:tags=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1))))))"
319
+ end
320
+
321
+ it "should allowing filtering by many_through_many association datasets with :conditions and composite keys" do
322
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
323
+ @c1.filter(:tags=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1))))))"
324
+ end
325
+
326
+ it "should allowing excluding by many_through_many association datasets" do
327
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
328
+ @c1.exclude(:tags=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (SELECT tags.id FROM tags WHERE ((x = 1) AND (tags.id IS NOT NULL)))) AND (albums_artists.artist_id IS NOT NULL)))) OR (artists.id IS NULL))'
329
+ end
330
+
331
+ it "should allowing excluding by many_through_many association datasets with composite keys" do
332
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
333
+ @c1.exclude(:tags=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN (SELECT tags.h1, tags.h2 FROM tags WHERE ((x = 1) AND (tags.h1 IS NOT NULL) AND (tags.h2 IS NOT NULL)))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))'
334
+ end
335
+
336
+ it "should allowing excluding by many_through_many association datasets with :conditions" do
337
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
338
+ @c1.exclude(:tags=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1)))))) OR (artists.id IS NULL))"
339
+ end
340
+
341
+ it "should allowing excluding by many_through_many association datasets with :conditions and composite keys" do
342
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
343
+ @c1.exclude(:tags=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1)))))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))"
344
+ end
345
+
346
+ it "should support a :conditions option" do
347
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:a=>32}
348
+ n = @c1.load(:id => 1234)
349
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((a = 32) AND (albums_artists.artist_id = 1234))'
350
+ n.tags.must_equal [@c2.load(:id=>1)]
351
+
352
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>Sequel.lit('a = ?', 42)
353
+ n = @c1.load(:id => 1234)
354
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((a = 42) AND (albums_artists.artist_id = 1234))'
355
+ n.tags.must_equal [@c2.load(:id=>1)]
356
+ end
357
+
358
+ it "should support an :order option" do
359
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:blah
360
+ n = @c1.load(:id => 1234)
361
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) ORDER BY blah'
362
+ n.tags.must_equal [@c2.load(:id=>1)]
363
+ end
364
+
365
+ it "should support an array for the :order option" do
366
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2]
367
+ n = @c1.load(:id => 1234)
368
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) ORDER BY blah1, blah2'
369
+ n.tags.must_equal [@c2.load(:id=>1)]
370
+ end
371
+
372
+ it "should support a select option" do
373
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :select=>:blah
374
+ n = @c1.load(:id => 1234)
375
+ n.tags_dataset.sql.must_equal 'SELECT blah FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)'
376
+ n.tags.must_equal [@c2.load(:id=>1)]
377
+ end
378
+
379
+ it "should support an array for the select option" do
380
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :select=>[Sequel::SQL::ColumnAll.new(:tags), Sequel[:albums][:name]]
381
+ n = @c1.load(:id => 1234)
382
+ n.tags_dataset.sql.must_equal 'SELECT tags.*, albums.name FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)'
383
+ n.tags.must_equal [@c2.load(:id=>1)]
384
+ end
385
+
386
+ it "should accept a block" do
387
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]] do |ds| ds.filter(:yyy=>@yyy) end
388
+ n = @c1.load(:id => 1234)
389
+ n.yyy = 85
390
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id = 1234) AND (yyy = 85))'
391
+ n.tags.must_equal [@c2.load(:id=>1)]
392
+ end
393
+
394
+ it "should allow the :order option while accepting a block" do
395
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:blah do |ds| ds.filter(:yyy=>@yyy) end
396
+ n = @c1.load(:id => 1234)
397
+ n.yyy = 85
398
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id = 1234) AND (yyy = 85)) ORDER BY blah'
399
+ n.tags.must_equal [@c2.load(:id=>1)]
400
+ end
401
+
402
+ it "should support a :dataset option that is used instead of the default" do
403
+ @c1.many_through_many :tags, [[:a, :b, :c]], :dataset=>proc{Tag.join(:albums_tags, [:tag_id]).join(:albums, [:album_id]).join(:albums_artists, [:album_id]).filter(Sequel[:albums_artists][:artist_id]=>id)}
404
+ n = @c1.load(:id => 1234)
405
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags USING (tag_id) INNER JOIN albums USING (album_id) INNER JOIN albums_artists USING (album_id) WHERE (albums_artists.artist_id = 1234)'
406
+ n.tags.must_equal [@c2.load(:id=>1)]
407
+ end
408
+
409
+ it "should support a :limit option" do
410
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :limit=>10
411
+ n = @c1.load(:id => 1234)
412
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 10'
413
+ n.tags.must_equal [@c2.load(:id=>1)]
414
+
415
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :limit=>[10, 10]
416
+ n = @c1.load(:id => 1234)
417
+ n.tags_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 10 OFFSET 10'
418
+ n.tags.must_equal [@c2.load(:id=>1)]
419
+ end
420
+
421
+ it "should have the :eager option affect the _dataset method" do
422
+ @c2.many_to_many :fans
423
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager=>:fans
424
+ @c1.load(:id => 1234).tags_dataset.opts[:eager].must_equal(:fans=>nil)
425
+ end
426
+
427
+ it "should provide an array with all members of the association" do
428
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
429
+ @c1.load(:id => 1234).tags.must_equal [@c2.load(:id=>1)]
430
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)']
431
+ end
432
+
433
+ it "should populate cache when accessed" do
434
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
435
+ n = @c1.load(:id => 1234)
436
+ n.associations[:tags].must_be_nil
437
+ DB.sqls.must_equal []
438
+ n.tags.must_equal [@c2.load(:id=>1)]
439
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)']
440
+ n.associations[:tags].must_equal n.tags
441
+ DB.sqls.length.must_equal 0
442
+ end
443
+
444
+ it "should use cache if available" do
445
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
446
+ n = @c1.load(:id => 1234)
447
+ n.associations[:tags] = []
448
+ n.tags.must_equal []
449
+ DB.sqls.must_equal []
450
+ end
451
+
452
+ it "should not use cache if asked to reload" do
453
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
454
+ n = @c1.load(:id => 1234)
455
+ n.associations[:tags] = []
456
+ DB.sqls.must_equal []
457
+ n.tags(:reload=>true).must_equal [@c2.load(:id=>1)]
458
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234)']
459
+ n.associations[:tags].must_equal n.tags
460
+ DB.sqls.length.must_equal 0
461
+ end
462
+
463
+ it "should not add associations methods directly to class" do
464
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
465
+ im = @c1.instance_methods
466
+ im.must_include(:tags)
467
+ im.must_include(:tags_dataset)
468
+ im2 = @c1.instance_methods(false)
469
+ im2.wont_include(:tags)
470
+ im2.wont_include(:tags_dataset)
471
+ end
472
+
473
+ it "should support after_load association callback" do
474
+ h = []
475
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :after_load=>:al
476
+ @c1.class_eval do
477
+ self::Foo = h
478
+ def al(v)
479
+ v.each{|x| model::Foo << x.pk * 20}
480
+ end
481
+ end
482
+ @c2.dataset = @c2.dataset.with_fetch([{:id=>20}, {:id=>30}])
483
+ p = @c1.load(:id=>10, :parent_id=>20)
484
+ p.tags
485
+ h.must_equal [400, 600]
486
+ p.tags.collect{|a| a.pk}.must_equal [20, 30]
487
+ end
488
+
489
+ it "should support a :uniq option that removes duplicates from the association" do
490
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :uniq=>true
491
+ @c2.dataset = @c2.dataset.with_fetch([{:id=>20}, {:id=>30}, {:id=>20}, {:id=>30}])
492
+ @c1.load(:id=>10).tags.must_equal [@c2.load(:id=>20), @c2.load(:id=>30)]
493
+ end
494
+ end
495
+
496
+ describe 'Sequel::Plugins::ManyThroughMany::ManyThroughManyAssociationReflection' do
497
+ before do
498
+ class ::Artist < Sequel::Model
499
+ plugin :many_through_many
500
+ many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
501
+ end
502
+ class ::Tag < Sequel::Model
503
+ end
504
+ DB.reset
505
+ @ar = Artist.association_reflection(:tags)
506
+ end
507
+ after do
508
+ Object.send(:remove_const, :Artist)
509
+ Object.send(:remove_const, :Tag)
510
+ end
511
+
512
+ it "#edges should be an array of joins to make when eager graphing" do
513
+ @ar.edges.must_equal [{:conditions=>[], :left=>:id, :right=>:artist_id, :table=>:albums_artists, :join_type=>:left_outer, :block=>nil}, {:conditions=>[], :left=>:album_id, :right=>:id, :table=>:albums, :join_type=>:left_outer, :block=>nil}, {:conditions=>[], :left=>:id, :right=>:album_id, :table=>:albums_tags, :join_type=>:left_outer, :block=>nil}]
514
+ end
515
+
516
+ it "#edges should handle composite keys" do
517
+ Artist.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
518
+ Artist.association_reflection(:tags).edges.must_equal [{:conditions=>[], :left=>[:id, :yyy], :right=>[:b1, :b2], :table=>:albums_artists, :join_type=>:left_outer, :block=>nil}, {:conditions=>[], :left=>[:c1, :c2], :right=>[:d1, :d2], :table=>:albums, :join_type=>:left_outer, :block=>nil}, {:conditions=>[], :left=>[:e1, :e2], :right=>[:f1, :f2], :table=>:albums_tags, :join_type=>:left_outer, :block=>nil}]
519
+ end
520
+
521
+ it "#reverse_edges should be an array of joins to make when lazy loading or eager loading" do
522
+ @ar.reverse_edges.must_equal [{:alias=>:albums_tags, :left=>:tag_id, :right=>:id, :table=>:albums_tags}, {:alias=>:albums, :left=>:id, :right=>:album_id, :table=>:albums}]
523
+ end
524
+
525
+ it "#reverse_edges should handle composite keys" do
526
+ Artist.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
527
+ Artist.association_reflection(:tags).reverse_edges.must_equal [{:alias=>:albums_tags, :left=>[:g1, :g2], :right=>[:h1, :h2], :table=>:albums_tags}, {:alias=>:albums, :left=>[:e1, :e2], :right=>[:f1, :f2], :table=>:albums}]
528
+ end
529
+
530
+ it "#reciprocal should be nil" do
531
+ @ar.reciprocal.must_be_nil
532
+ end
533
+ end
534
+
535
+ describe "many_through_many eager loading methods" do
536
+ before do
537
+ class ::Artist < Sequel::Model
538
+ plugin :many_through_many
539
+ many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
540
+ many_through_many :other_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>:Tag
541
+ many_through_many :albums, [[:albums_artists, :artist_id, :album_id]]
542
+ many_through_many :artists, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_artists, :album_id, :artist_id]]
543
+ end
544
+ class ::Tag < Sequel::Model
545
+ plugin :many_through_many
546
+ many_through_many :tracks, [[:albums_tags, :tag_id, :album_id], [:albums, :id, :id]], :right_primary_key=>:album_id
547
+ end
548
+ class ::Album < Sequel::Model
549
+ end
550
+ class ::Track < Sequel::Model
551
+ end
552
+ Artist.dataset = Artist.dataset.with_fetch(proc do |sql|
553
+ h = {:id => 1}
554
+ if sql =~ /FROM artists LEFT OUTER JOIN albums_artists/
555
+ h[:tags_id] = 2
556
+ h[:albums_0_id] = 3 if sql =~ /LEFT OUTER JOIN albums AS albums_0/
557
+ h[:tracks_id] = 4 if sql =~ /LEFT OUTER JOIN tracks/
558
+ h[:other_tags_id] = 9 if sql =~ /other_tags\.id AS other_tags_id/
559
+ h[:artists_0_id] = 10 if sql =~ /artists_0\.id AS artists_0_id/
560
+ end
561
+ h
562
+ end)
563
+ Artist.dataset.columns(:id)
564
+
565
+ Tag.dataset = Tag.dataset.with_fetch(proc do |sql|
566
+ h = {:id => 2}
567
+ if sql =~ /albums_artists.artist_id IN \(([18])\)/
568
+ h[:x_foreign_key_x] = $1.to_i
569
+ elsif sql =~ /\(\(albums_artists.b1, albums_artists.b2\) IN \(\(1, 8\)\)\)/
570
+ h.merge!(:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>8)
571
+ end
572
+ h[:tag_id] = h.delete(:id) if sql =~ /albums_artists.artist_id IN \(8\)/
573
+ h
574
+ end)
575
+
576
+ Album.dataset = Album.dataset.with_fetch(proc do |sql|
577
+ h = {:id => 3}
578
+ h[:x_foreign_key_x] = 1 if sql =~ /albums_artists.artist_id IN \(1\)/
579
+ h
580
+ end)
581
+
582
+ Track.dataset = Track.dataset.with_fetch(proc do |sql|
583
+ h = {:id => 4}
584
+ h[:x_foreign_key_x] = 2 if sql =~ /albums_tags.tag_id IN \(2\)/
585
+ h
586
+ end)
587
+
588
+ @c1 = Artist
589
+ DB.reset
590
+ end
591
+ after do
592
+ [:Artist, :Tag, :Album, :Track].each{|x| Object.send(:remove_const, x)}
593
+ end
594
+
595
+ it "should eagerly load a single many_through_many association" do
596
+ a = @c1.eager(:tags).all
597
+ a.must_equal [@c1.load(:id=>1)]
598
+ DB.sqls.must_equal ['SELECT * FROM artists', 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
599
+ a.first.tags.must_equal [Tag.load(:id=>2)]
600
+ DB.sqls.length.must_equal 0
601
+ end
602
+
603
+ it "should eagerly load multiple associations in a single call" do
604
+ a = @c1.eager(:tags, :albums).all
605
+ a.must_equal [@c1.load(:id=>1)]
606
+ DB.sqls.must_equal ['SELECT * FROM artists',
607
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
608
+ 'SELECT albums.*, albums_artists.artist_id AS x_foreign_key_x FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
609
+ a = a.first
610
+ a.tags.must_equal [Tag.load(:id=>2)]
611
+ a.albums.must_equal [Album.load(:id=>3)]
612
+ DB.sqls.length.must_equal 0
613
+ end
614
+
615
+ it "should eagerly load multiple associations in separate" do
616
+ a = @c1.eager(:tags).eager(:albums).all
617
+ a.must_equal [@c1.load(:id=>1)]
618
+ DB.sqls.must_equal ['SELECT * FROM artists',
619
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
620
+ 'SELECT albums.*, albums_artists.artist_id AS x_foreign_key_x FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
621
+ a = a.first
622
+ a.tags.must_equal [Tag.load(:id=>2)]
623
+ a.albums.must_equal [Album.load(:id=>3)]
624
+ DB.sqls.length.must_equal 0
625
+ end
626
+
627
+ it "should allow cascading of eager loading for associations of associated models" do
628
+ a = @c1.eager(:tags=>:tracks).all
629
+ a.must_equal [@c1.load(:id=>1)]
630
+ DB.sqls.must_equal ['SELECT * FROM artists',
631
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
632
+ 'SELECT tracks.*, albums_tags.tag_id AS x_foreign_key_x FROM tracks INNER JOIN albums ON (albums.id = tracks.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE (albums_tags.tag_id IN (2))']
633
+ a = a.first
634
+ a.tags.must_equal [Tag.load(:id=>2)]
635
+ a.tags.first.tracks.must_equal [Track.load(:id=>4)]
636
+ DB.sqls.length.must_equal 0
637
+ end
638
+
639
+ it "should cascade eagerly loading when the :eager association option is used" do
640
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager=>:tracks
641
+ a = @c1.eager(:tags).all
642
+ a.must_equal [@c1.load(:id=>1)]
643
+ DB.sqls.must_equal ['SELECT * FROM artists',
644
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
645
+ 'SELECT tracks.*, albums_tags.tag_id AS x_foreign_key_x FROM tracks INNER JOIN albums ON (albums.id = tracks.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE (albums_tags.tag_id IN (2))']
646
+ a = a.first
647
+ a.tags.must_equal [Tag.load(:id=>2)]
648
+ a.tags.first.tracks.must_equal [Track.load(:id=>4)]
649
+ DB.sqls.length.must_equal 0
650
+ end
651
+
652
+ it "should respect :eager when lazily loading an association" do
653
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager=>:tracks
654
+ a = @c1.load(:id=>1)
655
+ a.tags.must_equal [Tag.load(:id=>2)]
656
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1)',
657
+ 'SELECT tracks.*, albums_tags.tag_id AS x_foreign_key_x FROM tracks INNER JOIN albums ON (albums.id = tracks.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE (albums_tags.tag_id IN (2))']
658
+ a.tags.first.tracks.must_equal [Track.load(:id=>4)]
659
+ DB.sqls.length.must_equal 0
660
+ end
661
+
662
+ it "should raise error if attempting to eagerly load an association using :eager_graph option" do
663
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_graph=>:tracks
664
+ proc{@c1.eager(:tags).all}.must_raise(Sequel::Error)
665
+ end
666
+
667
+ it "should respect :eager_graph when lazily loading an association" do
668
+ Tag.dataset = Tag.dataset.with_fetch(:id=>2, :tracks_id=>4).with_extend{def columns; [:id] end}
669
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_graph=>:tracks
670
+ a = @c1.load(:id=>1)
671
+ a.tags
672
+ DB.sqls.must_equal [ 'SELECT tags.id, tracks.id AS tracks_id FROM (SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1)) AS tags LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tags.id) LEFT OUTER JOIN albums ON (albums.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks ON (tracks.album_id = albums.id)']
673
+ a.tags.must_equal [Tag.load(:id=>2)]
674
+ a.tags.first.tracks.must_equal [Track.load(:id=>4)]
675
+ DB.sqls.length.must_equal 0
676
+ end
677
+
678
+ it "should respect :conditions when eagerly loading" do
679
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:a=>32}
680
+ a = @c1.eager(:tags).all
681
+ a.must_equal [@c1.load(:id=>1)]
682
+ DB.sqls.must_equal ['SELECT * FROM artists',
683
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((a = 32) AND (albums_artists.artist_id IN (1)))']
684
+ a.first.tags.must_equal [Tag.load(:id=>2)]
685
+ DB.sqls.length.must_equal 0
686
+ end
687
+
688
+ it "should respect :order when eagerly loading" do
689
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:blah
690
+ a = @c1.eager(:tags).all
691
+ a.must_equal [@c1.load(:id=>1)]
692
+ DB.sqls.must_equal ['SELECT * FROM artists',
693
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1)) ORDER BY blah']
694
+ a.first.tags.must_equal [Tag.load(:id=>2)]
695
+ DB.sqls.length.must_equal 0
696
+ end
697
+
698
+ it "should use the association's block when eager loading by default" do
699
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]] do |ds| ds.filter(:a) end
700
+ a = @c1.eager(:tags).all
701
+ a.must_equal [@c1.load(:id=>1)]
702
+ DB.sqls.must_equal ['SELECT * FROM artists',
703
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (a AND (albums_artists.artist_id IN (1)))']
704
+ a.first.tags.must_equal [Tag.load(:id=>2)]
705
+ DB.sqls.length.must_equal 0
706
+ end
707
+
708
+ it "should use the :eager_block option when eager loading if given" do
709
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_block=>proc{|ds| ds.filter(:b)} do |ds| ds.filter(:a) end
710
+ a = @c1.eager(:tags).all
711
+ a.must_equal [@c1.load(:id=>1)]
712
+ DB.sqls.must_equal ['SELECT * FROM artists',
713
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (b AND (albums_artists.artist_id IN (1)))']
714
+ a.first.tags.must_equal [Tag.load(:id=>2)]
715
+ DB.sqls.length.must_equal 0
716
+ end
717
+
718
+ it "should respect the :limit option on a many_through_many association" do
719
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>2
720
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>5},{:x_foreign_key_x=>1, :id=>6}])
721
+ a = @c1.eager(:first_two_tags).all
722
+ a.must_equal [@c1.load(:id=>1)]
723
+ DB.sqls.must_equal ['SELECT * FROM artists',
724
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (1 = albums_artists.artist_id) LIMIT 2) AS t1']
725
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
726
+ DB.sqls.length.must_equal 0
727
+
728
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[1,1]
729
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>6}])
730
+ a = @c1.eager(:first_two_tags).all
731
+ a.must_equal [@c1.load(:id=>1)]
732
+ DB.sqls.must_equal ['SELECT * FROM artists',
733
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (1 = albums_artists.artist_id) LIMIT 1 OFFSET 1) AS t1']
734
+ a.first.first_two_tags.must_equal [Tag.load(:id=>6)]
735
+ DB.sqls.length.must_equal 0
736
+
737
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1]
738
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>6}, {:x_foreign_key_x=>1, :id=>7}])
739
+ a = @c1.eager(:first_two_tags).all
740
+ a.must_equal [@c1.load(:id=>1)]
741
+ DB.sqls.must_equal ['SELECT * FROM artists',
742
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (1 = albums_artists.artist_id) OFFSET 1) AS t1']
743
+ a.first.first_two_tags.must_equal [Tag.load(:id=>6), Tag.load(:id=>7)]
744
+ DB.sqls.length.must_equal 0
745
+ end
746
+
747
+ it "should respect the :limit option on a many_through_many association using a :ruby strategy" do
748
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>2, :eager_limit_strategy=>:ruby
749
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>5},{:x_foreign_key_x=>1, :id=>6}, {:x_foreign_key_x=>1, :id=>7}])
750
+ a = @c1.eager(:first_two_tags).all
751
+ a.must_equal [@c1.load(:id=>1)]
752
+ DB.sqls.must_equal ['SELECT * FROM artists',
753
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
754
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
755
+ DB.sqls.length.must_equal 0
756
+
757
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[1,1], :eager_limit_strategy=>:ruby
758
+ a = @c1.eager(:first_two_tags).all
759
+ a.must_equal [@c1.load(:id=>1)]
760
+ DB.sqls.must_equal ['SELECT * FROM artists',
761
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
762
+ a.first.first_two_tags.must_equal [Tag.load(:id=>6)]
763
+ DB.sqls.length.must_equal 0
764
+
765
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1], :eager_limit_strategy=>:ruby
766
+ a = @c1.eager(:first_two_tags).all
767
+ a.must_equal [@c1.load(:id=>1)]
768
+ DB.sqls.must_equal ['SELECT * FROM artists',
769
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
770
+ a.first.first_two_tags.must_equal [Tag.load(:id=>6), Tag.load(:id=>7)]
771
+ DB.sqls.length.must_equal 0
772
+ end
773
+
774
+ it "should respect the :limit option on a many_through_many association using a :window_function strategy" do
775
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>2, :order=>:name, :eager_limit_strategy=>:window_function
776
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>5},{:x_foreign_key_x=>1, :id=>6}]).with_extend{def supports_window_functions?; true end}
777
+ a = @c1.eager(:first_two_tags).all
778
+ a.must_equal [@c1.load(:id=>1)]
779
+ DB.sqls.must_equal ['SELECT * FROM artists',
780
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x, row_number() OVER (PARTITION BY albums_artists.artist_id ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))) AS t1 WHERE (x_sequel_row_number_x <= 2)']
781
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
782
+ DB.sqls.length.must_equal 0
783
+
784
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[2,1], :order=>:name, :eager_limit_strategy=>:window_function
785
+ a = @c1.eager(:first_two_tags).all
786
+ a.must_equal [@c1.load(:id=>1)]
787
+ DB.sqls.must_equal ['SELECT * FROM artists',
788
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x, row_number() OVER (PARTITION BY albums_artists.artist_id ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))) AS t1 WHERE ((x_sequel_row_number_x >= 2) AND (x_sequel_row_number_x < 4))']
789
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
790
+ DB.sqls.length.must_equal 0
791
+
792
+ @c1.many_through_many :first_two_tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1], :order=>:name, :eager_limit_strategy=>:window_function
793
+ a = @c1.eager(:first_two_tags).all
794
+ a.must_equal [@c1.load(:id=>1)]
795
+ DB.sqls.must_equal ['SELECT * FROM artists',
796
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x, row_number() OVER (PARTITION BY albums_artists.artist_id ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))) AS t1 WHERE (x_sequel_row_number_x >= 2)']
797
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
798
+ DB.sqls.length.must_equal 0
799
+ end
800
+
801
+ it "should respect the :limit option on a many_through_many association with composite primary keys on the main table" do
802
+ @c1.dataset = @c1.dataset.with_fetch([{:id1=>1, :id2=>2}])
803
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>2, :id=>5}, {:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>2, :id=>6}]).with_extend{def supports_window_functions?; true end}
804
+ @c1.set_primary_key([:id1, :id2])
805
+ @c1.columns :id1, :id2
806
+ @c1.many_through_many :first_two_tags, [[:albums_artists, [:artist_id1, :artist_id2], :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>2, :order=>:name
807
+ a = @c1.eager(:first_two_tags).all
808
+ a.must_equal [@c1.load(:id1=>1, :id2=>2)]
809
+ DB.sqls.must_equal ['SELECT * FROM artists',
810
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id1 AS x_foreign_key_0_x, albums_artists.artist_id2 AS x_foreign_key_1_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((1 = albums_artists.artist_id1) AND (2 = albums_artists.artist_id2)) ORDER BY name LIMIT 2) AS t1']
811
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
812
+ DB.sqls.length.must_equal 0
813
+
814
+ @c1.many_through_many :first_two_tags, [[:albums_artists, [:artist_id1, :artist_id2], :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[2,1]
815
+ a = @c1.eager(:first_two_tags).all
816
+ a.must_equal [@c1.load(:id1=>1, :id2=>2)]
817
+ DB.sqls.must_equal ['SELECT * FROM artists',
818
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id1 AS x_foreign_key_0_x, albums_artists.artist_id2 AS x_foreign_key_1_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((1 = albums_artists.artist_id1) AND (2 = albums_artists.artist_id2)) LIMIT 2 OFFSET 1) AS t1']
819
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
820
+ DB.sqls.length.must_equal 0
821
+ end
822
+
823
+ it "should respect the :limit option on a many_through_many association with composite primary keys on the main table using a :window_function strategy" do
824
+ @c1.dataset = @c1.dataset.with_fetch([{:id1=>1, :id2=>2}])
825
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>2, :id=>5}, {:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>2, :id=>6}]).with_extend{def supports_window_functions?; true end}
826
+ @c1.set_primary_key([:id1, :id2])
827
+ @c1.columns :id1, :id2
828
+ @c1.many_through_many :first_two_tags, [[:albums_artists, [:artist_id1, :artist_id2], :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>2, :order=>:name, :eager_limit_strategy=>:window_function
829
+ a = @c1.eager(:first_two_tags).all
830
+ a.must_equal [@c1.load(:id1=>1, :id2=>2)]
831
+ DB.sqls.must_equal ['SELECT * FROM artists',
832
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id1 AS x_foreign_key_0_x, albums_artists.artist_id2 AS x_foreign_key_1_x, row_number() OVER (PARTITION BY albums_artists.artist_id1, albums_artists.artist_id2 ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id1, albums_artists.artist_id2) IN ((1, 2)))) AS t1 WHERE (x_sequel_row_number_x <= 2)']
833
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
834
+ DB.sqls.length.must_equal 0
835
+
836
+ @c1.many_through_many :first_two_tags, [[:albums_artists, [:artist_id1, :artist_id2], :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[2,1], :order=>:name, :eager_limit_strategy=>:window_function
837
+ a = @c1.eager(:first_two_tags).all
838
+ a.must_equal [@c1.load(:id1=>1, :id2=>2)]
839
+ DB.sqls.must_equal ['SELECT * FROM artists',
840
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id1 AS x_foreign_key_0_x, albums_artists.artist_id2 AS x_foreign_key_1_x, row_number() OVER (PARTITION BY albums_artists.artist_id1, albums_artists.artist_id2 ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id1, albums_artists.artist_id2) IN ((1, 2)))) AS t1 WHERE ((x_sequel_row_number_x >= 2) AND (x_sequel_row_number_x < 4))']
841
+ a.first.first_two_tags.must_equal [Tag.load(:id=>5), Tag.load(:id=>6)]
842
+ DB.sqls.length.must_equal 0
843
+ end
844
+
845
+ it "should raise an error when attempting to eagerly load an association with the :allow_eager option set to false" do
846
+ @c1.eager(:tags).all
847
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :allow_eager=>false
848
+ proc{@c1.eager(:tags).all}.must_raise(Sequel::Error)
849
+ end
850
+
851
+ it "should respect the association's :select option" do
852
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :select=>Sequel[:tags][:name]
853
+ a = @c1.eager(:tags).all
854
+ a.must_equal [@c1.load(:id=>1)]
855
+ DB.sqls.must_equal ['SELECT * FROM artists',
856
+ 'SELECT tags.name, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
857
+ a.first.tags.must_equal [Tag.load(:id=>2)]
858
+ DB.sqls.length.must_equal 0
859
+ end
860
+
861
+ it "should respect many_through_many association's :left_primary_key and :right_primary_key options" do
862
+ @c1.send(:define_method, :yyy){values[:yyy]}
863
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1, :yyy=>8).with_extend{def columns; [:id, :yyy] end}
864
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:yyy, :right_primary_key=>:tag_id
865
+ a = @c1.eager(:tags).all
866
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
867
+ DB.sqls.must_equal ['SELECT * FROM artists',
868
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.tag_id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (8))']
869
+ a.first.tags.must_equal [Tag.load(:tag_id=>2)]
870
+ DB.sqls.length.must_equal 0
871
+ end
872
+
873
+ it "should handle composite keys" do
874
+ @c1.send(:define_method, :yyy){values[:yyy]}
875
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1, :yyy=>8).with_extend{def columns; [:id, :yyy] end}
876
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
877
+ a = @c1.eager(:tags).all
878
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
879
+ DB.sqls.must_equal ['SELECT * FROM artists',
880
+ 'SELECT tags.*, albums_artists.b1 AS x_foreign_key_0_x, albums_artists.b2 AS x_foreign_key_1_x FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((albums_artists.b1, albums_artists.b2) IN ((1, 8)))']
881
+ a.first.tags.must_equal [Tag.load(:id=>2)]
882
+ DB.sqls.length.must_equal 0
883
+ end
884
+
885
+ it "should respect :after_load callbacks on associations when eager loading" do
886
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :after_load=>lambda{|o, as| o[:id] *= 2; as.each{|a| a[:id] *= 3}}
887
+ a = @c1.eager(:tags).all
888
+ a.must_equal [@c1.load(:id=>2)]
889
+ DB.sqls.must_equal ['SELECT * FROM artists',
890
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
891
+ a.first.tags.must_equal [Tag.load(:id=>6)]
892
+ DB.sqls.length.must_equal 0
893
+ end
894
+
895
+ it "should raise an error if called without a symbol or hash" do
896
+ proc{@c1.eager_graph(Object.new)}.must_raise(Sequel::Error)
897
+ end
898
+
899
+ it "should support association_join" do
900
+ @c1.association_join(:tags).sql.must_equal "SELECT * FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags ON (tags.id = albums_tags.tag_id)"
901
+ end
902
+
903
+ it "should support custom selects when using association_join" do
904
+ @c1.select{a(b)}.association_join(:tags).sql.must_equal "SELECT a(b) FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags ON (tags.id = albums_tags.tag_id)"
905
+ end
906
+
907
+ it "should eagerly graph a single many_through_many association" do
908
+ a = @c1.eager_graph(:tags).all
909
+ a.must_equal [@c1.load(:id=>1)]
910
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)']
911
+ a.first.tags.must_equal [Tag.load(:id=>2)]
912
+ DB.sqls.length.must_equal 0
913
+ end
914
+
915
+ it "should eagerly graph a single many_through_many association using the :window_function strategy" do
916
+ Tag.dataset = Tag.dataset.with_extend do
917
+ def supports_window_functions?; true end
918
+ def columns; literal(opts[:select]) =~ /x_foreign_key_x/ ? [:id, :x_foreign_key_x] : [:id] end
919
+ end
920
+ @c1.many_through_many :tags, :clone=>:tags, :limit=>2
921
+ a = @c1.eager_graph_with_options(:tags, :limit_strategy=>true).with_fetch(:id=>1, :tags_id=>2).all
922
+ a.must_equal [@c1.load(:id=>1)]
923
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN (SELECT id, x_foreign_key_x FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x, row_number() OVER (PARTITION BY albums_artists.artist_id) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id)) AS t1 WHERE (x_sequel_row_number_x <= 2)) AS tags ON (tags.x_foreign_key_x = artists.id)']
924
+ a.first.tags.must_equal [Tag.load(:id=>2)]
925
+ DB.sqls.length.must_equal 0
926
+ end
927
+
928
+ it "should eagerly graph multiple associations in a single call" do
929
+ a = @c1.eager_graph(:tags, :albums).all
930
+ a.must_equal [@c1.load(:id=>1)]
931
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, albums_0.id AS albums_0_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id)']
932
+ a = a.first
933
+ a.tags.must_equal [Tag.load(:id=>2)]
934
+ a.albums.must_equal [Album.load(:id=>3)]
935
+ DB.sqls.length.must_equal 0
936
+ end
937
+
938
+ it "should eagerly graph multiple associations in separate calls" do
939
+ a = @c1.eager_graph(:tags).eager_graph(:albums).all
940
+ a.must_equal [@c1.load(:id=>1)]
941
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, albums_0.id AS albums_0_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id)']
942
+ a = a.first
943
+ a.tags.must_equal [Tag.load(:id=>2)]
944
+ a.albums.must_equal [Album.load(:id=>3)]
945
+ DB.sqls.length.must_equal 0
946
+ end
947
+
948
+ it "should allow cascading of eager graphing for associations of associated models" do
949
+ a = @c1.eager_graph(:tags=>:tracks).all
950
+ a.must_equal [@c1.load(:id=>1)]
951
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, tracks.id AS tracks_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tags.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks ON (tracks.album_id = albums_0.id)']
952
+ a = a.first
953
+ a.tags.must_equal [Tag.load(:id=>2)]
954
+ a.tags.first.tracks.must_equal [Track.load(:id=>4)]
955
+ DB.sqls.length.must_equal 0
956
+ end
957
+
958
+ it "eager graphing should eliminate duplicates caused by cartesian products" do
959
+ a = @c1.eager_graph(:tags).with_fetch([{:id=>1, :tags_id=>2}, {:id=>1, :tags_id=>3}, {:id=>1, :tags_id=>2}, {:id=>1, :tags_id=>3}]).all
960
+ a.must_equal [@c1.load(:id=>1)]
961
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)']
962
+ a.first.tags.must_equal [Tag.load(:id=>2), Tag.load(:id=>3)]
963
+ DB.sqls.length.must_equal 0
964
+ end
965
+
966
+ it "should eager graph multiple associations from the same table" do
967
+ a = @c1.eager_graph(:tags, :other_tags).all
968
+ a.must_equal [@c1.load(:id=>1)]
969
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, other_tags.id AS other_tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.album_id = albums_0.id) LEFT OUTER JOIN tags AS other_tags ON (other_tags.id = albums_tags_0.tag_id)']
970
+ a = a.first
971
+ a.tags.must_equal [Tag.load(:id=>2)]
972
+ a.other_tags.must_equal [Tag.load(:id=>9)]
973
+ DB.sqls.length.must_equal 0
974
+ end
975
+
976
+ it "should eager graph a self_referential association" do
977
+ a = @c1.eager_graph(:tags, :artists).all
978
+ a.must_equal [@c1.load(:id=>1)]
979
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, artists_0.id AS artists_0_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.album_id = albums_0.id) LEFT OUTER JOIN artists AS artists_0 ON (artists_0.id = albums_artists_1.artist_id)']
980
+ a = a.first
981
+ a.tags.must_equal [Tag.load(:id=>2)]
982
+ a.artists.must_equal [@c1.load(:id=>10)]
983
+ DB.sqls.length.must_equal 0
984
+ end
985
+
986
+ it "eager graphing should give you a plain hash when called without .all" do
987
+ @c1.eager_graph(:tags, :artists).first.must_equal(:albums_0_id=>3, :artists_0_id=>10, :id=>1, :tags_id=>2)
988
+ end
989
+
990
+ it "should be able to use eager and eager_graph together" do
991
+ a = @c1.eager_graph(:tags).eager(:albums).all
992
+ a.must_equal [@c1.load(:id=>1)]
993
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)',
994
+ 'SELECT albums.*, albums_artists.artist_id AS x_foreign_key_x FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
995
+ a = a.first
996
+ a.tags.must_equal [Tag.load(:id=>2)]
997
+ a.albums.must_equal [Album.load(:id=>3)]
998
+ DB.sqls.length.must_equal 0
999
+ end
1000
+
1001
+ it "should handle no associated records when eagerly graphing a single many_through_many association" do
1002
+ a = @c1.eager_graph(:tags).with_fetch(:id=>1, :tags_id=>nil).all
1003
+ a.must_equal [@c1.load(:id=>1)]
1004
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)']
1005
+ a.first.tags.must_equal []
1006
+ DB.sqls.length.must_equal 0
1007
+ end
1008
+
1009
+ it "should handle no associated records when eagerly graphing multiple many_through_many associations" do
1010
+ a = @c1.eager_graph(:tags, :albums).with_fetch([{:id=>1, :tags_id=>nil, :albums_0_id=>3}, {:id=>1, :tags_id=>2, :albums_0_id=>nil}, {:id=>1, :tags_id=>5, :albums_0_id=>6}, {:id=>7, :tags_id=>nil, :albums_0_id=>nil}]).all
1011
+ a.must_equal [@c1.load(:id=>1), @c1.load(:id=>7)]
1012
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, albums_0.id AS albums_0_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id)']
1013
+ a.first.tags.must_equal [Tag.load(:id=>2), Tag.load(:id=>5)]
1014
+ a.first.albums.must_equal [Album.load(:id=>3), Album.load(:id=>6)]
1015
+ a.last.tags.must_equal []
1016
+ a.last.albums.must_equal []
1017
+ DB.sqls.length.must_equal 0
1018
+ end
1019
+
1020
+ it "should handle missing associated records when cascading eager graphing for associations of associated models" do
1021
+ a = @c1.eager_graph(:tags=>:tracks).with_fetch([{:id=>1, :tags_id=>2, :tracks_id=>4}, {:id=>1, :tags_id=>3, :tracks_id=>nil}, {:id=>2, :tags_id=>nil, :tracks_id=>nil}]).all
1022
+ a.must_equal [@c1.load(:id=>1), @c1.load(:id=>2)]
1023
+ DB.sqls.must_equal ['SELECT artists.id, tags.id AS tags_id, tracks.id AS tracks_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tags.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks ON (tracks.album_id = albums_0.id)']
1024
+ a.last.tags.must_equal []
1025
+ a = a.first
1026
+ a.tags.must_equal [Tag.load(:id=>2), Tag.load(:id=>3)]
1027
+ a.tags.first.tracks.must_equal [Track.load(:id=>4)]
1028
+ a.tags.last.tracks.must_equal []
1029
+ DB.sqls.length.must_equal 0
1030
+ end
1031
+
1032
+ it "eager graphing should respect :left_primary_key and :right_primary_key options" do
1033
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:yyy, :right_primary_key=>:tag_id
1034
+ @c1.dataset = @c1.dataset.with_extend{def columns; [:id, :yyy] end}
1035
+ Tag.dataset = Tag.dataset.with_extend{def columns; [:id, :tag_id] end}
1036
+ a = @c1.eager_graph(:tags).with_fetch(:id=>1, :yyy=>8, :tags_id=>2, :tag_id=>4).all
1037
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
1038
+ DB.sqls.must_equal ['SELECT artists.id, artists.yyy, tags.id AS tags_id, tags.tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.yyy) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.tag_id = albums_tags.tag_id)']
1039
+ a.first.tags.must_equal [Tag.load(:id=>2, :tag_id=>4)]
1040
+ DB.sqls.length.must_equal 0
1041
+ end
1042
+
1043
+ it "eager graphing should respect composite keys" do
1044
+ @c1.many_through_many :tags, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:id, :tag_id], :left_primary_key=>[:id, :yyy]
1045
+ @c1.dataset = @c1.dataset.with_extend{def columns; [:id, :yyy] end}
1046
+ Tag.dataset = Tag.dataset.with_extend{def columns; [:id, :tag_id] end}
1047
+ a = @c1.eager_graph(:tags).with_fetch(:id=>1, :yyy=>8, :tags_id=>2, :tag_id=>4).all
1048
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
1049
+ DB.sqls.must_equal ['SELECT artists.id, artists.yyy, tags.id AS tags_id, tags.tag_id FROM artists LEFT OUTER JOIN albums_artists ON ((albums_artists.b1 = artists.id) AND (albums_artists.b2 = artists.yyy)) LEFT OUTER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) LEFT OUTER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) LEFT OUTER JOIN tags ON ((tags.id = albums_tags.g1) AND (tags.tag_id = albums_tags.g2))']
1050
+ a.first.tags.must_equal [Tag.load(:id=>2, :tag_id=>4)]
1051
+ DB.sqls.length.must_equal 0
1052
+ end
1053
+
1054
+ it "should respect the association's :graph_select option" do
1055
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :graph_select=>:b
1056
+ a = @c1.eager_graph(:tags).with_fetch(:id=>1, :b=>2).all
1057
+ a.must_equal [@c1.load(:id=>1)]
1058
+ DB.sqls.must_equal ['SELECT artists.id, tags.b FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)']
1059
+ a.first.tags.must_equal [Tag.load(:b=>2)]
1060
+ DB.sqls.length.must_equal 0
1061
+ end
1062
+
1063
+ it "should respect the association's :graph_join_type option" do
1064
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :graph_join_type=>:inner
1065
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags ON (tags.id = albums_tags.tag_id)'
1066
+ end
1067
+
1068
+ it "should respect the association's :join_type option on through" do
1069
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :join_type=>:natural}, [:albums_tags, :album_id, :tag_id]], :graph_join_type=>:inner
1070
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) NATURAL JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags ON (tags.id = albums_tags.tag_id)'
1071
+ end
1072
+
1073
+ it "should respect the association's :conditions option" do
1074
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :conditions=>{:a=>32}
1075
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON ((tags.id = albums_tags.tag_id) AND (tags.a = 32))'
1076
+ end
1077
+
1078
+ it "should respect the association's :graph_conditions option" do
1079
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_conditions=>{:a=>42}
1080
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON ((tags.id = albums_tags.tag_id) AND (tags.a = 42))'
1081
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_conditions=>{:a=>42}, :conditions=>{:a=>32}
1082
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON ((tags.id = albums_tags.tag_id) AND (tags.a = 42))'
1083
+ end
1084
+
1085
+ it "should respect the association's :conditions option on through" do
1086
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :conditions=>{:a=>42}}, [:albums_tags, :album_id, :tag_id]]
1087
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON ((albums.id = albums_artists.album_id) AND (albums.a = 42)) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)'
1088
+ end
1089
+
1090
+ it "should respect the association's :graph_block option" do
1091
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_block=>proc{|ja,lja,js| {Sequel.qualify(ja, :active)=>true}}
1092
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON ((tags.id = albums_tags.tag_id) AND (tags.active IS TRUE))'
1093
+ end
1094
+
1095
+ it "should respect the association's :block option on through" do
1096
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :block=>proc{|ja,lja,js| {Sequel.qualify(ja, :active)=>true}}}, [:albums_tags, :album_id, :tag_id]]
1097
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON ((albums.id = albums_artists.album_id) AND (albums.active IS TRUE)) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)'
1098
+ end
1099
+
1100
+ it "should respect the association's :graph_only_conditions option" do
1101
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_only_conditions=>{:a=>32}
1102
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.a = 32)'
1103
+ end
1104
+
1105
+ it "should respect the association's :only_conditions option on through" do
1106
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :only_conditions=>{:a=>42}}, [:albums_tags, :album_id, :tag_id]]
1107
+ @c1.eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.a = 42) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id)'
1108
+ end
1109
+
1110
+ it "should create unique table aliases for all associations" do
1111
+ @c1.eager_graph(:artists=>{:artists=>:artists}).sql.must_equal "SELECT artists.id, artists_0.id AS artists_0_id, artists_1.id AS artists_1_id, artists_2.id AS artists_2_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.album_id = albums.id) LEFT OUTER JOIN artists AS artists_0 ON (artists_0.id = albums_artists_0.artist_id) LEFT OUTER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.artist_id = artists_0.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_1.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_2 ON (albums_artists_2.album_id = albums_0.id) LEFT OUTER JOIN artists AS artists_1 ON (artists_1.id = albums_artists_2.artist_id) LEFT OUTER JOIN albums_artists AS albums_artists_3 ON (albums_artists_3.artist_id = artists_1.id) LEFT OUTER JOIN albums AS albums_1 ON (albums_1.id = albums_artists_3.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_4 ON (albums_artists_4.album_id = albums_1.id) LEFT OUTER JOIN artists AS artists_2 ON (artists_2.id = albums_artists_4.artist_id)"
1112
+ end
1113
+
1114
+ it "should respect the association's :order" do
1115
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2]
1116
+ @c1.order(Sequel[:artists][:blah2], Sequel[:artists][:blah3]).eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3, tags.blah1, tags.blah2'
1117
+ end
1118
+
1119
+ with_symbol_splitting "should not qualify qualified symbols" do
1120
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[Sequel.identifier(:blah__id), Sequel.identifier(:blah__id).desc, Sequel.desc(:blah__id), :blah__id, :album_id, Sequel.desc(:album_id), 1, Sequel.lit('RANDOM()'), Sequel.qualify(:b, :a)]
1121
+ @c1.order(:artists__blah2, :artists__blah3).eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3, tags.blah__id, tags.blah__id DESC, blah.id DESC, blah.id, tags.album_id, tags.album_id DESC, 1, RANDOM(), b.a'
1122
+ end
1123
+
1124
+ it "should only qualify symbols, identifiers, or ordered versions in association's :order" do
1125
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[Sequel.identifier(:blah__id), Sequel.identifier(:blah__id).desc, Sequel.desc(Sequel[:blah][:id]), Sequel[:blah][:id], :album_id, Sequel.desc(:album_id), 1, Sequel.lit('RANDOM()'), Sequel.qualify(:b, :a)]
1126
+ @c1.order(Sequel[:artists][:blah2], Sequel[:artists][:blah3]).eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3, tags.blah__id, tags.blah__id DESC, blah.id DESC, blah.id, tags.album_id, tags.album_id DESC, 1, RANDOM(), b.a'
1127
+ end
1128
+
1129
+ it "should not respect the association's :order if :order_eager_graph is false" do
1130
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2], :order_eager_graph=>false
1131
+ @c1.order(Sequel[:artists][:blah2], Sequel[:artists][:blah3]).eager_graph(:tags).sql.must_equal 'SELECT artists.id, tags.id AS tags_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3'
1132
+ end
1133
+
1134
+ it "should add the associations :order for multiple associations" do
1135
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2]
1136
+ @c1.many_through_many :albums, [[:albums_artists, :artist_id, :album_id]], :order=>[:blah3, :blah4]
1137
+ @c1.eager_graph(:tags, :albums).sql.must_equal 'SELECT artists.id, tags.id AS tags_id, albums_0.id AS albums_0_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) ORDER BY tags.blah1, tags.blah2, albums_0.blah3, albums_0.blah4'
1138
+ end
1139
+
1140
+ it "should add the association's :order for cascading associations" do
1141
+ @c1.many_through_many :tags, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2]
1142
+ Tag.many_through_many :tracks, [[:albums_tags, :tag_id, :album_id], [:albums, :id, :id]], :right_primary_key=>:album_id, :order=>[:blah3, :blah4]
1143
+ @c1.eager_graph(:tags=>:tracks).sql.must_equal 'SELECT artists.id, tags.id AS tags_id, tracks.id AS tracks_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tags.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks ON (tracks.album_id = albums_0.id) ORDER BY tags.blah1, tags.blah2, tracks.blah3, tracks.blah4'
1144
+ end
1145
+
1146
+ it "should use the correct qualifier when graphing multiple tables with extra conditions" do
1147
+ @c1.many_through_many :tags, [{:table=>:albums_artists, :left=>:artist_id, :right=>:album_id, :conditions=>{:a=>:b}}, {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]]
1148
+ @c1.many_through_many :albums, [{:table=>:albums_artists, :left=>:artist_id, :right=>:album_id, :conditions=>{:c=>:d}}]
1149
+ @c1.eager_graph(:tags, :albums).sql.must_equal 'SELECT artists.id, tags.id AS tags_id, albums_0.id AS albums_0_id FROM artists LEFT OUTER JOIN albums_artists ON ((albums_artists.artist_id = artists.id) AND (albums_artists.a = artists.b)) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags ON (tags.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON ((albums_artists_0.artist_id = artists.id) AND (albums_artists_0.c = artists.d)) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id)'
1150
+ end
1151
+ end
1152
+
1153
+ describe "many_through_many associations with non-column expression keys" do
1154
+ before do
1155
+ @db = Sequel.mock(:fetch=>{:id=>1, :object_ids=>[2]})
1156
+ @Foo = Class.new(Sequel::Model(@db[:foos]))
1157
+ @Foo.columns :id, :object_ids
1158
+ @Foo.plugin :many_through_many
1159
+ m = Module.new{def obj_id; object_ids[0]; end}
1160
+ @Foo.include m
1161
+
1162
+ @Foo.many_through_many :foos, [
1163
+ [:f, Sequel.subscript(:l, 0), Sequel.subscript(:r, 0)],
1164
+ [:f, Sequel.subscript(:l, 1), Sequel.subscript(:r, 1)]
1165
+ ], :class=>@Foo, :left_primary_key=>:obj_id, :left_primary_key_column=>Sequel.subscript(:object_ids, 0), :right_primary_key=>Sequel.subscript(:object_ids, 0), :right_primary_key_method=>:obj_id
1166
+ @foo = @Foo.load(:id=>1, :object_ids=>[2])
1167
+ @db.sqls
1168
+ end
1169
+
1170
+ it "should have working regular association methods" do
1171
+ @Foo.first.foos.must_equal [@foo]
1172
+ @db.sqls.must_equal ["SELECT * FROM foos LIMIT 1", "SELECT foos.* FROM foos INNER JOIN f ON (f.r[1] = foos.object_ids[0]) INNER JOIN f AS f_0 ON (f_0.r[0] = f.l[1]) WHERE (f_0.l[0] = 2)"]
1173
+ end
1174
+
1175
+ it "should have working eager loading methods" do
1176
+ @db.fetch = [[{:id=>1, :object_ids=>[2]}], [{:id=>1, :object_ids=>[2], :x_foreign_key_x=>2}]]
1177
+ @Foo.eager(:foos).all.map{|o| [o, o.foos]}.must_equal [[@foo, [@foo]]]
1178
+ @db.sqls.must_equal ["SELECT * FROM foos", "SELECT foos.*, f_0.l[0] AS x_foreign_key_x FROM foos INNER JOIN f ON (f.r[1] = foos.object_ids[0]) INNER JOIN f AS f_0 ON (f_0.r[0] = f.l[1]) WHERE (f_0.l[0] IN (2))"]
1179
+ end
1180
+
1181
+ it "should have working eager graphing methods" do
1182
+ @db.fetch = {:id=>1, :object_ids=>[2], :foos_0_id=>1, :foos_0_object_ids=>[2]}
1183
+ @Foo.eager_graph(:foos).all.map{|o| [o, o.foos]}.must_equal [[@foo, [@foo]]]
1184
+ @db.sqls.must_equal ["SELECT foos.id, foos.object_ids, foos_0.id AS foos_0_id, foos_0.object_ids AS foos_0_object_ids FROM foos LEFT OUTER JOIN f ON (f.l[0] = foos.object_ids[0]) LEFT OUTER JOIN f AS f_0 ON (f_0.l[1] = f.r[0]) LEFT OUTER JOIN foos AS foos_0 ON (foos_0.object_ids[0] = f_0.r[1])"]
1185
+ end
1186
+
1187
+ it "should have working filter by associations with model instances" do
1188
+ @Foo.first(:foos=>@foo).must_equal @foo
1189
+ @db.sqls.must_equal ["SELECT * FROM foos WHERE (foos.object_ids[0] IN (SELECT f.l[0] FROM f INNER JOIN f AS f_0 ON (f_0.l[1] = f.r[0]) WHERE ((f_0.r[1] = 2) AND (f.l[0] IS NOT NULL)))) LIMIT 1"]
1190
+ end
1191
+
1192
+ it "should have working filter by associations with model datasets" do
1193
+ @Foo.first(:foos=>@Foo.where(:id=>@foo.id)).must_equal @foo
1194
+ @db.sqls.must_equal ["SELECT * FROM foos WHERE (foos.object_ids[0] IN (SELECT f.l[0] FROM f INNER JOIN f AS f_0 ON (f_0.l[1] = f.r[0]) WHERE ((f_0.r[1] IN (SELECT foos.object_ids[0] FROM foos WHERE ((id = 1) AND (foos.object_ids[0] IS NOT NULL)))) AND (f.l[0] IS NOT NULL)))) LIMIT 1"]
1195
+ end
1196
+ end
1197
+
1198
+ describe Sequel::Model, "one_through_many" do
1199
+ before do
1200
+ class ::Artist < Sequel::Model
1201
+ attr_accessor :yyy
1202
+ columns :id
1203
+ plugin :many_through_many
1204
+ end
1205
+ class ::Tag < Sequel::Model
1206
+ columns :id, :h1, :h2
1207
+ end
1208
+ @c1 = Artist
1209
+ @c2 = Tag
1210
+ @dataset = @c2.dataset = @c2.dataset.with_fetch(:id=>1)
1211
+ DB.reset
1212
+ end
1213
+ after do
1214
+ Object.send(:remove_const, :Artist)
1215
+ Object.send(:remove_const, :Tag)
1216
+ end
1217
+
1218
+ it "should support using a custom :left_primary_key option when eager loading many_to_many associations" do
1219
+ @c1.send(:define_method, :id3){id*3}
1220
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1)
1221
+ @c2.dataset = @c2.dataset.with_fetch(:id=>4, :x_foreign_key_x=>3)
1222
+ @c1.one_through_many :tag, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:id3
1223
+ a = @c1.eager(:tag).all
1224
+ a.must_equal [@c1.load(:id => 1)]
1225
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (3))"]
1226
+ a.first.tag.must_equal @c2.load(:id=>4)
1227
+ DB.sqls.must_equal []
1228
+ end
1229
+
1230
+ it "should handle a :predicate_key option to change the SQL used in the lookup" do
1231
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1)
1232
+ @c2.dataset = @c2.dataset.with_fetch(:id=>4, :x_foreign_key_x=>1)
1233
+ @c1.one_through_many :tag, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :predicate_key=>(Sequel[:albums_artists][:artist_id] / 3)
1234
+ a = @c1.eager(:tag).all
1235
+ a.must_equal [@c1.load(:id => 1)]
1236
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT tags.*, (albums_artists.artist_id / 3) AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id / 3) IN (1))"]
1237
+ a.first.tag.must_equal @c2.load(:id=>4)
1238
+ end
1239
+
1240
+ it "should raise an error if in invalid form of through is used" do
1241
+ proc{@c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id]]}.must_raise(Sequel::Error)
1242
+ proc{@c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], {:table=>:album_tags, :left=>:album_id}]}.must_raise(Sequel::Error)
1243
+ proc{@c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], :album_tags]}.must_raise(Sequel::Error)
1244
+ end
1245
+
1246
+ it "should allow only two arguments with the :through option" do
1247
+ @c1.one_through_many :tag, :through=>[[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1248
+ n = @c1.load(:id => 1234)
1249
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1250
+ n.tag.must_equal @c2.load(:id=>1)
1251
+ end
1252
+
1253
+ it "should be clonable" do
1254
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1255
+ @c1.many_through_many :tags, :clone=>:tag
1256
+ @c1.one_through_many :tag, :clone=>:tags
1257
+ n = @c1.load(:id => 1234)
1258
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1259
+ n.tag.must_equal @c2.load(:id=>1)
1260
+ end
1261
+
1262
+ it "should use join tables given" do
1263
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1264
+ n = @c1.load(:id => 1234)
1265
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1266
+ n.tag.must_equal @c2.load(:id=>1)
1267
+ end
1268
+
1269
+ it "should handle multiple aliasing of tables" do
1270
+ begin
1271
+ class ::Album < Sequel::Model
1272
+ end
1273
+ @c1.one_through_many :album, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_artists, :album_id, :artist_id], [:artists, :id, :id], [:albums_artists, :artist_id, :album_id]]
1274
+ n = @c1.load(:id => 1234)
1275
+ n.album_dataset.sql.must_equal 'SELECT albums.* FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) INNER JOIN artists ON (artists.id = albums_artists.artist_id) INNER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) INNER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) INNER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.album_id = albums_0.id) WHERE (albums_artists_1.artist_id = 1234) LIMIT 1'
1276
+ n.album.must_equal Album.load(:id=>1, :x=>1)
1277
+ ensure
1278
+ Object.send(:remove_const, :Album)
1279
+ end
1280
+ end
1281
+
1282
+ it "should use explicit class if given" do
1283
+ @c1.one_through_many :album_tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag
1284
+ n = @c1.load(:id => 1234)
1285
+ n.album_tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1286
+ n.album_tag.must_equal @c2.load(:id=>1)
1287
+ end
1288
+
1289
+ it "should accept :left_primary_key and :right_primary_key option for primary keys to use in current and associated table" do
1290
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :right_primary_key=>:tag_id, :left_primary_key=>:yyy
1291
+ n = @c1.load(:id => 1234)
1292
+ n.yyy = 85
1293
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.tag_id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 85) LIMIT 1'
1294
+ n.tag.must_equal @c2.load(:id=>1)
1295
+ end
1296
+
1297
+ it "should handle composite keys" do
1298
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1299
+ n = @c1.load(:id => 1234)
1300
+ n.yyy = 85
1301
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((albums_artists.b1 = 1234) AND (albums_artists.b2 = 85)) LIMIT 1'
1302
+ n.tag.must_equal @c2.load(:id=>1)
1303
+ end
1304
+
1305
+ it "should allowing filtering by one_through_many associations" do
1306
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1307
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id = 1234) AND (albums_artists.artist_id IS NOT NULL))))'
1308
+ end
1309
+
1310
+ it "should allowing filtering by one_through_many associations with a single through table" do
1311
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id]]
1312
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists WHERE ((albums_artists.album_id = 1234) AND (albums_artists.artist_id IS NOT NULL))))'
1313
+ end
1314
+
1315
+ it "should allowing filtering by one_through_many associations with aliased tables" do
1316
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums_artists, :id, :id], [:albums_artists, :album_id, :tag_id]]
1317
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.id = albums_artists.album_id) INNER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.album_id = albums_artists_0.id) WHERE ((albums_artists_1.tag_id = 1234) AND (albums_artists.artist_id IS NOT NULL))))'
1318
+ end
1319
+
1320
+ it "should allowing filtering by one_through_many associations with composite keys" do
1321
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1322
+ @c1.filter(:tag=>@c2.load(:h1=>1234, :h2=>85)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE ((albums_tags.g1 = 1234) AND (albums_tags.g2 = 85) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL))))'
1323
+ end
1324
+
1325
+ it "should allowing filtering by one_through_many associations with :conditions" do
1326
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
1327
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id = 1234))))"
1328
+ end
1329
+
1330
+ it "should allowing filtering by one_through_many associations with :conditions with a single through table" do
1331
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id]], :conditions=>{:name=>'A'}
1332
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_artists ON (albums_artists.album_id = tags.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id = 1234))))"
1333
+ end
1334
+
1335
+ it "should allowing filtering by one_through_many associations with :conditions and composite keys" do
1336
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
1337
+ @c1.filter(:tag=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id = 1))))"
1338
+ end
1339
+
1340
+ it "should allowing filtering by one_through_many associations with :order" do
1341
+ @c2.dataset = @c2.dataset.with_extend{def supports_distinct_on?; true end}
1342
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:name
1343
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id IS NOT NULL) AND ((albums_artists.artist_id, tags.id) IN (SELECT DISTINCT ON (albums_artists.artist_id) albums_artists.artist_id, tags.id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) ORDER BY albums_artists.artist_id, name)) AND (tags.id = 1234))))'
1344
+ end
1345
+
1346
+ it "should allowing filtering by one_through_many associations with :order and composite keys" do
1347
+ @c2.dataset = @c2.dataset.with_extend{def supports_distinct_on?; true end}
1348
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :order=>:name
1349
+ @c1.filter(:tag=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND ((albums_artists.b1, albums_artists.b2, tags.id) IN (SELECT DISTINCT ON (albums_artists.b1, albums_artists.b2) albums_artists.b1, albums_artists.b2, tags.id FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) ORDER BY albums_artists.b1, albums_artists.b2, name)) AND (tags.id = 1))))'
1350
+ end
1351
+
1352
+ it "should allowing filtering by one_through_many associations with :order and :conditions" do
1353
+ @c2.dataset = @c2.dataset.with_extend{def supports_distinct_on?; true end}
1354
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}, :order=>:name
1355
+ @c1.filter(:tag=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND ((albums_artists.artist_id, tags.id) IN (SELECT DISTINCT ON (albums_artists.artist_id) albums_artists.artist_id, tags.id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (name = 'A') ORDER BY albums_artists.artist_id, name)) AND (tags.id = 1234))))"
1356
+ end
1357
+
1358
+ it "should allowing filtering by one_through_many associations with :order and :conditions and composite keys" do
1359
+ @c2.dataset = @c2.dataset.with_extend{def supports_distinct_on?; true end}
1360
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}, :order=>:name
1361
+ @c1.filter(:tag=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND ((albums_artists.b1, albums_artists.b2, tags.id) IN (SELECT DISTINCT ON (albums_artists.b1, albums_artists.b2) albums_artists.b1, albums_artists.b2, tags.id FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE (name = 'A') ORDER BY albums_artists.b1, albums_artists.b2, name)) AND (tags.id = 1))))"
1362
+ end
1363
+
1364
+ it "should allowing excluding by one_through_many associations" do
1365
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1366
+ @c1.exclude(:tag=>@c2.load(:id=>1234)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id = 1234) AND (albums_artists.artist_id IS NOT NULL)))) OR (artists.id IS NULL))'
1367
+ end
1368
+
1369
+ it "should allowing excluding by one_through_many associations with composite keys" do
1370
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1371
+ @c1.exclude(:tag=>@c2.load(:h1=>1234, :h2=>85)).sql.must_equal 'SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE ((albums_tags.g1 = 1234) AND (albums_tags.g2 = 85) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))'
1372
+ end
1373
+
1374
+ it "should allowing excluding by one_through_many associations with :conditions" do
1375
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
1376
+ @c1.exclude(:tag=>@c2.load(:id=>1234)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id = 1234)))) OR (artists.id IS NULL))"
1377
+ end
1378
+
1379
+ it "should allowing excluding by one_through_many associations with :conditions and composite keys" do
1380
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
1381
+ @c1.exclude(:tag=>@c2.load(:id=>1, :h1=>1234, :h2=>85)).sql.must_equal "SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id = 1)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))"
1382
+ end
1383
+
1384
+ it "should allowing filtering by multiple one_through_many associations" do
1385
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1386
+ @c1.filter(:tag=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (1234, 2345)) AND (albums_artists.artist_id IS NOT NULL))))'
1387
+ end
1388
+
1389
+ it "should allowing filtering by multiple one_through_many associations with composite keys" do
1390
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1391
+ @c1.filter(:tag=>[@c2.load(:h1=>1234, :h2=>85), @c2.load(:h1=>2345, :h2=>95)]).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN ((1234, 85), (2345, 95))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL))))'
1392
+ end
1393
+
1394
+ it "should allowing filtering by multiple one_through_many associations with :conditions" do
1395
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
1396
+ @c1.filter(:tag=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (1234, 2345)))))"
1397
+ end
1398
+
1399
+ it "should allowing filtering by multiple one_through_many associations with :conditions and composite keys" do
1400
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
1401
+ @c1.filter(:tag=>[@c2.load(:id=>1, :h1=>1234, :h2=>85), @c2.load(:id=>2, :h1=>2345, :h2=>95)]).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (1, 2)))))"
1402
+ end
1403
+
1404
+ it "should allowing excluding by multiple one_through_many associations" do
1405
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1406
+ @c1.exclude(:tag=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (1234, 2345)) AND (albums_artists.artist_id IS NOT NULL)))) OR (artists.id IS NULL))'
1407
+ end
1408
+
1409
+ it "should allowing excluding by multiple one_through_many associations with composite keys" do
1410
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1411
+ @c1.exclude(:tag=>[@c2.load(:h1=>1234, :h2=>85), @c2.load(:h1=>2345, :h2=>95)]).sql.must_equal 'SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN ((1234, 85), (2345, 95))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))'
1412
+ end
1413
+
1414
+ it "should allowing excluding by multiple one_through_many associations with :conditions" do
1415
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
1416
+ @c1.exclude(:tag=>[@c2.load(:id=>1234), @c2.load(:id=>2345)]).sql.must_equal "SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (1234, 2345))))) OR (artists.id IS NULL))"
1417
+ end
1418
+
1419
+ it "should allowing excluding by multiple one_through_many associations with :conditions and composite keys" do
1420
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
1421
+ @c1.exclude(:tag=>[@c2.load(:id=>1, :h1=>1234, :h2=>85), @c2.load(:id=>2, :h1=>2345, :h2=>95)]).sql.must_equal "SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (1, 2))))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))"
1422
+ end
1423
+
1424
+ it "should allowing filtering/excluding one_through_many associations with NULL values" do
1425
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1426
+ @c1.filter(:tag=>@c2.new).sql.must_equal 'SELECT * FROM artists WHERE \'f\''
1427
+ @c1.exclude(:tag=>@c2.new).sql.must_equal 'SELECT * FROM artists WHERE \'t\''
1428
+ end
1429
+
1430
+ it "should allowing filtering by one_through_many association datasets" do
1431
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1432
+ @c1.filter(:tag=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (SELECT tags.id FROM tags WHERE ((x = 1) AND (tags.id IS NOT NULL)))) AND (albums_artists.artist_id IS NOT NULL))))'
1433
+ end
1434
+
1435
+ it "should allowing filtering by one_through_many association datasets with composite keys" do
1436
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1437
+ @c1.filter(:tag=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN (SELECT tags.h1, tags.h2 FROM tags WHERE ((x = 1) AND (tags.h1 IS NOT NULL) AND (tags.h2 IS NOT NULL)))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL))))'
1438
+ end
1439
+
1440
+ it "should allowing filtering by one_through_many association datasets with :conditions" do
1441
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
1442
+ @c1.filter(:tag=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE (artists.id IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1))))))"
1443
+ end
1444
+
1445
+ it "should allowing filtering by one_through_many association datasets with :conditions and composite keys" do
1446
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
1447
+ @c1.filter(:tag=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id, artists.yyy) IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1))))))"
1448
+ end
1449
+
1450
+ it "should allowing excluding by one_through_many association datasets" do
1451
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1452
+ @c1.exclude(:tag=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM albums_artists INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE ((albums_tags.tag_id IN (SELECT tags.id FROM tags WHERE ((x = 1) AND (tags.id IS NOT NULL)))) AND (albums_artists.artist_id IS NOT NULL)))) OR (artists.id IS NULL))'
1453
+ end
1454
+
1455
+ it "should allowing excluding by one_through_many association datasets with composite keys" do
1456
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1457
+ @c1.exclude(:tag=>@c2.filter(:x=>1)).sql.must_equal 'SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM albums_artists INNER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) INNER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) WHERE (((albums_tags.g1, albums_tags.g2) IN (SELECT tags.h1, tags.h2 FROM tags WHERE ((x = 1) AND (tags.h1 IS NOT NULL) AND (tags.h2 IS NOT NULL)))) AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL)))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))'
1458
+ end
1459
+
1460
+ it "should allowing excluding by one_through_many association datasets with :conditions" do
1461
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:name=>'A'}
1462
+ @c1.exclude(:tag=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE ((artists.id NOT IN (SELECT albums_artists.artist_id FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((name = 'A') AND (albums_artists.artist_id IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1)))))) OR (artists.id IS NULL))"
1463
+ end
1464
+
1465
+ it "should allowing excluding by one_through_many association datasets with :conditions and composite keys" do
1466
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy], :conditions=>{:name=>'A'}
1467
+ @c1.exclude(:tag=>@c2.filter(:x=>1)).sql.must_equal "SELECT * FROM artists WHERE (((artists.id, artists.yyy) NOT IN (SELECT albums_artists.b1, albums_artists.b2 FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((name = 'A') AND (albums_artists.b1 IS NOT NULL) AND (albums_artists.b2 IS NOT NULL) AND (tags.id IN (SELECT tags.id FROM tags WHERE (x = 1)))))) OR (artists.id IS NULL) OR (artists.yyy IS NULL))"
1468
+ end
1469
+
1470
+ it "should support a :conditions option" do
1471
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:a=>32}
1472
+ n = @c1.load(:id => 1234)
1473
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((a = 32) AND (albums_artists.artist_id = 1234)) LIMIT 1'
1474
+ n.tag.must_equal @c2.load(:id=>1)
1475
+
1476
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>Sequel.lit('a = ?', 42)
1477
+ n = @c1.load(:id => 1234)
1478
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((a = 42) AND (albums_artists.artist_id = 1234)) LIMIT 1'
1479
+ n.tag.must_equal @c2.load(:id=>1)
1480
+ end
1481
+
1482
+ it "should support an :order option" do
1483
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:blah
1484
+ n = @c1.load(:id => 1234)
1485
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) ORDER BY blah LIMIT 1'
1486
+ n.tag.must_equal @c2.load(:id=>1)
1487
+ end
1488
+
1489
+ it "should support an array for the :order option" do
1490
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2]
1491
+ n = @c1.load(:id => 1234)
1492
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) ORDER BY blah1, blah2 LIMIT 1'
1493
+ n.tag.must_equal @c2.load(:id=>1)
1494
+ end
1495
+
1496
+ it "should support a select option" do
1497
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :select=>:blah
1498
+ n = @c1.load(:id => 1234)
1499
+ n.tag_dataset.sql.must_equal 'SELECT blah FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1500
+ n.tag.must_equal @c2.load(:id=>1)
1501
+ end
1502
+
1503
+ it "should support an array for the select option" do
1504
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :select=>[Sequel::SQL::ColumnAll.new(:tags), Sequel[:albums][:name]]
1505
+ n = @c1.load(:id => 1234)
1506
+ n.tag_dataset.sql.must_equal 'SELECT tags.*, albums.name FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1507
+ n.tag.must_equal @c2.load(:id=>1)
1508
+ end
1509
+
1510
+ it "should accept a block" do
1511
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]] do |ds| ds.filter(:yyy=>@yyy) end
1512
+ n = @c1.load(:id => 1234)
1513
+ n.yyy = 85
1514
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id = 1234) AND (yyy = 85)) LIMIT 1'
1515
+ n.tag.must_equal @c2.load(:id=>1)
1516
+ end
1517
+
1518
+ it "should allow the :order option while accepting a block" do
1519
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:blah do |ds| ds.filter(:yyy=>@yyy) end
1520
+ n = @c1.load(:id => 1234)
1521
+ n.yyy = 85
1522
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id = 1234) AND (yyy = 85)) ORDER BY blah LIMIT 1'
1523
+ n.tag.must_equal @c2.load(:id=>1)
1524
+ end
1525
+
1526
+ it "should support a :dataset option that is used instead of the default" do
1527
+ @c1.one_through_many :tag, [[:a, :b, :c]], :dataset=>proc{Tag.join(:albums_tags, [:tag_id]).join(:albums, [:album_id]).join(:albums_artists, [:album_id]).filter(Sequel[:albums_artists][:artist_id]=>id)}
1528
+ n = @c1.load(:id => 1234)
1529
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags USING (tag_id) INNER JOIN albums USING (album_id) INNER JOIN albums_artists USING (album_id) WHERE (albums_artists.artist_id = 1234) LIMIT 1'
1530
+ n.tag.must_equal @c2.load(:id=>1)
1531
+ end
1532
+
1533
+ it "should support a :limit option to specify an offset" do
1534
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :limit=>[nil, 10]
1535
+ n = @c1.load(:id => 1234)
1536
+ n.tag_dataset.sql.must_equal 'SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1 OFFSET 10'
1537
+ n.tag.must_equal @c2.load(:id=>1)
1538
+ end
1539
+
1540
+ it "should have the :eager option affect the _dataset method" do
1541
+ @c2.many_to_many :fans
1542
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager=>:fans
1543
+ @c1.load(:id => 1234).tag_dataset.opts[:eager].must_equal(:fans=>nil)
1544
+ end
1545
+
1546
+ it "should return the associated object" do
1547
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1548
+ @c1.load(:id => 1234).tag.must_equal @c2.load(:id=>1)
1549
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1']
1550
+ end
1551
+
1552
+ it "should populate cache when accessed" do
1553
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1554
+ n = @c1.load(:id => 1234)
1555
+ n.associations[:tag].must_be_nil
1556
+ DB.sqls.must_equal []
1557
+ n.tag.must_equal @c2.load(:id=>1)
1558
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1']
1559
+ n.associations[:tag].must_equal n.tag
1560
+ DB.sqls.length.must_equal 0
1561
+ end
1562
+
1563
+ it "should use cache if available" do
1564
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1565
+ n = @c1.load(:id => 1234)
1566
+ n.associations[:tag] = nil
1567
+ n.tag.must_be_nil
1568
+ DB.sqls.must_equal []
1569
+ end
1570
+
1571
+ it "should not use cache if asked to reload" do
1572
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1573
+ n = @c1.load(:id => 1234)
1574
+ n.associations[:tag] = nil
1575
+ DB.sqls.must_equal []
1576
+ n.tag(:reload=>true).must_equal @c2.load(:id=>1)
1577
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1234) LIMIT 1']
1578
+ n.associations[:tag].must_equal n.tag
1579
+ DB.sqls.length.must_equal 0
1580
+ end
1581
+
1582
+ it "should not add associations methods directly to class" do
1583
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1584
+ im = @c1.instance_methods
1585
+ im.must_include(:tag)
1586
+ im.must_include(:tag_dataset)
1587
+ im2 = @c1.instance_methods(false)
1588
+ im2.wont_include(:tag)
1589
+ im2.wont_include(:tag_dataset)
1590
+ end
1591
+
1592
+ it "should support after_load association callback" do
1593
+ h = []
1594
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :after_load=>:al
1595
+ @c1.class_eval do
1596
+ self::Foo = h
1597
+ def al(v)
1598
+ model::Foo << v.pk * 20
1599
+ end
1600
+ end
1601
+ @c2.dataset = @c2.dataset.with_fetch(:id=>20)
1602
+ p = @c1.load(:id=>10, :parent_id=>20)
1603
+ p.tag
1604
+ h.must_equal [400]
1605
+ p.tag.pk.must_equal 20
1606
+ end
1607
+ end
1608
+
1609
+ describe "one_through_many eager loading methods" do
1610
+ before do
1611
+ class ::Artist < Sequel::Model
1612
+ plugin :many_through_many
1613
+ one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]]
1614
+ one_through_many :other_tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>:Tag
1615
+ one_through_many :album, [[:albums_artists, :artist_id, :album_id]]
1616
+ one_through_many :artist, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_artists, :album_id, :artist_id]]
1617
+ end
1618
+ class ::Tag < Sequel::Model
1619
+ plugin :many_through_many
1620
+ one_through_many :track, [[:albums_tags, :tag_id, :album_id], [:albums, :id, :id]], :right_primary_key=>:album_id
1621
+ end
1622
+ class ::Album < Sequel::Model
1623
+ end
1624
+ class ::Track < Sequel::Model
1625
+ end
1626
+ Artist.dataset = Artist.dataset.with_fetch(proc do |sql|
1627
+ h = {:id => 1}
1628
+ if sql =~ /FROM artists LEFT OUTER JOIN albums_artists/
1629
+ h[:tag_id] = 2
1630
+ h[:album_id] = 3 if sql =~ /LEFT OUTER JOIN albums AS album/
1631
+ h[:track_id] = 4 if sql =~ /LEFT OUTER JOIN tracks AS track/
1632
+ h[:other_tag_id] = 9 if sql =~ /other_tag\.id AS other_tag_id/
1633
+ h[:artist_id] = 10 if sql =~ /artists_0\.id AS artist_id/
1634
+ end
1635
+ h
1636
+ end)
1637
+ Artist.dataset.columns(:id)
1638
+
1639
+ Tag.dataset = Tag.dataset.with_fetch(proc do |sql|
1640
+ h = {:id => 2}
1641
+ if sql =~ /albums_artists.artist_id IN \(([18])\)/
1642
+ h[:x_foreign_key_x] = $1.to_i
1643
+ elsif sql =~ /\(\(albums_artists.b1, albums_artists.b2\) IN \(\(1, 8\)\)\)/
1644
+ h.merge!(:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>8)
1645
+ end
1646
+ h[:tag_id] = h.delete(:id) if sql =~ /albums_artists.artist_id IN \(8\)/
1647
+ h
1648
+ end)
1649
+
1650
+ Album.dataset = Album.dataset.with_fetch(proc do |sql|
1651
+ h = {:id => 3}
1652
+ h[:x_foreign_key_x] = 1 if sql =~ /albums_artists.artist_id IN \(1\)/
1653
+ h
1654
+ end)
1655
+
1656
+ Track.dataset = Track.dataset.with_fetch(proc do |sql|
1657
+ h = {:id => 4}
1658
+ h[:x_foreign_key_x] = 2 if sql =~ /albums_tags.tag_id IN \(2\)/
1659
+ h
1660
+ end)
1661
+
1662
+ @c1 = Artist
1663
+ DB.reset
1664
+ end
1665
+ after do
1666
+ [:Artist, :Tag, :Album, :Track].each{|x| Object.send(:remove_const, x)}
1667
+ end
1668
+
1669
+ it "should eagerly load a single one_through_many association" do
1670
+ a = @c1.eager(:tag).all
1671
+ a.must_equal [@c1.load(:id=>1)]
1672
+ DB.sqls.must_equal ['SELECT * FROM artists', 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
1673
+ a.first.tag.must_equal Tag.load(:id=>2)
1674
+ DB.sqls.length.must_equal 0
1675
+ end
1676
+
1677
+ it "should eagerly load multiple associations in a single call" do
1678
+ a = @c1.eager(:tag, :album).all
1679
+ a.must_equal [@c1.load(:id=>1)]
1680
+ DB.sqls.must_equal ['SELECT * FROM artists',
1681
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
1682
+ 'SELECT albums.*, albums_artists.artist_id AS x_foreign_key_x FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
1683
+ a = a.first
1684
+ a.tag.must_equal Tag.load(:id=>2)
1685
+ a.album.must_equal Album.load(:id=>3)
1686
+ DB.sqls.length.must_equal 0
1687
+ end
1688
+
1689
+ it "should eagerly load multiple associations in separate" do
1690
+ a = @c1.eager(:tag).eager(:album).all
1691
+ a.must_equal [@c1.load(:id=>1)]
1692
+ DB.sqls.must_equal ['SELECT * FROM artists',
1693
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
1694
+ 'SELECT albums.*, albums_artists.artist_id AS x_foreign_key_x FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
1695
+ a = a.first
1696
+ a.tag.must_equal Tag.load(:id=>2)
1697
+ a.album.must_equal Album.load(:id=>3)
1698
+ DB.sqls.length.must_equal 0
1699
+ end
1700
+
1701
+ it "should allow cascading of eager loading for associations of associated models" do
1702
+ a = @c1.eager(:tag=>:track).all
1703
+ a.must_equal [@c1.load(:id=>1)]
1704
+ DB.sqls.must_equal ['SELECT * FROM artists',
1705
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
1706
+ 'SELECT tracks.*, albums_tags.tag_id AS x_foreign_key_x FROM tracks INNER JOIN albums ON (albums.id = tracks.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE (albums_tags.tag_id IN (2))']
1707
+ a = a.first
1708
+ a.tag.must_equal Tag.load(:id=>2)
1709
+ a.tag.track.must_equal Track.load(:id=>4)
1710
+ DB.sqls.length.must_equal 0
1711
+ end
1712
+
1713
+ it "should cascade eagerly loading when the :eager association option is used" do
1714
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager=>:track
1715
+ a = @c1.eager(:tag).all
1716
+ a.must_equal [@c1.load(:id=>1)]
1717
+ DB.sqls.must_equal ['SELECT * FROM artists',
1718
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))',
1719
+ 'SELECT tracks.*, albums_tags.tag_id AS x_foreign_key_x FROM tracks INNER JOIN albums ON (albums.id = tracks.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE (albums_tags.tag_id IN (2))']
1720
+ a = a.first
1721
+ a.tag.must_equal Tag.load(:id=>2)
1722
+ a.tag.track.must_equal Track.load(:id=>4)
1723
+ DB.sqls.length.must_equal 0
1724
+ end
1725
+
1726
+ it "should respect :eager when lazily loading an association" do
1727
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager=>:track
1728
+ a = @c1.load(:id=>1)
1729
+ a.tag.must_equal Tag.load(:id=>2)
1730
+ DB.sqls.must_equal ['SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1) LIMIT 1',
1731
+ 'SELECT tracks.*, albums_tags.tag_id AS x_foreign_key_x FROM tracks INNER JOIN albums ON (albums.id = tracks.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) WHERE (albums_tags.tag_id IN (2))']
1732
+ a.tag.track.must_equal Track.load(:id=>4)
1733
+ DB.sqls.length.must_equal 0
1734
+ end
1735
+
1736
+ it "should raise error if attempting to eagerly load an association using :eager_graph option" do
1737
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_graph=>:track
1738
+ proc{@c1.eager(:tag).all}.must_raise(Sequel::Error)
1739
+ end
1740
+
1741
+ it "should respect :eager_graph when lazily loading an association" do
1742
+ Tag.dataset = Tag.dataset.with_fetch(:id=>2, :track_id=>4).with_extend{def columns; [:id] end}
1743
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_graph=>:track
1744
+ a = @c1.load(:id=>1)
1745
+ a.tag
1746
+ DB.sqls.must_equal [ 'SELECT tags.id, track.id AS track_id FROM (SELECT tags.* FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id = 1) LIMIT 1) AS tags LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tags.id) LEFT OUTER JOIN albums ON (albums.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks AS track ON (track.album_id = albums.id)']
1747
+ a.tag.must_equal Tag.load(:id=>2)
1748
+ a.tag.track.must_equal Track.load(:id=>4)
1749
+ DB.sqls.length.must_equal 0
1750
+ end
1751
+
1752
+ it "should respect :conditions when eagerly loading" do
1753
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :conditions=>{:a=>32}
1754
+ a = @c1.eager(:tag).all
1755
+ a.must_equal [@c1.load(:id=>1)]
1756
+ DB.sqls.must_equal ['SELECT * FROM artists',
1757
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((a = 32) AND (albums_artists.artist_id IN (1)))']
1758
+ a.first.tag.must_equal Tag.load(:id=>2)
1759
+ DB.sqls.length.must_equal 0
1760
+ end
1761
+
1762
+ it "should respect :order when eagerly loading" do
1763
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :order=>:blah, :eager_limit_strategy=>:ruby
1764
+ a = @c1.eager(:tag).all
1765
+ a.must_equal [@c1.load(:id=>1)]
1766
+ DB.sqls.must_equal ['SELECT * FROM artists',
1767
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1)) ORDER BY blah']
1768
+ a.first.tag.must_equal Tag.load(:id=>2)
1769
+ DB.sqls.length.must_equal 0
1770
+ end
1771
+
1772
+ it "should use the association's block when eager loading by default" do
1773
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]] do |ds| ds.filter(:a) end
1774
+ a = @c1.eager(:tag).all
1775
+ a.must_equal [@c1.load(:id=>1)]
1776
+ DB.sqls.must_equal ['SELECT * FROM artists',
1777
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (a AND (albums_artists.artist_id IN (1)))']
1778
+ a.first.tag.must_equal Tag.load(:id=>2)
1779
+ DB.sqls.length.must_equal 0
1780
+ end
1781
+
1782
+ it "should use the :eager_block option when eager loading if given" do
1783
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :eager_block=>proc{|ds| ds.filter(:b)} do |ds| ds.filter(:a) end
1784
+ a = @c1.eager(:tag).all
1785
+ a.must_equal [@c1.load(:id=>1)]
1786
+ DB.sqls.must_equal ['SELECT * FROM artists',
1787
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (b AND (albums_artists.artist_id IN (1)))']
1788
+ a.first.tag.must_equal Tag.load(:id=>2)
1789
+ DB.sqls.length.must_equal 0
1790
+ end
1791
+
1792
+ it "should respect the :limit option on a one_through_many association" do
1793
+ @c1.one_through_many :second_tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1]
1794
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>6}])
1795
+ a = @c1.eager(:second_tag).all
1796
+ a.must_equal [@c1.load(:id=>1)]
1797
+ DB.sqls.must_equal ['SELECT * FROM artists',
1798
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (1 = albums_artists.artist_id) LIMIT 1 OFFSET 1) AS t1']
1799
+ a.first.second_tag.must_equal Tag.load(:id=>6)
1800
+ DB.sqls.length.must_equal 0
1801
+ end
1802
+
1803
+ it "should respect the :limit option on a one_through_many association using the :ruby strategy" do
1804
+ @c1.one_through_many :second_tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1], :eager_limit_strategy=>:ruby
1805
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>5}, {:x_foreign_key_x=>1, :id=>6}])
1806
+ a = @c1.eager(:second_tag).all
1807
+ a.must_equal [@c1.load(:id=>1)]
1808
+ DB.sqls.must_equal ['SELECT * FROM artists',
1809
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
1810
+ a.first.second_tag.must_equal Tag.load(:id=>6)
1811
+ DB.sqls.length.must_equal 0
1812
+ end
1813
+
1814
+ it "should eagerly load a single one_through_many association using the :distinct_on strategy" do
1815
+ @c1.one_through_many :second_tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :order=>:name, :eager_limit_strategy=>:distinct_on
1816
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>5}]).with_extend{def supports_distinct_on?; true end}
1817
+ a = @c1.eager(:second_tag).all
1818
+ a.must_equal [@c1.load(:id=>1)]
1819
+ DB.sqls.must_equal ['SELECT * FROM artists', "SELECT DISTINCT ON (albums_artists.artist_id) tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1)) ORDER BY albums_artists.artist_id, name"]
1820
+ a.first.second_tag.must_equal Tag.load(:id=>5)
1821
+ DB.sqls.length.must_equal 0
1822
+ end
1823
+
1824
+ it "should eagerly load a single one_through_many association using the :window_function strategy" do
1825
+ @c1.one_through_many :second_tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1], :order=>:name, :eager_limit_strategy=>:window_function
1826
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_x=>1, :id=>5}]).with_extend{def supports_window_functions?; true end}
1827
+ a = @c1.eager(:second_tag).all
1828
+ a.must_equal [@c1.load(:id=>1)]
1829
+ DB.sqls.must_equal ['SELECT * FROM artists',
1830
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x, row_number() OVER (PARTITION BY albums_artists.artist_id ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))) AS t1 WHERE (x_sequel_row_number_x = 2)']
1831
+ a.first.second_tag.must_equal Tag.load(:id=>5)
1832
+ DB.sqls.length.must_equal 0
1833
+ end
1834
+
1835
+ it "should respect the :limit option on a one_through_many association with composite primary keys on the main table" do
1836
+ @c1.set_primary_key([:id1, :id2])
1837
+ @c1.columns :id1, :id2
1838
+
1839
+ @c1.one_through_many :second_tag, [[:albums_artists, [:artist_id1, :artist_id2], :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1], :order=>:name
1840
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>2, :id=>5}]).with_extend{def supports_window_functions?; true end}
1841
+ a = @c1.eager(:second_tag).with_fetch(:id1=>1, :id2=>2).all
1842
+ a.must_equal [@c1.load(:id1=>1, :id2=>2)]
1843
+ DB.sqls.must_equal ['SELECT * FROM artists',
1844
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id1 AS x_foreign_key_0_x, albums_artists.artist_id2 AS x_foreign_key_1_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((1 = albums_artists.artist_id1) AND (2 = albums_artists.artist_id2)) ORDER BY name LIMIT 1 OFFSET 1) AS t1']
1845
+ a.first.second_tag.must_equal Tag.load(:id=>5)
1846
+ DB.sqls.length.must_equal 0
1847
+ end
1848
+
1849
+ it "should respect the :limit option on a one_through_many association with composite primary keys on the main table using a :window_function strategy" do
1850
+ @c1.set_primary_key([:id1, :id2])
1851
+ @c1.columns :id1, :id2
1852
+
1853
+ @c1.one_through_many :second_tag, [[:albums_artists, [:artist_id1, :artist_id2], :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :class=>Tag, :limit=>[nil,1], :order=>:name, :eager_limit_strategy=>:window_function
1854
+ Tag.dataset = Tag.dataset.with_fetch([{:x_foreign_key_0_x=>1, :x_foreign_key_1_x=>2, :id=>5}]).with_extend{def supports_window_functions?; true end}
1855
+ a = @c1.eager(:second_tag).with_fetch(:id1=>1, :id2=>2).all
1856
+ a.must_equal [@c1.load(:id1=>1, :id2=>2)]
1857
+ DB.sqls.must_equal ['SELECT * FROM artists',
1858
+ 'SELECT * FROM (SELECT tags.*, albums_artists.artist_id1 AS x_foreign_key_0_x, albums_artists.artist_id2 AS x_foreign_key_1_x, row_number() OVER (PARTITION BY albums_artists.artist_id1, albums_artists.artist_id2 ORDER BY name) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE ((albums_artists.artist_id1, albums_artists.artist_id2) IN ((1, 2)))) AS t1 WHERE (x_sequel_row_number_x = 2)']
1859
+ a.first.second_tag.must_equal Tag.load(:id=>5)
1860
+ DB.sqls.length.must_equal 0
1861
+ end
1862
+
1863
+ it "should raise an error when attempting to eagerly load an association with the :allow_eager option set to false" do
1864
+ @c1.eager(:tag).all
1865
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :allow_eager=>false
1866
+ proc{@c1.eager(:tag).all}.must_raise(Sequel::Error)
1867
+ end
1868
+
1869
+ it "should respect the association's :select option" do
1870
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :select=>Sequel[:tags][:name]
1871
+ a = @c1.eager(:tag).all
1872
+ a.must_equal [@c1.load(:id=>1)]
1873
+ DB.sqls.must_equal ['SELECT * FROM artists',
1874
+ 'SELECT tags.name, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
1875
+ a.first.tag.must_equal Tag.load(:id=>2)
1876
+ DB.sqls.length.must_equal 0
1877
+ end
1878
+
1879
+ it "should respect one_through_many association's :left_primary_key and :right_primary_key options" do
1880
+ @c1.send(:define_method, :yyy){values[:yyy]}
1881
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1, :yyy=>8).with_extend{def columns; [:id, :yyy] end}
1882
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:yyy, :right_primary_key=>:tag_id
1883
+ a = @c1.eager(:tag).all
1884
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
1885
+ DB.sqls.must_equal ['SELECT * FROM artists',
1886
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.tag_id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (8))']
1887
+ a.first.tag.must_equal Tag.load(:tag_id=>2)
1888
+ DB.sqls.length.must_equal 0
1889
+ end
1890
+
1891
+ it "should handle composite keys" do
1892
+ @c1.send(:define_method, :yyy){values[:yyy]}
1893
+ @c1.dataset = @c1.dataset.with_fetch(:id=>1, :yyy=>8).with_extend{def columns; [:id, :yyy] end}
1894
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:h1, :h2], :left_primary_key=>[:id, :yyy]
1895
+ a = @c1.eager(:tag).all
1896
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
1897
+ DB.sqls.must_equal ['SELECT * FROM artists',
1898
+ 'SELECT tags.*, albums_artists.b1 AS x_foreign_key_0_x, albums_artists.b2 AS x_foreign_key_1_x FROM tags INNER JOIN albums_tags ON ((albums_tags.g1 = tags.h1) AND (albums_tags.g2 = tags.h2)) INNER JOIN albums ON ((albums.e1 = albums_tags.f1) AND (albums.e2 = albums_tags.f2)) INNER JOIN albums_artists ON ((albums_artists.c1 = albums.d1) AND (albums_artists.c2 = albums.d2)) WHERE ((albums_artists.b1, albums_artists.b2) IN ((1, 8)))']
1899
+ a.first.tag.must_equal Tag.load(:id=>2)
1900
+ DB.sqls.length.must_equal 0
1901
+ end
1902
+
1903
+ it "should respect :after_load callbacks on associations when eager loading" do
1904
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :after_load=>lambda{|o, a| o[:id] *= 2; a[:id] *= 3}
1905
+ a = @c1.eager(:tag).all
1906
+ a.must_equal [@c1.load(:id=>2)]
1907
+ DB.sqls.must_equal ['SELECT * FROM artists',
1908
+ 'SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
1909
+ a.first.tag.must_equal Tag.load(:id=>6)
1910
+ DB.sqls.length.must_equal 0
1911
+ end
1912
+
1913
+ it "should support association_join" do
1914
+ @c1.association_join(:tag).sql.must_equal "SELECT * FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)"
1915
+ end
1916
+
1917
+ it "should eagerly graph a single one_through_many association" do
1918
+ a = @c1.eager_graph(:tag).all
1919
+ a.must_equal [@c1.load(:id=>1)]
1920
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)']
1921
+ a.first.tag.must_equal Tag.load(:id=>2)
1922
+ DB.sqls.length.must_equal 0
1923
+ end
1924
+
1925
+ it "should eagerly graph a single one_through_many association using the :distinct_on strategy" do
1926
+ Tag.dataset = Tag.dataset.with_extend{def supports_distinct_on?; true end}
1927
+ a = @c1.eager_graph_with_options(:tag, :limit_strategy=>true).with_fetch(:id=>1, :tag_id=>2).all
1928
+ a.must_equal [@c1.load(:id=>1)]
1929
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN (SELECT DISTINCT ON (albums_artists.artist_id) tags.*, albums_artists.artist_id AS x_foreign_key_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) ORDER BY albums_artists.artist_id) AS tag ON (tag.x_foreign_key_x = artists.id)']
1930
+ a.first.tag.must_equal Tag.load(:id=>2)
1931
+ DB.sqls.length.must_equal 0
1932
+ end
1933
+
1934
+ it "should eagerly graph a single one_through_many association using the :window_function strategy" do
1935
+ Tag.dataset = Tag.dataset.with_extend do
1936
+ def supports_window_functions?; true end
1937
+ def columns; literal(opts[:select]) =~ /x_foreign_key_x/ ? [:id, :x_foreign_key_x] : [:id] end
1938
+ end
1939
+ a = @c1.eager_graph_with_options(:tag, :limit_strategy=>true).with_fetch(:id=>1, :tag_id=>2).all
1940
+ a.must_equal [@c1.load(:id=>1)]
1941
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN (SELECT id, x_foreign_key_x FROM (SELECT tags.*, albums_artists.artist_id AS x_foreign_key_x, row_number() OVER (PARTITION BY albums_artists.artist_id) AS x_sequel_row_number_x FROM tags INNER JOIN albums_tags ON (albums_tags.tag_id = tags.id) INNER JOIN albums ON (albums.id = albums_tags.album_id) INNER JOIN albums_artists ON (albums_artists.album_id = albums.id)) AS t1 WHERE (x_sequel_row_number_x = 1)) AS tag ON (tag.x_foreign_key_x = artists.id)']
1942
+ a.first.tag.must_equal Tag.load(:id=>2)
1943
+ DB.sqls.length.must_equal 0
1944
+ end
1945
+
1946
+ it "should eagerly graph multiple associations in a single call" do
1947
+ a = @c1.eager_graph(:tag, :album).all
1948
+ a.must_equal [@c1.load(:id=>1)]
1949
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, album.id AS album_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS album ON (album.id = albums_artists_0.album_id)']
1950
+ a = a.first
1951
+ a.tag.must_equal Tag.load(:id=>2)
1952
+ a.album.must_equal Album.load(:id=>3)
1953
+ DB.sqls.length.must_equal 0
1954
+ end
1955
+
1956
+ it "should eagerly graph multiple associations in separate calls" do
1957
+ a = @c1.eager_graph(:tag).eager_graph(:album).all
1958
+ a.must_equal [@c1.load(:id=>1)]
1959
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, album.id AS album_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS album ON (album.id = albums_artists_0.album_id)']
1960
+ a = a.first
1961
+ a.tag.must_equal Tag.load(:id=>2)
1962
+ a.album.must_equal Album.load(:id=>3)
1963
+ DB.sqls.length.must_equal 0
1964
+ end
1965
+
1966
+ it "should allow cascading of eager graphing for associations of associated models" do
1967
+ a = @c1.eager_graph(:tag=>:track).all
1968
+ a.must_equal [@c1.load(:id=>1)]
1969
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, track.id AS track_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tag.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks AS track ON (track.album_id = albums_0.id)']
1970
+ a = a.first
1971
+ a.tag.must_equal Tag.load(:id=>2)
1972
+ a.tag.track.must_equal Track.load(:id=>4)
1973
+ DB.sqls.length.must_equal 0
1974
+ end
1975
+
1976
+ it "should eager graph multiple associations from the same table" do
1977
+ a = @c1.eager_graph(:tag, :other_tag).all
1978
+ a.must_equal [@c1.load(:id=>1)]
1979
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, other_tag.id AS other_tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.album_id = albums_0.id) LEFT OUTER JOIN tags AS other_tag ON (other_tag.id = albums_tags_0.tag_id)']
1980
+ a = a.first
1981
+ a.tag.must_equal Tag.load(:id=>2)
1982
+ a.other_tag.must_equal Tag.load(:id=>9)
1983
+ DB.sqls.length.must_equal 0
1984
+ end
1985
+
1986
+ it "should eager graph a self_referential association" do
1987
+ a = @c1.eager_graph(:tag, :artist).with_fetch(:id=>1, :tag_id=>2, :artist_id=>10).all
1988
+ a.must_equal [@c1.load(:id=>1)]
1989
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, artist.id AS artist_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_0.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.album_id = albums_0.id) LEFT OUTER JOIN artists AS artist ON (artist.id = albums_artists_1.artist_id)']
1990
+ a = a.first
1991
+ a.tag.must_equal Tag.load(:id=>2)
1992
+ a.artist.must_equal @c1.load(:id=>10)
1993
+ DB.sqls.length.must_equal 0
1994
+ end
1995
+
1996
+ it "should be able to use eager and eager_graph together" do
1997
+ a = @c1.eager_graph(:tag).eager(:album).all
1998
+ a.must_equal [@c1.load(:id=>1)]
1999
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)',
2000
+ 'SELECT albums.*, albums_artists.artist_id AS x_foreign_key_x FROM albums INNER JOIN albums_artists ON (albums_artists.album_id = albums.id) WHERE (albums_artists.artist_id IN (1))']
2001
+ a = a.first
2002
+ a.tag.must_equal Tag.load(:id=>2)
2003
+ a.album.must_equal Album.load(:id=>3)
2004
+ DB.sqls.length.must_equal 0
2005
+ end
2006
+
2007
+ it "should handle no associated records when eagerly graphing a single one_through_many association" do
2008
+ a = @c1.eager_graph(:tag).with_fetch(:id=>1, :tag_id=>nil).all
2009
+ a.must_equal [@c1.load(:id=>1)]
2010
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)']
2011
+ a.first.tag.must_be_nil
2012
+ DB.sqls.length.must_equal 0
2013
+ end
2014
+
2015
+ it "should handle no associated records when eagerly graphing multiple one_through_many associations" do
2016
+ a = @c1.eager_graph(:tag, :album).with_fetch([{:id=>1, :tag_id=>5, :album_id=>6}, {:id=>7, :tag_id=>nil, :albums_0_id=>nil}]).all
2017
+ a.must_equal [@c1.load(:id=>1), @c1.load(:id=>7)]
2018
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, album.id AS album_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.artist_id = artists.id) LEFT OUTER JOIN albums AS album ON (album.id = albums_artists_0.album_id)']
2019
+ a.first.tag.must_equal Tag.load(:id=>5)
2020
+ a.first.album.must_equal Album.load(:id=>6)
2021
+ a.last.tag.must_be_nil
2022
+ a.last.album.must_be_nil
2023
+ DB.sqls.length.must_equal 0
2024
+ end
2025
+
2026
+ it "should handle missing associated records when cascading eager graphing for associations of associated models" do
2027
+ a = @c1.eager_graph(:tag=>:track).with_fetch([{:id=>1, :tag_id=>2, :track_id=>nil}, {:id=>2, :tag_id=>nil, :tracks_id=>nil}]).all
2028
+ a.must_equal [@c1.load(:id=>1), @c1.load(:id=>2)]
2029
+ DB.sqls.must_equal ['SELECT artists.id, tag.id AS tag_id, track.id AS track_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) LEFT OUTER JOIN albums_tags AS albums_tags_0 ON (albums_tags_0.tag_id = tag.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_tags_0.album_id) LEFT OUTER JOIN tracks AS track ON (track.album_id = albums_0.id)']
2030
+ a.last.tag.must_be_nil
2031
+ a = a.first
2032
+ a.tag.must_equal Tag.load(:id=>2)
2033
+ a.tag.track.must_be_nil
2034
+ DB.sqls.length.must_equal 0
2035
+ end
2036
+
2037
+ it "eager graphing should respect :left_primary_key and :right_primary_key options" do
2038
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :left_primary_key=>:yyy, :right_primary_key=>:tag_id
2039
+ @c1.dataset = @c1.dataset.with_extend{def columns; [:id, :yyy] end}
2040
+ Tag.dataset = Tag.dataset.with_extend{def columns; [:id, :tag_id] end}
2041
+ a = @c1.eager_graph(:tag).with_fetch(:id=>1, :yyy=>8, :tag_id=>2, :tag_tag_id=>4).all
2042
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
2043
+ DB.sqls.must_equal ['SELECT artists.id, artists.yyy, tag.id AS tag_id, tag.tag_id AS tag_tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.yyy) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.tag_id = albums_tags.tag_id)']
2044
+ a.first.tag.must_equal Tag.load(:id=>2, :tag_id=>4)
2045
+ DB.sqls.length.must_equal 0
2046
+ end
2047
+
2048
+ it "eager graphing should respect composite keys" do
2049
+ @c1.one_through_many :tag, [[:albums_artists, [:b1, :b2], [:c1, :c2]], [:albums, [:d1, :d2], [:e1, :e2]], [:albums_tags, [:f1, :f2], [:g1, :g2]]], :right_primary_key=>[:id, :tag_id], :left_primary_key=>[:id, :yyy]
2050
+ @c1.dataset = @c1.dataset.with_extend{def columns; [:id, :yyy] end}
2051
+ Tag.dataset = Tag.dataset.with_extend{def columns; [:id, :tag_id] end}
2052
+ a = @c1.eager_graph(:tag).with_fetch(:id=>1, :yyy=>8, :tag_id=>2, :tag_tag_id=>4).all
2053
+ a.must_equal [@c1.load(:id=>1, :yyy=>8)]
2054
+ DB.sqls.must_equal ['SELECT artists.id, artists.yyy, tag.id AS tag_id, tag.tag_id AS tag_tag_id FROM artists LEFT OUTER JOIN albums_artists ON ((albums_artists.b1 = artists.id) AND (albums_artists.b2 = artists.yyy)) LEFT OUTER JOIN albums ON ((albums.d1 = albums_artists.c1) AND (albums.d2 = albums_artists.c2)) LEFT OUTER JOIN albums_tags ON ((albums_tags.f1 = albums.e1) AND (albums_tags.f2 = albums.e2)) LEFT OUTER JOIN tags AS tag ON ((tag.id = albums_tags.g1) AND (tag.tag_id = albums_tags.g2))']
2055
+ a.first.tag.must_equal Tag.load(:id=>2, :tag_id=>4)
2056
+ DB.sqls.length.must_equal 0
2057
+ end
2058
+
2059
+ it "should respect the association's :graph_select option" do
2060
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :graph_select=>:b
2061
+ a = @c1.eager_graph(:tag).with_fetch(:id=>1, :b=>2).all
2062
+ a.must_equal [@c1.load(:id=>1)]
2063
+ DB.sqls.must_equal ['SELECT artists.id, tag.b FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)']
2064
+ a.first.tag.must_equal Tag.load(:b=>2)
2065
+ DB.sqls.length.must_equal 0
2066
+ end
2067
+
2068
+ it "should respect the association's :graph_join_type option" do
2069
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_tags, :album_id, :tag_id]], :graph_join_type=>:inner
2070
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) INNER JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)'
2071
+ end
2072
+
2073
+ it "should respect the association's :join_type option on through" do
2074
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :join_type=>:natural}, [:albums_tags, :album_id, :tag_id]], :graph_join_type=>:inner
2075
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists INNER JOIN albums_artists ON (albums_artists.artist_id = artists.id) NATURAL JOIN albums ON (albums.id = albums_artists.album_id) INNER JOIN albums_tags ON (albums_tags.album_id = albums.id) INNER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)'
2076
+ end
2077
+
2078
+ it "should respect the association's :conditions option" do
2079
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :conditions=>{:a=>32}
2080
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON ((tag.id = albums_tags.tag_id) AND (tag.a = 32))'
2081
+ end
2082
+
2083
+ it "should respect the association's :graph_conditions option" do
2084
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_conditions=>{:a=>42}
2085
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON ((tag.id = albums_tags.tag_id) AND (tag.a = 42))'
2086
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_conditions=>{:a=>42}, :conditions=>{:a=>32}
2087
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON ((tag.id = albums_tags.tag_id) AND (tag.a = 42))'
2088
+ end
2089
+
2090
+ it "should respect the association's :conditions option on through" do
2091
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :conditions=>{:a=>42}}, [:albums_tags, :album_id, :tag_id]]
2092
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON ((albums.id = albums_artists.album_id) AND (albums.a = 42)) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)'
2093
+ end
2094
+
2095
+ it "should respect the association's :graph_block option" do
2096
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_block=>proc{|ja,lja,js| {Sequel.qualify(ja, :active)=>true}}
2097
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON ((tag.id = albums_tags.tag_id) AND (tag.active IS TRUE))'
2098
+ end
2099
+
2100
+ it "should respect the association's :block option on through" do
2101
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :block=>proc{|ja,lja,js| {Sequel.qualify(ja, :active)=>true}}}, [:albums_tags, :album_id, :tag_id]]
2102
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON ((albums.id = albums_artists.album_id) AND (albums.active IS TRUE)) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)'
2103
+ end
2104
+
2105
+ it "should respect the association's :graph_only_conditions option" do
2106
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :graph_only_conditions=>{:a=>32}
2107
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.a = 32)'
2108
+ end
2109
+
2110
+ it "should respect the association's :only_conditions option on through" do
2111
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id, :only_conditions=>{:a=>42}}, [:albums_tags, :album_id, :tag_id]]
2112
+ @c1.eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.a = 42) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id)'
2113
+ end
2114
+
2115
+ it "should create unique table aliases for all associations" do
2116
+ @c1.eager_graph(:artist=>{:artist=>:artist}).sql.must_equal "SELECT artists.id, artist.id AS artist_id, artist_0.id AS artist_0_id, artist_1.id AS artist_1_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_0 ON (albums_artists_0.album_id = albums.id) LEFT OUTER JOIN artists AS artist ON (artist.id = albums_artists_0.artist_id) LEFT OUTER JOIN albums_artists AS albums_artists_1 ON (albums_artists_1.artist_id = artist.id) LEFT OUTER JOIN albums AS albums_0 ON (albums_0.id = albums_artists_1.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_2 ON (albums_artists_2.album_id = albums_0.id) LEFT OUTER JOIN artists AS artist_0 ON (artist_0.id = albums_artists_2.artist_id) LEFT OUTER JOIN albums_artists AS albums_artists_3 ON (albums_artists_3.artist_id = artist_0.id) LEFT OUTER JOIN albums AS albums_1 ON (albums_1.id = albums_artists_3.album_id) LEFT OUTER JOIN albums_artists AS albums_artists_4 ON (albums_artists_4.album_id = albums_1.id) LEFT OUTER JOIN artists AS artist_1 ON (artist_1.id = albums_artists_4.artist_id)"
2117
+ end
2118
+
2119
+ it "should respect the association's :order" do
2120
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[:blah1, :blah2]
2121
+ @c1.order(Sequel[:artists][:blah2], Sequel[:artists][:blah3]).eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3, tag.blah1, tag.blah2'
2122
+ end
2123
+
2124
+ it "should only qualify unqualified symbols, identifiers, or ordered versions in association's :order" do
2125
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[Sequel.identifier(:blah__id), Sequel.identifier(:blah__id).desc, Sequel.desc(Sequel[:blah][:id]), Sequel[:blah][:id], :album_id, Sequel.desc(:album_id), 1, Sequel.lit('RANDOM()'), Sequel.qualify(:b, :a)]
2126
+ @c1.order(Sequel[:artists][:blah2], Sequel[:artists][:blah3]).eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3, tag.blah__id, tag.blah__id DESC, blah.id DESC, blah.id, tag.album_id, tag.album_id DESC, 1, RANDOM(), b.a'
2127
+ end
2128
+
2129
+ with_symbol_splitting "should not qualify qualified symbols in association's :order" do
2130
+ @c1.one_through_many :tag, [[:albums_artists, :artist_id, :album_id], {:table=>:albums, :left=>:id, :right=>:id}, [:albums_tags, :album_id, :tag_id]], :order=>[Sequel.identifier(:blah__id), Sequel.identifier(:blah__id).desc, Sequel.desc(:blah__id), :blah__id, :album_id, Sequel.desc(:album_id), 1, Sequel.lit('RANDOM()'), Sequel.qualify(:b, :a)]
2131
+ @c1.order(:artists__blah2, :artists__blah3).eager_graph(:tag).sql.must_equal 'SELECT artists.id, tag.id AS tag_id FROM artists LEFT OUTER JOIN albums_artists ON (albums_artists.artist_id = artists.id) LEFT OUTER JOIN albums ON (albums.id = albums_artists.album_id) LEFT OUTER JOIN albums_tags ON (albums_tags.album_id = albums.id) LEFT OUTER JOIN tags AS tag ON (tag.id = albums_tags.tag_id) ORDER BY artists.blah2, artists.blah3, tag.blah__id, tag.blah__id DESC, blah.id DESC, blah.id, tag.album_id, tag.album_id DESC, 1, RANDOM(), b.a'
2132
+ end
2133
+ end
2134
+
2135
+ describe "Sequel::Model.finalize_associations" do
2136
+ before do
2137
+ class ::Item < Sequel::Model
2138
+ plugin :many_through_many
2139
+ many_through_many :items, [[:foos, :item1_id, :foo1_id], [:bars, :foo2_id, :item2_id]]
2140
+ one_through_many :item, [[:foos, :item1_id, :foo1_id], [:bars, :foo2_id, :item2_id]]
2141
+ finalize_associations
2142
+ end
2143
+ end
2144
+ after do
2145
+ Object.send(:remove_const, :Item)
2146
+ end
2147
+
2148
+ it "should finalize one_through_many associations" do
2149
+ r = Item.association_reflection(:item)
2150
+ r[:class].must_equal Item
2151
+ r[:_dataset].sql.must_equal "SELECT items.* FROM items INNER JOIN bars ON (bars.item2_id = items.id) INNER JOIN foos ON (foos.foo1_id = bars.foo2_id) LIMIT 1"
2152
+ r[:associated_eager_dataset].sql.must_equal "SELECT items.* FROM items INNER JOIN bars ON (bars.item2_id = items.id) INNER JOIN foos ON (foos.foo1_id = bars.foo2_id)"
2153
+ r[:filter_by_associations_conditions_dataset].sql.must_equal "SELECT foos.item1_id FROM items INNER JOIN bars ON (bars.item2_id = items.id) INNER JOIN foos ON (foos.foo1_id = bars.foo2_id) WHERE (foos.item1_id IS NOT NULL)"
2154
+ r[:placeholder_loader].wont_be_nil
2155
+ r[:predicate_key].must_equal Sequel.qualify(:foos, :item1_id)
2156
+ r[:associated_key_table].must_equal :foos
2157
+ r[:edges].must_equal [{:table=>:foos, :left=>:id, :right=>:item1_id, :conditions=>[], :join_type=>:left_outer, :block=>nil}, {:table=>:bars, :left=>:foo1_id, :right=>:foo2_id, :conditions=>[], :join_type=>:left_outer, :block=>nil}]
2158
+ r[:final_edge].must_equal(:table=>:items, :left=>:item2_id, :right=>:id, :conditions=>nil, :join_type=>nil, :block=>nil)
2159
+ r[:final_reverse_edge].must_equal(:table=>:foos, :left=>:foo1_id, :right=>:foo2_id, :alias=>:foos)
2160
+ r[:reverse_edges].must_equal [{:table=>:bars, :left=>:item2_id, :right=>:id, :alias=>:bars}]
2161
+ end
2162
+
2163
+ it "should finalize many_through_many associations" do
2164
+ r = Item.association_reflection(:items)
2165
+ r[:class].must_equal Item
2166
+ r[:_dataset].sql.must_equal "SELECT items.* FROM items INNER JOIN bars ON (bars.item2_id = items.id) INNER JOIN foos ON (foos.foo1_id = bars.foo2_id)"
2167
+ r[:associated_eager_dataset].sql.must_equal "SELECT items.* FROM items INNER JOIN bars ON (bars.item2_id = items.id) INNER JOIN foos ON (foos.foo1_id = bars.foo2_id)"
2168
+ r[:filter_by_associations_conditions_dataset].sql.must_equal "SELECT foos.item1_id FROM items INNER JOIN bars ON (bars.item2_id = items.id) INNER JOIN foos ON (foos.foo1_id = bars.foo2_id) WHERE (foos.item1_id IS NOT NULL)"
2169
+ r[:placeholder_loader].wont_be_nil
2170
+ r[:predicate_key].must_equal Sequel.qualify(:foos, :item1_id)
2171
+ r[:associated_key_table].must_equal :foos
2172
+ r[:edges].must_equal [{:table=>:foos, :left=>:id, :right=>:item1_id, :conditions=>[], :join_type=>:left_outer, :block=>nil}, {:table=>:bars, :left=>:foo1_id, :right=>:foo2_id, :conditions=>[], :join_type=>:left_outer, :block=>nil}]
2173
+ r[:final_edge].must_equal(:table=>:items, :left=>:item2_id, :right=>:id, :conditions=>nil, :join_type=>nil, :block=>nil)
2174
+ r[:final_reverse_edge].must_equal(:table=>:foos, :left=>:foo1_id, :right=>:foo2_id, :alias=>:foos)
2175
+ r[:reverse_edges].must_equal [{:table=>:bars, :left=>:item2_id, :right=>:id, :alias=>:bars}]
2176
+ end
2177
+ end