asana2flowdock 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1595) hide show
  1. checksums.yaml +8 -8
  2. data/asana2flowdock.gemspec +3 -1819
  3. data/lib/asana2flowdock.rb +1 -1
  4. metadata +1 -1599
  5. data/a.rb +0 -336
  6. data/a.yml +0 -6
  7. data/bin/amalgalite-pack +0 -16
  8. data/bin/asana2flowdock-daemon +0 -16
  9. data/bin/coderay +0 -16
  10. data/bin/httparty +0 -16
  11. data/bin/pry +0 -16
  12. data/bin/sekrets +0 -16
  13. data/bin/sequel +0 -16
  14. data/config/asana2flowdock.yml.enc +0 -2
  15. data/vendor/bundle/ruby/1.9.1/bin/amalgalite-pack +0 -23
  16. data/vendor/bundle/ruby/1.9.1/bin/asana2flowdock +0 -23
  17. data/vendor/bundle/ruby/1.9.1/bin/asana2flowdock-daemon +0 -23
  18. data/vendor/bundle/ruby/1.9.1/bin/coderay +0 -23
  19. data/vendor/bundle/ruby/1.9.1/bin/httparty +0 -23
  20. data/vendor/bundle/ruby/1.9.1/bin/pry +0 -23
  21. data/vendor/bundle/ruby/1.9.1/bin/sekrets +0 -23
  22. data/vendor/bundle/ruby/1.9.1/bin/sequel +0 -23
  23. data/vendor/bundle/ruby/1.9.1/build_info/amalgalite-1.3.0.info +0 -1
  24. data/vendor/bundle/ruby/1.9.1/build_info/arrayfields-4.7.4.info +0 -1
  25. data/vendor/bundle/ruby/1.9.1/build_info/chronic-0.10.2.info +0 -1
  26. data/vendor/bundle/ruby/1.9.1/build_info/coderay-1.1.0.info +0 -1
  27. data/vendor/bundle/ruby/1.9.1/build_info/coerce-0.0.6.info +0 -1
  28. data/vendor/bundle/ruby/1.9.1/build_info/daemons-1.1.9.info +0 -1
  29. data/vendor/bundle/ruby/1.9.1/build_info/fastercsv-1.5.5.info +0 -1
  30. data/vendor/bundle/ruby/1.9.1/build_info/fattr-2.2.2.info +0 -1
  31. data/vendor/bundle/ruby/1.9.1/build_info/flowdock-0.5.0.info +0 -1
  32. data/vendor/bundle/ruby/1.9.1/build_info/highline-1.6.21.info +0 -1
  33. data/vendor/bundle/ruby/1.9.1/build_info/httparty-0.13.1.info +0 -1
  34. data/vendor/bundle/ruby/1.9.1/build_info/json-1.8.1.info +0 -1
  35. data/vendor/bundle/ruby/1.9.1/build_info/main-6.0.0.info +0 -1
  36. data/vendor/bundle/ruby/1.9.1/build_info/main-6.1.0.info +0 -1
  37. data/vendor/bundle/ruby/1.9.1/build_info/map-6.5.5.info +0 -1
  38. data/vendor/bundle/ruby/1.9.1/build_info/method_source-0.8.2.info +0 -1
  39. data/vendor/bundle/ruby/1.9.1/build_info/multi_json-1.10.1.info +0 -1
  40. data/vendor/bundle/ruby/1.9.1/build_info/multi_xml-0.5.5.info +0 -1
  41. data/vendor/bundle/ruby/1.9.1/build_info/pry-0.9.12.6.info +0 -1
  42. data/vendor/bundle/ruby/1.9.1/build_info/sekrets-1.7.0.info +0 -1
  43. data/vendor/bundle/ruby/1.9.1/build_info/sequel-4.15.0.info +0 -1
  44. data/vendor/bundle/ruby/1.9.1/build_info/slop-3.5.0.info +0 -1
  45. data/vendor/bundle/ruby/1.9.1/build_info/threadify-1.3.0.info +0 -1
  46. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/CONTRIBUTING.md +0 -49
  47. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/HISTORY.md +0 -315
  48. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/LICENSE +0 -29
  49. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/Manifest.txt +0 -104
  50. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/README.md +0 -73
  51. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/Rakefile +0 -25
  52. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/TODO.md +0 -50
  53. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/bin/amalgalite-pack +0 -147
  54. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/a.rb +0 -9
  55. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/blob.rb +0 -88
  56. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/bootstrap.rb +0 -36
  57. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/define_aggregate.rb +0 -75
  58. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/define_function.rb +0 -104
  59. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/fts3.rb +0 -144
  60. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/gem-db.rb +0 -94
  61. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/require_me.rb +0 -11
  62. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/requires.rb +0 -42
  63. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/examples/schema-info.rb +0 -34
  64. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/Makefile +0 -220
  65. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.bundle +0 -0
  66. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.c +0 -329
  67. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.h +0 -151
  68. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite.o +0 -0
  69. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_blob.c +0 -240
  70. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_blob.o +0 -0
  71. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_constants.c +0 -378
  72. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_constants.o +0 -0
  73. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_database.c +0 -1177
  74. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_database.o +0 -0
  75. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_requires_bootstrap.c +0 -282
  76. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_requires_bootstrap.o +0 -0
  77. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_statement.c +0 -649
  78. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/amalgalite_statement.o +0 -0
  79. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/extconf.rb +0 -36
  80. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/gen_constants.rb +0 -193
  81. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/notes.txt +0 -134
  82. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3.c +0 -137414
  83. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3.h +0 -7160
  84. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3.o +0 -0
  85. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3_options.h +0 -4
  86. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/ext/amalgalite/c/sqlite3ext.h +0 -447
  87. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite.rb +0 -51
  88. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/1.9/amalgalite.bundle +0 -0
  89. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/aggregate.rb +0 -67
  90. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/blob.rb +0 -186
  91. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/boolean.rb +0 -42
  92. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/busy_timeout.rb +0 -47
  93. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/column.rb +0 -99
  94. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/core_ext/kernel/require.rb +0 -21
  95. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/csv_table_importer.rb +0 -74
  96. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/database.rb +0 -984
  97. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/function.rb +0 -61
  98. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/index.rb +0 -43
  99. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/memory_database.rb +0 -15
  100. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/packer.rb +0 -231
  101. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/paths.rb +0 -80
  102. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/profile_tap.rb +0 -131
  103. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/progress_handler.rb +0 -21
  104. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/requires.rb +0 -151
  105. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/schema.rb +0 -225
  106. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3.rb +0 -6
  107. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/constants.rb +0 -95
  108. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/database/function.rb +0 -48
  109. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/database/status.rb +0 -68
  110. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/status.rb +0 -60
  111. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/sqlite3/version.rb +0 -55
  112. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/statement.rb +0 -418
  113. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/table.rb +0 -91
  114. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/taps.rb +0 -2
  115. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/taps/console.rb +0 -27
  116. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/taps/io.rb +0 -71
  117. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/trace_tap.rb +0 -35
  118. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_map.rb +0 -63
  119. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_maps/default_map.rb +0 -166
  120. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_maps/storage_map.rb +0 -38
  121. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/type_maps/text_map.rb +0 -21
  122. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/version.rb +0 -8
  123. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/lib/amalgalite/view.rb +0 -26
  124. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/aggregate_spec.rb +0 -150
  125. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/amalgalite_spec.rb +0 -4
  126. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/blob_spec.rb +0 -78
  127. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/boolean_spec.rb +0 -24
  128. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/busy_handler.rb +0 -157
  129. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/iso-3166-country.txt +0 -242
  130. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/iso-3166-schema.sql +0 -22
  131. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/iso-3166-subcountry.txt +0 -3995
  132. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/data/make-iso-db.sh +0 -12
  133. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/database_spec.rb +0 -510
  134. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/default_map_spec.rb +0 -92
  135. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/function_spec.rb +0 -78
  136. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/integeration_spec.rb +0 -97
  137. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/iso_3166_database.rb +0 -58
  138. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/packer_spec.rb +0 -60
  139. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/paths_spec.rb +0 -28
  140. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/progress_handler_spec.rb +0 -91
  141. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/requires_spec.rb +0 -54
  142. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/rtree_spec.rb +0 -66
  143. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/schema_spec.rb +0 -131
  144. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/spec_helper.rb +0 -43
  145. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/constants_spec.rb +0 -108
  146. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/database_status_spec.rb +0 -36
  147. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/status_spec.rb +0 -22
  148. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3/version_spec.rb +0 -22
  149. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/sqlite3_spec.rb +0 -53
  150. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/statement_spec.rb +0 -168
  151. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/storage_map_spec.rb +0 -38
  152. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/tap_spec.rb +0 -57
  153. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/text_map_spec.rb +0 -20
  154. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/type_map_spec.rb +0 -14
  155. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/spec/version_spec.rb +0 -8
  156. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/custom.rake +0 -99
  157. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/default.rake +0 -277
  158. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/extension.rake +0 -38
  159. data/vendor/bundle/ruby/1.9.1/gems/amalgalite-1.3.0/tasks/this.rb +0 -209
  160. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/README +0 -378
  161. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/arrayfields.gemspec +0 -26
  162. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/gemspec.rb +0 -62
  163. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/install.rb +0 -206
  164. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/lib/arrayfields.rb +0 -443
  165. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/readme.rb +0 -248
  166. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/a.rb +0 -40
  167. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/b.rb +0 -16
  168. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/c.rb +0 -9
  169. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/d.rb +0 -25
  170. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/sample/e.rb +0 -15
  171. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/test/arrayfields.rb +0 -324
  172. data/vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/test/memtest.rb +0 -41
  173. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/HISTORY.md +0 -243
  174. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/LICENSE +0 -21
  175. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/README.md +0 -182
  176. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/Rakefile +0 -66
  177. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/chronic.gemspec +0 -23
  178. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic.rb +0 -150
  179. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/date.rb +0 -82
  180. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/grabber.rb +0 -33
  181. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/handler.rb +0 -97
  182. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/handlers.rb +0 -647
  183. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/mini_date.rb +0 -38
  184. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/numerizer.rb +0 -130
  185. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/ordinal.rb +0 -49
  186. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/parser.rb +0 -268
  187. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/pointer.rb +0 -32
  188. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeater.rb +0 -145
  189. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_day.rb +0 -54
  190. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_day_name.rb +0 -53
  191. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_day_portion.rb +0 -109
  192. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_fortnight.rb +0 -72
  193. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_hour.rb +0 -59
  194. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_minute.rb +0 -59
  195. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_month.rb +0 -80
  196. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_month_name.rb +0 -95
  197. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_season.rb +0 -111
  198. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_season_name.rb +0 -43
  199. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_second.rb +0 -43
  200. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_time.rb +0 -138
  201. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_week.rb +0 -75
  202. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_weekday.rb +0 -86
  203. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_weekend.rb +0 -67
  204. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/repeaters/repeater_year.rb +0 -78
  205. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/scalar.rb +0 -81
  206. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/season.rb +0 -26
  207. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/separator.rb +0 -207
  208. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/sign.rb +0 -49
  209. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/span.rb +0 -31
  210. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/tag.rb +0 -37
  211. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/time.rb +0 -40
  212. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/time_zone.rb +0 -32
  213. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/lib/chronic/token.rb +0 -51
  214. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/helper.rb +0 -12
  215. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_chronic.rb +0 -183
  216. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_daylight_savings.rb +0 -118
  217. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_handler.rb +0 -128
  218. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_mini_date.rb +0 -32
  219. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_numerizer.rb +0 -86
  220. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_parsing.rb +0 -1235
  221. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_day_name.rb +0 -51
  222. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_day_portion.rb +0 -254
  223. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_fortnight.rb +0 -62
  224. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_hour.rb +0 -68
  225. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_minute.rb +0 -34
  226. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_month.rb +0 -50
  227. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_month_name.rb +0 -56
  228. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_season.rb +0 -40
  229. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_time.rb +0 -88
  230. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_week.rb +0 -62
  231. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_weekday.rb +0 -55
  232. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_weekend.rb +0 -74
  233. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_repeater_year.rb +0 -69
  234. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_span.rb +0 -23
  235. data/vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_token.rb +0 -25
  236. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/README_INDEX.rdoc +0 -123
  237. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/Rakefile +0 -37
  238. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/bin/coderay +0 -215
  239. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay.rb +0 -284
  240. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/duo.rb +0 -81
  241. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoder.rb +0 -201
  242. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/_map.rb +0 -17
  243. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/comment_filter.rb +0 -25
  244. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/count.rb +0 -39
  245. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/debug.rb +0 -49
  246. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/debug_lint.rb +0 -63
  247. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/div.rb +0 -23
  248. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/filter.rb +0 -58
  249. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html.rb +0 -332
  250. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html/css.rb +0 -65
  251. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html/numbering.rb +0 -108
  252. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/html/output.rb +0 -166
  253. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/json.rb +0 -83
  254. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/lines_of_code.rb +0 -45
  255. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/lint.rb +0 -59
  256. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/null.rb +0 -18
  257. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/page.rb +0 -24
  258. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/span.rb +0 -23
  259. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/statistic.rb +0 -95
  260. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/terminal.rb +0 -195
  261. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/text.rb +0 -46
  262. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/token_kind_filter.rb +0 -111
  263. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/xml.rb +0 -72
  264. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/encoders/yaml.rb +0 -50
  265. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/for_redcloth.rb +0 -95
  266. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/helpers/file_type.rb +0 -151
  267. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/helpers/plugin.rb +0 -274
  268. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/helpers/word_list.rb +0 -72
  269. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanner.rb +0 -355
  270. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/_map.rb +0 -24
  271. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/c.rb +0 -189
  272. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/clojure.rb +0 -217
  273. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/cpp.rb +0 -215
  274. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/css.rb +0 -196
  275. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/debug.rb +0 -75
  276. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/delphi.rb +0 -144
  277. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/diff.rb +0 -221
  278. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/erb.rb +0 -81
  279. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/go.rb +0 -208
  280. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/groovy.rb +0 -268
  281. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/haml.rb +0 -168
  282. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/html.rb +0 -275
  283. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/java.rb +0 -174
  284. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/java/builtin_types.rb +0 -421
  285. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/java_script.rb +0 -237
  286. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/json.rb +0 -98
  287. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/lua.rb +0 -280
  288. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/php.rb +0 -527
  289. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/python.rb +0 -287
  290. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/raydebug.rb +0 -75
  291. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/ruby.rb +0 -470
  292. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/ruby/patterns.rb +0 -178
  293. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/ruby/string_state.rb +0 -71
  294. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/sass.rb +0 -232
  295. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/sql.rb +0 -177
  296. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/taskpaper.rb +0 -36
  297. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/text.rb +0 -26
  298. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/xml.rb +0 -17
  299. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/scanners/yaml.rb +0 -140
  300. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/style.rb +0 -23
  301. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/styles/_map.rb +0 -7
  302. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/styles/alpha.rb +0 -152
  303. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/token_kinds.rb +0 -85
  304. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/tokens.rb +0 -161
  305. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/tokens_proxy.rb +0 -55
  306. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/lib/coderay/version.rb +0 -3
  307. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/basic.rb +0 -318
  308. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/examples.rb +0 -129
  309. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/for_redcloth.rb +0 -78
  310. data/vendor/bundle/ruby/1.9.1/gems/coderay-1.1.0/test/functional/suite.rb +0 -15
  311. data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/README +0 -28
  312. data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/Rakefile +0 -392
  313. data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/coerce.gemspec +0 -31
  314. data/vendor/bundle/ruby/1.9.1/gems/coerce-0.0.6/lib/coerce.rb +0 -210
  315. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/LICENSE +0 -22
  316. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/README +0 -214
  317. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/Rakefile +0 -90
  318. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/Releases +0 -195
  319. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/TODO +0 -2
  320. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/call/call.rb +0 -57
  321. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/call/call_monitor.rb +0 -55
  322. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/daemonize/daemonize.rb +0 -27
  323. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_crash.rb +0 -17
  324. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_exec.rb +0 -16
  325. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_exit.rb +0 -15
  326. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_hanging.rb +0 -19
  327. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_keep_pid_files.rb +0 -17
  328. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_monitor.rb +0 -16
  329. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_multiple.rb +0 -16
  330. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_normal.rb +0 -11
  331. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_ontop.rb +0 -16
  332. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_optionparser.rb +0 -43
  333. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc.rb +0 -25
  334. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc_multiple.rb +0 -22
  335. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc_rand.rb +0 -23
  336. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_proc_simple.rb +0 -17
  337. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/ctrl_slowstop.rb +0 -16
  338. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver.rb +0 -12
  339. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_crashing.rb +0 -14
  340. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_exiting.rb +0 -8
  341. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_hanging.rb +0 -21
  342. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/examples/run/myserver_slowstop.rb +0 -21
  343. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons.rb +0 -315
  344. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb +0 -477
  345. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application_group.rb +0 -194
  346. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/change_privilege.rb +0 -19
  347. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb +0 -121
  348. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/controller.rb +0 -140
  349. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb +0 -169
  350. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/etc_extension.rb +0 -12
  351. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/exceptions.rb +0 -28
  352. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/monitor.rb +0 -138
  353. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/pid.rb +0 -108
  354. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/pidfile.rb +0 -116
  355. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/pidmem.rb +0 -19
  356. data/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/setup.rb +0 -1360
  357. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/AUTHORS +0 -1
  358. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/CHANGELOG +0 -182
  359. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/COPYING +0 -340
  360. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/INSTALL +0 -33
  361. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/LICENSE +0 -9
  362. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/README +0 -71
  363. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/Rakefile +0 -94
  364. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/TODO +0 -6
  365. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_converters.rb +0 -28
  366. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_filter.rb +0 -23
  367. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_reading.rb +0 -57
  368. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_table.rb +0 -56
  369. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/csv_writing.rb +0 -67
  370. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/purchase.csv +0 -3
  371. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/shortcut_interface.rb +0 -36
  372. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/lib/faster_csv.rb +0 -2025
  373. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/lib/fastercsv.rb +0 -10
  374. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/line_endings.gz +0 -0
  375. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_csv_parsing.rb +0 -191
  376. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_csv_writing.rb +0 -96
  377. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_data_converters.rb +0 -260
  378. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_encodings.rb +0 -23
  379. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_features.rb +0 -212
  380. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_headers.rb +0 -277
  381. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_interface.rb +0 -376
  382. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_row.rb +0 -305
  383. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_serialization.rb +0 -154
  384. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_speed.rb +0 -65
  385. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/tc_table.rb +0 -408
  386. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/test_data.csv +0 -1000
  387. data/vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/test/ts_all.rb +0 -20
  388. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/LICENSE +0 -1
  389. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/README +0 -347
  390. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/README.erb +0 -82
  391. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/Rakefile +0 -376
  392. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/lib/fattr.rb +0 -206
  393. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/a.rb +0 -21
  394. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/b.rb +0 -22
  395. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/c.rb +0 -12
  396. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/d.rb +0 -34
  397. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/e.rb +0 -17
  398. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/f.rb +0 -21
  399. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/g.rb +0 -15
  400. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/samples/h.rb +0 -29
  401. data/vendor/bundle/ruby/1.9.1/gems/fattr-2.2.2/test/fattr_test.rb +0 -173
  402. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/Gemfile +0 -16
  403. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/LICENSE +0 -20
  404. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/README.md +0 -145
  405. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/Rakefile +0 -43
  406. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/VERSION +0 -1
  407. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/flowdock.gemspec +0 -73
  408. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/lib/flowdock.rb +0 -181
  409. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/lib/flowdock/capistrano.rb +0 -1
  410. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/spec/flowdock_spec.rb +0 -435
  411. data/vendor/bundle/ruby/1.9.1/gems/flowdock-0.5.0/spec/spec_helper.rb +0 -14
  412. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/AUTHORS +0 -3
  413. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/CHANGELOG +0 -357
  414. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/COPYING +0 -340
  415. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/INSTALL +0 -55
  416. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/LICENSE +0 -7
  417. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/README.rdoc +0 -67
  418. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/Rakefile +0 -50
  419. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/TODO +0 -6
  420. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/ansi_colors.rb +0 -38
  421. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/asking_for_arrays.rb +0 -18
  422. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/basic_usage.rb +0 -75
  423. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/color_scheme.rb +0 -32
  424. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/get_character.rb +0 -12
  425. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/limit.rb +0 -12
  426. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/menus.rb +0 -65
  427. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/overwrite.rb +0 -19
  428. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/page_and_wrap.rb +0 -322
  429. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/password.rb +0 -7
  430. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/repeat_entry.rb +0 -21
  431. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/trapping_eof.rb +0 -22
  432. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/examples/using_readline.rb +0 -17
  433. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/highline.gemspec +0 -37
  434. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline.rb +0 -1034
  435. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/color_scheme.rb +0 -134
  436. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/compatibility.rb +0 -16
  437. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/import.rb +0 -41
  438. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/menu.rb +0 -381
  439. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/question.rb +0 -481
  440. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/simulate.rb +0 -48
  441. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/string_extensions.rb +0 -111
  442. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/style.rb +0 -181
  443. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/lib/highline/system_extensions.rb +0 -242
  444. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/setup.rb +0 -1360
  445. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/site/highline.css +0 -65
  446. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/site/images/logo.png +0 -0
  447. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/site/index.html +0 -58
  448. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/string_methods.rb +0 -32
  449. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_color_scheme.rb +0 -96
  450. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_highline.rb +0 -1134
  451. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_import.rb +0 -52
  452. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_menu.rb +0 -439
  453. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_string_extension.rb +0 -20
  454. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_string_highline.rb +0 -38
  455. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/tc_style.rb +0 -567
  456. data/vendor/bundle/ruby/1.9.1/gems/highline-1.6.21/test/ts_all.rb +0 -16
  457. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/Gemfile +0 -14
  458. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/Guardfile +0 -16
  459. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/History +0 -303
  460. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/MIT-LICENSE +0 -20
  461. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/README.md +0 -74
  462. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/Rakefile +0 -12
  463. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/bin/httparty +0 -117
  464. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/cucumber.yml +0 -1
  465. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/aaws.rb +0 -32
  466. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/basic.rb +0 -28
  467. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/crack.rb +0 -19
  468. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/custom_parsers.rb +0 -67
  469. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/delicious.rb +0 -37
  470. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/google.rb +0 -16
  471. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/headers_and_user_agents.rb +0 -6
  472. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/nokogiri_html_parser.rb +0 -22
  473. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/rubyurl.rb +0 -14
  474. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/stackexchange.rb +0 -24
  475. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/tripit_sign_in.rb +0 -33
  476. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/twitter.rb +0 -31
  477. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/examples/whoismyrep.rb +0 -10
  478. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/basic_authentication.feature +0 -20
  479. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/command_line.feature +0 -7
  480. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/deals_with_http_error_codes.feature +0 -26
  481. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/digest_authentication.feature +0 -20
  482. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/handles_compressed_responses.feature +0 -27
  483. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/handles_multiple_formats.feature +0 -57
  484. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/env.rb +0 -22
  485. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/httparty_response_steps.rb +0 -52
  486. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/httparty_steps.rb +0 -43
  487. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/mongrel_helper.rb +0 -94
  488. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/remote_service_steps.rb +0 -74
  489. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/supports_read_timeout_option.feature +0 -13
  490. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/supports_redirection.feature +0 -22
  491. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/supports_timeout_option.feature +0 -13
  492. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/httparty.gemspec +0 -26
  493. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty.rb +0 -600
  494. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/connection_adapter.rb +0 -187
  495. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/cookie_hash.rb +0 -22
  496. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/core_extensions.rb +0 -32
  497. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/exceptions.rb +0 -29
  498. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/hash_conversions.rb +0 -51
  499. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/logger/apache_logger.rb +0 -22
  500. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/logger/curl_logger.rb +0 -48
  501. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/logger/logger.rb +0 -18
  502. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/module_inheritable_attributes.rb +0 -56
  503. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/net_digest_auth.rb +0 -84
  504. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/parser.rb +0 -141
  505. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/request.rb +0 -331
  506. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/response.rb +0 -72
  507. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/response/headers.rb +0 -31
  508. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/version.rb +0 -3
  509. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/script/release +0 -42
  510. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/delicious.xml +0 -23
  511. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/empty.xml +0 -0
  512. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/google.html +0 -3
  513. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generate.sh +0 -29
  514. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/1fe462c2.0 +0 -16
  515. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/bogushost.crt +0 -13
  516. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/ca.crt +0 -16
  517. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/ca.key +0 -15
  518. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/selfsigned.crt +0 -14
  519. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/server.crt +0 -13
  520. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/generated/server.key +0 -15
  521. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/ssl/openssl-exts.cnf +0 -9
  522. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/twitter.csv +0 -2
  523. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/twitter.json +0 -1
  524. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/twitter.xml +0 -403
  525. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/fixtures/undefined_method_add_node_for_nil.xml +0 -2
  526. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/connection_adapter_spec.rb +0 -354
  527. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/cookie_hash_spec.rb +0 -83
  528. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/exception_spec.rb +0 -23
  529. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/apache_logger_spec.rb +0 -26
  530. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/curl_logger_spec.rb +0 -18
  531. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/logger/logger_spec.rb +0 -22
  532. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/net_digest_auth_spec.rb +0 -152
  533. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/parser_spec.rb +0 -165
  534. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/request_spec.rb +0 -638
  535. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/response_spec.rb +0 -221
  536. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty/ssl_spec.rb +0 -74
  537. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/httparty_spec.rb +0 -764
  538. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/spec.opts +0 -2
  539. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/spec_helper.rb +0 -37
  540. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/support/ssl_test_helper.rb +0 -47
  541. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/support/ssl_test_server.rb +0 -80
  542. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/spec/support/stub_response.rb +0 -43
  543. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/website/css/common.css +0 -47
  544. data/vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/website/index.html +0 -73
  545. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/CHANGES +0 -284
  546. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/COPYING +0 -58
  547. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/COPYING-json-jruby +0 -57
  548. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/GPL +0 -340
  549. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/Gemfile +0 -11
  550. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/README-json-jruby.markdown +0 -33
  551. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/README.rdoc +0 -358
  552. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/Rakefile +0 -412
  553. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/TODO +0 -1
  554. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/VERSION +0 -1
  555. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/data/example.json +0 -1
  556. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/data/index.html +0 -38
  557. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/data/prototype.js +0 -4184
  558. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/fbuffer/fbuffer.h +0 -181
  559. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/Makefile +0 -221
  560. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/depend +0 -1
  561. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/extconf.rb +0 -14
  562. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.bundle +0 -0
  563. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.c +0 -1435
  564. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.h +0 -148
  565. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/generator/generator.o +0 -0
  566. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/Makefile +0 -221
  567. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/depend +0 -1
  568. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/extconf.rb +0 -13
  569. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.bundle +0 -0
  570. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.c +0 -2204
  571. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.h +0 -77
  572. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.o +0 -0
  573. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/ext/json/ext/parser/parser.rl +0 -927
  574. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/install.rb +0 -23
  575. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/ByteListTranscoder.java +0 -167
  576. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Generator.java +0 -444
  577. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/GeneratorMethods.java +0 -232
  578. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/GeneratorService.java +0 -43
  579. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/GeneratorState.java +0 -543
  580. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/OptionsReader.java +0 -114
  581. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Parser.java +0 -2644
  582. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Parser.rl +0 -968
  583. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/ParserService.java +0 -35
  584. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/RuntimeInfo.java +0 -121
  585. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/StringDecoder.java +0 -167
  586. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/StringEncoder.java +0 -106
  587. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/java/src/json/ext/Utils.java +0 -89
  588. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/json-java.gemspec +0 -23
  589. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/json.gemspec +0 -38
  590. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/json_pure.gemspec +0 -40
  591. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json.rb +0 -62
  592. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/bigdecimal.rb +0 -28
  593. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/complex.rb +0 -22
  594. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/core.rb +0 -11
  595. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/date.rb +0 -34
  596. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/date_time.rb +0 -50
  597. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/exception.rb +0 -31
  598. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/ostruct.rb +0 -31
  599. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/range.rb +0 -29
  600. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/rational.rb +0 -22
  601. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/regexp.rb +0 -30
  602. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/struct.rb +0 -30
  603. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/symbol.rb +0 -25
  604. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/add/time.rb +0 -38
  605. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/common.rb +0 -484
  606. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/ext.rb +0 -21
  607. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/ext/generator.bundle +0 -0
  608. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/ext/parser.bundle +0 -0
  609. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/generic_object.rb +0 -70
  610. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/pure.rb +0 -21
  611. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/pure/generator.rb +0 -522
  612. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/pure/parser.rb +0 -359
  613. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/lib/json/version.rb +0 -8
  614. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail1.json +0 -1
  615. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail10.json +0 -1
  616. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail11.json +0 -1
  617. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail12.json +0 -1
  618. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail13.json +0 -1
  619. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail14.json +0 -1
  620. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail18.json +0 -1
  621. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail19.json +0 -1
  622. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail2.json +0 -1
  623. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail20.json +0 -1
  624. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail21.json +0 -1
  625. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail22.json +0 -1
  626. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail23.json +0 -1
  627. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail24.json +0 -1
  628. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail25.json +0 -1
  629. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail27.json +0 -2
  630. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail28.json +0 -2
  631. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail3.json +0 -1
  632. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail4.json +0 -1
  633. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail5.json +0 -1
  634. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail6.json +0 -1
  635. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail7.json +0 -1
  636. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail8.json +0 -1
  637. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/fail9.json +0 -1
  638. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass1.json +0 -56
  639. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass15.json +0 -1
  640. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass16.json +0 -1
  641. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass17.json +0 -1
  642. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass2.json +0 -1
  643. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass26.json +0 -1
  644. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/fixtures/pass3.json +0 -6
  645. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/setup_variant.rb +0 -11
  646. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json.rb +0 -545
  647. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_addition.rb +0 -196
  648. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_encoding.rb +0 -65
  649. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_fixtures.rb +0 -35
  650. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_generate.rb +0 -322
  651. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_generic_object.rb +0 -75
  652. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_string_matching.rb +0 -39
  653. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tests/test_json_unicode.rb +0 -72
  654. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tools/fuzz.rb +0 -139
  655. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.1/tools/server.rb +0 -62
  656. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/LICENSE +0 -1
  657. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/README +0 -1177
  658. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/README.erb +0 -881
  659. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/Rakefile +0 -394
  660. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/TODO +0 -23
  661. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/a.rb +0 -3
  662. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main.rb +0 -93
  663. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/cast.rb +0 -163
  664. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/dsl.rb +0 -77
  665. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/factories.rb +0 -28
  666. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/getoptlong.rb +0 -470
  667. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/logger.rb +0 -51
  668. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/mode.rb +0 -46
  669. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/parameter.rb +0 -735
  670. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/program.rb +0 -6
  671. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/program/class_methods.rb +0 -381
  672. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/program/instance_methods.rb +0 -303
  673. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/softspoken.rb +0 -12
  674. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/stdext.rb +0 -36
  675. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/test.rb +0 -89
  676. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/usage.rb +0 -212
  677. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/lib/main/util.rb +0 -109
  678. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/main.gemspec +0 -74
  679. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/a.rb +0 -17
  680. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/b.rb +0 -17
  681. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/c.rb +0 -21
  682. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/d.rb +0 -26
  683. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/e.rb +0 -27
  684. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/f.rb +0 -29
  685. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/g.rb +0 -10
  686. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/h.rb +0 -36
  687. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/samples/j.rb +0 -31
  688. data/vendor/bundle/ruby/1.9.1/gems/main-6.0.0/test/main_test.rb +0 -954
  689. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/LICENSE +0 -1
  690. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/README +0 -1177
  691. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/README.erb +0 -881
  692. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/Rakefile +0 -394
  693. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/TODO +0 -23
  694. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/a.rb +0 -28
  695. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main.rb +0 -94
  696. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/cast.rb +0 -163
  697. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/daemon.rb +0 -525
  698. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/dsl.rb +0 -77
  699. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/factories.rb +0 -28
  700. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/getoptlong.rb +0 -470
  701. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/logger.rb +0 -51
  702. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/mode.rb +0 -46
  703. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/parameter.rb +0 -735
  704. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/program.rb +0 -6
  705. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/program/class_methods.rb +0 -392
  706. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/program/instance_methods.rb +0 -308
  707. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/softspoken.rb +0 -12
  708. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/stdext.rb +0 -36
  709. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/test.rb +0 -89
  710. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/usage.rb +0 -212
  711. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/lib/main/util.rb +0 -109
  712. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/main.gemspec +0 -75
  713. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/a.rb +0 -17
  714. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/b.rb +0 -17
  715. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/c.rb +0 -21
  716. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/d.rb +0 -26
  717. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/e.rb +0 -27
  718. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/f.rb +0 -29
  719. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/g.rb +0 -10
  720. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/h.rb +0 -36
  721. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/samples/j.rb +0 -31
  722. data/vendor/bundle/ruby/1.9.1/gems/main-6.1.0/test/main_test.rb +0 -954
  723. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/LICENSE +0 -1
  724. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/README +0 -145
  725. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/Rakefile +0 -394
  726. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/a.rb +0 -22
  727. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map.rb +0 -1190
  728. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/integrations/active_record.rb +0 -140
  729. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/options.rb +0 -188
  730. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/params.rb +0 -79
  731. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/lib/map/struct.rb +0 -52
  732. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/map.gemspec +0 -46
  733. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/test/leak.rb +0 -61
  734. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/test/lib/testing.rb +0 -74
  735. data/vendor/bundle/ruby/1.9.1/gems/map-6.5.5/test/map_test.rb +0 -802
  736. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/Gemfile +0 -2
  737. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/LICENSE +0 -25
  738. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/README.markdown +0 -91
  739. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/Rakefile +0 -79
  740. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source.rb +0 -141
  741. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source/code_helpers.rb +0 -154
  742. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source/source_location.rb +0 -138
  743. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/lib/method_source/version.rb +0 -3
  744. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/method_source.gemspec +0 -33
  745. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/test/test.rb +0 -138
  746. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/test/test_code_helpers.rb +0 -41
  747. data/vendor/bundle/ruby/1.9.1/gems/method_source-0.8.2/test/test_helper.rb +0 -98
  748. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/CHANGELOG.md +0 -220
  749. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/CONTRIBUTING.md +0 -46
  750. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/Gemfile +0 -29
  751. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/LICENSE.md +0 -20
  752. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/README.md +0 -119
  753. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/Rakefile +0 -25
  754. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json.rb +0 -158
  755. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapter.rb +0 -37
  756. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapter_error.rb +0 -15
  757. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/gson.rb +0 -21
  758. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/jr_jackson.rb +0 -19
  759. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/json_common.rb +0 -25
  760. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/json_gem.rb +0 -11
  761. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/json_pure.rb +0 -11
  762. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/nsjsonserialization.rb +0 -34
  763. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/oj.rb +0 -25
  764. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/ok_json.rb +0 -24
  765. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/adapters/yajl.rb +0 -19
  766. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/convertible_hash_keys.rb +0 -43
  767. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/options.rb +0 -38
  768. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/parse_error.rb +0 -17
  769. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/vendor/okjson.rb +0 -606
  770. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/lib/multi_json/version.rb +0 -20
  771. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/multi_json.gemspec +0 -22
  772. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/gson_adapter_spec.rb +0 -10
  773. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/jr_jackson_adapter_spec.rb +0 -10
  774. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/json_gem_adapter_spec.rb +0 -9
  775. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/json_pure_adapter_spec.rb +0 -9
  776. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/multi_json_spec.rb +0 -200
  777. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/nsjsonserialization_adapter_spec.rb +0 -10
  778. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/oj_adapter_spec.rb +0 -20
  779. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/ok_json_adapter_spec.rb +0 -7
  780. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/shared/adapter.rb +0 -236
  781. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/shared/json_common_adapter.rb +0 -30
  782. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/shared/options.rb +0 -119
  783. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/spec_helper.rb +0 -77
  784. data/vendor/bundle/ruby/1.9.1/gems/multi_json-1.10.1/spec/yajl_adapter_spec.rb +0 -10
  785. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/CHANGELOG.md +0 -93
  786. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/CONTRIBUTING.md +0 -49
  787. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/LICENSE.md +0 -20
  788. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/README.md +0 -97
  789. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/Rakefile +0 -21
  790. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml.rb +0 -296
  791. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml.rb +0 -30
  792. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/libxml2_parser.rb +0 -74
  793. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/nokogiri.rb +0 -32
  794. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/ox.rb +0 -97
  795. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/parsers/rexml.rb +0 -113
  796. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/lib/multi_xml/version.rb +0 -3
  797. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/multi_xml.gemspec +0 -24
  798. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/helper.rb +0 -17
  799. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/multi_xml_spec.rb +0 -43
  800. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/parser_shared_example.rb +0 -694
  801. data/vendor/bundle/ruby/1.9.1/gems/multi_xml-0.5.5/spec/speed.rb +0 -63
  802. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/CHANGELOG +0 -534
  803. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/CONTRIBUTORS +0 -55
  804. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/Gemfile +0 -12
  805. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/LICENSE +0 -25
  806. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/README.markdown +0 -400
  807. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/Rakefile +0 -140
  808. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/TODO +0 -117
  809. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/bin/pry +0 -16
  810. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry.rb +0 -274
  811. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/cli.rb +0 -202
  812. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code.rb +0 -385
  813. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code/code_range.rb +0 -70
  814. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code/loc.rb +0 -92
  815. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/code_object.rb +0 -153
  816. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/command.rb +0 -689
  817. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/command_set.rb +0 -400
  818. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands.rb +0 -6
  819. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/amend_line.rb +0 -99
  820. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/bang.rb +0 -20
  821. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/bang_pry.rb +0 -17
  822. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat.rb +0 -53
  823. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/abstract_formatter.rb +0 -27
  824. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/exception_formatter.rb +0 -78
  825. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/file_formatter.rb +0 -84
  826. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cat/input_expression_formatter.rb +0 -43
  827. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/cd.rb +0 -30
  828. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/code_collector.rb +0 -165
  829. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/disable_pry.rb +0 -27
  830. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/disabled_commands.rb +0 -2
  831. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/easter_eggs.rb +0 -112
  832. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit.rb +0 -207
  833. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit/exception_patcher.rb +0 -25
  834. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit/file_and_line_locator.rb +0 -38
  835. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/edit/method_patcher.rb +0 -122
  836. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/exit.rb +0 -42
  837. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/exit_all.rb +0 -29
  838. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/exit_program.rb +0 -24
  839. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/find_method.rb +0 -199
  840. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/fix_indent.rb +0 -19
  841. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_cd.rb +0 -26
  842. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_install.rb +0 -29
  843. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_list.rb +0 -33
  844. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gem_open.rb +0 -29
  845. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/gist.rb +0 -102
  846. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/help.rb +0 -164
  847. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/hist.rb +0 -161
  848. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/import_set.rb +0 -22
  849. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/install_command.rb +0 -51
  850. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/jump_to.rb +0 -29
  851. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/ls.rb +0 -338
  852. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/nesting.rb +0 -25
  853. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/play.rb +0 -69
  854. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/pry_backtrace.rb +0 -26
  855. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/pry_version.rb +0 -17
  856. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/raise_up.rb +0 -32
  857. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/reload_code.rb +0 -65
  858. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/reset.rb +0 -18
  859. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/ri.rb +0 -56
  860. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/save_file.rb +0 -61
  861. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/shell_command.rb +0 -43
  862. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/shell_mode.rb +0 -27
  863. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_doc.rb +0 -78
  864. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_info.rb +0 -200
  865. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_input.rb +0 -17
  866. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/show_source.rb +0 -38
  867. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/simple_prompt.rb +0 -22
  868. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/stat.rb +0 -40
  869. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/switch_to.rb +0 -23
  870. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/toggle_color.rb +0 -20
  871. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/whereami.rb +0 -182
  872. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/commands/wtf.rb +0 -57
  873. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/completion.rb +0 -321
  874. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/config.rb +0 -258
  875. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/core_extensions.rb +0 -121
  876. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/custom_completions.rb +0 -6
  877. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/editor.rb +0 -129
  878. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers.rb +0 -5
  879. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/base_helpers.rb +0 -200
  880. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/command_helpers.rb +0 -154
  881. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/documentation_helpers.rb +0 -76
  882. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/options_helpers.rb +0 -27
  883. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/table.rb +0 -109
  884. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/helpers/text.rb +0 -108
  885. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/history.rb +0 -124
  886. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/history_array.rb +0 -116
  887. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/hooks.rb +0 -250
  888. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/indent.rb +0 -406
  889. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/method.rb +0 -551
  890. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/method/disowned.rb +0 -53
  891. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/method/weird_method_locator.rb +0 -186
  892. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/module_candidate.rb +0 -146
  893. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/pager.rb +0 -90
  894. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/plugins.rb +0 -103
  895. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/pry_class.rb +0 -456
  896. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/pry_instance.rb +0 -765
  897. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/rbx_method.rb +0 -13
  898. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/rbx_path.rb +0 -22
  899. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/repl_file_loader.rb +0 -80
  900. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/rubygem.rb +0 -74
  901. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/terminal.rb +0 -78
  902. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/test/helper.rb +0 -185
  903. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/version.rb +0 -3
  904. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/lib/pry/wrapped_module.rb +0 -387
  905. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/man/pry.1 +0 -195
  906. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/man/pry.1.html +0 -204
  907. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/man/pry.1.ronn +0 -141
  908. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/pry.gemspec +0 -29
  909. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/Procfile +0 -3
  910. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/cli_spec.rb +0 -78
  911. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/code_object_spec.rb +0 -277
  912. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/code_spec.rb +0 -219
  913. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_helpers_spec.rb +0 -29
  914. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_integration_spec.rb +0 -644
  915. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_set_spec.rb +0 -627
  916. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/command_spec.rb +0 -821
  917. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/amend_line_spec.rb +0 -247
  918. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/bang_spec.rb +0 -19
  919. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/cat_spec.rb +0 -164
  920. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/cd_spec.rb +0 -250
  921. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/disable_pry_spec.rb +0 -25
  922. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/edit_spec.rb +0 -727
  923. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/exit_all_spec.rb +0 -34
  924. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/exit_program_spec.rb +0 -19
  925. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/exit_spec.rb +0 -34
  926. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/find_method_spec.rb +0 -70
  927. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/gem_list_spec.rb +0 -26
  928. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/gist_spec.rb +0 -79
  929. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/help_spec.rb +0 -56
  930. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/hist_spec.rb +0 -181
  931. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/jump_to_spec.rb +0 -15
  932. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/ls_spec.rb +0 -181
  933. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/play_spec.rb +0 -140
  934. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/raise_up_spec.rb +0 -56
  935. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/save_file_spec.rb +0 -177
  936. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/show_doc_spec.rb +0 -510
  937. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/show_input_spec.rb +0 -17
  938. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/show_source_spec.rb +0 -782
  939. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/commands/whereami_spec.rb +0 -203
  940. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/completion_spec.rb +0 -241
  941. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/control_d_handler_spec.rb +0 -58
  942. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/documentation_helper_spec.rb +0 -73
  943. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/editor_spec.rb +0 -79
  944. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/exception_whitelist_spec.rb +0 -21
  945. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/candidate_helper1.rb +0 -11
  946. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/candidate_helper2.rb +0 -8
  947. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/example.erb +0 -5
  948. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/example_nesting.rb +0 -33
  949. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/show_source_doc_examples.rb +0 -15
  950. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/testrc +0 -2
  951. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/testrcbad +0 -2
  952. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/fixtures/whereami_helper.rb +0 -6
  953. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helper.rb +0 -34
  954. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helpers/bacon.rb +0 -86
  955. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helpers/mock_pry.rb +0 -43
  956. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/helpers/table_spec.rb +0 -105
  957. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/history_array_spec.rb +0 -67
  958. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/hooks_spec.rb +0 -522
  959. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/indent_spec.rb +0 -301
  960. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/input_stack_spec.rb +0 -90
  961. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/method_spec.rb +0 -482
  962. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/prompt_spec.rb +0 -60
  963. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_defaults_spec.rb +0 -419
  964. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_history_spec.rb +0 -99
  965. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_output_spec.rb +0 -95
  966. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/pry_spec.rb +0 -515
  967. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/run_command_spec.rb +0 -25
  968. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/sticky_locals_spec.rb +0 -157
  969. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/syntax_checking_spec.rb +0 -81
  970. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/wrapped_module_spec.rb +0 -261
  971. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/wiki/Customizing-pry.md +0 -397
  972. data/vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/wiki/Home.md +0 -4
  973. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/README +0 -144
  974. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/Rakefile +0 -390
  975. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/bin/sekrets +0 -372
  976. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/lib/sekrets.rb +0 -511
  977. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/lib/sekrets/capistrano.rb +0 -37
  978. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/sekrets.gemspec +0 -50
  979. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/test/lib/testing.rb +0 -75
  980. data/vendor/bundle/ruby/1.9.1/gems/sekrets-1.7.0/test/sekrets_test.rb +0 -167
  981. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/CHANGELOG +0 -5790
  982. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/MIT-LICENSE +0 -19
  983. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/README.rdoc +0 -815
  984. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/Rakefile +0 -186
  985. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/bin/sequel +0 -244
  986. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/active_record.rdoc +0 -912
  987. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/advanced_associations.rdoc +0 -818
  988. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/association_basics.rdoc +0 -1763
  989. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/bin_sequel.rdoc +0 -144
  990. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/cheat_sheet.rdoc +0 -220
  991. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/code_order.rdoc +0 -96
  992. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/core_extensions.rdoc +0 -364
  993. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/dataset_basics.rdoc +0 -105
  994. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/dataset_filtering.rdoc +0 -191
  995. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/extensions.rdoc +0 -84
  996. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/mass_assignment.rdoc +0 -55
  997. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/migration.rdoc +0 -611
  998. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/model_hooks.rdoc +0 -262
  999. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/model_plugins.rdoc +0 -270
  1000. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/mssql_stored_procedures.rdoc +0 -43
  1001. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/object_model.rdoc +0 -573
  1002. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/opening_databases.rdoc +0 -489
  1003. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/postgresql.rdoc +0 -326
  1004. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/prepared_statements.rdoc +0 -139
  1005. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/querying.rdoc +0 -1017
  1006. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/reflection.rdoc +0 -121
  1007. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.0.txt +0 -38
  1008. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.1.txt +0 -143
  1009. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.3.txt +0 -101
  1010. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.4.0.txt +0 -53
  1011. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/1.5.0.txt +0 -155
  1012. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.0.0.txt +0 -298
  1013. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.1.0.txt +0 -271
  1014. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.10.0.txt +0 -328
  1015. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.11.0.txt +0 -215
  1016. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.12.0.txt +0 -534
  1017. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.2.0.txt +0 -253
  1018. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.3.0.txt +0 -88
  1019. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.4.0.txt +0 -106
  1020. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.5.0.txt +0 -137
  1021. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.6.0.txt +0 -157
  1022. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.7.0.txt +0 -166
  1023. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.8.0.txt +0 -171
  1024. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/2.9.0.txt +0 -97
  1025. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.0.0.txt +0 -221
  1026. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.1.0.txt +0 -406
  1027. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.10.0.txt +0 -286
  1028. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.11.0.txt +0 -254
  1029. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.12.0.txt +0 -304
  1030. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.13.0.txt +0 -210
  1031. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.14.0.txt +0 -118
  1032. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.15.0.txt +0 -78
  1033. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.16.0.txt +0 -45
  1034. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.17.0.txt +0 -58
  1035. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.18.0.txt +0 -120
  1036. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.19.0.txt +0 -67
  1037. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.2.0.txt +0 -268
  1038. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.20.0.txt +0 -41
  1039. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.21.0.txt +0 -87
  1040. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.22.0.txt +0 -39
  1041. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.23.0.txt +0 -172
  1042. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.24.0.txt +0 -420
  1043. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.25.0.txt +0 -88
  1044. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.26.0.txt +0 -88
  1045. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.27.0.txt +0 -82
  1046. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.28.0.txt +0 -304
  1047. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.29.0.txt +0 -459
  1048. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.3.0.txt +0 -192
  1049. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.30.0.txt +0 -135
  1050. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.31.0.txt +0 -146
  1051. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.32.0.txt +0 -202
  1052. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.33.0.txt +0 -157
  1053. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.34.0.txt +0 -671
  1054. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.35.0.txt +0 -144
  1055. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.36.0.txt +0 -245
  1056. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.37.0.txt +0 -338
  1057. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.38.0.txt +0 -234
  1058. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.39.0.txt +0 -237
  1059. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.4.0.txt +0 -325
  1060. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.40.0.txt +0 -73
  1061. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.41.0.txt +0 -155
  1062. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.42.0.txt +0 -74
  1063. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.43.0.txt +0 -105
  1064. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.44.0.txt +0 -152
  1065. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.45.0.txt +0 -179
  1066. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.46.0.txt +0 -122
  1067. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.47.0.txt +0 -270
  1068. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.48.0.txt +0 -477
  1069. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.5.0.txt +0 -510
  1070. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.6.0.txt +0 -366
  1071. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.7.0.txt +0 -179
  1072. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.8.0.txt +0 -151
  1073. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/3.9.0.txt +0 -233
  1074. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.0.0.txt +0 -262
  1075. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.1.0.txt +0 -85
  1076. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.10.0.txt +0 -226
  1077. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.11.0.txt +0 -147
  1078. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.12.0.txt +0 -105
  1079. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.13.0.txt +0 -169
  1080. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.14.0.txt +0 -68
  1081. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.15.0.txt +0 -56
  1082. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.2.0.txt +0 -129
  1083. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.3.0.txt +0 -40
  1084. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.4.0.txt +0 -92
  1085. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.5.0.txt +0 -34
  1086. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.6.0.txt +0 -30
  1087. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.7.0.txt +0 -103
  1088. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.8.0.txt +0 -175
  1089. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/release_notes/4.9.0.txt +0 -190
  1090. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/schema_modification.rdoc +0 -654
  1091. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/security.rdoc +0 -370
  1092. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/sharding.rdoc +0 -245
  1093. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/sql.rdoc +0 -589
  1094. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/testing.rdoc +0 -176
  1095. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/thread_safety.rdoc +0 -17
  1096. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/transactions.rdoc +0 -168
  1097. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/validations.rdoc +0 -540
  1098. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/doc/virtual_rows.rdoc +0 -272
  1099. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel.rb +0 -1
  1100. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ado.rb +0 -151
  1101. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ado/access.rb +0 -335
  1102. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ado/mssql.rb +0 -69
  1103. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/amalgalite.rb +0 -179
  1104. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/cubrid.rb +0 -143
  1105. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/db2.rb +0 -229
  1106. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/dbi.rb +0 -101
  1107. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do.rb +0 -156
  1108. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do/mysql.rb +0 -64
  1109. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do/postgres.rb +0 -42
  1110. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/do/sqlite3.rb +0 -40
  1111. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/fdbsql.rb +0 -285
  1112. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/firebird.rb +0 -104
  1113. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/ibmdb.rb +0 -476
  1114. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/informix.rb +0 -67
  1115. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc.rb +0 -794
  1116. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/as400.rb +0 -82
  1117. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/cubrid.rb +0 -62
  1118. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/db2.rb +0 -91
  1119. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/derby.rb +0 -312
  1120. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/fdbsql.rb +0 -65
  1121. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/firebirdsql.rb +0 -34
  1122. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/h2.rb +0 -227
  1123. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/hsqldb.rb +0 -231
  1124. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/informix-sqli.rb +0 -31
  1125. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/jdbcprogress.rb +0 -31
  1126. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/jtds.rb +0 -45
  1127. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/mssql.rb +0 -47
  1128. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/mysql.rb +0 -90
  1129. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/oracle.rb +0 -140
  1130. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/postgresql.rb +0 -215
  1131. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/sqlanywhere.rb +0 -82
  1132. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/sqlite.rb +0 -82
  1133. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/sqlserver.rb +0 -61
  1134. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/jdbc/transactions.rb +0 -109
  1135. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/mock.rb +0 -391
  1136. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/mysql.rb +0 -372
  1137. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/mysql2.rb +0 -200
  1138. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc.rb +0 -149
  1139. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc/db2.rb +0 -9
  1140. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc/mssql.rb +0 -61
  1141. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/odbc/progress.rb +0 -8
  1142. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/openbase.rb +0 -53
  1143. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/oracle.rb +0 -459
  1144. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/postgres.rb +0 -877
  1145. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/access.rb +0 -299
  1146. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/cubrid.rb +0 -243
  1147. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/db2.rb +0 -403
  1148. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/fdbsql.rb +0 -550
  1149. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/firebird.rb +0 -245
  1150. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/informix.rb +0 -52
  1151. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/mssql.rb +0 -1037
  1152. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/mysql.rb +0 -984
  1153. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/mysql_prepared_statements.rb +0 -182
  1154. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/oracle.rb +0 -522
  1155. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/postgres.rb +0 -1617
  1156. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/progress.rb +0 -38
  1157. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/sqlanywhere.rb +0 -470
  1158. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/shared/sqlite.rb +0 -729
  1159. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/sqlanywhere.rb +0 -177
  1160. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/sqlite.rb +0 -413
  1161. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift.rb +0 -150
  1162. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift/mysql.rb +0 -47
  1163. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift/postgres.rb +0 -45
  1164. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/swift/sqlite.rb +0 -35
  1165. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/tinytds.rb +0 -282
  1166. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/emulate_offset_with_reverse_and_count.rb +0 -75
  1167. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb +0 -62
  1168. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/pg_types.rb +0 -68
  1169. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/replace.rb +0 -36
  1170. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/split_alter_table.rb +0 -44
  1171. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/adapters/utils/stored_procedures.rb +0 -74
  1172. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/ast_transformer.rb +0 -200
  1173. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool.rb +0 -110
  1174. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/sharded_single.rb +0 -98
  1175. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/sharded_threaded.rb +0 -265
  1176. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/single.rb +0 -38
  1177. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/connection_pool/threaded.rb +0 -198
  1178. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/core.rb +0 -394
  1179. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database.rb +0 -20
  1180. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/connecting.rb +0 -318
  1181. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/dataset.rb +0 -69
  1182. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/dataset_defaults.rb +0 -175
  1183. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/features.rb +0 -134
  1184. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/logging.rb +0 -73
  1185. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/misc.rb +0 -534
  1186. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/query.rb +0 -329
  1187. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/schema_generator.rb +0 -525
  1188. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/schema_methods.rb +0 -964
  1189. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/database/transactions.rb +0 -353
  1190. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset.rb +0 -40
  1191. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/actions.rb +0 -1045
  1192. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/features.rb +0 -203
  1193. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/graph.rb +0 -272
  1194. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/misc.rb +0 -279
  1195. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/mutation.rb +0 -109
  1196. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/placeholder_literalizer.rb +0 -179
  1197. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/prepared_statements.rb +0 -283
  1198. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/query.rb +0 -1136
  1199. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/dataset/sql.rb +0 -1555
  1200. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/deprecated.rb +0 -58
  1201. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/exceptions.rb +0 -77
  1202. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/_pretty_table.rb +0 -84
  1203. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/arbitrary_servers.rb +0 -110
  1204. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/blank.rb +0 -47
  1205. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/columns_introspection.rb +0 -83
  1206. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/connection_validator.rb +0 -110
  1207. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/constraint_validations.rb +0 -455
  1208. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/core_extensions.rb +0 -230
  1209. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/core_refinements.rb +0 -221
  1210. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/current_datetime_timestamp.rb +0 -58
  1211. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/dataset_source_alias.rb +0 -91
  1212. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/date_arithmetic.rb +0 -192
  1213. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/empty_array_ignore_nulls.rb +0 -34
  1214. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/error_sql.rb +0 -72
  1215. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/eval_inspect.rb +0 -182
  1216. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/filter_having.rb +0 -59
  1217. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/from_block.rb +0 -32
  1218. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/graph_each.rb +0 -75
  1219. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/hash_aliases.rb +0 -45
  1220. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/inflector.rb +0 -246
  1221. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/looser_typecasting.rb +0 -44
  1222. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/meta_def.rb +0 -31
  1223. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/migration.rb +0 -736
  1224. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/mssql_emulate_lateral_with_apply.rb +0 -80
  1225. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/named_timezones.rb +0 -99
  1226. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/null_dataset.rb +0 -105
  1227. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pagination.rb +0 -121
  1228. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_array.rb +0 -606
  1229. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_array_ops.rb +0 -324
  1230. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_enum.rb +0 -136
  1231. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_hstore.rb +0 -357
  1232. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_hstore_ops.rb +0 -349
  1233. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_inet.rb +0 -118
  1234. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_interval.rb +0 -198
  1235. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_json.rb +0 -365
  1236. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_json_ops.rb +0 -434
  1237. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_loose_count.rb +0 -33
  1238. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_range.rb +0 -546
  1239. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_range_ops.rb +0 -162
  1240. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_row.rb +0 -615
  1241. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_row_ops.rb +0 -194
  1242. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pg_static_cache_updater.rb +0 -140
  1243. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/pretty_table.rb +0 -36
  1244. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/query.rb +0 -78
  1245. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/query_literals.rb +0 -80
  1246. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/round_timestamps.rb +0 -52
  1247. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/ruby18_symbol_extensions.rb +0 -22
  1248. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/schema_caching.rb +0 -75
  1249. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/schema_dumper.rb +0 -476
  1250. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/select_remove.rb +0 -48
  1251. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/sequel_3_dataset_methods.rb +0 -118
  1252. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/server_block.rb +0 -149
  1253. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/set_overrides.rb +0 -72
  1254. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/split_array_nil.rb +0 -66
  1255. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/sql_expr.rb +0 -20
  1256. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/string_date_time.rb +0 -50
  1257. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/thread_local_timezones.rb +0 -55
  1258. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/extensions/to_dot.rb +0 -154
  1259. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model.rb +0 -175
  1260. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/associations.rb +0 -3171
  1261. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/base.rb +0 -2306
  1262. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/dataset_module.rb +0 -30
  1263. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/default_inflections.rb +0 -45
  1264. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/errors.rb +0 -58
  1265. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/exceptions.rb +0 -46
  1266. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/inflections.rb +0 -162
  1267. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/model/plugins.rb +0 -49
  1268. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/no_core_ext.rb +0 -1
  1269. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/active_model.rb +0 -99
  1270. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/after_initialize.rb +0 -37
  1271. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_autoreloading.rb +0 -7
  1272. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_dependencies.rb +0 -97
  1273. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_pks.rb +0 -167
  1274. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/association_proxies.rb +0 -105
  1275. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/auto_validations.rb +0 -161
  1276. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/blacklist_security.rb +0 -93
  1277. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/boolean_readers.rb +0 -56
  1278. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/caching.rb +0 -153
  1279. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/class_table_inheritance.rb +0 -292
  1280. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/column_select.rb +0 -57
  1281. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/composition.rb +0 -187
  1282. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/constraint_validations.rb +0 -229
  1283. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/dataset_associations.rb +0 -107
  1284. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/defaults_setter.rb +0 -69
  1285. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/dirty.rb +0 -231
  1286. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/eager_each.rb +0 -64
  1287. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/error_splitter.rb +0 -54
  1288. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/force_encoding.rb +0 -81
  1289. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/hook_class_methods.rb +0 -125
  1290. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/input_transformer.rb +0 -79
  1291. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/insert_returning_select.rb +0 -70
  1292. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/instance_filters.rb +0 -131
  1293. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/instance_hooks.rb +0 -96
  1294. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/json_serializer.rb +0 -352
  1295. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/lazy_attributes.rb +0 -117
  1296. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/list.rb +0 -189
  1297. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/many_through_many.rb +0 -317
  1298. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/many_to_one_pk_lookup.rb +0 -7
  1299. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/modification_detection.rb +0 -90
  1300. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/mssql_optimistic_locking.rb +0 -92
  1301. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/nested_attributes.rb +0 -323
  1302. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/optimistic_locking.rb +0 -83
  1303. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/pg_array_associations.rb +0 -528
  1304. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/pg_row.rb +0 -123
  1305. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/pg_typecast_on_load.rb +0 -78
  1306. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements.rb +0 -205
  1307. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements_associations.rb +0 -116
  1308. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements_safe.rb +0 -73
  1309. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/prepared_statements_with_pk.rb +0 -59
  1310. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/rcte_tree.rb +0 -343
  1311. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/schema.rb +0 -80
  1312. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/scissors.rb +0 -33
  1313. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/serialization.rb +0 -235
  1314. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/serialization_modification_detection.rb +0 -84
  1315. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/sharding.rb +0 -117
  1316. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/single_table_inheritance.rb +0 -230
  1317. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/skip_create_refresh.rb +0 -35
  1318. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/split_values.rb +0 -64
  1319. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/static_cache.rb +0 -215
  1320. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/string_stripper.rb +0 -57
  1321. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/subclasses.rb +0 -61
  1322. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/table_select.rb +0 -41
  1323. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/tactical_eager_loading.rb +0 -85
  1324. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/timestamps.rb +0 -95
  1325. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/touch.rb +0 -140
  1326. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/tree.rb +0 -156
  1327. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/typecast_on_load.rb +0 -80
  1328. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/unlimited_update.rb +0 -31
  1329. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/update_or_create.rb +0 -60
  1330. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/update_primary_key.rb +0 -70
  1331. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/validation_class_methods.rb +0 -439
  1332. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/validation_helpers.rb +0 -291
  1333. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/plugins/xml_serializer.rb +0 -410
  1334. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/sql.rb +0 -1865
  1335. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/timezones.rb +0 -221
  1336. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/lib/sequel/version.rb +0 -18
  1337. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/db2_spec.rb +0 -148
  1338. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/fdbsql_spec.rb +0 -429
  1339. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/firebird_spec.rb +0 -417
  1340. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/informix_spec.rb +0 -100
  1341. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/mssql_spec.rb +0 -722
  1342. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/mysql_spec.rb +0 -1304
  1343. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/oracle_spec.rb +0 -315
  1344. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/postgres_spec.rb +0 -3537
  1345. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/spec_helper.rb +0 -76
  1346. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/sqlanywhere_spec.rb +0 -170
  1347. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/adapters/sqlite_spec.rb +0 -650
  1348. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/bin_spec.rb +0 -256
  1349. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/connection_pool_spec.rb +0 -982
  1350. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/database_spec.rb +0 -2487
  1351. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/dataset_spec.rb +0 -4970
  1352. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/deprecated_spec.rb +0 -70
  1353. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/expression_filters_spec.rb +0 -1197
  1354. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/mock_adapter_spec.rb +0 -462
  1355. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/object_graph_spec.rb +0 -303
  1356. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/placeholder_literalizer_spec.rb +0 -163
  1357. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/schema_generator_spec.rb +0 -179
  1358. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/schema_spec.rb +0 -1610
  1359. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/spec_helper.rb +0 -49
  1360. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core/version_spec.rb +0 -7
  1361. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/core_extensions_spec.rb +0 -695
  1362. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/active_model_spec.rb +0 -123
  1363. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/after_initialize_spec.rb +0 -24
  1364. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/arbitrary_servers_spec.rb +0 -109
  1365. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/association_dependencies_spec.rb +0 -117
  1366. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/association_pks_spec.rb +0 -281
  1367. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/association_proxies_spec.rb +0 -86
  1368. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/auto_validations_spec.rb +0 -158
  1369. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/blacklist_security_spec.rb +0 -87
  1370. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/blank_spec.rb +0 -69
  1371. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/boolean_readers_spec.rb +0 -93
  1372. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/caching_spec.rb +0 -270
  1373. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/class_table_inheritance_spec.rb +0 -274
  1374. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/column_select_spec.rb +0 -108
  1375. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/columns_introspection_spec.rb +0 -91
  1376. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/composition_spec.rb +0 -242
  1377. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/connection_validator_spec.rb +0 -118
  1378. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/constraint_validations_plugin_spec.rb +0 -274
  1379. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/constraint_validations_spec.rb +0 -325
  1380. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/core_refinements_spec.rb +0 -519
  1381. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/current_datetime_timestamp_spec.rb +0 -27
  1382. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/dataset_associations_spec.rb +0 -311
  1383. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/dataset_source_alias_spec.rb +0 -51
  1384. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/date_arithmetic_spec.rb +0 -157
  1385. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/defaults_setter_spec.rb +0 -101
  1386. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/dirty_spec.rb +0 -180
  1387. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/eager_each_spec.rb +0 -42
  1388. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/empty_array_ignore_nulls_spec.rb +0 -24
  1389. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/error_splitter_spec.rb +0 -18
  1390. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/error_sql_spec.rb +0 -20
  1391. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/eval_inspect_spec.rb +0 -73
  1392. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/filter_having_spec.rb +0 -40
  1393. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/force_encoding_spec.rb +0 -114
  1394. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/from_block_spec.rb +0 -21
  1395. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/graph_each_spec.rb +0 -109
  1396. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/hash_aliases_spec.rb +0 -24
  1397. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/hook_class_methods_spec.rb +0 -416
  1398. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/inflector_spec.rb +0 -183
  1399. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/input_transformer_spec.rb +0 -54
  1400. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/insert_returning_select_spec.rb +0 -46
  1401. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/instance_filters_spec.rb +0 -79
  1402. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/instance_hooks_spec.rb +0 -276
  1403. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/json_serializer_spec.rb +0 -267
  1404. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/lazy_attributes_spec.rb +0 -170
  1405. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/list_spec.rb +0 -265
  1406. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/looser_typecasting_spec.rb +0 -43
  1407. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/many_through_many_spec.rb +0 -2159
  1408. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/meta_def_spec.rb +0 -21
  1409. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/migration_spec.rb +0 -709
  1410. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/modification_detection_spec.rb +0 -80
  1411. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/mssql_optimistic_locking_spec.rb +0 -91
  1412. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/named_timezones_spec.rb +0 -108
  1413. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/nested_attributes_spec.rb +0 -697
  1414. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/null_dataset_spec.rb +0 -85
  1415. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/optimistic_locking_spec.rb +0 -128
  1416. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pagination_spec.rb +0 -118
  1417. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_array_associations_spec.rb +0 -736
  1418. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_array_ops_spec.rb +0 -143
  1419. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_array_spec.rb +0 -390
  1420. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_enum_spec.rb +0 -64
  1421. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_hstore_ops_spec.rb +0 -236
  1422. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_hstore_spec.rb +0 -206
  1423. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_inet_spec.rb +0 -52
  1424. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_interval_spec.rb +0 -76
  1425. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_json_ops_spec.rb +0 -226
  1426. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_json_spec.rb +0 -218
  1427. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_loose_count_spec.rb +0 -17
  1428. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_range_ops_spec.rb +0 -58
  1429. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_range_spec.rb +0 -404
  1430. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_row_ops_spec.rb +0 -60
  1431. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_row_plugin_spec.rb +0 -62
  1432. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_row_spec.rb +0 -360
  1433. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_static_cache_updater_spec.rb +0 -92
  1434. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pg_typecast_on_load_spec.rb +0 -63
  1435. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_associations_spec.rb +0 -151
  1436. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_safe_spec.rb +0 -61
  1437. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_spec.rb +0 -103
  1438. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/prepared_statements_with_pk_spec.rb +0 -31
  1439. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/pretty_table_spec.rb +0 -92
  1440. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/query_literals_spec.rb +0 -167
  1441. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/query_spec.rb +0 -102
  1442. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/rcte_tree_spec.rb +0 -387
  1443. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/round_timestamps_spec.rb +0 -43
  1444. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/schema_caching_spec.rb +0 -41
  1445. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/schema_dumper_spec.rb +0 -788
  1446. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/schema_spec.rb +0 -113
  1447. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/scissors_spec.rb +0 -26
  1448. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/select_remove_spec.rb +0 -38
  1449. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/sequel_3_dataset_methods_spec.rb +0 -101
  1450. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/serialization_modification_detection_spec.rb +0 -98
  1451. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/serialization_spec.rb +0 -340
  1452. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/server_block_spec.rb +0 -90
  1453. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/set_overrides_spec.rb +0 -61
  1454. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/sharding_spec.rb +0 -198
  1455. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/shared_caching_spec.rb +0 -175
  1456. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/single_table_inheritance_spec.rb +0 -276
  1457. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/skip_create_refresh_spec.rb +0 -17
  1458. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/spec_helper.rb +0 -96
  1459. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/split_array_nil_spec.rb +0 -24
  1460. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/split_values_spec.rb +0 -22
  1461. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/sql_expr_spec.rb +0 -60
  1462. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/static_cache_spec.rb +0 -355
  1463. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/string_date_time_spec.rb +0 -95
  1464. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/string_stripper_spec.rb +0 -68
  1465. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/subclasses_spec.rb +0 -66
  1466. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/table_select_spec.rb +0 -71
  1467. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/tactical_eager_loading_spec.rb +0 -82
  1468. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/thread_local_timezones_spec.rb +0 -67
  1469. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/timestamps_spec.rb +0 -175
  1470. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/to_dot_spec.rb +0 -154
  1471. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/touch_spec.rb +0 -203
  1472. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/tree_spec.rb +0 -270
  1473. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/typecast_on_load_spec.rb +0 -80
  1474. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/unlimited_update_spec.rb +0 -20
  1475. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/update_or_create_spec.rb +0 -81
  1476. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/update_primary_key_spec.rb +0 -100
  1477. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/validation_class_methods_spec.rb +0 -1030
  1478. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/validation_helpers_spec.rb +0 -520
  1479. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/extensions/xml_serializer_spec.rb +0 -207
  1480. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_down_migration/001_create_alt_basic.rb +0 -4
  1481. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_down_migration/002_create_alt_advanced.rb +0 -4
  1482. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  1483. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_timestamped_migrations/1273253851_create_nodes.rb +0 -9
  1484. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_timestamped_migrations/1273253853_3_create_users.rb +0 -3
  1485. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_up_migration/001_create_alt_basic.rb +0 -4
  1486. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/bad_up_migration/002_create_alt_advanced.rb +0 -3
  1487. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/001_create_sessions.rb +0 -9
  1488. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/002_create_nodes.rb +0 -9
  1489. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/003_3_create_users.rb +0 -4
  1490. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/1273253850_create_artists.rb +0 -9
  1491. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/convert_to_timestamp_migrations/1273253852_create_albums.rb +0 -9
  1492. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_integer_migrations/001_create_alt_advanced.rb +0 -4
  1493. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_integer_migrations/001_create_alt_basic.rb +0 -4
  1494. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  1495. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_timestamped_migrations/1273253853_create_nodes.rb +0 -9
  1496. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/duplicate_timestamped_migrations/1273253853_create_users.rb +0 -4
  1497. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/integer_migrations/001_create_sessions.rb +0 -9
  1498. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/integer_migrations/002_create_nodes.rb +0 -9
  1499. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/integer_migrations/003_3_create_users.rb +0 -4
  1500. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  1501. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253850_create_artists.rb +0 -9
  1502. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253851_create_nodes.rb +0 -9
  1503. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253852_create_albums.rb +0 -9
  1504. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/interleaved_timestamped_migrations/1273253853_3_create_users.rb +0 -4
  1505. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_integer_migrations/001_create_alt_basic.rb +0 -4
  1506. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_integer_migrations/003_create_alt_advanced.rb +0 -4
  1507. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_timestamped_migrations/1273253849_create_sessions.rb +0 -9
  1508. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/missing_timestamped_migrations/1273253853_3_create_users.rb +0 -4
  1509. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/001_reversible.rb +0 -5
  1510. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/002_reversible.rb +0 -5
  1511. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/003_reversible.rb +0 -5
  1512. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/004_reversible.rb +0 -5
  1513. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/reversible_migrations/005_reversible.rb +0 -10
  1514. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/timestamped_migrations/1273253849_create_sessions.rb +0 -9
  1515. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/timestamped_migrations/1273253851_create_nodes.rb +0 -9
  1516. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/timestamped_migrations/1273253853_3_create_users.rb +0 -4
  1517. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_specified_migrations/001_create_alt_basic.rb +0 -4
  1518. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_specified_migrations/002_create_basic.rb +0 -4
  1519. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_unspecified_migrations/001_create_alt_basic.rb +0 -3
  1520. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/transaction_unspecified_migrations/002_create_basic.rb +0 -3
  1521. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/uppercase_timestamped_migrations/1273253849_CREATE_SESSIONS.RB +0 -9
  1522. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/uppercase_timestamped_migrations/1273253851_CREATE_NODES.RB +0 -9
  1523. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/files/uppercase_timestamped_migrations/1273253853_3_CREATE_USERS.RB +0 -4
  1524. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/associations_test.rb +0 -2453
  1525. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/database_test.rb +0 -113
  1526. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/dataset_test.rb +0 -1798
  1527. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/eager_loader_test.rb +0 -687
  1528. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/migrator_test.rb +0 -240
  1529. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/model_test.rb +0 -226
  1530. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/plugin_test.rb +0 -2162
  1531. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/prepared_statement_test.rb +0 -426
  1532. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/schema_test.rb +0 -801
  1533. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/spec_helper.rb +0 -111
  1534. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/timezone_test.rb +0 -86
  1535. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/transaction_test.rb +0 -374
  1536. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/integration/type_test.rb +0 -133
  1537. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/association_reflection_spec.rb +0 -500
  1538. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/associations_spec.rb +0 -4316
  1539. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/base_spec.rb +0 -746
  1540. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/class_dataset_methods_spec.rb +0 -145
  1541. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/dataset_methods_spec.rb +0 -149
  1542. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/eager_loading_spec.rb +0 -2080
  1543. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/hooks_spec.rb +0 -536
  1544. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/inflector_spec.rb +0 -26
  1545. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/model_spec.rb +0 -992
  1546. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/plugins_spec.rb +0 -299
  1547. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/record_spec.rb +0 -2053
  1548. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/spec_helper.rb +0 -64
  1549. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/model/validations_spec.rb +0 -191
  1550. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/rspec_helper.rb +0 -22
  1551. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/sequel_coverage.rb +0 -15
  1552. data/vendor/bundle/ruby/1.9.1/gems/sequel-4.15.0/spec/spec_config.rb +0 -2
  1553. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/CHANGES.md +0 -303
  1554. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/Gemfile +0 -3
  1555. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/LICENSE +0 -20
  1556. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/README.md +0 -182
  1557. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/Rakefile +0 -29
  1558. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/lib/slop.rb +0 -687
  1559. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/lib/slop/commands.rb +0 -196
  1560. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/lib/slop/option.rb +0 -209
  1561. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/slop.gemspec +0 -17
  1562. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/commands_test.rb +0 -26
  1563. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/helper.rb +0 -12
  1564. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/option_test.rb +0 -138
  1565. data/vendor/bundle/ruby/1.9.1/gems/slop-3.5.0/test/slop_test.rb +0 -518
  1566. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/README +0 -151
  1567. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/README.erb +0 -43
  1568. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/lib/threadify.rb +0 -176
  1569. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/rakefile +0 -222
  1570. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/sample/a.rb +0 -37
  1571. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/sample/b.rb +0 -41
  1572. data/vendor/bundle/ruby/1.9.1/gems/threadify-1.3.0/threadify.gemspec +0 -26
  1573. data/vendor/bundle/ruby/1.9.1/specifications/amalgalite-1.3.0.gemspec +0 -52
  1574. data/vendor/bundle/ruby/1.9.1/specifications/arrayfields-4.7.4.gemspec +0 -16
  1575. data/vendor/bundle/ruby/1.9.1/specifications/chronic-0.10.2.gemspec +0 -42
  1576. data/vendor/bundle/ruby/1.9.1/specifications/coderay-1.1.0.gemspec +0 -23
  1577. data/vendor/bundle/ruby/1.9.1/specifications/coerce-0.0.6.gemspec +0 -30
  1578. data/vendor/bundle/ruby/1.9.1/specifications/daemons-1.1.9.gemspec +0 -19
  1579. data/vendor/bundle/ruby/1.9.1/specifications/fastercsv-1.5.5.gemspec +0 -20
  1580. data/vendor/bundle/ruby/1.9.1/specifications/fattr-2.2.2.gemspec +0 -18
  1581. data/vendor/bundle/ruby/1.9.1/specifications/flowdock-0.5.0.gemspec +0 -51
  1582. data/vendor/bundle/ruby/1.9.1/specifications/highline-1.6.21.gemspec +0 -21
  1583. data/vendor/bundle/ruby/1.9.1/specifications/httparty-0.13.1.gemspec +0 -35
  1584. data/vendor/bundle/ruby/1.9.1/specifications/json-1.8.1.gemspec +0 -36
  1585. data/vendor/bundle/ruby/1.9.1/specifications/main-6.0.0.gemspec +0 -39
  1586. data/vendor/bundle/ruby/1.9.1/specifications/main-6.1.0.gemspec +0 -39
  1587. data/vendor/bundle/ruby/1.9.1/specifications/map-6.5.5.gemspec +0 -18
  1588. data/vendor/bundle/ruby/1.9.1/specifications/method_source-0.8.2.gemspec +0 -31
  1589. data/vendor/bundle/ruby/1.9.1/specifications/multi_json-1.10.1.gemspec +0 -30
  1590. data/vendor/bundle/ruby/1.9.1/specifications/multi_xml-0.5.5.gemspec +0 -30
  1591. data/vendor/bundle/ruby/1.9.1/specifications/pry-0.9.12.6.gemspec +0 -51
  1592. data/vendor/bundle/ruby/1.9.1/specifications/sekrets-1.7.0.gemspec +0 -43
  1593. data/vendor/bundle/ruby/1.9.1/specifications/sequel-4.15.0.gemspec +0 -22
  1594. data/vendor/bundle/ruby/1.9.1/specifications/slop-3.5.0.gemspec +0 -33
  1595. data/vendor/bundle/ruby/1.9.1/specifications/threadify-1.3.0.gemspec +0 -16
@@ -1,315 +0,0 @@
1
- SEQUEL_ADAPTER_TEST = :oracle
2
-
3
- require File.join(File.dirname(File.expand_path(__FILE__)), 'spec_helper.rb')
4
-
5
- describe "An Oracle database" do
6
- before(:all) do
7
- DB.create_table!(:items) do
8
- String :name, :size => 50
9
- Integer :value
10
- Date :date_created
11
- index :value
12
- end
13
-
14
- DB.create_table!(:books) do
15
- Integer :id
16
- String :title, :size => 50
17
- Integer :category_id
18
- end
19
-
20
- DB.create_table!(:categories) do
21
- Integer :id
22
- String :cat_name, :size => 50
23
- end
24
-
25
- DB.create_table!(:notes) do
26
- Integer :id
27
- String :title, :size => 50
28
- String :content, :text => true
29
- end
30
- @d = DB[:items]
31
- end
32
- after do
33
- @d.delete
34
- end
35
- after(:all) do
36
- DB.drop_table?(:items, :books, :categories, :notes)
37
- end
38
-
39
- specify "should allow limit and offset with clob columns" do
40
- notes = []
41
- notes << {:id => 1, :title => 'abc', :content => 'zyx'}
42
- notes << {:id => 2, :title => 'def', :content => 'wvu'}
43
- notes << {:id => 3, :title => 'ghi', :content => 'tsr'}
44
- notes << {:id => 4, :title => 'jkl', :content => 'qpo'}
45
- notes << {:id => 5, :title => 'mno', :content => 'nml'}
46
- DB[:notes].multi_insert(notes)
47
-
48
- DB[:notes].sort_by{|x| x[:id]}.should == notes
49
- rows = DB[:notes].limit(3, 0).all
50
- rows.length.should == 3
51
- rows.all?{|v| notes.should include(v)}
52
- end
53
-
54
- specify "should provide disconnect functionality" do
55
- DB.execute("select user from dual")
56
- DB.pool.size.should == 1
57
- DB.disconnect
58
- DB.pool.size.should == 0
59
- end
60
-
61
- specify "should have working view_exists?" do
62
- begin
63
- DB.view_exists?(:cats).should == false
64
- DB.create_view(:cats, DB[:categories])
65
- DB.view_exists?(:cats).should == true
66
- om = DB.identifier_output_method
67
- im = DB.identifier_input_method
68
- DB.identifier_output_method = :reverse
69
- DB.identifier_input_method = :reverse
70
- DB.view_exists?(:STAC).should == true
71
- DB.view_exists?(:cats).should == false
72
- ensure
73
- DB.identifier_output_method = om
74
- DB.identifier_input_method = im
75
- DB.drop_view(:cats)
76
- end
77
- end
78
-
79
- specify "should be able to get current sequence value with SQL" do
80
- begin
81
- DB.create_table!(:foo){primary_key :id}
82
- DB.fetch('SELECT seq_foo_id.nextval FROM DUAL').single_value.should == 1
83
- ensure
84
- DB.drop_table(:foo)
85
- end
86
- end
87
-
88
- specify "should provide schema information" do
89
- books_schema = [[:id, [:integer, false, true, nil]],
90
- [:title, [:string, false, true, nil]],
91
- [:category_id, [:integer, false, true, nil]]]
92
- categories_schema = [[:id, [:integer, false, true, nil]],
93
- [:cat_name, [:string, false, true, nil]]]
94
- items_schema = [[:name, [:string, false, true, nil]],
95
- [:value, [:integer, false, true, nil]],
96
- [:date_created, [:datetime, false, true, nil]]]
97
-
98
- {:books => books_schema, :categories => categories_schema, :items => items_schema}.each_pair do |table, expected_schema|
99
- schema = DB.schema(table)
100
- schema.should_not be_nil
101
- schema.map{|c, s| [c, s.values_at(:type, :primary_key, :allow_null, :ruby_default)]}.should == expected_schema
102
- end
103
- end
104
-
105
- specify "should create a temporary table" do
106
- DB.create_table! :test_tmp, :temp => true do
107
- varchar2 :name, :size => 50
108
- primary_key :id, :integer, :null => false
109
- index :name, :unique => true
110
- end
111
- DB.drop_table?(:test_tmp)
112
- end
113
-
114
- specify "should return the correct record count" do
115
- @d.count.should == 0
116
- @d << {:name => 'abc', :value => 123}
117
- @d << {:name => 'abc', :value => 456}
118
- @d << {:name => 'def', :value => 789}
119
- @d.count.should == 3
120
- end
121
-
122
- specify "should return the correct records" do
123
- @d.to_a.should == []
124
- @d << {:name => 'abc', :value => 123}
125
- @d << {:name => 'abc', :value => 456}
126
- @d << {:name => 'def', :value => 789}
127
-
128
- @d.order(:value).to_a.should == [
129
- {:date_created=>nil, :name => 'abc', :value => 123},
130
- {:date_created=>nil, :name => 'abc', :value => 456},
131
- {:date_created=>nil, :name => 'def', :value => 789}
132
- ]
133
-
134
- @d.select(:name).distinct.order_by(:name).to_a.should == [
135
- {:name => 'abc'},
136
- {:name => 'def'}
137
- ]
138
-
139
- @d.order(Sequel.desc(:value)).limit(1).to_a.should == [
140
- {:date_created=>nil, :name => 'def', :value => 789}
141
- ]
142
-
143
- @d.filter(:name => 'abc').to_a.should == [
144
- {:date_created=>nil, :name => 'abc', :value => 123},
145
- {:date_created=>nil, :name => 'abc', :value => 456}
146
- ]
147
-
148
- @d.order(Sequel.desc(:value)).filter(:name => 'abc').to_a.should == [
149
- {:date_created=>nil, :name => 'abc', :value => 456},
150
- {:date_created=>nil, :name => 'abc', :value => 123}
151
- ]
152
-
153
- @d.filter(:name => 'abc').limit(1).to_a.should == [
154
- {:date_created=>nil, :name => 'abc', :value => 123}
155
- ]
156
-
157
- @d.filter(:name => 'abc').order(Sequel.desc(:value)).limit(1).to_a.should == [
158
- {:date_created=>nil, :name => 'abc', :value => 456}
159
- ]
160
-
161
- @d.filter(:name => 'abc').order(:value).limit(1).to_a.should == [
162
- {:date_created=>nil, :name => 'abc', :value => 123}
163
- ]
164
-
165
- @d.order(:value).limit(1).to_a.should == [
166
- {:date_created=>nil, :name => 'abc', :value => 123}
167
- ]
168
-
169
- @d.order(:value).limit(1, 1).to_a.should == [
170
- {:date_created=>nil, :name => 'abc', :value => 456}
171
- ]
172
-
173
- @d.order(:value).limit(1, 2).to_a.should == [
174
- {:date_created=>nil, :name => 'def', :value => 789}
175
- ]
176
-
177
- @d.avg(:value).to_i.should == (789+123+456)/3
178
-
179
- @d.max(:value).to_i.should == 789
180
-
181
- @d.select(:name, Sequel.function(:AVG, :value).as(:avg)).filter(:name => 'abc').group(:name).to_a.should == [
182
- {:name => 'abc', :avg => (456+123)/2.0}
183
- ]
184
-
185
- @d.select(Sequel.function(:AVG, :value).as(:avg)).group(:name).order(:name).limit(1).to_a.should == [
186
- {:avg => (456+123)/2.0}
187
- ]
188
-
189
- @d.select(:name, Sequel.function(:AVG, :value).as(:avg)).group(:name).order(:name).to_a.should == [
190
- {:name => 'abc', :avg => (456+123)/2.0},
191
- {:name => 'def', :avg => 789*1.0}
192
- ]
193
-
194
- @d.select(:name, Sequel.function(:AVG, :value).as(:avg)).group(:name).order(:name).to_a.should == [
195
- {:name => 'abc', :avg => (456+123)/2.0},
196
- {:name => 'def', :avg => 789*1.0}
197
- ]
198
-
199
- @d.select(:name, Sequel.function(:AVG, :value).as(:avg)).group(:name).having(:name => ['abc', 'def']).order(:name).to_a.should == [
200
- {:name => 'abc', :avg => (456+123)/2.0},
201
- {:name => 'def', :avg => 789*1.0}
202
- ]
203
-
204
- @d.select(:name, :value).filter(:name => 'abc').union(@d.select(:name, :value).filter(:name => 'def')).order(:value).to_a.should == [
205
- {:name => 'abc', :value => 123},
206
- {:name => 'abc', :value => 456},
207
- {:name => 'def', :value => 789}
208
- ]
209
-
210
- end
211
-
212
- specify "should update records correctly" do
213
- @d << {:name => 'abc', :value => 123}
214
- @d << {:name => 'abc', :value => 456}
215
- @d << {:name => 'def', :value => 789}
216
- @d.filter(:name => 'abc').update(:value => 530)
217
-
218
- @d[:name => 'def'][:value].should == 789
219
- @d.filter(:value => 530).count.should == 2
220
- end
221
-
222
- specify "should translate values correctly" do
223
- @d << {:name => 'abc', :value => 456}
224
- @d << {:name => 'def', :value => 789}
225
- @d.filter('value > 500').update(:date_created => Sequel.lit("to_timestamp('2009-09-09', 'YYYY-MM-DD')"))
226
-
227
- @d[:name => 'def'][:date_created].strftime('%F').should == '2009-09-09'
228
- end
229
-
230
- specify "should delete records correctly" do
231
- @d << {:name => 'abc', :value => 123}
232
- @d << {:name => 'abc', :value => 456}
233
- @d << {:name => 'def', :value => 789}
234
- @d.filter(:name => 'abc').delete
235
-
236
- @d.count.should == 1
237
- @d.first[:name].should == 'def'
238
- end
239
-
240
- specify "should be able to literalize booleans" do
241
- proc {@d.literal(true)}.should_not raise_error
242
- proc {@d.literal(false)}.should_not raise_error
243
- end
244
-
245
- specify "should support transactions" do
246
- DB.transaction do
247
- @d << {:name => 'abc', :value => 1}
248
- end
249
-
250
- @d.count.should == 1
251
- end
252
-
253
- specify "should return correct result" do
254
- @d1 = DB[:books]
255
- @d1.delete
256
- @d1 << {:id => 1, :title => 'aaa', :category_id => 100}
257
- @d1 << {:id => 2, :title => 'bbb', :category_id => 100}
258
- @d1 << {:id => 3, :title => 'ccc', :category_id => 101}
259
- @d1 << {:id => 4, :title => 'ddd', :category_id => 102}
260
-
261
- @d2 = DB[:categories]
262
- @d2.delete
263
- @d2 << {:id => 100, :cat_name => 'ruby'}
264
- @d2 << {:id => 101, :cat_name => 'rails'}
265
-
266
- @d1.join(:categories, :id => :category_id).select(:books__id, :title, :cat_name).order(:books__id).to_a.should == [
267
- {:id => 1, :title => 'aaa', :cat_name => 'ruby'},
268
- {:id => 2, :title => 'bbb', :cat_name => 'ruby'},
269
- {:id => 3, :title => 'ccc', :cat_name => 'rails'}
270
- ]
271
-
272
- @d1.join(:categories, :id => :category_id).select(:books__id, :title, :cat_name).order(:books__id).limit(2, 1).to_a.should == [
273
- {:id => 2, :title => 'bbb', :cat_name => 'ruby'},
274
- {:id => 3, :title => 'ccc', :cat_name => 'rails'},
275
- ]
276
-
277
- @d1.left_outer_join(:categories, :id => :category_id).select(:books__id, :title, :cat_name).order(:books__id).to_a.should == [
278
- {:id => 1, :title => 'aaa', :cat_name => 'ruby'},
279
- {:id => 2, :title => 'bbb', :cat_name => 'ruby'},
280
- {:id => 3, :title => 'ccc', :cat_name => 'rails'},
281
- {:id => 4, :title => 'ddd', :cat_name => nil}
282
- ]
283
-
284
- @d1.left_outer_join(:categories, :id => :category_id).select(:books__id, :title, :cat_name).reverse_order(:books__id).limit(2, 0).to_a.should == [
285
- {:id => 4, :title => 'ddd', :cat_name => nil},
286
- {:id => 3, :title => 'ccc', :cat_name => 'rails'}
287
- ]
288
- end
289
-
290
- specify "should allow columns to be renamed" do
291
- @d1 = DB[:books]
292
- @d1.delete
293
- @d1 << {:id => 1, :title => 'aaa', :category_id => 100}
294
- @d1 << {:id => 2, :title => 'bbb', :category_id => 100}
295
- @d1 << {:id => 3, :title => 'bbb', :category_id => 100}
296
-
297
- @d1.select(Sequel.as(:title, :name)).order_by(:id).to_a.should == [
298
- { :name => 'aaa' },
299
- { :name => 'bbb' },
300
- { :name => 'bbb' },
301
- ]
302
- end
303
-
304
- specify "nested queries should work" do
305
- DB[:books].select(:title).group_by(:title).count.should == 2
306
- end
307
-
308
- specify "#for_update should use FOR UPDATE" do
309
- DB[:books].for_update.sql.should == 'SELECT * FROM "BOOKS" FOR UPDATE'
310
- end
311
-
312
- specify "#lock_style should accept symbols" do
313
- DB[:books].lock_style(:update).sql.should == 'SELECT * FROM "BOOKS" FOR UPDATE'
314
- end
315
- end
@@ -1,3537 +0,0 @@
1
- SEQUEL_ADAPTER_TEST = :postgres
2
-
3
- require File.join(File.dirname(File.expand_path(__FILE__)), 'spec_helper.rb')
4
-
5
- def DB.sqls
6
- (@sqls ||= [])
7
- end
8
- logger = Object.new
9
- def logger.method_missing(m, msg)
10
- DB.sqls << msg
11
- end
12
- DB.loggers << logger
13
-
14
- describe "PostgreSQL", '#create_table' do
15
- before do
16
- @db = DB
17
- DB.sqls.clear
18
- end
19
- after do
20
- @db.drop_table?(:tmp_dolls, :unlogged_dolls)
21
- end
22
-
23
- specify "should create a temporary table" do
24
- @db.create_table(:tmp_dolls, :temp => true){text :name}
25
- check_sqls do
26
- @db.sqls.should == ['CREATE TEMPORARY TABLE "tmp_dolls" ("name" text)']
27
- end
28
- end
29
-
30
- specify "temporary table should support :on_commit option" do
31
- @db.drop_table?(:some_table)
32
- @db.transaction do
33
- @db.create_table(:some_table, :temp => true, :on_commit => :drop){text :name}
34
- end
35
- @db.table_exists?(:some_table).should == false
36
-
37
- @db.transaction do
38
- @db.create_table(:some_table, :temp => true, :on_commit => :delete_rows){text :name}
39
- @db[:some_table].insert('a')
40
- end
41
- @db.table_exists?(:some_table).should == true
42
- @db[:some_table].empty?.should == true
43
-
44
- @db.drop_table(:some_table)
45
- @db.transaction do
46
- @db.create_table(:some_table, :temp => true, :on_commit => :preserve_rows){text :name}
47
- @db[:some_table].insert('a')
48
- end
49
- @db.table_exists?(:some_table).should == true
50
- @db[:some_table].count.should == 1
51
- @db.drop_table(:some_table)
52
- end
53
-
54
- specify "temporary table should accept :on_commit with :as option" do
55
- @db.drop_table?(:some_table)
56
- @db.transaction do
57
- @db.create_table(:some_table, :temp => true, :on_commit => :drop, :as => 'select 1')
58
- end
59
- @db.table_exists?(:some_table).should == false
60
- end
61
-
62
- specify ":on_commit should raise error if not used on a temporary table" do
63
- proc{@db.create_table(:some_table, :on_commit => :drop)}.should raise_error(Sequel::Error)
64
- end
65
-
66
- specify ":on_commit should raise error if given unsupported value" do
67
- proc{@db.create_table(:some_table, :temp => true, :on_commit => :unsupported){text :name}}.should raise_error(Sequel::Error)
68
- end
69
-
70
- specify "should create an unlogged table" do
71
- @db.create_table(:unlogged_dolls, :unlogged => true){text :name}
72
- check_sqls do
73
- @db.sqls.should == ['CREATE UNLOGGED TABLE "unlogged_dolls" ("name" text)']
74
- end
75
- end
76
-
77
- specify "should create a table inheriting from another table" do
78
- @db.create_table(:unlogged_dolls){text :name}
79
- @db.create_table(:tmp_dolls, :inherits=>:unlogged_dolls){}
80
- @db[:tmp_dolls].insert('a')
81
- @db[:unlogged_dolls].all.should == [{:name=>'a'}]
82
- end
83
-
84
- specify "should create a table inheriting from multiple tables" do
85
- begin
86
- @db.create_table(:unlogged_dolls){text :name}
87
- @db.create_table(:tmp_dolls){text :bar}
88
- @db.create_table!(:items, :inherits=>[:unlogged_dolls, :tmp_dolls]){text :foo}
89
- @db[:items].insert(:name=>'a', :bar=>'b', :foo=>'c')
90
- @db[:unlogged_dolls].all.should == [{:name=>'a'}]
91
- @db[:tmp_dolls].all.should == [{:bar=>'b'}]
92
- @db[:items].all.should == [{:name=>'a', :bar=>'b', :foo=>'c'}]
93
- ensure
94
- @db.drop_table?(:items)
95
- end
96
- end
97
-
98
- specify "should not allow to pass both :temp and :unlogged" do
99
- proc do
100
- @db.create_table(:temp_unlogged_dolls, :temp => true, :unlogged => true){text :name}
101
- end.should raise_error(Sequel::Error, "can't provide both :temp and :unlogged to create_table")
102
- end
103
-
104
- specify "should support pg_loose_count extension" do
105
- @db.extension :pg_loose_count
106
- @db.create_table(:tmp_dolls){text :name}
107
- @db.loose_count(:tmp_dolls).should be_a_kind_of(Integer)
108
- @db.loose_count(:tmp_dolls).should == 0
109
- @db.loose_count(:public__tmp_dolls).should == 0
110
- @db[:tmp_dolls].insert('a')
111
- @db << 'VACUUM ANALYZE tmp_dolls'
112
- @db.loose_count(:tmp_dolls).should == 1
113
- @db.loose_count(:public__tmp_dolls).should == 1
114
- end
115
- end
116
-
117
- describe "PostgreSQL views" do
118
- before do
119
- @db = DB
120
- @db.drop_table?(:items, :cascade=>true)
121
- @db.create_table(:items){Integer :number}
122
- @db[:items].insert(10)
123
- @db[:items].insert(20)
124
- end
125
- after do
126
- @opts ||={}
127
- @db.drop_view(:items_view, @opts.merge(:if_exists=>true, :cascade=>true)) rescue nil
128
- @db.drop_table?(:items)
129
- end
130
-
131
- specify "should support temporary views" do
132
- @db.create_view(:items_view, @db[:items].where(:number=>10), :temp=>true)
133
- @db[:items_view].map(:number).should == [10]
134
- @db.create_or_replace_view(:items_view, @db[:items].where(:number=>20), :temp=>true)
135
- @db[:items_view].map(:number).should == [20]
136
- end
137
-
138
- specify "should support recursive views" do
139
- @db.create_view(:items_view, @db[:items].where(:number=>10).union(@db[:items, :items_view].where(Sequel.-(:number, 5)=>:n).select(:number), :all=>true, :from_self=>false), :recursive=>[:n])
140
- @db[:items_view].select_order_map(:n).should == [10]
141
- @db[:items].insert(15)
142
- @db[:items_view].select_order_map(:n).should == [10, 15, 20]
143
- end if DB.server_version >= 90300
144
-
145
- specify "should support materialized views" do
146
- @opts = {:materialized=>true}
147
- @db.create_view(:items_view, @db[:items].where{number >= 10}, @opts)
148
- @db[:items_view].select_order_map(:number).should == [10, 20]
149
- @db[:items].insert(15)
150
- @db[:items_view].select_order_map(:number).should == [10, 20]
151
- @db.refresh_view(:items_view)
152
- @db[:items_view].select_order_map(:number).should == [10, 15, 20]
153
- end if DB.server_version >= 90300
154
-
155
- specify "should support refreshing materialized views concurrently" do
156
- @opts = {:materialized=>true}
157
- @db.create_view(:items_view, @db[:items].where{number >= 10}, @opts)
158
- @db.refresh_view(:items_view)
159
- proc{@db.refresh_view(:items_view, :concurrently=>true)}.should raise_error(Sequel::DatabaseError)
160
- @db.add_index :items_view, :number, :unique=>true
161
- proc{@db.refresh_view(:items_view, :concurrently=>true)}.should_not raise_error
162
- end if DB.server_version >= 90400
163
-
164
- specify "should support :if_exists=>true for not raising an error if the view does not exist" do
165
- proc{@db.drop_view(:items_view, :if_exists=>true)}.should_not raise_error
166
- end
167
- end
168
-
169
- describe "A PostgreSQL database" do
170
- before(:all) do
171
- @db = DB
172
- @db.create_table!(:public__testfk){primary_key :id; foreign_key :i, :public__testfk}
173
- end
174
- after(:all) do
175
- @db.drop_table?(:public__testfk)
176
- end
177
-
178
- specify "should provide the server version" do
179
- @db.server_version.should > 70000
180
- end
181
-
182
- specify "should create a dataset using the VALUES clause via #values" do
183
- @db.values([[1, 2], [3, 4]]).map([:column1, :column2]).should == [[1, 2], [3, 4]]
184
- end
185
-
186
- specify "should support ordering and limiting with #values" do
187
- @db.values([[1, 2], [3, 4]]).reverse(:column2, :column1).limit(1).map([:column1, :column2]).should == [[3, 4]]
188
- @db.values([[1, 2], [3, 4]]).reverse(:column2, :column1).offset(1).map([:column1, :column2]).should == [[1, 2]]
189
- end
190
-
191
- specify "should support subqueries with #values" do
192
- @db.values([[1, 2]]).from_self.cross_join(@db.values([[3, 4]]).as(:x, [:c1, :c2])).map([:column1, :column2, :c1, :c2]).should == [[1, 2, 3, 4]]
193
- end
194
-
195
- specify "should respect the :read_only option per-savepoint" do
196
- proc{@db.transaction{@db.transaction(:savepoint=>true, :read_only=>true){@db[:public__testfk].insert}}}.should raise_error(Sequel::DatabaseError)
197
- proc{@db.transaction(:auto_savepoint=>true, :read_only=>true){@db.transaction(:read_only=>false){@db[:public__testfk].insert}}}.should raise_error(Sequel::DatabaseError)
198
- proc{@db.transaction{@db[:public__testfk].insert; @db.transaction(:savepoint=>true, :read_only=>true){@db[:public__testfk].all;}}}.should_not raise_error
199
- proc{@db.transaction{@db.transaction(:savepoint=>true, :read_only=>true){}; @db[:public__testfk].insert}}.should_not raise_error
200
- proc{@db.transaction{@db[:public__testfk].all; @db.transaction(:savepoint=>true, :read_only=>true){@db[:public__testfk].all;}}}.should_not raise_error
201
- end
202
-
203
- specify "should support disable_insert_returning" do
204
- ds = @db[:public__testfk].disable_insert_returning
205
- ds.delete
206
- ds.insert.should == nil
207
- id = ds.max(:id)
208
- ds.select_order_map([:id, :i]).should == [[id, nil]]
209
- ds.insert(:i=>id).should == nil
210
- ds.select_order_map([:id, :i]).should == [[id, nil], [id+1, id]]
211
- ds.insert_select(:i=>ds.max(:id)).should == nil
212
- ds.select_order_map([:id, :i]).should == [[id, nil], [id+1, id]]
213
- c = Class.new(Sequel::Model(ds))
214
- c.class_eval do
215
- def before_create
216
- self.id = model.max(:id)+1
217
- super
218
- end
219
- end
220
- c.create(:i=>id+1).should == c.load(:id=>id+2, :i=>id+1)
221
- ds.select_order_map([:id, :i]).should == [[id, nil], [id+1, id], [id+2, id+1]]
222
- ds.delete
223
- end
224
-
225
- specify "should support functions with and without quoting" do
226
- ds = @db[:public__testfk]
227
- ds.delete
228
- ds.insert
229
- ds.get{sum(1)}.should == 1
230
- ds.get{Sequel.function('pg_catalog.sum', 1)}.should == 1
231
- ds.get{sum.function(1)}.should == 1
232
- ds.get{pg_catalog__sum.function(1)}.should == 1
233
- ds.delete
234
- end
235
-
236
- specify "should support a :qualify option to tables and views" do
237
- @db.tables(:qualify=>true).should include(Sequel.qualify(:public, :testfk))
238
- begin
239
- @db.create_view(:testfkv, @db[:testfk])
240
- @db.views(:qualify=>true).should include(Sequel.qualify(:public, :testfkv))
241
- ensure
242
- @db.drop_view(:testfkv)
243
- end
244
- end
245
-
246
- specify "should not typecast the int2vector type incorrectly" do
247
- @db.get(Sequel.cast('10 20', :int2vector)).should_not == 10
248
- end
249
-
250
- cspecify "should not typecast the money type incorrectly", :do do
251
- @db.get(Sequel.cast('10.01', :money)).should_not == 0
252
- end
253
-
254
- specify "should correctly parse the schema" do
255
- @db.schema(:public__testfk, :reload=>true).should == [
256
- [:id, {:type=>:integer, :ruby_default=>nil, :db_type=>"integer", :default=>"nextval('testfk_id_seq'::regclass)", :oid=>23, :primary_key=>true, :allow_null=>false}],
257
- [:i, {:type=>:integer, :ruby_default=>nil, :db_type=>"integer", :default=>nil, :oid=>23, :primary_key=>false, :allow_null=>true}]]
258
- end
259
-
260
- specify "should parse foreign keys for tables in a schema" do
261
- @db.foreign_key_list(:public__testfk).should == [{:on_delete=>:no_action, :on_update=>:no_action, :columns=>[:i], :key=>[:id], :deferrable=>false, :table=>Sequel.qualify(:public, :testfk), :name=>:testfk_i_fkey}]
262
- end
263
-
264
- specify "should return uuid fields as strings" do
265
- @db.get(Sequel.cast('550e8400-e29b-41d4-a716-446655440000', :uuid)).should == '550e8400-e29b-41d4-a716-446655440000'
266
- end
267
-
268
- specify "should handle inserts with placeholder literal string tables" do
269
- ds = @db.from(Sequel.lit('?', :testfk))
270
- ds.insert(:id=>1)
271
- ds.select_map(:id).should == [1]
272
- end
273
-
274
- specify "should have notice receiver receive notices" do
275
- a = nil
276
- Sequel.connect(DB.opts.merge(:notice_receiver=>proc{|r| a = r.result_error_message})){|db| db.do("BEGIN\nRAISE WARNING 'foo';\nEND;")}
277
- a.should == "WARNING: foo\n"
278
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG && DB.server_version >= 90000
279
-
280
- specify "should support creating foreign tables" do
281
- # This only tests the SQL created, because a true test using file_fdw or postgres_fdw
282
- # requires superuser permissions, and you should not be running the tests as a superuser.
283
- DB.send(:create_table_sql, :t, DB.create_table_generator{Integer :a}, :foreign=>:f, :options=>{:o=>1}).should == 'CREATE FOREIGN TABLE "t" ("a" integer) SERVER "f" OPTIONS (o \'1\')'
284
- end
285
- end
286
-
287
- describe "A PostgreSQL database with domain types" do
288
- before(:all) do
289
- @db = DB
290
- @db << "DROP DOMAIN IF EXISTS positive_number CASCADE"
291
- @db << "CREATE DOMAIN positive_number AS numeric(10,2) CHECK (VALUE > 0)"
292
- @db.create_table!(:testfk){positive_number :id, :primary_key=>true}
293
- end
294
- after(:all) do
295
- @db.drop_table?(:testfk)
296
- @db << "DROP DOMAIN positive_number"
297
- end
298
-
299
- specify "should correctly parse the schema" do
300
- sch = @db.schema(:testfk, :reload=>true)
301
- sch.first.last.delete(:domain_oid).should be_a_kind_of(Integer)
302
- sch.should == [[:id, {:type=>:decimal, :ruby_default=>nil, :db_type=>"numeric(10,2)", :default=>nil, :oid=>1700, :primary_key=>true, :allow_null=>false, :db_domain_type=>'positive_number'}]]
303
- end
304
- end
305
-
306
- describe "A PostgreSQL dataset" do
307
- before(:all) do
308
- @db = DB
309
- @d = @db[:test]
310
- @db.create_table! :test do
311
- text :name
312
- integer :value, :index => true
313
- end
314
- end
315
- before do
316
- @d.delete
317
- @db.sqls.clear
318
- end
319
- after do
320
- @db.drop_table?(:atest)
321
- end
322
- after(:all) do
323
- @db.drop_table?(:test)
324
- end
325
-
326
- specify "should quote columns and tables using double quotes if quoting identifiers" do
327
- check_sqls do
328
- @d.select(:name).sql.should == 'SELECT "name" FROM "test"'
329
- @d.select(Sequel.lit('COUNT(*)')).sql.should == 'SELECT COUNT(*) FROM "test"'
330
- @d.select(Sequel.function(:max, :value)).sql.should == 'SELECT max("value") FROM "test"'
331
- @d.select(Sequel.function(:NOW)).sql.should == 'SELECT NOW() FROM "test"'
332
- @d.select(Sequel.function(:max, :items__value)).sql.should == 'SELECT max("items"."value") FROM "test"'
333
- @d.order(Sequel.desc(:name)).sql.should == 'SELECT * FROM "test" ORDER BY "name" DESC'
334
- @d.select(Sequel.lit('test.name AS item_name')).sql.should == 'SELECT test.name AS item_name FROM "test"'
335
- @d.select(Sequel.lit('"name"')).sql.should == 'SELECT "name" FROM "test"'
336
- @d.select(Sequel.lit('max(test."name") AS "max_name"')).sql.should == 'SELECT max(test."name") AS "max_name" FROM "test"'
337
- @d.insert_sql(:x => :y).should =~ /\AINSERT INTO "test" \("x"\) VALUES \("y"\)( RETURNING NULL)?\z/
338
-
339
- @d.select(Sequel.function(:test, :abc, 'hello')).sql.should == "SELECT test(\"abc\", 'hello') FROM \"test\""
340
- @d.select(Sequel.function(:test, :abc__def, 'hello')).sql.should == "SELECT test(\"abc\".\"def\", 'hello') FROM \"test\""
341
- @d.select(Sequel.function(:test, :abc__def, 'hello').as(:x2)).sql.should == "SELECT test(\"abc\".\"def\", 'hello') AS \"x2\" FROM \"test\""
342
- @d.insert_sql(:value => 333).should =~ /\AINSERT INTO "test" \("value"\) VALUES \(333\)( RETURNING NULL)?\z/
343
- end
344
- end
345
-
346
- specify "should quote fields correctly when reversing the order if quoting identifiers" do
347
- check_sqls do
348
- @d.reverse_order(:name).sql.should == 'SELECT * FROM "test" ORDER BY "name" DESC'
349
- @d.reverse_order(Sequel.desc(:name)).sql.should == 'SELECT * FROM "test" ORDER BY "name" ASC'
350
- @d.reverse_order(:name, Sequel.desc(:test)).sql.should == 'SELECT * FROM "test" ORDER BY "name" DESC, "test" ASC'
351
- @d.reverse_order(Sequel.desc(:name), :test).sql.should == 'SELECT * FROM "test" ORDER BY "name" ASC, "test" DESC'
352
- end
353
- end
354
-
355
- specify "should support regexps" do
356
- @d << {:name => 'abc', :value => 1}
357
- @d << {:name => 'bcd', :value => 2}
358
- @d.filter(:name => /bc/).count.should == 2
359
- @d.filter(:name => /^bc/).count.should == 1
360
- end
361
-
362
- specify "should support NULLS FIRST and NULLS LAST" do
363
- @d << {:name => 'abc'}
364
- @d << {:name => 'bcd'}
365
- @d << {:name => 'bcd', :value => 2}
366
- @d.order(Sequel.asc(:value, :nulls=>:first), :name).select_map(:name).should == %w[abc bcd bcd]
367
- @d.order(Sequel.asc(:value, :nulls=>:last), :name).select_map(:name).should == %w[bcd abc bcd]
368
- @d.order(Sequel.asc(:value, :nulls=>:first), :name).reverse.select_map(:name).should == %w[bcd bcd abc]
369
- end
370
-
371
- specify "should support selecting from LATERAL functions" do
372
- @d.from{[generate_series(1,3,1).as(:a), pow(:a, 2).lateral.as(:b)]}.select_map([:a, :b])== [[1, 1], [2, 4], [3, 9]]
373
- end if DB.server_version >= 90300
374
-
375
- specify "should support ordered-set and hypothetical-set aggregate functions" do
376
- @d.from{generate_series(1,3,1).as(:a)}.select{(a.sql_number % 2).as(:a)}.from_self.get{mode{}.within_group(:a)}.should == 1
377
- end if DB.server_version >= 90400
378
-
379
- specify "should support filtered aggregate functions" do
380
- @d.from{generate_series(1,3,1).as(:a)}.select{(a.sql_number % 2).as(:a)}.from_self.get{count(:a).filter(:a=>1)}.should == 2
381
- end if DB.server_version >= 90400
382
-
383
- specify "should support functions with ordinality" do
384
- @d.from{generate_series(1,10,3).with_ordinality}.select_map([:generate_series, :ordinality]).should == [[1, 1], [4, 2], [7, 3], [10, 4]]
385
- end if DB.server_version >= 90400
386
-
387
- specify "#lock should lock tables and yield if a block is given" do
388
- @d.lock('EXCLUSIVE'){@d.insert(:name=>'a')}
389
- end
390
-
391
- specify "should support exclusion constraints when creating or altering tables" do
392
- @db.create_table!(:atest){Integer :t; exclude [[Sequel.desc(:t, :nulls=>:last), '=']], :using=>:btree, :where=>proc{t > 0}}
393
- @db[:atest].insert(1)
394
- @db[:atest].insert(2)
395
- proc{@db[:atest].insert(2)}.should raise_error(Sequel::Postgres::ExclusionConstraintViolation)
396
-
397
- @db.create_table!(:atest){Integer :t}
398
- @db.alter_table(:atest){add_exclusion_constraint [[:t, '=']], :using=>:btree, :name=>'atest_ex'}
399
- @db[:atest].insert(1)
400
- @db[:atest].insert(2)
401
- proc{@db[:atest].insert(2)}.should raise_error(Sequel::Postgres::ExclusionConstraintViolation)
402
- @db.alter_table(:atest){drop_constraint 'atest_ex'}
403
- end if DB.server_version >= 90000
404
-
405
- specify "should support deferrable exclusion constraints" do
406
- @db.create_table!(:atest){Integer :t; exclude [[Sequel.desc(:t, :nulls=>:last), '=']], :using=>:btree, :where=>proc{t > 0}, :deferrable => true}
407
- proc do
408
- @db.transaction do
409
- @db[:atest].insert(2)
410
- proc{@db[:atest].insert(2)}.should_not raise_error
411
- end
412
- end.should raise_error(Sequel::Postgres::ExclusionConstraintViolation)
413
- end if DB.server_version >= 90000
414
-
415
- specify "should support Database#error_info for getting info hash on the given error" do
416
- @db.create_table!(:atest){Integer :t; Integer :t2, :null=>false, :default=>1; constraint :f, :t=>0}
417
- begin
418
- @db[:atest].insert(1)
419
- rescue => e
420
- end
421
- e.should_not be_nil
422
- info = @db.error_info(e)
423
- info[:schema].should == 'public'
424
- info[:table].should == 'atest'
425
- info[:constraint].should == 'f'
426
- info[:column].should be_nil
427
- info[:type].should be_nil
428
-
429
- begin
430
- @db[:atest].insert(0, nil)
431
- rescue => e
432
- end
433
- e.should_not be_nil
434
- info = @db.error_info(e.wrapped_exception)
435
- info[:schema].should == 'public'
436
- info[:table].should == 'atest'
437
- info[:constraint].should be_nil
438
- info[:column].should == 't2'
439
- info[:type].should be_nil
440
- end if DB.server_version >= 90300 && DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG && Object.const_defined?(:PG) && ::PG.const_defined?(:Constants) && ::PG::Constants.const_defined?(:PG_DIAG_SCHEMA_NAME)
441
-
442
- specify "should support Database#do for executing anonymous code blocks" do
443
- @db.drop_table?(:btest)
444
- @db.do "BEGIN EXECUTE 'CREATE TABLE btest (a INTEGER)'; EXECUTE 'INSERT INTO btest VALUES (1)'; END"
445
- @db[:btest].select_map(:a).should == [1]
446
-
447
- @db.do "BEGIN EXECUTE 'DROP TABLE btest; CREATE TABLE atest (a INTEGER)'; EXECUTE 'INSERT INTO atest VALUES (1)'; END", :language=>:plpgsql
448
- @db[:atest].select_map(:a).should == [1]
449
- end if DB.server_version >= 90000
450
-
451
- specify "should support adding foreign key constarints that are not yet valid, and validating them later" do
452
- @db.create_table!(:atest){primary_key :id; Integer :fk}
453
- @db[:atest].insert(1, 5)
454
- @db.alter_table(:atest){add_foreign_key [:fk], :atest, :not_valid=>true, :name=>:atest_fk}
455
- @db[:atest].insert(2, 1)
456
- proc{@db[:atest].insert(3, 4)}.should raise_error(Sequel::DatabaseError)
457
-
458
- proc{@db.alter_table(:atest){validate_constraint :atest_fk}}.should raise_error(Sequel::DatabaseError)
459
- @db[:atest].where(:id=>1).update(:fk=>2)
460
- @db.alter_table(:atest){validate_constraint :atest_fk}
461
- proc{@db.alter_table(:atest){validate_constraint :atest_fk}}.should_not raise_error
462
- end if DB.server_version >= 90200
463
-
464
- specify "should support adding check constarints that are not yet valid, and validating them later" do
465
- @db.create_table!(:atest){Integer :a}
466
- @db[:atest].insert(5)
467
- @db.alter_table(:atest){add_constraint({:name=>:atest_check, :not_valid=>true}){a >= 10}}
468
- @db[:atest].insert(10)
469
- proc{@db[:atest].insert(6)}.should raise_error(Sequel::DatabaseError)
470
-
471
- proc{@db.alter_table(:atest){validate_constraint :atest_check}}.should raise_error(Sequel::DatabaseError)
472
- @db[:atest].where{a < 10}.update(:a=>Sequel.+(:a, 10))
473
- @db.alter_table(:atest){validate_constraint :atest_check}
474
- proc{@db.alter_table(:atest){validate_constraint :atest_check}}.should_not raise_error
475
- end if DB.server_version >= 90200
476
-
477
- specify "should support :using when altering a column's type" do
478
- @db.create_table!(:atest){Integer :t}
479
- @db[:atest].insert(1262304000)
480
- @db.alter_table(:atest){set_column_type :t, Time, :using=>Sequel.cast('epoch', Time) + Sequel.cast('1 second', :interval) * :t}
481
- @db[:atest].get(Sequel.extract(:year, :t)).should == 2010
482
- end
483
-
484
- specify "should support :using with a string when altering a column's type" do
485
- @db.create_table!(:atest){Integer :t}
486
- @db[:atest].insert(1262304000)
487
- @db.alter_table(:atest){set_column_type :t, Time, :using=>"'epoch'::timestamp + '1 second'::interval * t"}
488
- @db[:atest].get(Sequel.extract(:year, :t)).should == 2010
489
- end
490
-
491
- specify "should be able to parse the default value for an interval type" do
492
- @db.create_table!(:atest){interval :t, :default=>'1 week'}
493
- @db.schema(:atest).first.last[:ruby_default].should == '7 days'
494
- end
495
-
496
- specify "should have #transaction support various types of synchronous options" do
497
- @db.transaction(:synchronous=>:on){}
498
- @db.transaction(:synchronous=>true){}
499
- @db.transaction(:synchronous=>:off){}
500
- @db.transaction(:synchronous=>false){}
501
- @db.sqls.grep(/synchronous/).should == ["SET LOCAL synchronous_commit = on", "SET LOCAL synchronous_commit = on", "SET LOCAL synchronous_commit = off", "SET LOCAL synchronous_commit = off"]
502
-
503
- @db.sqls.clear
504
- @db.transaction(:synchronous=>nil){}
505
- check_sqls do
506
- @db.sqls.should == ['BEGIN', 'COMMIT']
507
- end
508
-
509
- if @db.server_version >= 90100
510
- @db.sqls.clear
511
- @db.transaction(:synchronous=>:local){}
512
- check_sqls do
513
- @db.sqls.grep(/synchronous/).should == ["SET LOCAL synchronous_commit = local"]
514
- end
515
-
516
- if @db.server_version >= 90200
517
- @db.sqls.clear
518
- @db.transaction(:synchronous=>:remote_write){}
519
- check_sqls do
520
- @db.sqls.grep(/synchronous/).should == ["SET LOCAL synchronous_commit = remote_write"]
521
- end
522
- end
523
- end
524
- end
525
-
526
- specify "should have #transaction support read only transactions" do
527
- @db.transaction(:read_only=>true){}
528
- @db.transaction(:read_only=>false){}
529
- @db.transaction(:isolation=>:serializable, :read_only=>true){}
530
- @db.transaction(:isolation=>:serializable, :read_only=>false){}
531
- @db.sqls.grep(/READ/).should == ["SET TRANSACTION READ ONLY", "SET TRANSACTION READ WRITE", "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY", "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ WRITE"]
532
- end
533
-
534
- specify "should have #transaction support deferrable transactions" do
535
- @db.transaction(:deferrable=>true){}
536
- @db.transaction(:deferrable=>false){}
537
- @db.transaction(:deferrable=>true, :read_only=>true){}
538
- @db.transaction(:deferrable=>false, :read_only=>false){}
539
- @db.transaction(:isolation=>:serializable, :deferrable=>true, :read_only=>true){}
540
- @db.transaction(:isolation=>:serializable, :deferrable=>false, :read_only=>false){}
541
- @db.sqls.grep(/DEF/).should == ["SET TRANSACTION DEFERRABLE", "SET TRANSACTION NOT DEFERRABLE", "SET TRANSACTION READ ONLY DEFERRABLE", "SET TRANSACTION READ WRITE NOT DEFERRABLE", "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE", "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ WRITE NOT DEFERRABLE"]
542
- end if DB.server_version >= 90100
543
-
544
- specify "should support creating indexes concurrently" do
545
- @db.add_index :test, [:name, :value], :concurrently=>true
546
- check_sqls do
547
- @db.sqls.should == ['CREATE INDEX CONCURRENTLY "test_name_value_index" ON "test" ("name", "value")']
548
- end
549
- end
550
-
551
- specify "should support dropping indexes only if they already exist" do
552
- @db.add_index :test, [:name, :value], :name=>'tnv1'
553
- @db.sqls.clear
554
- @db.drop_index :test, [:name, :value], :if_exists=>true, :name=>'tnv1'
555
- check_sqls do
556
- @db.sqls.should == ['DROP INDEX IF EXISTS "tnv1"']
557
- end
558
- end
559
-
560
- specify "should support CASCADE when dropping indexes" do
561
- @db.add_index :test, [:name, :value], :name=>'tnv2'
562
- @db.sqls.clear
563
- @db.drop_index :test, [:name, :value], :cascade=>true, :name=>'tnv2'
564
- check_sqls do
565
- @db.sqls.should == ['DROP INDEX "tnv2" CASCADE']
566
- end
567
- end
568
-
569
- specify "should support dropping indexes concurrently" do
570
- @db.add_index :test, [:name, :value], :name=>'tnv2'
571
- @db.sqls.clear
572
- @db.drop_index :test, [:name, :value], :concurrently=>true, :name=>'tnv2'
573
- check_sqls do
574
- @db.sqls.should == ['DROP INDEX CONCURRENTLY "tnv2"']
575
- end
576
- end if DB.server_version >= 90200
577
-
578
- specify "#lock should lock table if inside a transaction" do
579
- @db.transaction{@d.lock('EXCLUSIVE'); @d.insert(:name=>'a')}
580
- end
581
-
582
- specify "#lock should return nil" do
583
- @d.lock('EXCLUSIVE'){@d.insert(:name=>'a')}.should == nil
584
- @db.transaction{@d.lock('EXCLUSIVE').should == nil; @d.insert(:name=>'a')}
585
- end
586
-
587
- specify "should raise an error if attempting to update a joined dataset with a single FROM table" do
588
- proc{@db[:test].join(:test, [:name]).update(:name=>'a')}.should raise_error(Sequel::Error, 'Need multiple FROM tables if updating/deleting a dataset with JOINs')
589
- end
590
-
591
- specify "should truncate with options" do
592
- @d << { :name => 'abc', :value => 1}
593
- @d.count.should == 1
594
- @d.truncate(:cascade => true)
595
- @d.count.should == 0
596
- if @d.db.server_version > 80400
597
- @d << { :name => 'abc', :value => 1}
598
- @d.truncate(:cascade => true, :only=>true, :restart=>true)
599
- @d.count.should == 0
600
- end
601
- end
602
-
603
- specify "should truncate multiple tables at once" do
604
- tables = [:test, :test]
605
- tables.each{|t| @d.from(t).insert}
606
- @d.from(:test, :test).truncate
607
- tables.each{|t| @d.from(t).count.should == 0}
608
- end
609
- end
610
-
611
- describe "Dataset#distinct" do
612
- before do
613
- @db = DB
614
- @db.create_table!(:a) do
615
- Integer :a
616
- Integer :b
617
- end
618
- @ds = @db[:a]
619
- end
620
- after do
621
- @db.drop_table?(:a)
622
- end
623
-
624
- it "#distinct with arguments should return results distinct on those arguments" do
625
- @ds.insert(20, 10)
626
- @ds.insert(30, 10)
627
- @ds.order(:b, :a).distinct.map(:a).should == [20, 30]
628
- @ds.order(:b, Sequel.desc(:a)).distinct.map(:a).should == [30, 20]
629
- @ds.order(:b, :a).distinct(:b).map(:a).should == [20]
630
- @ds.order(:b, Sequel.desc(:a)).distinct(:b).map(:a).should == [30]
631
- end
632
- end
633
-
634
- if DB.pool.respond_to?(:max_size) and DB.pool.max_size > 1
635
- describe "Dataset#for_update support" do
636
- before do
637
- @db = DB.create_table!(:items) do
638
- primary_key :id
639
- Integer :number
640
- String :name
641
- end
642
- @ds = DB[:items]
643
- end
644
- after do
645
- DB.drop_table?(:items)
646
- DB.disconnect
647
- end
648
-
649
- specify "should handle FOR UPDATE" do
650
- @ds.insert(:number=>20)
651
- c, t = nil, nil
652
- q = Queue.new
653
- DB.transaction do
654
- @ds.for_update.first(:id=>1)
655
- t = Thread.new do
656
- DB.transaction do
657
- q.push nil
658
- @ds.filter(:id=>1).update(:name=>'Jim')
659
- c = @ds.first(:id=>1)
660
- q.push nil
661
- end
662
- end
663
- q.pop
664
- @ds.filter(:id=>1).update(:number=>30)
665
- end
666
- q.pop
667
- t.join
668
- c.should == {:id=>1, :number=>30, :name=>'Jim'}
669
- end
670
-
671
- specify "should handle FOR SHARE" do
672
- @ds.insert(:number=>20)
673
- c, t = nil
674
- q = Queue.new
675
- DB.transaction do
676
- @ds.for_share.first(:id=>1)
677
- t = Thread.new do
678
- DB.transaction do
679
- c = @ds.for_share.filter(:id=>1).first
680
- q.push nil
681
- end
682
- end
683
- q.pop
684
- @ds.filter(:id=>1).update(:name=>'Jim')
685
- c.should == {:id=>1, :number=>20, :name=>nil}
686
- end
687
- t.join
688
- end
689
- end
690
- end
691
-
692
- describe "A PostgreSQL dataset with a timestamp field" do
693
- before(:all) do
694
- @db = DB
695
- @db.create_table! :test3 do
696
- Date :date
697
- DateTime :time
698
- end
699
- @d = @db[:test3]
700
- end
701
- before do
702
- @d.delete
703
- end
704
- after do
705
- @db.convert_infinite_timestamps = false if @db.adapter_scheme == :postgres
706
- end
707
- after(:all) do
708
- @db.drop_table?(:test3)
709
- end
710
-
711
- cspecify "should store milliseconds in time fields for Time objects", :do, :swift do
712
- t = Time.now
713
- @d << {:time=>t}
714
- t2 = @d.get(:time)
715
- @d.literal(t2).should == @d.literal(t)
716
- t2.strftime('%Y-%m-%d %H:%M:%S').should == t.strftime('%Y-%m-%d %H:%M:%S')
717
- (t2.is_a?(Time) ? t2.usec : t2.strftime('%N').to_i/1000).should == t.usec
718
- end
719
-
720
- cspecify "should store milliseconds in time fields for DateTime objects", :do, :swift do
721
- t = DateTime.now
722
- @d << {:time=>t}
723
- t2 = @d.get(:time)
724
- @d.literal(t2).should == @d.literal(t)
725
- t2.strftime('%Y-%m-%d %H:%M:%S').should == t.strftime('%Y-%m-%d %H:%M:%S')
726
- (t2.is_a?(Time) ? t2.usec : t2.strftime('%N').to_i/1000).should == t.strftime('%N').to_i/1000
727
- end
728
-
729
- if DB.adapter_scheme == :postgres
730
- specify "should handle infinite timestamps if convert_infinite_timestamps is set" do
731
- @d << {:time=>Sequel.cast('infinity', DateTime)}
732
- @db.convert_infinite_timestamps = :nil
733
- @db[:test3].get(:time).should == nil
734
- @db.convert_infinite_timestamps = :string
735
- @db[:test3].get(:time).should == 'infinity'
736
- @db.convert_infinite_timestamps = :float
737
- @db[:test3].get(:time).should == 1.0/0.0
738
- @db.convert_infinite_timestamps = 'nil'
739
- @db[:test3].get(:time).should == nil
740
- @db.convert_infinite_timestamps = 'string'
741
- @db[:test3].get(:time).should == 'infinity'
742
- @db.convert_infinite_timestamps = 'float'
743
- @db[:test3].get(:time).should == 1.0/0.0
744
- @db.convert_infinite_timestamps = 't'
745
- @db[:test3].get(:time).should == 1.0/0.0
746
- if ((Time.parse('infinity'); nil) rescue true)
747
- # Skip for loose time parsing (e.g. old rbx)
748
- @db.convert_infinite_timestamps = 'f'
749
- proc{@db[:test3].get(:time)}.should raise_error
750
- @db.convert_infinite_timestamps = nil
751
- proc{@db[:test3].get(:time)}.should raise_error
752
- @db.convert_infinite_timestamps = false
753
- proc{@db[:test3].get(:time)}.should raise_error
754
- end
755
-
756
- @d.update(:time=>Sequel.cast('-infinity', DateTime))
757
- @db.convert_infinite_timestamps = :nil
758
- @db[:test3].get(:time).should == nil
759
- @db.convert_infinite_timestamps = :string
760
- @db[:test3].get(:time).should == '-infinity'
761
- @db.convert_infinite_timestamps = :float
762
- @db[:test3].get(:time).should == -1.0/0.0
763
- end
764
-
765
- specify "should handle conversions from infinite strings/floats in models" do
766
- c = Class.new(Sequel::Model(:test3))
767
- @db.convert_infinite_timestamps = :float
768
- c.new(:time=>'infinity').time.should == 'infinity'
769
- c.new(:time=>'-infinity').time.should == '-infinity'
770
- c.new(:time=>1.0/0.0).time.should == 1.0/0.0
771
- c.new(:time=>-1.0/0.0).time.should == -1.0/0.0
772
- end
773
-
774
- specify "should handle infinite dates if convert_infinite_timestamps is set" do
775
- @d << {:date=>Sequel.cast('infinity', Date)}
776
- @db.convert_infinite_timestamps = :nil
777
- @db[:test3].get(:date).should == nil
778
- @db.convert_infinite_timestamps = :string
779
- @db[:test3].get(:date).should == 'infinity'
780
- @db.convert_infinite_timestamps = :float
781
- @db[:test3].get(:date).should == 1.0/0.0
782
-
783
- @d.update(:date=>Sequel.cast('-infinity', :timestamp))
784
- @db.convert_infinite_timestamps = :nil
785
- @db[:test3].get(:date).should == nil
786
- @db.convert_infinite_timestamps = :string
787
- @db[:test3].get(:date).should == '-infinity'
788
- @db.convert_infinite_timestamps = :float
789
- @db[:test3].get(:date).should == -1.0/0.0
790
- end
791
-
792
- specify "should handle conversions from infinite strings/floats in models" do
793
- c = Class.new(Sequel::Model(:test3))
794
- @db.convert_infinite_timestamps = :float
795
- c.new(:date=>'infinity').date.should == 'infinity'
796
- c.new(:date=>'-infinity').date.should == '-infinity'
797
- c.new(:date=>1.0/0.0).date.should == 1.0/0.0
798
- c.new(:date=>-1.0/0.0).date.should == -1.0/0.0
799
- end
800
- end
801
-
802
- specify "explain and analyze should not raise errors" do
803
- @d = DB[:test3]
804
- proc{@d.explain}.should_not raise_error
805
- proc{@d.analyze}.should_not raise_error
806
- end
807
-
808
- specify "#locks should be a dataset returning database locks " do
809
- @db.locks.should be_a_kind_of(Sequel::Dataset)
810
- @db.locks.all.should be_a_kind_of(Array)
811
- end
812
- end
813
-
814
- describe "A PostgreSQL database" do
815
- before do
816
- @db = DB
817
- @db.create_table! :test2 do
818
- text :name
819
- integer :value
820
- end
821
- end
822
- after do
823
- @db.drop_table?(:test2)
824
- end
825
-
826
- specify "should support column operations" do
827
- @db.create_table!(:test2){text :name; integer :value}
828
- @db[:test2] << {}
829
- @db[:test2].columns.should == [:name, :value]
830
-
831
- @db.add_column :test2, :xyz, :text, :default => '000'
832
- @db[:test2].columns.should == [:name, :value, :xyz]
833
- @db[:test2] << {:name => 'mmm', :value => 111}
834
- @db[:test2].first[:xyz].should == '000'
835
-
836
- @db[:test2].columns.should == [:name, :value, :xyz]
837
- @db.drop_column :test2, :xyz
838
-
839
- @db[:test2].columns.should == [:name, :value]
840
-
841
- @db[:test2].delete
842
- @db.add_column :test2, :xyz, :text, :default => '000'
843
- @db[:test2] << {:name => 'mmm', :value => 111, :xyz => 'qqqq'}
844
-
845
- @db[:test2].columns.should == [:name, :value, :xyz]
846
- @db.rename_column :test2, :xyz, :zyx
847
- @db[:test2].columns.should == [:name, :value, :zyx]
848
- @db[:test2].first[:zyx].should == 'qqqq'
849
-
850
- @db.add_column :test2, :xyz, :float
851
- @db[:test2].delete
852
- @db[:test2] << {:name => 'mmm', :value => 111, :xyz => 56.78}
853
- @db.set_column_type :test2, :xyz, :integer
854
-
855
- @db[:test2].first[:xyz].should == 57
856
- end
857
- end
858
-
859
- describe "A PostgreSQL database" do
860
- before do
861
- @db = DB
862
- @db.drop_table?(:posts)
863
- @db.sqls.clear
864
- end
865
- after do
866
- @db.drop_table?(:posts)
867
- end
868
-
869
- specify "should support resetting the primary key sequence" do
870
- @db.create_table(:posts){primary_key :a}
871
- @db[:posts].insert(:a=>20).should == 20
872
- @db[:posts].insert.should == 1
873
- @db[:posts].insert.should == 2
874
- @db[:posts].insert(:a=>10).should == 10
875
- @db.reset_primary_key_sequence(:posts).should == 21
876
- @db[:posts].insert.should == 21
877
- @db[:posts].order(:a).map(:a).should == [1, 2, 10, 20, 21]
878
- end
879
-
880
- specify "should support specifying Integer/Bignum/Fixnum types in primary keys and have them be auto incrementing" do
881
- @db.create_table(:posts){primary_key :a, :type=>Integer}
882
- @db[:posts].insert.should == 1
883
- @db[:posts].insert.should == 2
884
- @db.create_table!(:posts){primary_key :a, :type=>Fixnum}
885
- @db[:posts].insert.should == 1
886
- @db[:posts].insert.should == 2
887
- @db.create_table!(:posts){primary_key :a, :type=>Bignum}
888
- @db[:posts].insert.should == 1
889
- @db[:posts].insert.should == 2
890
- end
891
-
892
- specify "should not raise an error if attempting to resetting the primary key sequence for a table without a primary key" do
893
- @db.create_table(:posts){Integer :a}
894
- @db.reset_primary_key_sequence(:posts).should == nil
895
- end
896
-
897
- specify "should support opclass specification" do
898
- @db.create_table(:posts){text :title; text :body; integer :user_id; index(:user_id, :opclass => :int4_ops, :type => :btree)}
899
- check_sqls do
900
- @db.sqls.should == [
901
- 'CREATE TABLE "posts" ("title" text, "body" text, "user_id" integer)',
902
- 'CREATE INDEX "posts_user_id_index" ON "posts" USING btree ("user_id" int4_ops)'
903
- ]
904
- end
905
- end
906
-
907
- specify "should support fulltext indexes and searching" do
908
- @db.create_table(:posts){text :title; text :body; full_text_index [:title, :body]; full_text_index :title, :language => 'french', :index_type=>:gist}
909
-
910
- @db[:posts].insert(:title=>'ruby rails', :body=>'yowsa')
911
- @db[:posts].insert(:title=>'sequel', :body=>'ruby')
912
- @db[:posts].insert(:title=>'ruby scooby', :body=>'x')
913
-
914
- @db[:posts].full_text_search(:title, 'rails').all.should == [{:title=>'ruby rails', :body=>'yowsa'}]
915
- @db[:posts].full_text_search([:title, :body], ['yowsa', 'rails']).all.should == [:title=>'ruby rails', :body=>'yowsa']
916
- @db[:posts].full_text_search(:title, 'scooby', :language => 'french').all.should == [{:title=>'ruby scooby', :body=>'x'}]
917
-
918
- @db[:posts].full_text_search(:title, :$n).call(:select, :n=>'rails').should == [{:title=>'ruby rails', :body=>'yowsa'}]
919
- @db[:posts].full_text_search(:title, :$n).prepare(:select, :fts_select).call(:n=>'rails').should == [{:title=>'ruby rails', :body=>'yowsa'}]
920
-
921
- @db[:posts].insert(:title=>'jruby rubinius ruby maglev mri iron')
922
- @db[:posts].insert(:title=>'ruby jruby maglev mri rubinius iron')
923
- @db[:posts].full_text_search(:title, 'rubinius ruby', :phrase=>true).select_order_map(:title).should == ['jruby rubinius ruby maglev mri iron']
924
- @db[:posts].full_text_search(:title, 'jruby maglev', :phrase=>true).select_order_map(:title).should == ['ruby jruby maglev mri rubinius iron']
925
- @db[:posts].full_text_search(:title, 'rubinius ruby', :plain=>true).select_order_map(:title).should == ['jruby rubinius ruby maglev mri iron', 'ruby jruby maglev mri rubinius iron']
926
- @db[:posts].full_text_search(:title, 'jruby maglev', :plain=>true).select_order_map(:title).should == ['jruby rubinius ruby maglev mri iron', 'ruby jruby maglev mri rubinius iron']
927
-
928
- @db[:posts].delete
929
- t1 = "bork " * 1000 + "ruby sequel"
930
- t2 = "ruby sequel " * 1000
931
- @db[:posts].insert(:title=>t1)
932
- @db[:posts].insert(:title=>t2)
933
- @db[:posts].full_text_search(:title, 'ruby & sequel', :rank=>true).select_map(:title).should == [t1, t2]
934
- end
935
-
936
- specify "should support spatial indexes" do
937
- @db.create_table(:posts){box :geom; spatial_index [:geom]}
938
- check_sqls do
939
- @db.sqls.should == [
940
- 'CREATE TABLE "posts" ("geom" box)',
941
- 'CREATE INDEX "posts_geom_index" ON "posts" USING gist ("geom")'
942
- ]
943
- end
944
- end
945
-
946
- specify "should support indexes with index type" do
947
- @db.create_table(:posts){varchar :title, :size => 5; index :title, :type => 'hash'}
948
- check_sqls do
949
- @db.sqls.should == [
950
- 'CREATE TABLE "posts" ("title" varchar(5))',
951
- 'CREATE INDEX "posts_title_index" ON "posts" USING hash ("title")'
952
- ]
953
- end
954
- end
955
-
956
- specify "should support unique indexes with index type" do
957
- @db.create_table(:posts){varchar :title, :size => 5; index :title, :type => 'btree', :unique => true}
958
- check_sqls do
959
- @db.sqls.should == [
960
- 'CREATE TABLE "posts" ("title" varchar(5))',
961
- 'CREATE UNIQUE INDEX "posts_title_index" ON "posts" USING btree ("title")'
962
- ]
963
- end
964
- end
965
-
966
- specify "should support partial indexes" do
967
- @db.create_table(:posts){varchar :title, :size => 5; index :title, :where => {:title => '5'}}
968
- check_sqls do
969
- @db.sqls.should == [
970
- 'CREATE TABLE "posts" ("title" varchar(5))',
971
- 'CREATE INDEX "posts_title_index" ON "posts" ("title") WHERE ("title" = \'5\')'
972
- ]
973
- end
974
- end
975
-
976
- specify "should support identifiers for table names in indicies" do
977
- @db.create_table(Sequel::SQL::Identifier.new(:posts)){varchar :title, :size => 5; index :title, :where => {:title => '5'}}
978
- check_sqls do
979
- @db.sqls.should == [
980
- 'CREATE TABLE "posts" ("title" varchar(5))',
981
- 'CREATE INDEX "posts_title_index" ON "posts" ("title") WHERE ("title" = \'5\')'
982
- ]
983
- end
984
- end
985
-
986
- specify "should support renaming tables" do
987
- @db.create_table!(:posts1){primary_key :a}
988
- @db.rename_table(:posts1, :posts)
989
- end
990
- end
991
-
992
- describe "Postgres::Dataset#import" do
993
- before do
994
- @db = DB
995
- @db.create_table!(:test){primary_key :x; Integer :y}
996
- @db.sqls.clear
997
- @ds = @db[:test]
998
- end
999
- after do
1000
- @db.drop_table?(:test)
1001
- end
1002
-
1003
-
1004
- specify "#import should a single insert statement" do
1005
- @ds.import([:x, :y], [[1, 2], [3, 4]])
1006
- check_sqls do
1007
- @db.sqls.should == ['BEGIN', 'INSERT INTO "test" ("x", "y") VALUES (1, 2), (3, 4)', 'COMMIT']
1008
- end
1009
- @ds.all.should == [{:x=>1, :y=>2}, {:x=>3, :y=>4}]
1010
- end
1011
-
1012
- specify "#import should work correctly when returning primary keys" do
1013
- @ds.import([:x, :y], [[1, 2], [3, 4]], :return=>:primary_key).should == [1, 3]
1014
- @ds.all.should == [{:x=>1, :y=>2}, {:x=>3, :y=>4}]
1015
- end
1016
-
1017
- specify "#import should work correctly when returning primary keys with :slice option" do
1018
- @ds.import([:x, :y], [[1, 2], [3, 4]], :return=>:primary_key, :slice=>1).should == [1, 3]
1019
- @ds.all.should == [{:x=>1, :y=>2}, {:x=>3, :y=>4}]
1020
- end
1021
-
1022
- specify "#import should work correctly with an arbitrary returning value" do
1023
- @ds.returning(:y, :x).import([:x, :y], [[1, 2], [3, 4]]).should == [{:y=>2, :x=>1}, {:y=>4, :x=>3}]
1024
- @ds.all.should == [{:x=>1, :y=>2}, {:x=>3, :y=>4}]
1025
- end
1026
- end
1027
-
1028
- describe "Postgres::Dataset#insert" do
1029
- before do
1030
- @db = DB
1031
- @db.create_table!(:test5){primary_key :xid; Integer :value}
1032
- @db.sqls.clear
1033
- @ds = @db[:test5]
1034
- end
1035
- after do
1036
- @db.drop_table?(:test5)
1037
- end
1038
-
1039
- specify "should work with static SQL" do
1040
- @ds.with_sql('INSERT INTO test5 (value) VALUES (10)').insert.should == nil
1041
- @db['INSERT INTO test5 (value) VALUES (20)'].insert.should == nil
1042
- @ds.all.should == [{:xid=>1, :value=>10}, {:xid=>2, :value=>20}]
1043
- end
1044
-
1045
- specify "should insert correctly if using a column array and a value array" do
1046
- @ds.insert([:value], [10]).should == 1
1047
- @ds.all.should == [{:xid=>1, :value=>10}]
1048
- end
1049
-
1050
- specify "should use INSERT RETURNING" do
1051
- @ds.insert(:value=>10).should == 1
1052
- check_sqls do
1053
- @db.sqls.last.should == 'INSERT INTO "test5" ("value") VALUES (10) RETURNING "xid"'
1054
- end
1055
- end
1056
-
1057
- specify "should have insert_select insert the record and return the inserted record" do
1058
- h = @ds.insert_select(:value=>10)
1059
- h[:value].should == 10
1060
- @ds.first(:xid=>h[:xid])[:value].should == 10
1061
- end
1062
-
1063
- specify "should have insert_select respect existing returning clause" do
1064
- h = @ds.returning(:value___v, :xid___x).insert_select(:value=>10)
1065
- h[:v].should == 10
1066
- @ds.first(:xid=>h[:x])[:value].should == 10
1067
- end
1068
-
1069
- specify "should have prepared insert_select respect existing returning clause" do
1070
- h = @ds.returning(:value___v, :xid___x).prepare(:insert_select, :insert_select, :value=>10).call
1071
- h[:v].should == 10
1072
- @ds.first(:xid=>h[:x])[:value].should == 10
1073
- end
1074
-
1075
- specify "should correctly return the inserted record's primary key value" do
1076
- value1 = 10
1077
- id1 = @ds.insert(:value=>value1)
1078
- @ds.first(:xid=>id1)[:value].should == value1
1079
- value2 = 20
1080
- id2 = @ds.insert(:value=>value2)
1081
- @ds.first(:xid=>id2)[:value].should == value2
1082
- end
1083
-
1084
- specify "should return nil if the table has no primary key" do
1085
- @db.create_table!(:test5){String :name; Integer :value}
1086
- @ds.delete
1087
- @ds.insert(:name=>'a').should == nil
1088
- end
1089
- end
1090
-
1091
- describe "Postgres::Database schema qualified tables" do
1092
- before do
1093
- @db = DB
1094
- @db << "CREATE SCHEMA schema_test"
1095
- @db.instance_variable_set(:@primary_keys, {})
1096
- @db.instance_variable_set(:@primary_key_sequences, {})
1097
- end
1098
- after do
1099
- @db << "DROP SCHEMA schema_test CASCADE"
1100
- end
1101
-
1102
- specify "should be able to create, drop, select and insert into tables in a given schema" do
1103
- @db.create_table(:schema_test__schema_test){primary_key :i}
1104
- @db[:schema_test__schema_test].first.should == nil
1105
- @db[:schema_test__schema_test].insert(:i=>1).should == 1
1106
- @db[:schema_test__schema_test].first.should == {:i=>1}
1107
- @db.from(Sequel.lit('schema_test.schema_test')).first.should == {:i=>1}
1108
- @db.drop_table(:schema_test__schema_test)
1109
- @db.create_table(Sequel.qualify(:schema_test, :schema_test)){integer :i}
1110
- @db[:schema_test__schema_test].first.should == nil
1111
- @db.from(Sequel.lit('schema_test.schema_test')).first.should == nil
1112
- @db.drop_table(Sequel.qualify(:schema_test, :schema_test))
1113
- end
1114
-
1115
- specify "#tables should not include tables in a default non-public schema" do
1116
- @db.create_table(:schema_test__schema_test){integer :i}
1117
- @db.tables(:schema=>:schema_test).should include(:schema_test)
1118
- @db.tables.should_not include(:pg_am)
1119
- @db.tables.should_not include(:domain_udt_usage)
1120
- end
1121
-
1122
- specify "#tables should return tables in the schema provided by the :schema argument" do
1123
- @db.create_table(:schema_test__schema_test){integer :i}
1124
- @db.tables(:schema=>:schema_test).should == [:schema_test]
1125
- end
1126
-
1127
- specify "#schema should not include columns from tables in a default non-public schema" do
1128
- @db.create_table(:schema_test__domains){integer :i}
1129
- sch = @db.schema(:schema_test__domains)
1130
- cs = sch.map{|x| x.first}
1131
- cs.should include(:i)
1132
- cs.should_not include(:data_type)
1133
- end
1134
-
1135
- specify "#schema should only include columns from the table in the given :schema argument" do
1136
- @db.create_table!(:domains){integer :d}
1137
- @db.create_table(:schema_test__domains){integer :i}
1138
- sch = @db.schema(:domains, :schema=>:schema_test)
1139
- cs = sch.map{|x| x.first}
1140
- cs.should include(:i)
1141
- cs.should_not include(:d)
1142
- @db.drop_table(:domains)
1143
- end
1144
-
1145
- specify "#schema should not include columns in tables from other domains by default" do
1146
- @db.create_table!(:public__domains){integer :d}
1147
- @db.create_table(:schema_test__domains){integer :i}
1148
- begin
1149
- @db.schema(:domains).map{|x| x.first}.should == [:d]
1150
- @db.schema(:schema_test__domains).map{|x| x.first}.should == [:i]
1151
- ensure
1152
- @db.drop_table?(:public__domains)
1153
- end
1154
- end
1155
-
1156
- specify "#table_exists? should see if the table is in a given schema" do
1157
- @db.create_table(:schema_test__schema_test){integer :i}
1158
- @db.table_exists?(:schema_test__schema_test).should == true
1159
- end
1160
-
1161
- specify "should be able to add and drop indexes in a schema" do
1162
- @db.create_table(:schema_test__schema_test){Integer :i, :index=>true}
1163
- @db.indexes(:schema_test__schema_test).keys.should == [:schema_test_schema_test_i_index]
1164
- @db.drop_index :schema_test__schema_test, :i
1165
- @db.indexes(:schema_test__schema_test).keys.should == []
1166
- end
1167
-
1168
- specify "should be able to get primary keys for tables in a given schema" do
1169
- @db.create_table(:schema_test__schema_test){primary_key :i}
1170
- @db.primary_key(:schema_test__schema_test).should == 'i'
1171
- end
1172
-
1173
- specify "should be able to get serial sequences for tables in a given schema" do
1174
- @db.create_table(:schema_test__schema_test){primary_key :i}
1175
- @db.primary_key_sequence(:schema_test__schema_test).should == '"schema_test"."schema_test_i_seq"'
1176
- end
1177
-
1178
- specify "should be able to get serial sequences for tables that have spaces in the name in a given schema" do
1179
- @db.create_table(:"schema_test__schema test"){primary_key :i}
1180
- @db.primary_key_sequence(:"schema_test__schema test").should == '"schema_test"."schema test_i_seq"'
1181
- end
1182
-
1183
- specify "should be able to get custom sequences for tables in a given schema" do
1184
- @db << "CREATE SEQUENCE schema_test.kseq"
1185
- @db.create_table(:schema_test__schema_test){integer :j; primary_key :k, :type=>:integer, :default=>Sequel.lit("nextval('schema_test.kseq'::regclass)")}
1186
- @db.primary_key_sequence(:schema_test__schema_test).should == '"schema_test".kseq'
1187
- end
1188
-
1189
- specify "should be able to get custom sequences for tables that have spaces in the name in a given schema" do
1190
- @db << "CREATE SEQUENCE schema_test.\"ks eq\""
1191
- @db.create_table(:"schema_test__schema test"){integer :j; primary_key :k, :type=>:integer, :default=>Sequel.lit("nextval('schema_test.\"ks eq\"'::regclass)")}
1192
- @db.primary_key_sequence(:"schema_test__schema test").should == '"schema_test"."ks eq"'
1193
- end
1194
-
1195
- specify "should handle schema introspection cases with tables with same name in multiple schemas" do
1196
- begin
1197
- @db.create_table(:schema_test__schema_test) do
1198
- primary_key :id
1199
- foreign_key :i, :schema_test__schema_test, :index=>{:name=>:schema_test_sti}
1200
- end
1201
- @db.create_table!(:public__schema_test) do
1202
- primary_key :id
1203
- foreign_key :j, :public__schema_test, :index=>{:name=>:public_test_sti}
1204
- end
1205
-
1206
- h = @db.schema(:schema_test)
1207
- h.length.should == 2
1208
- h.last.first.should == :j
1209
-
1210
- @db.indexes(:schema_test).should == {:public_test_sti=>{:unique=>false, :columns=>[:j], :deferrable=>nil}}
1211
- @db.foreign_key_list(:schema_test).should == [{:on_update=>:no_action, :columns=>[:j], :deferrable=>false, :key=>[:id], :table=>:schema_test, :on_delete=>:no_action, :name=>:schema_test_j_fkey}]
1212
- ensure
1213
- @db.drop_table?(:public__schema_test)
1214
- end
1215
- end
1216
- end
1217
-
1218
- describe "Postgres::Database schema qualified tables and eager graphing" do
1219
- before(:all) do
1220
- @db = DB
1221
- @db.run "DROP SCHEMA s CASCADE" rescue nil
1222
- @db.run "CREATE SCHEMA s"
1223
-
1224
- @db.create_table(:s__bands){primary_key :id; String :name}
1225
- @db.create_table(:s__albums){primary_key :id; String :name; foreign_key :band_id, :s__bands}
1226
- @db.create_table(:s__tracks){primary_key :id; String :name; foreign_key :album_id, :s__albums}
1227
- @db.create_table(:s__members){primary_key :id; String :name; foreign_key :band_id, :s__bands}
1228
-
1229
- @Band = Class.new(Sequel::Model(:s__bands))
1230
- @Album = Class.new(Sequel::Model(:s__albums))
1231
- @Track = Class.new(Sequel::Model(:s__tracks))
1232
- @Member = Class.new(Sequel::Model(:s__members))
1233
- def @Band.name; :Band; end
1234
- def @Album.name; :Album; end
1235
- def @Track.name; :Track; end
1236
- def @Member.name; :Member; end
1237
-
1238
- @Band.one_to_many :albums, :class=>@Album, :order=>:name
1239
- @Band.one_to_many :members, :class=>@Member, :order=>:name
1240
- @Album.many_to_one :band, :class=>@Band, :order=>:name
1241
- @Album.one_to_many :tracks, :class=>@Track, :order=>:name
1242
- @Track.many_to_one :album, :class=>@Album, :order=>:name
1243
- @Member.many_to_one :band, :class=>@Band, :order=>:name
1244
-
1245
- @Member.many_to_many :members, :class=>@Member, :join_table=>:s__bands, :right_key=>:id, :left_key=>:id, :left_primary_key=>:band_id, :right_primary_key=>:band_id, :order=>:name
1246
- @Band.many_to_many :tracks, :class=>@Track, :join_table=>:s__albums, :right_key=>:id, :right_primary_key=>:album_id, :order=>:name
1247
-
1248
- @b1 = @Band.create(:name=>"BM")
1249
- @b2 = @Band.create(:name=>"J")
1250
- @a1 = @Album.create(:name=>"BM1", :band=>@b1)
1251
- @a2 = @Album.create(:name=>"BM2", :band=>@b1)
1252
- @a3 = @Album.create(:name=>"GH", :band=>@b2)
1253
- @a4 = @Album.create(:name=>"GHL", :band=>@b2)
1254
- @t1 = @Track.create(:name=>"BM1-1", :album=>@a1)
1255
- @t2 = @Track.create(:name=>"BM1-2", :album=>@a1)
1256
- @t3 = @Track.create(:name=>"BM2-1", :album=>@a2)
1257
- @t4 = @Track.create(:name=>"BM2-2", :album=>@a2)
1258
- @m1 = @Member.create(:name=>"NU", :band=>@b1)
1259
- @m2 = @Member.create(:name=>"TS", :band=>@b1)
1260
- @m3 = @Member.create(:name=>"NS", :band=>@b2)
1261
- @m4 = @Member.create(:name=>"JC", :band=>@b2)
1262
- end
1263
- after(:all) do
1264
- @db.run "DROP SCHEMA s CASCADE"
1265
- end
1266
-
1267
- specify "should return all eager graphs correctly" do
1268
- bands = @Band.order(:bands__name).eager_graph(:albums).all
1269
- bands.should == [@b1, @b2]
1270
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1271
-
1272
- bands = @Band.order(:bands__name).eager_graph(:albums=>:tracks).all
1273
- bands.should == [@b1, @b2]
1274
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1275
- bands.map{|x| x.albums.map{|y| y.tracks}}.should == [[[@t1, @t2], [@t3, @t4]], [[], []]]
1276
-
1277
- bands = @Band.order(:bands__name).eager_graph({:albums=>:tracks}, :members).all
1278
- bands.should == [@b1, @b2]
1279
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1280
- bands.map{|x| x.albums.map{|y| y.tracks}}.should == [[[@t1, @t2], [@t3, @t4]], [[], []]]
1281
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1282
- end
1283
-
1284
- specify "should have eager graphs work with previous joins" do
1285
- bands = @Band.order(:bands__name).select_all(:s__bands).join(:s__members, :band_id=>:id).from_self(:alias=>:bands0).eager_graph(:albums=>:tracks).all
1286
- bands.should == [@b1, @b2]
1287
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1288
- bands.map{|x| x.albums.map{|y| y.tracks}}.should == [[[@t1, @t2], [@t3, @t4]], [[], []]]
1289
- end
1290
-
1291
- specify "should have eager graphs work with joins with the same tables" do
1292
- bands = @Band.order(:bands__name).select_all(:s__bands).join(:s__members, :band_id=>:id).eager_graph({:albums=>:tracks}, :members).all
1293
- bands.should == [@b1, @b2]
1294
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1295
- bands.map{|x| x.albums.map{|y| y.tracks}}.should == [[[@t1, @t2], [@t3, @t4]], [[], []]]
1296
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1297
- end
1298
-
1299
- specify "should have eager graphs work with self referential associations" do
1300
- bands = @Band.order(:bands__name).eager_graph(:tracks=>{:album=>:band}).all
1301
- bands.should == [@b1, @b2]
1302
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1303
- bands.map{|x| x.tracks.map{|y| y.album}}.should == [[@a1, @a1, @a2, @a2], []]
1304
- bands.map{|x| x.tracks.map{|y| y.album.band}}.should == [[@b1, @b1, @b1, @b1], []]
1305
-
1306
- members = @Member.order(:members__name).eager_graph(:members).all
1307
- members.should == [@m4, @m3, @m1, @m2]
1308
- members.map{|x| x.members}.should == [[@m4, @m3], [@m4, @m3], [@m1, @m2], [@m1, @m2]]
1309
-
1310
- members = @Member.order(:members__name).eager_graph(:band, :members=>:band).all
1311
- members.should == [@m4, @m3, @m1, @m2]
1312
- members.map{|x| x.band}.should == [@b2, @b2, @b1, @b1]
1313
- members.map{|x| x.members}.should == [[@m4, @m3], [@m4, @m3], [@m1, @m2], [@m1, @m2]]
1314
- members.map{|x| x.members.map{|y| y.band}}.should == [[@b2, @b2], [@b2, @b2], [@b1, @b1], [@b1, @b1]]
1315
- end
1316
-
1317
- specify "should have eager graphs work with a from_self dataset" do
1318
- bands = @Band.order(:bands__name).from_self.eager_graph(:tracks=>{:album=>:band}).all
1319
- bands.should == [@b1, @b2]
1320
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1321
- bands.map{|x| x.tracks.map{|y| y.album}}.should == [[@a1, @a1, @a2, @a2], []]
1322
- bands.map{|x| x.tracks.map{|y| y.album.band}}.should == [[@b1, @b1, @b1, @b1], []]
1323
- end
1324
-
1325
- specify "should have eager graphs work with different types of aliased from tables" do
1326
- bands = @Band.order(:tracks__name).from(:s__bands___tracks).eager_graph(:tracks).all
1327
- bands.should == [@b1, @b2]
1328
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1329
-
1330
- bands = @Band.order(:tracks__name).from(Sequel.expr(:s__bands).as(:tracks)).eager_graph(:tracks).all
1331
- bands.should == [@b1, @b2]
1332
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1333
-
1334
- bands = @Band.order(:tracks__name).from(Sequel.expr(:s__bands).as(Sequel.identifier(:tracks))).eager_graph(:tracks).all
1335
- bands.should == [@b1, @b2]
1336
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1337
-
1338
- bands = @Band.order(:tracks__name).from(Sequel.expr(:s__bands).as('tracks')).eager_graph(:tracks).all
1339
- bands.should == [@b1, @b2]
1340
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1341
- end
1342
-
1343
- specify "should have eager graphs work with join tables with aliases" do
1344
- bands = @Band.order(:bands__name).eager_graph(:members).join(:s__albums___tracks, :band_id=>Sequel.qualify(:s__bands, :id)).eager_graph(:albums=>:tracks).all
1345
- bands.should == [@b1, @b2]
1346
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1347
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1348
-
1349
- bands = @Band.order(:bands__name).eager_graph(:members).join(Sequel.as(:s__albums, :tracks), :band_id=>Sequel.qualify(:s__bands, :id)).eager_graph(:albums=>:tracks).all
1350
- bands.should == [@b1, @b2]
1351
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1352
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1353
-
1354
- bands = @Band.order(:bands__name).eager_graph(:members).join(Sequel.as(:s__albums, 'tracks'), :band_id=>Sequel.qualify(:s__bands, :id)).eager_graph(:albums=>:tracks).all
1355
- bands.should == [@b1, @b2]
1356
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1357
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1358
-
1359
- bands = @Band.order(:bands__name).eager_graph(:members).join(Sequel.as(:s__albums, Sequel.identifier(:tracks)), :band_id=>Sequel.qualify(:s__bands, :id)).eager_graph(:albums=>:tracks).all
1360
- bands.should == [@b1, @b2]
1361
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1362
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1363
-
1364
- bands = @Band.order(:bands__name).eager_graph(:members).join(:s__albums, {:band_id=>Sequel.qualify(:s__bands, :id)}, :table_alias=>:tracks).eager_graph(:albums=>:tracks).all
1365
- bands.should == [@b1, @b2]
1366
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1367
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1368
-
1369
- bands = @Band.order(:bands__name).eager_graph(:members).join(:s__albums, {:band_id=>Sequel.qualify(:s__bands, :id)}, :table_alias=>'tracks').eager_graph(:albums=>:tracks).all
1370
- bands.should == [@b1, @b2]
1371
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1372
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1373
-
1374
- bands = @Band.order(:bands__name).eager_graph(:members).join(:s__albums, {:band_id=>Sequel.qualify(:s__bands, :id)}, :table_alias=>Sequel.identifier(:tracks)).eager_graph(:albums=>:tracks).all
1375
- bands.should == [@b1, @b2]
1376
- bands.map{|x| x.albums}.should == [[@a1, @a2], [@a3, @a4]]
1377
- bands.map{|x| x.members}.should == [[@m1, @m2], [@m4, @m3]]
1378
- end
1379
-
1380
- specify "should have eager graphs work with different types of qualified from tables" do
1381
- bands = @Band.order(:bands__name).from(Sequel.qualify(:s, :bands)).eager_graph(:tracks).all
1382
- bands.should == [@b1, @b2]
1383
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1384
-
1385
- bands = @Band.order(:bands__name).from(Sequel.identifier(:bands).qualify(:s)).eager_graph(:tracks).all
1386
- bands.should == [@b1, @b2]
1387
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1388
-
1389
- bands = @Band.order(:bands__name).from(Sequel::SQL::QualifiedIdentifier.new(:s, 'bands')).eager_graph(:tracks).all
1390
- bands.should == [@b1, @b2]
1391
- bands.map{|x| x.tracks}.should == [[@t1, @t2, @t3, @t4], []]
1392
- end
1393
-
1394
- end
1395
-
1396
- if DB.server_version >= 80300
1397
- describe "PostgreSQL tsearch2" do
1398
- before(:all) do
1399
- DB.create_table! :test6 do
1400
- text :title
1401
- text :body
1402
- full_text_index [:title, :body]
1403
- end
1404
- @ds = DB[:test6]
1405
- end
1406
- after do
1407
- DB[:test6].delete
1408
- end
1409
- after(:all) do
1410
- DB.drop_table?(:test6)
1411
- end
1412
-
1413
- specify "should search by indexed column" do
1414
- record = {:title => "oopsla conference", :body => "test"}
1415
- @ds << record
1416
- @ds.full_text_search(:title, "oopsla").all.should include(record)
1417
- end
1418
-
1419
- specify "should join multiple coumns with spaces to search by last words in row" do
1420
- record = {:title => "multiple words", :body => "are easy to search"}
1421
- @ds << record
1422
- @ds.full_text_search([:title, :body], "words").all.should include(record)
1423
- end
1424
-
1425
- specify "should return rows with a NULL in one column if a match in another column" do
1426
- record = {:title => "multiple words", :body =>nil}
1427
- @ds << record
1428
- @ds.full_text_search([:title, :body], "words").all.should include(record)
1429
- end
1430
- end
1431
- end
1432
-
1433
- if DB.dataset.supports_window_functions?
1434
- describe "Postgres::Dataset named windows" do
1435
- before do
1436
- @db = DB
1437
- @db.create_table!(:i1){Integer :id; Integer :group_id; Integer :amount}
1438
- @ds = @db[:i1].order(:id)
1439
- @ds.insert(:id=>1, :group_id=>1, :amount=>1)
1440
- @ds.insert(:id=>2, :group_id=>1, :amount=>10)
1441
- @ds.insert(:id=>3, :group_id=>1, :amount=>100)
1442
- @ds.insert(:id=>4, :group_id=>2, :amount=>1000)
1443
- @ds.insert(:id=>5, :group_id=>2, :amount=>10000)
1444
- @ds.insert(:id=>6, :group_id=>2, :amount=>100000)
1445
- end
1446
- after do
1447
- @db.drop_table?(:i1)
1448
- end
1449
-
1450
- specify "should give correct results for window functions" do
1451
- @ds.window(:win, :partition=>:group_id, :order=>:id).select(:id){sum(:amount).over(:window=>win)}.all.should ==
1452
- [{:sum=>1, :id=>1}, {:sum=>11, :id=>2}, {:sum=>111, :id=>3}, {:sum=>1000, :id=>4}, {:sum=>11000, :id=>5}, {:sum=>111000, :id=>6}]
1453
- @ds.window(:win, :partition=>:group_id).select(:id){sum(:amount).over(:window=>win, :order=>id)}.all.should ==
1454
- [{:sum=>1, :id=>1}, {:sum=>11, :id=>2}, {:sum=>111, :id=>3}, {:sum=>1000, :id=>4}, {:sum=>11000, :id=>5}, {:sum=>111000, :id=>6}]
1455
- @ds.window(:win, {}).select(:id){sum(:amount).over(:window=>:win, :order=>id)}.all.should ==
1456
- [{:sum=>1, :id=>1}, {:sum=>11, :id=>2}, {:sum=>111, :id=>3}, {:sum=>1111, :id=>4}, {:sum=>11111, :id=>5}, {:sum=>111111, :id=>6}]
1457
- @ds.window(:win, :partition=>:group_id).select(:id){sum(:amount).over(:window=>:win, :order=>id, :frame=>:all)}.all.should ==
1458
- [{:sum=>111, :id=>1}, {:sum=>111, :id=>2}, {:sum=>111, :id=>3}, {:sum=>111000, :id=>4}, {:sum=>111000, :id=>5}, {:sum=>111000, :id=>6}]
1459
- end
1460
- end
1461
- end
1462
-
1463
- describe "Postgres::Database functions, languages, schemas, and triggers" do
1464
- before do
1465
- @d = DB
1466
- end
1467
- after do
1468
- @d.drop_function('tf', :if_exists=>true, :cascade=>true)
1469
- @d.drop_function('tf', :if_exists=>true, :cascade=>true, :args=>%w'integer integer')
1470
- @d.drop_language(:plpgsql, :if_exists=>true, :cascade=>true) if @d.server_version < 90000
1471
- @d.drop_schema(:sequel, :if_exists=>true, :cascade=>true)
1472
- @d.drop_table?(:test)
1473
- end
1474
-
1475
- specify "#create_function and #drop_function should create and drop functions" do
1476
- proc{@d['SELECT tf()'].all}.should raise_error(Sequel::DatabaseError)
1477
- args = ['tf', 'SELECT 1', {:returns=>:integer}]
1478
- @d.send(:create_function_sql, *args).should =~ /\A\s*CREATE FUNCTION tf\(\)\s+RETURNS integer\s+LANGUAGE SQL\s+AS 'SELECT 1'\s*\z/
1479
- @d.create_function(*args)
1480
- @d['SELECT tf()'].all.should == [{:tf=>1}]
1481
- @d.send(:drop_function_sql, 'tf').should == 'DROP FUNCTION tf()'
1482
- @d.drop_function('tf')
1483
- proc{@d['SELECT tf()'].all}.should raise_error(Sequel::DatabaseError)
1484
- end
1485
-
1486
- specify "#create_function and #drop_function should support options" do
1487
- args = ['tf', 'SELECT $1 + $2', {:args=>[[:integer, :a], :integer], :replace=>true, :returns=>:integer, :language=>'SQL', :behavior=>:immutable, :strict=>true, :security_definer=>true, :cost=>2, :set=>{:search_path => 'public'}}]
1488
- @d.send(:create_function_sql,*args).should =~ /\A\s*CREATE OR REPLACE FUNCTION tf\(a integer, integer\)\s+RETURNS integer\s+LANGUAGE SQL\s+IMMUTABLE\s+STRICT\s+SECURITY DEFINER\s+COST 2\s+SET search_path = public\s+AS 'SELECT \$1 \+ \$2'\s*\z/
1489
- @d.create_function(*args)
1490
- # Make sure replace works
1491
- @d.create_function(*args)
1492
- @d['SELECT tf(1, 2)'].all.should == [{:tf=>3}]
1493
- args = ['tf', {:if_exists=>true, :cascade=>true, :args=>[[:integer, :a], :integer]}]
1494
- @d.send(:drop_function_sql,*args).should == 'DROP FUNCTION IF EXISTS tf(a integer, integer) CASCADE'
1495
- @d.drop_function(*args)
1496
- # Make sure if exists works
1497
- @d.drop_function(*args)
1498
- end
1499
-
1500
- specify "#create_language and #drop_language should create and drop languages" do
1501
- @d.send(:create_language_sql, :plpgsql).should == 'CREATE LANGUAGE plpgsql'
1502
- @d.create_language(:plpgsql, :replace=>true) if @d.server_version < 90000
1503
- proc{@d.create_language(:plpgsql)}.should raise_error(Sequel::DatabaseError)
1504
- @d.send(:drop_language_sql, :plpgsql).should == 'DROP LANGUAGE plpgsql'
1505
- @d.drop_language(:plpgsql) if @d.server_version < 90000
1506
- proc{@d.drop_language(:plpgsql)}.should raise_error(Sequel::DatabaseError) if @d.server_version < 90000
1507
- @d.send(:create_language_sql, :plpgsql, :replace=>true, :trusted=>true, :handler=>:a, :validator=>:b).should == (@d.server_version >= 90000 ? 'CREATE OR REPLACE TRUSTED LANGUAGE plpgsql HANDLER a VALIDATOR b' : 'CREATE TRUSTED LANGUAGE plpgsql HANDLER a VALIDATOR b')
1508
- @d.send(:drop_language_sql, :plpgsql, :if_exists=>true, :cascade=>true).should == 'DROP LANGUAGE IF EXISTS plpgsql CASCADE'
1509
- # Make sure if exists works
1510
- @d.drop_language(:plpgsql, :if_exists=>true, :cascade=>true) if @d.server_version < 90000
1511
- end
1512
-
1513
- specify "#create_schema and #drop_schema should create and drop schemas" do
1514
- @d.send(:create_schema_sql, :sequel).should == 'CREATE SCHEMA "sequel"'
1515
- @d.send(:create_schema_sql, :sequel, :if_not_exists=>true, :owner=>:foo).should == 'CREATE SCHEMA IF NOT EXISTS "sequel" AUTHORIZATION "foo"'
1516
- @d.send(:drop_schema_sql, :sequel).should == 'DROP SCHEMA "sequel"'
1517
- @d.send(:drop_schema_sql, :sequel, :if_exists=>true, :cascade=>true).should == 'DROP SCHEMA IF EXISTS "sequel" CASCADE'
1518
- @d.create_schema(:sequel)
1519
- @d.create_schema(:sequel, :if_not_exists=>true) if @d.server_version >= 90300
1520
- @d.create_table(:sequel__test){Integer :a}
1521
- @d.drop_schema(:sequel, :if_exists=>true, :cascade=>true)
1522
- end
1523
-
1524
- specify "#create_trigger and #drop_trigger should create and drop triggers" do
1525
- @d.create_language(:plpgsql) if @d.server_version < 90000
1526
- @d.create_function(:tf, 'BEGIN IF NEW.value IS NULL THEN RAISE EXCEPTION \'Blah\'; END IF; RETURN NEW; END;', :language=>:plpgsql, :returns=>:trigger)
1527
- @d.send(:create_trigger_sql, :test, :identity, :tf, :each_row=>true).should == 'CREATE TRIGGER identity BEFORE INSERT OR UPDATE OR DELETE ON "test" FOR EACH ROW EXECUTE PROCEDURE tf()'
1528
- @d.create_table(:test){String :name; Integer :value}
1529
- @d.create_trigger(:test, :identity, :tf, :each_row=>true)
1530
- @d[:test].insert(:name=>'a', :value=>1)
1531
- @d[:test].filter(:name=>'a').all.should == [{:name=>'a', :value=>1}]
1532
- proc{@d[:test].filter(:name=>'a').update(:value=>nil)}.should raise_error(Sequel::DatabaseError)
1533
- @d[:test].filter(:name=>'a').all.should == [{:name=>'a', :value=>1}]
1534
- @d[:test].filter(:name=>'a').update(:value=>3)
1535
- @d[:test].filter(:name=>'a').all.should == [{:name=>'a', :value=>3}]
1536
- @d.send(:drop_trigger_sql, :test, :identity).should == 'DROP TRIGGER identity ON "test"'
1537
- @d.drop_trigger(:test, :identity)
1538
- @d.send(:create_trigger_sql, :test, :identity, :tf, :after=>true, :events=>:insert, :args=>[1, 'a']).should == 'CREATE TRIGGER identity AFTER INSERT ON "test" EXECUTE PROCEDURE tf(1, \'a\')'
1539
- @d.send(:drop_trigger_sql, :test, :identity, :if_exists=>true, :cascade=>true).should == 'DROP TRIGGER IF EXISTS identity ON "test" CASCADE'
1540
- # Make sure if exists works
1541
- @d.drop_trigger(:test, :identity, :if_exists=>true, :cascade=>true)
1542
-
1543
- if @d.supports_trigger_conditions?
1544
- @d.send(:create_trigger_sql, :test, :identity, :tf, :each_row=>true, :when=> {:new__name => 'b'}).should == %q{CREATE TRIGGER identity BEFORE INSERT OR UPDATE OR DELETE ON "test" FOR EACH ROW WHEN ("new"."name" = 'b') EXECUTE PROCEDURE tf()}
1545
- @d.create_trigger(:test, :identity, :tf, :each_row=>true, :events => :update, :when=> {:new__name => 'b'})
1546
- proc{@d[:test].filter(:name=>'a').update(:value=>nil)}.should_not raise_error
1547
- @d[:test].filter(:name=>'a').all.should == [{:name=>'a', :value=>nil}]
1548
- proc{@d[:test].filter(:name=>'a').update(:name=>'b')}.should raise_error(Sequel::DatabaseError)
1549
- @d[:test].filter(:name=>'a').all.should == [{:name=>'a', :value=>nil}]
1550
- @d.drop_trigger(:test, :identity)
1551
- end
1552
- end
1553
- end
1554
-
1555
- if DB.adapter_scheme == :postgres
1556
- describe "Postgres::Dataset #use_cursor" do
1557
- before(:all) do
1558
- @db = DB
1559
- @db.create_table!(:test_cursor){Integer :x}
1560
- @db.sqls.clear
1561
- @ds = @db[:test_cursor]
1562
- @db.transaction{1001.times{|i| @ds.insert(i)}}
1563
- end
1564
- after(:all) do
1565
- @db.drop_table?(:test_cursor)
1566
- end
1567
-
1568
- specify "should return the same results as the non-cursor use" do
1569
- @ds.all.should == @ds.use_cursor.all
1570
- end
1571
-
1572
- specify "should not swallow errors if closing cursor raises an error" do
1573
- proc do
1574
- @db.synchronize do |c|
1575
- @ds.use_cursor.each do |r|
1576
- @db.run "CLOSE sequel_cursor"
1577
- raise ArgumentError
1578
- end
1579
- end
1580
- end.should raise_error(ArgumentError)
1581
- end
1582
-
1583
- specify "should respect the :rows_per_fetch option" do
1584
- @db.sqls.clear
1585
- @ds.use_cursor.all
1586
- check_sqls do
1587
- @db.sqls.length.should == 6
1588
- @db.sqls.clear
1589
- end
1590
- @ds.use_cursor(:rows_per_fetch=>100).all
1591
- check_sqls do
1592
- @db.sqls.length.should == 15
1593
- end
1594
- end
1595
-
1596
- specify "should respect the :hold=>true option for creating the cursor WITH HOLD and not using a transaction" do
1597
- @ds.use_cursor.each{@db.in_transaction?.should == true}
1598
- check_sqls{@db.sqls.any?{|s| s =~ /WITH HOLD/}.should == false}
1599
- @ds.use_cursor(:hold=>true).each{@db.in_transaction?.should == false}
1600
- check_sqls{@db.sqls.any?{|s| s =~ /WITH HOLD/}.should == true}
1601
- end
1602
-
1603
- specify "should support updating individual rows based on a cursor" do
1604
- @db.transaction(:rollback=>:always) do
1605
- @ds.use_cursor(:rows_per_fetch=>1).each do |row|
1606
- @ds.where_current_of.update(:x=>Sequel.*(row[:x], 10))
1607
- end
1608
- @ds.select_order_map(:x).should == (0..1000).map{|x| x * 10}
1609
- end
1610
- @ds.select_order_map(:x).should == (0..1000).to_a
1611
- end
1612
-
1613
- specify "should respect the :cursor_name option" do
1614
- one_rows = []
1615
- two_rows = []
1616
- @ds.order(:x).use_cursor(:cursor_name => 'cursor_one').each do |one|
1617
- one_rows << one
1618
- if one[:x] % 1000 == 500
1619
- two_rows = []
1620
- @ds.order(:x).use_cursor(:cursor_name => 'cursor_two').each do |two|
1621
- two_rows << two
1622
- end
1623
- end
1624
- end
1625
- one_rows.should == two_rows
1626
- end
1627
-
1628
- specify "should handle returning inside block" do
1629
- def @ds.check_return
1630
- use_cursor.each{|r| return}
1631
- end
1632
- @ds.check_return
1633
- @ds.all.should == @ds.use_cursor.all
1634
- end
1635
- end
1636
-
1637
- describe "Postgres::PG_NAMED_TYPES" do
1638
- before do
1639
- @db = DB
1640
- Sequel::Postgres::PG_NAMED_TYPES[:interval] = lambda{|v| v.reverse}
1641
- @db.extension :pg_array
1642
- @db.reset_conversion_procs
1643
- end
1644
- after do
1645
- Sequel::Postgres::PG_NAMED_TYPES.delete(:interval)
1646
- @db.reset_conversion_procs
1647
- @db.drop_table?(:foo)
1648
- end
1649
-
1650
- specify "should look up conversion procs by name" do
1651
- @db.create_table!(:foo){interval :bar}
1652
- @db[:foo].insert(Sequel.cast('21 days', :interval))
1653
- @db[:foo].get(:bar).should == 'syad 12'
1654
- end
1655
-
1656
- specify "should handle array types of named types" do
1657
- @db.create_table!(:foo){column :bar, 'interval[]'}
1658
- @db[:foo].insert(Sequel.pg_array(['21 days'], :interval))
1659
- @db[:foo].get(:bar).should == ['syad 12']
1660
- end
1661
- end
1662
- end
1663
-
1664
- if ((DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG) || DB.adapter_scheme == :jdbc) && DB.server_version >= 90000
1665
- describe "Postgres::Database#copy_into" do
1666
- before(:all) do
1667
- @db = DB
1668
- @db.create_table!(:test_copy){Integer :x; Integer :y}
1669
- @ds = @db[:test_copy].order(:x, :y)
1670
- end
1671
- before do
1672
- @db[:test_copy].delete
1673
- end
1674
- after(:all) do
1675
- @db.drop_table?(:test_copy)
1676
- end
1677
-
1678
- specify "should work with a :data option containing data in PostgreSQL text format" do
1679
- @db.copy_into(:test_copy, :data=>"1\t2\n3\t4\n")
1680
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1681
- end
1682
-
1683
- specify "should work with :format=>:csv option and :data option containing data in CSV format" do
1684
- @db.copy_into(:test_copy, :format=>:csv, :data=>"1,2\n3,4\n")
1685
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1686
- end
1687
-
1688
- specify "should respect given :options" do
1689
- @db.copy_into(:test_copy, :options=>"FORMAT csv, HEADER TRUE", :data=>"x,y\n1,2\n3,4\n")
1690
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1691
- end
1692
-
1693
- specify "should respect given :options options when :format is used" do
1694
- @db.copy_into(:test_copy, :options=>"QUOTE '''', DELIMITER '|'", :format=>:csv, :data=>"'1'|'2'\n'3'|'4'\n")
1695
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1696
- end
1697
-
1698
- specify "should accept :columns option to online copy the given columns" do
1699
- @db.copy_into(:test_copy, :data=>"1\t2\n3\t4\n", :columns=>[:y, :x])
1700
- @ds.select_map([:x, :y]).should == [[2, 1], [4, 3]]
1701
- end
1702
-
1703
- specify "should accept a block and use returned values for the copy in data stream" do
1704
- buf = ["1\t2\n", "3\t4\n"]
1705
- @db.copy_into(:test_copy){buf.shift}
1706
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1707
- end
1708
-
1709
- specify "should work correctly with a block and :format=>:csv" do
1710
- buf = ["1,2\n", "3,4\n"]
1711
- @db.copy_into(:test_copy, :format=>:csv){buf.shift}
1712
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1713
- end
1714
-
1715
- specify "should accept an enumerable as the :data option" do
1716
- @db.copy_into(:test_copy, :data=>["1\t2\n", "3\t4\n"])
1717
- @ds.select_map([:x, :y]).should == [[1, 2], [3, 4]]
1718
- end
1719
-
1720
- specify "should have an exception, cause a rollback of copied data and still have a usable connection" do
1721
- 2.times do
1722
- sent = false
1723
- proc{@db.copy_into(:test_copy){raise ArgumentError if sent; sent = true; "1\t2\n"}}.should raise_error(ArgumentError)
1724
- @ds.select_map([:x, :y]).should == []
1725
- end
1726
- end
1727
-
1728
- specify "should handle database errors with a rollback of copied data and still have a usable connection" do
1729
- 2.times do
1730
- proc{@db.copy_into(:test_copy, :data=>["1\t2\n", "3\ta\n"])}.should raise_error(Sequel::DatabaseError)
1731
- @ds.select_map([:x, :y]).should == []
1732
- end
1733
- end
1734
-
1735
- specify "should raise an Error if both :data and a block are provided" do
1736
- proc{@db.copy_into(:test_copy, :data=>["1\t2\n", "3\t4\n"]){}}.should raise_error(Sequel::Error)
1737
- end
1738
-
1739
- specify "should raise an Error if neither :data or a block are provided" do
1740
- proc{@db.copy_into(:test_copy)}.should raise_error(Sequel::Error)
1741
- end
1742
- end
1743
-
1744
- describe "Postgres::Database#copy_table" do
1745
- before(:all) do
1746
- @db = DB
1747
- @db.create_table!(:test_copy){Integer :x; Integer :y}
1748
- ds = @db[:test_copy]
1749
- ds.insert(1, 2)
1750
- ds.insert(3, 4)
1751
- end
1752
- after(:all) do
1753
- @db.drop_table?(:test_copy)
1754
- end
1755
-
1756
- specify "without a block or options should return a text version of the table as a single string" do
1757
- @db.copy_table(:test_copy).should == "1\t2\n3\t4\n"
1758
- end
1759
-
1760
- specify "without a block and with :format=>:csv should return a csv version of the table as a single string" do
1761
- @db.copy_table(:test_copy, :format=>:csv).should == "1,2\n3,4\n"
1762
- end
1763
-
1764
- specify "should treat string as SQL code" do
1765
- @db.copy_table('COPY "test_copy" TO STDOUT').should == "1\t2\n3\t4\n"
1766
- end
1767
-
1768
- specify "should respect given :options options" do
1769
- @db.copy_table(:test_copy, :options=>"FORMAT csv, HEADER TRUE").should == "x,y\n1,2\n3,4\n"
1770
- end
1771
-
1772
- specify "should respect given :options options when :format is used" do
1773
- @db.copy_table(:test_copy, :format=>:csv, :options=>"QUOTE '''', FORCE_QUOTE *").should == "'1','2'\n'3','4'\n"
1774
- end
1775
-
1776
- specify "should accept dataset as first argument" do
1777
- @db.copy_table(@db[:test_copy].cross_join(:test_copy___tc).order(:test_copy__x, :test_copy__y, :tc__x, :tc__y)).should == "1\t2\t1\t2\n1\t2\t3\t4\n3\t4\t1\t2\n3\t4\t3\t4\n"
1778
- end
1779
-
1780
- specify "with a block and no options should yield each row as a string in text format" do
1781
- buf = []
1782
- @db.copy_table(:test_copy){|b| buf << b}
1783
- buf.should == ["1\t2\n", "3\t4\n"]
1784
- end
1785
-
1786
- specify "with a block and :format=>:csv should yield each row as a string in csv format" do
1787
- buf = []
1788
- @db.copy_table(:test_copy, :format=>:csv){|b| buf << b}
1789
- buf.should == ["1,2\n", "3,4\n"]
1790
- end
1791
-
1792
- specify "should work fine when using a block that is terminated early with a following copy_table" do
1793
- buf = []
1794
- proc{@db.copy_table(:test_copy, :format=>:csv){|b| buf << b; break}}.should raise_error(Sequel::DatabaseDisconnectError)
1795
- buf.should == ["1,2\n"]
1796
- buf.clear
1797
- proc{@db.copy_table(:test_copy, :format=>:csv){|b| buf << b; raise ArgumentError}}.should raise_error(Sequel::DatabaseDisconnectError)
1798
- buf.should == ["1,2\n"]
1799
- buf.clear
1800
- @db.copy_table(:test_copy){|b| buf << b}
1801
- buf.should == ["1\t2\n", "3\t4\n"]
1802
- end
1803
-
1804
- specify "should work fine when using a block that is terminated early with a following regular query" do
1805
- buf = []
1806
- proc{@db.copy_table(:test_copy, :format=>:csv){|b| buf << b; break}}.should raise_error(Sequel::DatabaseDisconnectError)
1807
- buf.should == ["1,2\n"]
1808
- buf.clear
1809
- proc{@db.copy_table(:test_copy, :format=>:csv){|b| buf << b; raise ArgumentError}}.should raise_error(Sequel::DatabaseDisconnectError)
1810
- buf.should == ["1,2\n"]
1811
- @db[:test_copy].select_order_map(:x).should == [1, 3]
1812
- end
1813
- end
1814
- end
1815
-
1816
- if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG && DB.server_version >= 90000
1817
- describe "Postgres::Database LISTEN/NOTIFY" do
1818
- before(:all) do
1819
- @db = DB
1820
- end
1821
-
1822
- specify "should support listen and notify" do
1823
- notify_pid = @db.synchronize{|conn| conn.backend_pid}
1824
-
1825
- called = false
1826
- @db.listen('foo', :after_listen=>proc{@db.notify('foo')}) do |ev, pid, payload|
1827
- ev.should == 'foo'
1828
- pid.should == notify_pid
1829
- ['', nil].should include(payload)
1830
- called = true
1831
- end.should == 'foo'
1832
- called.should == true
1833
-
1834
- # Check weird identifier names
1835
- called = false
1836
- @db.listen('FOO bar', :after_listen=>proc{@db.notify('FOO bar')}) do |ev, pid, payload|
1837
- ev.should == 'FOO bar'
1838
- pid.should == notify_pid
1839
- ['', nil].should include(payload)
1840
- called = true
1841
- end.should == 'FOO bar'
1842
- called.should == true
1843
-
1844
- # Check identifier symbols
1845
- called = false
1846
- @db.listen(:foo, :after_listen=>proc{@db.notify(:foo)}) do |ev, pid, payload|
1847
- ev.should == 'foo'
1848
- pid.should == notify_pid
1849
- ['', nil].should include(payload)
1850
- called = true
1851
- end.should == 'foo'
1852
- called.should == true
1853
-
1854
- called = false
1855
- @db.listen('foo', :after_listen=>proc{@db.notify('foo', :payload=>'bar')}) do |ev, pid, payload|
1856
- ev.should == 'foo'
1857
- pid.should == notify_pid
1858
- payload.should == 'bar'
1859
- called = true
1860
- end.should == 'foo'
1861
- called.should == true
1862
-
1863
- @db.listen('foo', :after_listen=>proc{@db.notify('foo')}).should == 'foo'
1864
-
1865
- called = false
1866
- called2 = false
1867
- i = 0
1868
- @db.listen(['foo', 'bar'], :after_listen=>proc{@db.notify('foo', :payload=>'bar'); @db.notify('bar', :payload=>'foo')}, :loop=>proc{i+=1}) do |ev, pid, payload|
1869
- if !called
1870
- ev.should == 'foo'
1871
- pid.should == notify_pid
1872
- payload.should == 'bar'
1873
- called = true
1874
- else
1875
- ev.should == 'bar'
1876
- pid.should == notify_pid
1877
- payload.should == 'foo'
1878
- called2 = true
1879
- break
1880
- end
1881
- end.should be_nil
1882
- called.should == true
1883
- called2.should == true
1884
- i.should == 1
1885
- end
1886
-
1887
- specify "should accept a :timeout option in listen" do
1888
- @db.listen('foo2', :timeout=>0.001).should == nil
1889
- called = false
1890
- @db.listen('foo2', :timeout=>0.001){|ev, pid, payload| called = true}.should == nil
1891
- called.should == false
1892
- i = 0
1893
- @db.listen('foo2', :timeout=>0.001, :loop=>proc{i+=1; throw :stop if i > 3}){|ev, pid, payload| called = true}.should == nil
1894
- i.should == 4
1895
- end unless RUBY_PLATFORM =~ /mingw/ # Ruby freezes on this spec on this platform/version
1896
- end
1897
- end
1898
-
1899
- describe 'PostgreSQL special float handling' do
1900
- before do
1901
- @db = DB
1902
- @db.create_table!(:test5){Float :value}
1903
- @db.sqls.clear
1904
- @ds = @db[:test5]
1905
- end
1906
- after do
1907
- @db.drop_table?(:test5)
1908
- end
1909
-
1910
- check_sqls do
1911
- specify 'should quote NaN' do
1912
- nan = 0.0/0.0
1913
- @ds.insert_sql(:value => nan).should == %q{INSERT INTO "test5" ("value") VALUES ('NaN')}
1914
- end
1915
-
1916
- specify 'should quote +Infinity' do
1917
- inf = 1.0/0.0
1918
- @ds.insert_sql(:value => inf).should == %q{INSERT INTO "test5" ("value") VALUES ('Infinity')}
1919
- end
1920
-
1921
- specify 'should quote -Infinity' do
1922
- inf = -1.0/0.0
1923
- @ds.insert_sql(:value => inf).should == %q{INSERT INTO "test5" ("value") VALUES ('-Infinity')}
1924
- end
1925
- end
1926
-
1927
- if DB.adapter_scheme == :postgres
1928
- specify 'inserts NaN' do
1929
- nan = 0.0/0.0
1930
- @ds.insert(:value=>nan)
1931
- @ds.all[0][:value].nan?.should == true
1932
- end
1933
-
1934
- specify 'inserts +Infinity' do
1935
- inf = 1.0/0.0
1936
- @ds.insert(:value=>inf)
1937
- @ds.all[0][:value].infinite?.should > 0
1938
- end
1939
-
1940
- specify 'inserts -Infinity' do
1941
- inf = -1.0/0.0
1942
- @ds.insert(:value=>inf)
1943
- @ds.all[0][:value].infinite?.should < 0
1944
- end
1945
- end
1946
- end
1947
-
1948
- describe 'PostgreSQL array handling' do
1949
- before(:all) do
1950
- @db = DB
1951
- @db.extension :pg_array
1952
- @ds = @db[:items]
1953
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
1954
- @tp = lambda{@db.schema(:items).map{|a| a.last[:type]}}
1955
- end
1956
- after do
1957
- @db.drop_table?(:items)
1958
- end
1959
-
1960
- specify 'insert and retrieve integer and float arrays of various sizes' do
1961
- @db.create_table!(:items) do
1962
- column :i2, 'int2[]'
1963
- column :i4, 'int4[]'
1964
- column :i8, 'int8[]'
1965
- column :r, 'real[]'
1966
- column :dp, 'double precision[]'
1967
- end
1968
- @tp.call.should == [:smallint_array, :integer_array, :bigint_array, :real_array, :float_array]
1969
- @ds.insert(Sequel.pg_array([1], :int2), Sequel.pg_array([nil, 2], :int4), Sequel.pg_array([3, nil], :int8), Sequel.pg_array([4, nil, 4.5], :real), Sequel.pg_array([5, nil, 5.5], "double precision"))
1970
- @ds.count.should == 1
1971
- rs = @ds.all
1972
- if @native
1973
- rs.should == [{:i2=>[1], :i4=>[nil, 2], :i8=>[3, nil], :r=>[4.0, nil, 4.5], :dp=>[5.0, nil, 5.5]}]
1974
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
1975
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
1976
- @ds.delete
1977
- @ds.insert(rs.first)
1978
- @ds.all.should == rs
1979
- end
1980
-
1981
- @ds.delete
1982
- @ds.insert(Sequel.pg_array([[1], [2]], :int2), Sequel.pg_array([[nil, 2], [3, 4]], :int4), Sequel.pg_array([[3, nil], [nil, nil]], :int8), Sequel.pg_array([[4, nil], [nil, 4.5]], :real), Sequel.pg_array([[5, nil], [nil, 5.5]], "double precision"))
1983
-
1984
- rs = @ds.all
1985
- if @native
1986
- rs.should == [{:i2=>[[1], [2]], :i4=>[[nil, 2], [3, 4]], :i8=>[[3, nil], [nil, nil]], :r=>[[4, nil], [nil, 4.5]], :dp=>[[5, nil], [nil, 5.5]]}]
1987
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
1988
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
1989
- @ds.delete
1990
- @ds.insert(rs.first)
1991
- @ds.all.should == rs
1992
- end
1993
- end
1994
-
1995
- specify 'insert and retrieve decimal arrays' do
1996
- @db.create_table!(:items) do
1997
- column :n, 'numeric[]'
1998
- end
1999
- @tp.call.should == [:decimal_array]
2000
- @ds.insert(Sequel.pg_array([BigDecimal.new('1.000000000000000000001'), nil, BigDecimal.new('1')], :numeric))
2001
- @ds.count.should == 1
2002
- rs = @ds.all
2003
- if @native
2004
- rs.should == [{:n=>[BigDecimal.new('1.000000000000000000001'), nil, BigDecimal.new('1')]}]
2005
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2006
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2007
- @ds.delete
2008
- @ds.insert(rs.first)
2009
- @ds.all.should == rs
2010
- end
2011
-
2012
- @ds.delete
2013
- @ds.insert(Sequel.pg_array([[BigDecimal.new('1.0000000000000000000000000000001'), nil], [nil, BigDecimal.new('1')]], :numeric))
2014
- rs = @ds.all
2015
- if @native
2016
- rs.should == [{:n=>[[BigDecimal.new('1.0000000000000000000000000000001'), nil], [nil, BigDecimal.new('1')]]}]
2017
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2018
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2019
- @ds.delete
2020
- @ds.insert(rs.first)
2021
- @ds.all.should == rs
2022
- end
2023
- end
2024
-
2025
- specify 'insert and retrieve string arrays' do
2026
- @db.create_table!(:items) do
2027
- column :c, 'char(4)[]'
2028
- column :vc, 'varchar[]'
2029
- column :t, 'text[]'
2030
- end
2031
- @tp.call.should == [:character_array, :varchar_array, :string_array]
2032
- @ds.insert(Sequel.pg_array(['a', nil, 'NULL', 'b"\'c'], 'char(4)'), Sequel.pg_array(['a', nil, 'NULL', 'b"\'c', '', ''], :varchar), Sequel.pg_array(['a', nil, 'NULL', 'b"\'c'], :text))
2033
- @ds.count.should == 1
2034
- rs = @ds.all
2035
- if @native
2036
- rs.should == [{:c=>['a ', nil, 'NULL', 'b"\'c'], :vc=>['a', nil, 'NULL', 'b"\'c', '', ''], :t=>['a', nil, 'NULL', 'b"\'c']}]
2037
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2038
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2039
- @ds.delete
2040
- @ds.insert(rs.first)
2041
- @ds.all.should == rs
2042
- end
2043
-
2044
- @ds.delete
2045
- @ds.insert(Sequel.pg_array([[['a'], [nil]], [['NULL'], ['b"\'c']]], 'char(4)'), Sequel.pg_array([[['a[],\\[\\]\\,\\""NULL",'], ['']], [['NULL'], ['b"\'c']]], :varchar), Sequel.pg_array([[['a'], [nil]], [['NULL'], ['b"\'c']]], :text))
2046
- rs = @ds.all
2047
- if @native
2048
- rs.should == [{:c=>[[['a '], [nil]], [['NULL'], ['b"\'c']]], :vc=>[[['a[],\\[\\]\\,\\""NULL",'], ['']], [['NULL'], ['b"\'c']]], :t=>[[['a'], [nil]], [['NULL'], ['b"\'c']]]}]
2049
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2050
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2051
- @ds.delete
2052
- @ds.insert(rs.first)
2053
- @ds.all.should == rs
2054
- end
2055
- end
2056
-
2057
- specify 'insert and retrieve arrays of other types' do
2058
- @db.create_table!(:items) do
2059
- column :b, 'bool[]'
2060
- column :d, 'date[]'
2061
- column :t, 'time[]'
2062
- column :ts, 'timestamp[]'
2063
- column :tstz, 'timestamptz[]'
2064
- end
2065
- @tp.call.should == [:boolean_array, :date_array, :time_array, :datetime_array, :datetime_timezone_array]
2066
-
2067
- d = Date.today
2068
- t = Sequel::SQLTime.create(10, 20, 30)
2069
- ts = Time.local(2011, 1, 2, 3, 4, 5)
2070
-
2071
- @ds.insert(Sequel.pg_array([true, false], :bool), Sequel.pg_array([d, nil], :date), Sequel.pg_array([t, nil], :time), Sequel.pg_array([ts, nil], :timestamp), Sequel.pg_array([ts, nil], :timestamptz))
2072
- @ds.count.should == 1
2073
- rs = @ds.all
2074
- if @native
2075
- rs.should == [{:b=>[true, false], :d=>[d, nil], :t=>[t, nil], :ts=>[ts, nil], :tstz=>[ts, nil]}]
2076
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2077
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2078
- @ds.delete
2079
- @ds.insert(rs.first)
2080
- @ds.all.should == rs
2081
- end
2082
-
2083
- @db.create_table!(:items) do
2084
- column :ba, 'bytea[]'
2085
- column :tz, 'timetz[]'
2086
- column :o, 'oid[]'
2087
- end
2088
- @tp.call.should == [:blob_array, :time_timezone_array, :oid_array]
2089
- @ds.insert(Sequel.pg_array([Sequel.blob("a\0"), nil], :bytea), Sequel.pg_array([t, nil], :timetz), Sequel.pg_array([1, 2, 3], :oid))
2090
- @ds.count.should == 1
2091
- if @native
2092
- rs = @ds.all
2093
- rs.should == [{:ba=>[Sequel.blob("a\0"), nil], :tz=>[t, nil], :o=>[1, 2, 3]}]
2094
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2095
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2096
- @ds.delete
2097
- @ds.insert(rs.first)
2098
- @ds.all.should == rs
2099
- end
2100
-
2101
- @db.create_table!(:items) do
2102
- column :x, 'xml[]'
2103
- column :m, 'money[]'
2104
- column :b, 'bit[]'
2105
- column :vb, 'bit varying[]'
2106
- column :u, 'uuid[]'
2107
- column :xi, 'xid[]'
2108
- column :c, 'cid[]'
2109
- column :n, 'name[]'
2110
- column :t, 'tid[]'
2111
- column :i, 'int2vector[]'
2112
- column :o, 'oidvector[]'
2113
- end
2114
- @tp.call.should == [:xml_array, :money_array, :bit_array, :varbit_array, :uuid_array, :xid_array, :cid_array, :name_array, :tid_array, :int2vector_array, :oidvector_array]
2115
- @ds.insert(Sequel.pg_array(['<a></a>'], :xml),
2116
- Sequel.pg_array(['1'], :money),
2117
- Sequel.pg_array(['1'], :bit),
2118
- Sequel.pg_array(['10'], :varbit),
2119
- Sequel.pg_array(['c0f24910-39e7-11e4-916c-0800200c9a66'], :uuid),
2120
- Sequel.pg_array(['12'], :xid),
2121
- Sequel.pg_array(['12'], :cid),
2122
- Sequel.pg_array(['N'], :name),
2123
- Sequel.pg_array(['(1,2)'], :tid),
2124
- Sequel.pg_array(['1 2'], :int2vector),
2125
- Sequel.pg_array(['1 2'], :oidvector))
2126
- @ds.count.should == 1
2127
- if @native
2128
- rs = @ds.all
2129
- r = rs.first
2130
- m = r.delete(:m)
2131
- m.should_not be_a_kind_of(Array)
2132
- m.to_a.should be_a_kind_of(Array)
2133
- m.first.should be_a_kind_of(String)
2134
- r.should == {:x=>['<a></a>'], :b=>['1'], :vb=>['10'], :u=>['c0f24910-39e7-11e4-916c-0800200c9a66'], :xi=>['12'], :c=>['12'], :n=>['N'], :t=>['(1,2)'], :i=>['1 2'], :o=>['1 2']}
2135
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2136
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2137
- r[:m] = m
2138
- @ds.delete
2139
- @ds.insert(r)
2140
- @ds.all.should == rs
2141
- end
2142
- end
2143
-
2144
- specify 'insert and retrieve empty arrays' do
2145
- @db.create_table!(:items) do
2146
- column :n, 'integer[]'
2147
- end
2148
- @ds.insert(:n=>Sequel.pg_array([], :integer))
2149
- @ds.count.should == 1
2150
- if @native
2151
- rs = @ds.all
2152
- rs.should == [{:n=>[]}]
2153
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2154
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2155
- @ds.delete
2156
- @ds.insert(rs.first)
2157
- @ds.all.should == rs
2158
- end
2159
- end
2160
-
2161
- specify 'insert and retrieve custom array types' do
2162
- int2vector = Class.new do
2163
- attr_reader :array
2164
- def initialize(array)
2165
- @array = array
2166
- end
2167
- def sql_literal_append(ds, sql)
2168
- sql << "'#{array.join(' ')}'"
2169
- end
2170
- def ==(other)
2171
- if other.is_a?(self.class)
2172
- array == other.array
2173
- else
2174
- super
2175
- end
2176
- end
2177
- end
2178
- @db.register_array_type(:int2vector){|s| int2vector.new(s.split.map{|i| i.to_i})}
2179
- @db.create_table!(:items) do
2180
- column :b, 'int2vector[]'
2181
- end
2182
- @tp.call.should == [:int2vector_array]
2183
- int2v = int2vector.new([1, 2])
2184
- @ds.insert(Sequel.pg_array([int2v], :int2vector))
2185
- @ds.count.should == 1
2186
- rs = @ds.all
2187
- if @native
2188
- rs.should == [{:b=>[int2v]}]
2189
- rs.first.values.each{|v| v.should_not be_a_kind_of(Array)}
2190
- rs.first.values.each{|v| v.to_a.should be_a_kind_of(Array)}
2191
- @ds.delete
2192
- @ds.insert(rs.first)
2193
- @ds.all.should == rs
2194
- end
2195
- end
2196
-
2197
- specify 'use arrays in bound variables' do
2198
- @db.create_table!(:items) do
2199
- column :i, 'int4[]'
2200
- end
2201
- @ds.call(:insert, {:i=>[1,2]}, {:i=>:$i})
2202
- @ds.get(:i).should == [1, 2]
2203
- @ds.filter(:i=>:$i).call(:first, :i=>[1,2]).should == {:i=>[1,2]}
2204
- @ds.filter(:i=>:$i).call(:first, :i=>[1,3]).should == nil
2205
-
2206
- # NULL values
2207
- @ds.delete
2208
- @ds.call(:insert, {:i=>[nil,nil]}, {:i=>:$i})
2209
- @ds.first.should == {:i=>[nil, nil]}
2210
-
2211
- @db.create_table!(:items) do
2212
- column :i, 'text[]'
2213
- end
2214
- a = ["\"\\\\\"{}\n\t\r \v\b123afP", 'NULL', nil, '']
2215
- @ds.call(:insert, {:i=>:$i}, :i=>Sequel.pg_array(a))
2216
- @ds.get(:i).should == a
2217
- @ds.filter(:i=>:$i).call(:first, :i=>a).should == {:i=>a}
2218
- @ds.filter(:i=>:$i).call(:first, :i=>['', nil, nil, 'a']).should == nil
2219
-
2220
- @db.create_table!(:items) do
2221
- column :i, 'date[]'
2222
- end
2223
- a = [Date.today]
2224
- @ds.call(:insert, {:i=>:$i}, :i=>Sequel.pg_array(a, 'date'))
2225
- @ds.get(:i).should == a
2226
- @ds.filter(:i=>:$i).call(:first, :i=>a).should == {:i=>a}
2227
- @ds.filter(:i=>:$i).call(:first, :i=>Sequel.pg_array([Date.today-1], 'date')).should == nil
2228
-
2229
- @db.create_table!(:items) do
2230
- column :i, 'timestamp[]'
2231
- end
2232
- a = [Time.local(2011, 1, 2, 3, 4, 5)]
2233
- @ds.call(:insert, {:i=>:$i}, :i=>Sequel.pg_array(a, 'timestamp'))
2234
- @ds.get(:i).should == a
2235
- @ds.filter(:i=>:$i).call(:first, :i=>a).should == {:i=>a}
2236
- @ds.filter(:i=>:$i).call(:first, :i=>Sequel.pg_array([a.first-1], 'timestamp')).should == nil
2237
-
2238
- @db.create_table!(:items) do
2239
- column :i, 'boolean[]'
2240
- end
2241
- a = [true, false]
2242
- @ds.call(:insert, {:i=>:$i}, :i=>Sequel.pg_array(a, 'boolean'))
2243
- @ds.get(:i).should == a
2244
- @ds.filter(:i=>:$i).call(:first, :i=>a).should == {:i=>a}
2245
- @ds.filter(:i=>:$i).call(:first, :i=>Sequel.pg_array([false, true], 'boolean')).should == nil
2246
-
2247
- @db.create_table!(:items) do
2248
- column :i, 'bytea[]'
2249
- end
2250
- a = [Sequel.blob("a\0'\"")]
2251
- @ds.call(:insert, {:i=>:$i}, :i=>Sequel.pg_array(a, 'bytea'))
2252
- @ds.get(:i).should == a
2253
- @ds.filter(:i=>:$i).call(:first, :i=>a).should == {:i=>a}
2254
- @ds.filter(:i=>:$i).call(:first, :i=>Sequel.pg_array([Sequel.blob("b\0")], 'bytea')).should == nil
2255
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
2256
-
2257
- specify 'with models' do
2258
- @db.create_table!(:items) do
2259
- primary_key :id
2260
- column :i, 'integer[]'
2261
- column :f, 'double precision[]'
2262
- column :d, 'numeric[]'
2263
- column :t, 'text[]'
2264
- end
2265
- c = Class.new(Sequel::Model(@db[:items]))
2266
- c.plugin :pg_typecast_on_load, :i, :f, :d, :t unless @native
2267
- h = {:i=>[1,2, nil], :f=>[[1, 2.5], [3, 4.5]], :d=>[1, BigDecimal.new('1.000000000000000000001')], :t=>[%w'a b c', ['NULL', nil, '1']]}
2268
- o = c.create(h)
2269
- o.i.should == [1, 2, nil]
2270
- o.f.should == [[1, 2.5], [3, 4.5]]
2271
- o.d.should == [BigDecimal.new('1'), BigDecimal.new('1.000000000000000000001')]
2272
- o.t.should == [%w'a b c', ['NULL', nil, '1']]
2273
- c.where(:i=>o.i, :f=>o.f, :d=>o.d, :t=>o.t).all.should == [o]
2274
- o2 = c.new(h)
2275
- c.where(:i=>o2.i, :f=>o2.f, :d=>o2.d, :t=>o2.t).all.should == [o]
2276
-
2277
- @db.create_table!(:items) do
2278
- primary_key :id
2279
- column :i, 'int2[]'
2280
- column :f, 'real[]'
2281
- column :d, 'numeric(30,28)[]'
2282
- column :t, 'varchar[]'
2283
- end
2284
- c = Class.new(Sequel::Model(@db[:items]))
2285
- c.plugin :pg_typecast_on_load, :i, :f, :d, :t unless @native
2286
- o = c.create(:i=>[1,2, nil], :f=>[[1, 2.5], [3, 4.5]], :d=>[1, BigDecimal.new('1.000000000000000000001')], :t=>[%w'a b c', ['NULL', nil, '1']])
2287
- o.i.should == [1, 2, nil]
2288
- o.f.should == [[1, 2.5], [3, 4.5]]
2289
- o.d.should == [BigDecimal.new('1'), BigDecimal.new('1.000000000000000000001')]
2290
- o.t.should == [%w'a b c', ['NULL', nil, '1']]
2291
- c.where(:i=>o.i, :f=>o.f, :d=>o.d, :t=>o.t).all.should == [o]
2292
- o2 = c.new(h)
2293
- c.where(:i=>o2.i, :f=>o2.f, :d=>o2.d, :t=>o2.t).all.should == [o]
2294
- end
2295
-
2296
- specify 'operations/functions with pg_array_ops' do
2297
- Sequel.extension :pg_array_ops
2298
- @db.create_table!(:items){column :i, 'integer[]'; column :i2, 'integer[]'; column :i3, 'integer[]'; column :i4, 'integer[]'; column :i5, 'integer[]'}
2299
- @ds.insert(Sequel.pg_array([1, 2, 3]), Sequel.pg_array([2, 1]), Sequel.pg_array([4, 4]), Sequel.pg_array([[5, 5], [4, 3]]), Sequel.pg_array([1, nil, 5]))
2300
-
2301
- @ds.get(Sequel.pg_array(:i) > :i3).should == false
2302
- @ds.get(Sequel.pg_array(:i3) > :i).should == true
2303
-
2304
- @ds.get(Sequel.pg_array(:i) >= :i3).should == false
2305
- @ds.get(Sequel.pg_array(:i) >= :i).should == true
2306
-
2307
- @ds.get(Sequel.pg_array(:i3) < :i).should == false
2308
- @ds.get(Sequel.pg_array(:i) < :i3).should == true
2309
-
2310
- @ds.get(Sequel.pg_array(:i3) <= :i).should == false
2311
- @ds.get(Sequel.pg_array(:i) <= :i).should == true
2312
-
2313
- @ds.get(Sequel.expr(5=>Sequel.pg_array(:i).any)).should == false
2314
- @ds.get(Sequel.expr(1=>Sequel.pg_array(:i).any)).should == true
2315
-
2316
- @ds.get(Sequel.expr(1=>Sequel.pg_array(:i3).all)).should == false
2317
- @ds.get(Sequel.expr(4=>Sequel.pg_array(:i3).all)).should == true
2318
-
2319
- @ds.get(Sequel.expr(1=>Sequel.pg_array(:i)[1..1].any)).should == true
2320
- @ds.get(Sequel.expr(2=>Sequel.pg_array(:i)[1..1].any)).should == false
2321
-
2322
- @ds.get(Sequel.pg_array(:i2)[1]).should == 2
2323
- @ds.get(Sequel.pg_array(:i2)[1]).should == 2
2324
- @ds.get(Sequel.pg_array(:i2)[2]).should == 1
2325
-
2326
- @ds.get(Sequel.pg_array(:i4)[2][1]).should == 4
2327
- @ds.get(Sequel.pg_array(:i4)[2][2]).should == 3
2328
-
2329
- @ds.get(Sequel.pg_array(:i).contains(:i2)).should == true
2330
- @ds.get(Sequel.pg_array(:i).contains(:i3)).should == false
2331
-
2332
- @ds.get(Sequel.pg_array(:i2).contained_by(:i)).should == true
2333
- @ds.get(Sequel.pg_array(:i).contained_by(:i2)).should == false
2334
-
2335
- @ds.get(Sequel.pg_array(:i).overlaps(:i2)).should == true
2336
- @ds.get(Sequel.pg_array(:i2).overlaps(:i3)).should == false
2337
-
2338
- @ds.get(Sequel.pg_array(:i).dims).should == '[1:3]'
2339
- @ds.get(Sequel.pg_array(:i).length).should == 3
2340
- @ds.get(Sequel.pg_array(:i).lower).should == 1
2341
-
2342
- if @db.server_version >= 80400
2343
- @ds.select(Sequel.pg_array(:i).unnest).from_self.count.should == 3
2344
- end
2345
- if @db.server_version >= 90000
2346
- @ds.get(Sequel.pg_array(:i5).join).should == '15'
2347
- @ds.get(Sequel.pg_array(:i5).join(':')).should == '1:5'
2348
- @ds.get(Sequel.pg_array(:i5).join(':', '*')).should == '1:*:5'
2349
- end
2350
- if @db.server_version >= 90300
2351
- @ds.get(Sequel.pg_array(:i5).remove(1).length).should == 2
2352
- @ds.get(Sequel.pg_array(:i5).replace(1, 4).contains([1])).should == false
2353
- @ds.get(Sequel.pg_array(:i5).replace(1, 4).contains([4])).should == true
2354
- end
2355
- if @db.server_version >= 90400
2356
- @ds.get(Sequel.pg_array(:i).cardinality).should == 3
2357
- @ds.get(Sequel.pg_array(:i4).cardinality).should == 4
2358
- @ds.get(Sequel.pg_array(:i5).cardinality).should == 3
2359
-
2360
- @ds.from{Sequel.pg_array([1,2,3]).op.unnest([4,5,6], [7,8]).as(:t1, [:a, :b, :c])}.select_order_map([:a, :b, :c]).should == [[1, 4, 7], [2, 5, 8], [3, 6, nil]]
2361
- end
2362
-
2363
- if @native
2364
- @ds.get(Sequel.pg_array(:i).push(4)).should == [1, 2, 3, 4]
2365
- @ds.get(Sequel.pg_array(:i).unshift(4)).should == [4, 1, 2, 3]
2366
- @ds.get(Sequel.pg_array(:i).concat(:i2)).should == [1, 2, 3, 2, 1]
2367
- end
2368
-
2369
- if @db.type_supported?(:hstore)
2370
- Sequel.extension :pg_hstore, :pg_hstore_ops
2371
- @db.get(Sequel.pg_array(['a', 'b']).op.hstore['a']).should == 'b'
2372
- @db.get(Sequel.pg_array(['a', 'b']).op.hstore(['c', 'd'])['a']).should == 'c'
2373
- end
2374
- end
2375
- end
2376
-
2377
- describe 'PostgreSQL hstore handling' do
2378
- before(:all) do
2379
- @db = DB
2380
- @db.extension :pg_array, :pg_hstore
2381
- @ds = @db[:items]
2382
- @h = {'a'=>'b', 'c'=>nil, 'd'=>'NULL', 'e'=>'\\\\" \\\' ,=>'}
2383
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
2384
- end
2385
- after do
2386
- @db.drop_table?(:items)
2387
- end
2388
-
2389
- specify 'insert and retrieve hstore values' do
2390
- @db.create_table!(:items) do
2391
- column :h, :hstore
2392
- end
2393
- @ds.insert(Sequel.hstore(@h))
2394
- @ds.count.should == 1
2395
- if @native
2396
- rs = @ds.all
2397
- v = rs.first[:h]
2398
- v.should == @h
2399
- v.should_not be_a_kind_of(Hash)
2400
- v.to_hash.should be_a_kind_of(Hash)
2401
- v.to_hash.should == @h
2402
- @ds.delete
2403
- @ds.insert(rs.first)
2404
- @ds.all.should == rs
2405
- end
2406
- end
2407
-
2408
- specify 'insert and retrieve hstore[] values' do
2409
- @db.create_table!(:items) do
2410
- column :h, 'hstore[]'
2411
- end
2412
- @ds.insert(Sequel.pg_array([Sequel.hstore(@h)], :hstore))
2413
- @ds.count.should == 1
2414
- if @native
2415
- rs = @ds.all
2416
- v = rs.first[:h].first
2417
- v.should_not be_a_kind_of(Hash)
2418
- v.to_hash.should be_a_kind_of(Hash)
2419
- v.to_hash.should == @h
2420
- @ds.delete
2421
- @ds.insert(rs.first)
2422
- @ds.all.should == rs
2423
- end
2424
- end
2425
-
2426
- specify 'use hstore in bound variables' do
2427
- @db.create_table!(:items) do
2428
- column :i, :hstore
2429
- end
2430
- @ds.call(:insert, {:i=>Sequel.hstore(@h)}, {:i=>:$i})
2431
- @ds.get(:i).should == @h
2432
- @ds.filter(:i=>:$i).call(:first, :i=>Sequel.hstore(@h)).should == {:i=>@h}
2433
- @ds.filter(:i=>:$i).call(:first, :i=>Sequel.hstore({})).should == nil
2434
-
2435
- @ds.delete
2436
- @ds.call(:insert, {:i=>Sequel.hstore('a'=>nil)}, {:i=>:$i})
2437
- @ds.get(:i).should == Sequel.hstore('a'=>nil)
2438
-
2439
- @ds.delete
2440
- @ds.call(:insert, {:i=>@h}, {:i=>:$i})
2441
- @ds.get(:i).should == @h
2442
- @ds.filter(:i=>:$i).call(:first, :i=>@h).should == {:i=>@h}
2443
- @ds.filter(:i=>:$i).call(:first, :i=>{}).should == nil
2444
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
2445
-
2446
- specify 'with models and associations' do
2447
- @db.create_table!(:items) do
2448
- primary_key :id
2449
- column :h, :hstore
2450
- end
2451
- c = Class.new(Sequel::Model(@db[:items])) do
2452
- def self.name
2453
- 'Item'
2454
- end
2455
- unrestrict_primary_key
2456
- def item_id
2457
- h['item_id'].to_i if h
2458
- end
2459
- def left_item_id
2460
- h['left_item_id'].to_i if h
2461
- end
2462
- end
2463
- Sequel.extension :pg_hstore_ops
2464
- c.plugin :many_through_many
2465
- c.plugin :pg_typecast_on_load, :h unless @native
2466
-
2467
- h = {'item_id'=>"2", 'left_item_id'=>"1"}
2468
- o2 = c.create(:id=>2)
2469
- o = c.create(:id=>1, :h=>h)
2470
- o.h.should == h
2471
-
2472
- c.many_to_one :item, :class=>c, :key_column=>Sequel.cast(Sequel.hstore(:h)['item_id'], Integer)
2473
- c.one_to_many :items, :class=>c, :key=>Sequel.cast(Sequel.hstore(:h)['item_id'], Integer), :key_method=>:item_id
2474
- c.many_to_many :related_items, :class=>c, :join_table=>:items___i, :left_key=>Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer), :right_key=>Sequel.cast(Sequel.hstore(:h)['item_id'], Integer)
2475
-
2476
- c.many_to_one :other_item, :class=>c, :key=>:id, :primary_key_method=>:item_id, :primary_key=>Sequel.cast(Sequel.hstore(:h)['item_id'], Integer), :reciprocal=>:other_items
2477
- c.one_to_many :other_items, :class=>c, :primary_key=>:item_id, :key=>:id, :primary_key_column=>Sequel.cast(Sequel.hstore(:h)['item_id'], Integer), :reciprocal=>:other_item
2478
- c.many_to_many :other_related_items, :class=>c, :join_table=>:items___i, :left_key=>:id, :right_key=>:id,
2479
- :left_primary_key_column=>Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer),
2480
- :left_primary_key=>:left_item_id,
2481
- :right_primary_key=>Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer),
2482
- :right_primary_key_method=>:left_item_id
2483
-
2484
- c.many_through_many :mtm_items, [
2485
- [:items, Sequel.cast(Sequel.hstore(:h)['item_id'], Integer), Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer)],
2486
- [:items, Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer), Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer)]
2487
- ],
2488
- :class=>c,
2489
- :left_primary_key_column=>Sequel.cast(Sequel.hstore(:h)['item_id'], Integer),
2490
- :left_primary_key=>:item_id,
2491
- :right_primary_key=>Sequel.cast(Sequel.hstore(:h)['left_item_id'], Integer),
2492
- :right_primary_key_method=>:left_item_id
2493
-
2494
- # Lazily Loading
2495
- o.item.should == o2
2496
- o2.items.should == [o]
2497
- o.related_items.should == [o2]
2498
- o2.other_item.should == o
2499
- o.other_items.should == [o2]
2500
- o.other_related_items.should == [o]
2501
- o.mtm_items.should == [o]
2502
-
2503
- # Eager Loading via eager
2504
- os = c.eager(:item, :related_items, :other_items, :other_related_items, :mtm_items).where(:id=>1).all.first
2505
- os.item.should == o2
2506
- os.related_items.should == [o2]
2507
- os.other_items.should == [o2]
2508
- os.other_related_items.should == [o]
2509
- os.mtm_items.should == [o]
2510
- os = c.eager(:items, :other_item).where(:id=>2).all.first
2511
- os.items.should == [o]
2512
- os.other_item.should == o
2513
-
2514
- # Eager Loading via eager_graph
2515
- c.eager_graph(:item).where(:items__id=>1).all.first.item.should == o2
2516
- c.eager_graph(:items).where(:items__id=>2).all.first.items.should == [o]
2517
- c.eager_graph(:related_items).where(:items__id=>1).all.first.related_items.should == [o2]
2518
- c.eager_graph(:other_item).where(:items__id=>2).all.first.other_item.should == o
2519
- c.eager_graph(:other_items).where(:items__id=>1).all.first.other_items.should == [o2]
2520
- c.eager_graph(:other_related_items).where(:items__id=>1).all.first.other_related_items.should == [o]
2521
- c.eager_graph(:mtm_items).where(:items__id=>1).all.first.mtm_items.should == [o]
2522
-
2523
- # Filter By Associations - Model Instances
2524
- c.filter(:item=>o2).all.should == [o]
2525
- c.filter(:items=>o).all.should == [o2]
2526
- c.filter(:related_items=>o2).all.should == [o]
2527
- c.filter(:other_item=>o).all.should == [o2]
2528
- c.filter(:other_items=>o2).all.should == [o]
2529
- c.filter(:other_related_items=>o).all.should == [o]
2530
- c.filter(:mtm_items=>o).all.should == [o]
2531
-
2532
- # Filter By Associations - Model Datasets
2533
- c.filter(:item=>c.filter(:id=>o2.id)).all.should == [o]
2534
- c.filter(:items=>c.filter(:id=>o.id)).all.should == [o2]
2535
- c.filter(:related_items=>c.filter(:id=>o2.id)).all.should == [o]
2536
- c.filter(:other_item=>c.filter(:id=>o.id)).all.should == [o2]
2537
- c.filter(:other_items=>c.filter(:id=>o2.id)).all.should == [o]
2538
- c.filter(:other_related_items=>c.filter(:id=>o.id)).all.should == [o]
2539
- c.filter(:mtm_items=>c.filter(:id=>o.id)).all.should == [o]
2540
- end
2541
-
2542
- specify 'operations/functions with pg_hstore_ops' do
2543
- Sequel.extension :pg_hstore_ops, :pg_array, :pg_array_ops
2544
- @db.create_table!(:items){hstore :h1; hstore :h2; hstore :h3; String :t}
2545
- @ds.insert(Sequel.hstore('a'=>'b', 'c'=>nil), Sequel.hstore('a'=>'b'), Sequel.hstore('d'=>'e'))
2546
- h1 = Sequel.hstore(:h1)
2547
- h2 = Sequel.hstore(:h2)
2548
- h3 = Sequel.hstore(:h3)
2549
-
2550
- @ds.get(h1['a']).should == 'b'
2551
- @ds.get(h1['d']).should == nil
2552
-
2553
- @ds.get(h2.concat(h3).keys.length).should == 2
2554
- @ds.get(h1.concat(h3).keys.length).should == 3
2555
- @ds.get(h2.merge(h3).keys.length).should == 2
2556
- @ds.get(h1.merge(h3).keys.length).should == 3
2557
-
2558
- @ds.get(h1.contain_all(%w'a c')).should == true
2559
- @ds.get(h1.contain_all(%w'a d')).should == false
2560
-
2561
- @ds.get(h1.contain_any(%w'a d')).should == true
2562
- @ds.get(h1.contain_any(%w'e d')).should == false
2563
-
2564
- @ds.get(h1.contains(h2)).should == true
2565
- @ds.get(h1.contains(h3)).should == false
2566
-
2567
- @ds.get(h2.contained_by(h1)).should == true
2568
- @ds.get(h2.contained_by(h3)).should == false
2569
-
2570
- @ds.get(h1.defined('a')).should == true
2571
- @ds.get(h1.defined('c')).should == false
2572
- @ds.get(h1.defined('d')).should == false
2573
-
2574
- @ds.get(h1.delete('a')['c']).should == nil
2575
- @ds.get(h1.delete(%w'a d')['c']).should == nil
2576
- @ds.get(h1.delete(h2)['c']).should == nil
2577
-
2578
- @ds.from(Sequel.hstore('a'=>'b', 'c'=>nil).op.each).order(:key).all.should == [{:key=>'a', :value=>'b'}, {:key=>'c', :value=>nil}]
2579
-
2580
- @ds.get(h1.has_key?('c')).should == true
2581
- @ds.get(h1.include?('c')).should == true
2582
- @ds.get(h1.key?('c')).should == true
2583
- @ds.get(h1.member?('c')).should == true
2584
- @ds.get(h1.exist?('c')).should == true
2585
- @ds.get(h1.has_key?('d')).should == false
2586
- @ds.get(h1.include?('d')).should == false
2587
- @ds.get(h1.key?('d')).should == false
2588
- @ds.get(h1.member?('d')).should == false
2589
- @ds.get(h1.exist?('d')).should == false
2590
-
2591
- @ds.get(h1.hstore.hstore.hstore.keys.length).should == 2
2592
- @ds.get(h1.keys.length).should == 2
2593
- @ds.get(h2.keys.length).should == 1
2594
- @ds.get(h1.akeys.length).should == 2
2595
- @ds.get(h2.akeys.length).should == 1
2596
-
2597
- @ds.from(Sequel.hstore('t'=>'s').op.populate(Sequel::SQL::Cast.new(nil, :items))).select_map(:t).should == ['s']
2598
- @ds.from(:items___i).select(Sequel.hstore('t'=>'s').op.record_set(:i).as(:r)).from_self(:alias=>:s).select(Sequel.lit('(r).*')).from_self.select_map(:t).should == ['s']
2599
-
2600
- @ds.from(Sequel.hstore('t'=>'s', 'a'=>'b').op.skeys.as(:s)).select_order_map(:s).should == %w'a t'
2601
- @ds.from((Sequel.hstore('t'=>'s', 'a'=>'b').op - 'a').skeys.as(:s)).select_order_map(:s).should == %w't'
2602
-
2603
- @ds.get(h1.slice(%w'a c').keys.length).should == 2
2604
- @ds.get(h1.slice(%w'd c').keys.length).should == 1
2605
- @ds.get(h1.slice(%w'd e').keys.length).should == nil
2606
-
2607
- @ds.from(Sequel.hstore('t'=>'s', 'a'=>'b').op.svals.as(:s)).select_order_map(:s).should == %w'b s'
2608
-
2609
- @ds.get(h1.to_array.length).should == 4
2610
- @ds.get(h2.to_array.length).should == 2
2611
-
2612
- @ds.get(h1.to_matrix.length).should == 2
2613
- @ds.get(h2.to_matrix.length).should == 1
2614
-
2615
- @ds.get(h1.values.length).should == 2
2616
- @ds.get(h2.values.length).should == 1
2617
- @ds.get(h1.avals.length).should == 2
2618
- @ds.get(h2.avals.length).should == 1
2619
- end
2620
- end if DB.type_supported?(:hstore)
2621
-
2622
- describe 'PostgreSQL json type' do
2623
- before(:all) do
2624
- @db = DB
2625
- @db.extension :pg_array, :pg_json
2626
- @ds = @db[:items]
2627
- @a = [1, 2, {'a'=>'b'}, 3.0]
2628
- @h = {'a'=>'b', '1'=>[3, 4, 5]}
2629
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
2630
- end
2631
- after do
2632
- @db.drop_table?(:items)
2633
- end
2634
-
2635
- json_types = [:json]
2636
- json_types << :jsonb if DB.server_version >= 90400
2637
- json_types.each do |json_type|
2638
- json_array_type = "#{json_type}[]"
2639
- pg_json = lambda{|v| Sequel.send(:"pg_#{json_type}", v)}
2640
-
2641
- specify 'insert and retrieve json values' do
2642
- @db.create_table!(:items){column :j, json_type}
2643
- @ds.insert(pg_json.call(@h))
2644
- @ds.count.should == 1
2645
- if @native
2646
- rs = @ds.all
2647
- v = rs.first[:j]
2648
- v.should_not be_a_kind_of(Hash)
2649
- v.to_hash.should be_a_kind_of(Hash)
2650
- v.should == @h
2651
- v.to_hash.should == @h
2652
- @ds.delete
2653
- @ds.insert(rs.first)
2654
- @ds.all.should == rs
2655
- end
2656
-
2657
- @ds.delete
2658
- @ds.insert(pg_json.call(@a))
2659
- @ds.count.should == 1
2660
- if @native
2661
- rs = @ds.all
2662
- v = rs.first[:j]
2663
- v.should_not be_a_kind_of(Array)
2664
- v.to_a.should be_a_kind_of(Array)
2665
- v.should == @a
2666
- v.to_a.should == @a
2667
- @ds.delete
2668
- @ds.insert(rs.first)
2669
- @ds.all.should == rs
2670
- end
2671
- end
2672
-
2673
- specify 'insert and retrieve json[] values' do
2674
- @db.create_table!(:items){column :j, json_array_type}
2675
- j = Sequel.pg_array([pg_json.call('a'=>1), pg_json.call(['b', 2])])
2676
- @ds.insert(j)
2677
- @ds.count.should == 1
2678
- if @native
2679
- rs = @ds.all
2680
- v = rs.first[:j]
2681
- v.should_not be_a_kind_of(Array)
2682
- v.to_a.should be_a_kind_of(Array)
2683
- v.should == j
2684
- v.to_a.should == j
2685
- @ds.delete
2686
- @ds.insert(rs.first)
2687
- @ds.all.should == rs
2688
- end
2689
- end
2690
-
2691
- specify 'with models' do
2692
- @db.create_table!(:items) do
2693
- primary_key :id
2694
- column :h, json_type
2695
- end
2696
- c = Class.new(Sequel::Model(@db[:items]))
2697
- c.plugin :pg_typecast_on_load, :h unless @native
2698
- c.create(:h=>pg_json.call(@h)).h.should == @h
2699
- c.create(:h=>pg_json.call(@a)).h.should == @a
2700
- end
2701
-
2702
- specify 'use json in bound variables' do
2703
- @db.create_table!(:items){column :i, json_type}
2704
- @ds.call(:insert, {:i=>pg_json.call(@h)}, {:i=>:$i})
2705
- @ds.get(:i).should == @h
2706
-
2707
- @ds.delete
2708
- @ds.call(:insert, {:i=>pg_json.call('a'=>nil)}, {:i=>:$i})
2709
- @ds.get(:i).should == pg_json.call('a'=>nil)
2710
-
2711
- @db.create_table!(:items){column :i, json_array_type}
2712
- j = Sequel.pg_array([pg_json.call('a'=>1), pg_json.call(['b', 2])], json_type)
2713
- @ds.call(:insert, {:i=>j}, {:i=>:$i})
2714
- @ds.get(:i).should == j
2715
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
2716
-
2717
- specify 'operations/functions with pg_json_ops' do
2718
- Sequel.extension :pg_json_ops
2719
- jo = pg_json.call('a'=>1, 'b'=>{'c'=>2, 'd'=>{'e'=>3}}).op
2720
- ja = pg_json.call([2, 3, %w'a b']).op
2721
-
2722
- @db.get(jo['a']).should == 1
2723
- @db.get(jo['b']['c']).should == 2
2724
- @db.get(jo[%w'b c']).should == 2
2725
- @db.get(jo['b'].get_text(%w'd e')).should == "3"
2726
- @db.get(jo[%w'b d'].get_text('e')).should == "3"
2727
- @db.get(ja[1]).should == 3
2728
- @db.get(ja[%w'2 1']).should == 'b'
2729
-
2730
- @db.get(jo.extract('a')).should == 1
2731
- @db.get(jo.extract('b').extract('c')).should == 2
2732
- @db.get(jo.extract('b', 'c')).should == 2
2733
- @db.get(jo.extract('b', 'd', 'e')).should == 3
2734
- @db.get(jo.extract_text('b', 'd')).gsub(' ', '').should == '{"e":3}'
2735
- @db.get(jo.extract_text('b', 'd', 'e')).should == '3'
2736
-
2737
- @db.get(ja.array_length).should == 3
2738
- @db.from(ja.array_elements.as(:v)).select_map(:v).should == [2, 3, %w'a b']
2739
-
2740
- if DB.server_version >= 90400
2741
- @db.get(jo.typeof).should == 'object'
2742
- @db.get(ja.typeof).should == 'array'
2743
- @db.from(ja.array_elements_text.as(:v)).select_map(:v).map{|s| s.gsub(' ', '')}.should == ['2', '3', '["a","b"]']
2744
- @db.from(jo.to_record.as(:v, [Sequel.lit('a integer'), Sequel.lit('b text')])).select_map(:a).should == [1]
2745
- @db.from(pg_json.call([{'a'=>1, 'b'=>1}]).op.to_recordset.as(:v, [Sequel.lit('a integer'), Sequel.lit('b integer')])).select_map(:a).should == [1]
2746
-
2747
- if json_type == :jsonb
2748
- @db.get(jo.has_key?('a')).should == true
2749
- @db.get(jo.has_key?('c')).should == false
2750
- @db.get(pg_json.call(['2', '3', %w'a b']).op.include?('2')).should == true
2751
- @db.get(pg_json.call(['2', '3', %w'a b']).op.include?('4')).should == false
2752
-
2753
- @db.get(jo.contain_all(['a', 'b'])).should == true
2754
- @db.get(jo.contain_all(['a', 'c'])).should == false
2755
- @db.get(jo.contain_all(['d', 'c'])).should == false
2756
- @db.get(jo.contain_any(['a', 'b'])).should == true
2757
- @db.get(jo.contain_any(['a', 'c'])).should == true
2758
- @db.get(jo.contain_any(['d', 'c'])).should == false
2759
-
2760
- @db.get(jo.contains(jo)).should == true
2761
- @db.get(jo.contained_by(jo)).should == true
2762
- @db.get(jo.contains('a'=>1)).should == true
2763
- @db.get(jo.contained_by('a'=>1)).should == false
2764
- @db.get(pg_json.call('a'=>1).op.contains(jo)).should == false
2765
- @db.get(pg_json.call('a'=>1).op.contained_by(jo)).should == true
2766
-
2767
- @db.get(ja.contains(ja)).should == true
2768
- @db.get(ja.contained_by(ja)).should == true
2769
- @db.get(ja.contains([2,3])).should == true
2770
- @db.get(ja.contained_by([2,3])).should == false
2771
- @db.get(pg_json.call([2,3]).op.contains(ja)).should == false
2772
- @db.get(pg_json.call([2,3]).op.contained_by(ja)).should == true
2773
- end
2774
- end
2775
-
2776
- @db.from(jo.keys.as(:k)).select_order_map(:k).should == %w'a b'
2777
- @db.from(jo.each).select_order_map(:key).should == %w'a b'
2778
- @db.from(jo.each).order(:key).select_map(:value).should == [1, {'c'=>2, 'd'=>{'e'=>3}}]
2779
- @db.from(jo.each_text).select_order_map(:key).should == %w'a b'
2780
- @db.from(jo.each_text).order(:key).where(:key=>'b').get(:value).gsub(' ', '').should =~ /\{"d":\{"e":3\},"c":2\}|\{"c":2,"d":\{"e":3\}\}/
2781
-
2782
- Sequel.extension :pg_row_ops
2783
- @db.create_table!(:items) do
2784
- Integer :a
2785
- String :b
2786
- end
2787
- j = Sequel.pg_json('a'=>1, 'b'=>'c').op
2788
- @db.get(j.populate(Sequel.cast(nil, :items)).pg_row[:a]).should == 1
2789
- @db.get(j.populate(Sequel.cast(nil, :items)).pg_row[:b]).should == 'c'
2790
- j = Sequel.pg_json([{'a'=>1, 'b'=>'c'}, {'a'=>2, 'b'=>'d'}]).op
2791
- @db.from(j.populate_set(Sequel.cast(nil, :items))).select_order_map(:a).should == [1, 2]
2792
- @db.from(j.populate_set(Sequel.cast(nil, :items))).select_order_map(:b).should == %w'c d'
2793
- end if DB.server_version >= 90300 && (DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc)
2794
- end
2795
- end if DB.server_version >= 90200
2796
-
2797
- describe 'PostgreSQL inet/cidr types' do
2798
- ipv6_broken = (IPAddr.new('::1'); false) rescue true
2799
-
2800
- before(:all) do
2801
- @db = DB
2802
- @db.extension :pg_array, :pg_inet
2803
- @ds = @db[:items]
2804
- @v4 = '127.0.0.1'
2805
- @v4nm = '127.0.0.0/8'
2806
- @v6 = '2001:4f8:3:ba:2e0:81ff:fe22:d1f1'
2807
- @v6nm = '2001:4f8:3:ba::/64'
2808
- @ipv4 = IPAddr.new(@v4)
2809
- @ipv4nm = IPAddr.new(@v4nm)
2810
- unless ipv6_broken
2811
- @ipv6 = IPAddr.new(@v6)
2812
- @ipv6nm = IPAddr.new(@v6nm)
2813
- end
2814
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
2815
- end
2816
- after do
2817
- @db.drop_table?(:items)
2818
- end
2819
-
2820
- specify 'insert and retrieve inet/cidr values' do
2821
- @db.create_table!(:items){inet :i; cidr :c}
2822
- @ds.insert(@ipv4, @ipv4nm)
2823
- @ds.count.should == 1
2824
- if @native
2825
- rs = @ds.all
2826
- rs.first[:i].should == @ipv4
2827
- rs.first[:c].should == @ipv4nm
2828
- rs.first[:i].should be_a_kind_of(IPAddr)
2829
- rs.first[:c].should be_a_kind_of(IPAddr)
2830
- @ds.delete
2831
- @ds.insert(rs.first)
2832
- @ds.all.should == rs
2833
- end
2834
-
2835
- unless ipv6_broken
2836
- @ds.delete
2837
- @ds.insert(@ipv6, @ipv6nm)
2838
- @ds.count.should == 1
2839
- if @native
2840
- rs = @ds.all
2841
- rs.first[:j]
2842
- rs.first[:i].should == @ipv6
2843
- rs.first[:c].should == @ipv6nm
2844
- rs.first[:i].should be_a_kind_of(IPAddr)
2845
- rs.first[:c].should be_a_kind_of(IPAddr)
2846
- @ds.delete
2847
- @ds.insert(rs.first)
2848
- @ds.all.should == rs
2849
- end
2850
- end
2851
- end
2852
-
2853
- specify 'insert and retrieve inet/cidr/macaddr array values' do
2854
- @db.create_table!(:items){column :i, 'inet[]'; column :c, 'cidr[]'; column :m, 'macaddr[]'}
2855
- @ds.insert(Sequel.pg_array([@ipv4], 'inet'), Sequel.pg_array([@ipv4nm], 'cidr'), Sequel.pg_array(['12:34:56:78:90:ab'], 'macaddr'))
2856
- @ds.count.should == 1
2857
- if @native
2858
- rs = @ds.all
2859
- rs.first.values.all?{|c| c.is_a?(Sequel::Postgres::PGArray)}.should == true
2860
- rs.first[:i].first.should == @ipv4
2861
- rs.first[:c].first.should == @ipv4nm
2862
- rs.first[:m].first.should == '12:34:56:78:90:ab'
2863
- rs.first[:i].first.should be_a_kind_of(IPAddr)
2864
- rs.first[:c].first.should be_a_kind_of(IPAddr)
2865
- @ds.delete
2866
- @ds.insert(rs.first)
2867
- @ds.all.should == rs
2868
- end
2869
- end
2870
-
2871
- specify 'use ipaddr in bound variables' do
2872
- @db.create_table!(:items){inet :i; cidr :c}
2873
-
2874
- @ds.call(:insert, {:i=>@ipv4, :c=>@ipv4nm}, {:i=>:$i, :c=>:$c})
2875
- @ds.get(:i).should == @ipv4
2876
- @ds.get(:c).should == @ipv4nm
2877
- @ds.filter(:i=>:$i, :c=>:$c).call(:first, :i=>@ipv4, :c=>@ipv4nm).should == {:i=>@ipv4, :c=>@ipv4nm}
2878
- @ds.filter(:i=>:$i, :c=>:$c).call(:first, :i=>@ipv6, :c=>@ipv6nm).should == nil
2879
- @ds.filter(:i=>:$i, :c=>:$c).call(:delete, :i=>@ipv4, :c=>@ipv4nm).should == 1
2880
-
2881
- unless ipv6_broken
2882
- @ds.call(:insert, {:i=>@ipv6, :c=>@ipv6nm}, {:i=>:$i, :c=>:$c})
2883
- @ds.get(:i).should == @ipv6
2884
- @ds.get(:c).should == @ipv6nm
2885
- @ds.filter(:i=>:$i, :c=>:$c).call(:first, :i=>@ipv6, :c=>@ipv6nm).should == {:i=>@ipv6, :c=>@ipv6nm}
2886
- @ds.filter(:i=>:$i, :c=>:$c).call(:first, :i=>@ipv4, :c=>@ipv4nm).should == nil
2887
- @ds.filter(:i=>:$i, :c=>:$c).call(:delete, :i=>@ipv6, :c=>@ipv6nm).should == 1
2888
- end
2889
-
2890
- @db.create_table!(:items){column :i, 'inet[]'; column :c, 'cidr[]'; column :m, 'macaddr[]'}
2891
- @ds.call(:insert, {:i=>[@ipv4], :c=>[@ipv4nm], :m=>['12:34:56:78:90:ab']}, {:i=>:$i, :c=>:$c, :m=>:$m})
2892
- @ds.filter(:i=>:$i, :c=>:$c, :m=>:$m).call(:first, :i=>[@ipv4], :c=>[@ipv4nm], :m=>['12:34:56:78:90:ab']).should == {:i=>[@ipv4], :c=>[@ipv4nm], :m=>['12:34:56:78:90:ab']}
2893
- @ds.filter(:i=>:$i, :c=>:$c, :m=>:$m).call(:first, :i=>[], :c=>[], :m=>[]).should == nil
2894
- @ds.filter(:i=>:$i, :c=>:$c, :m=>:$m).call(:delete, :i=>[@ipv4], :c=>[@ipv4nm], :m=>['12:34:56:78:90:ab']).should == 1
2895
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
2896
-
2897
- specify 'with models' do
2898
- @db.create_table!(:items) do
2899
- primary_key :id
2900
- inet :i
2901
- cidr :c
2902
- end
2903
- c = Class.new(Sequel::Model(@db[:items]))
2904
- c.plugin :pg_typecast_on_load, :i, :c unless @native
2905
- c.create(:i=>@v4, :c=>@v4nm).values.values_at(:i, :c).should == [@ipv4, @ipv4nm]
2906
- unless ipv6_broken
2907
- c.create(:i=>@ipv6, :c=>@ipv6nm).values.values_at(:i, :c).should == [@ipv6, @ipv6nm]
2908
- end
2909
- end
2910
- end
2911
-
2912
- describe 'PostgreSQL range types' do
2913
- before(:all) do
2914
- @db = DB
2915
- @db.extension :pg_array, :pg_range
2916
- @ds = @db[:items]
2917
- @map = {:i4=>'int4range', :i8=>'int8range', :n=>'numrange', :d=>'daterange', :t=>'tsrange', :tz=>'tstzrange'}
2918
- @r = {:i4=>1...2, :i8=>2...3, :n=>BigDecimal.new('1.0')..BigDecimal.new('2.0'), :d=>Date.today...(Date.today+1), :t=>Time.local(2011, 1)..Time.local(2011, 2), :tz=>Time.local(2011, 1)..Time.local(2011, 2)}
2919
- @ra = {}
2920
- @pgr = {}
2921
- @pgra = {}
2922
- @r.each{|k, v| @ra[k] = Sequel.pg_array([v], @map[k])}
2923
- @r.each{|k, v| @pgr[k] = Sequel.pg_range(v)}
2924
- @r.each{|k, v| @pgra[k] = Sequel.pg_array([Sequel.pg_range(v)], @map[k])}
2925
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
2926
- end
2927
- after do
2928
- @db.drop_table?(:items)
2929
- end
2930
-
2931
- specify 'insert and retrieve range type values' do
2932
- @db.create_table!(:items){int4range :i4; int8range :i8; numrange :n; daterange :d; tsrange :t; tstzrange :tz}
2933
- [@r, @pgr].each do |input|
2934
- h = {}
2935
- input.each{|k, v| h[k] = Sequel.cast(v, @map[k])}
2936
- @ds.insert(h)
2937
- @ds.count.should == 1
2938
- if @native
2939
- rs = @ds.all
2940
- rs.first.each do |k, v|
2941
- v.should_not be_a_kind_of(Range)
2942
- v.to_range.should be_a_kind_of(Range)
2943
- v.should == @r[k]
2944
- v.to_range.should == @r[k]
2945
- end
2946
- @ds.delete
2947
- @ds.insert(rs.first)
2948
- @ds.all.should == rs
2949
- end
2950
- @ds.delete
2951
- end
2952
- end
2953
-
2954
- specify 'insert and retrieve arrays of range type values' do
2955
- @db.create_table!(:items){column :i4, 'int4range[]'; column :i8, 'int8range[]'; column :n, 'numrange[]'; column :d, 'daterange[]'; column :t, 'tsrange[]'; column :tz, 'tstzrange[]'}
2956
- [@ra, @pgra].each do |input|
2957
- @ds.insert(input)
2958
- @ds.count.should == 1
2959
- if @native
2960
- rs = @ds.all
2961
- rs.first.each do |k, v|
2962
- v.should_not be_a_kind_of(Array)
2963
- v.to_a.should be_a_kind_of(Array)
2964
- v.first.should_not be_a_kind_of(Range)
2965
- v.first.to_range.should be_a_kind_of(Range)
2966
- v.should == @ra[k].to_a
2967
- v.first.should == @r[k]
2968
- end
2969
- @ds.delete
2970
- @ds.insert(rs.first)
2971
- @ds.all.should == rs
2972
- end
2973
- @ds.delete
2974
- end
2975
- end
2976
-
2977
- specify 'use range types in bound variables' do
2978
- @db.create_table!(:items){int4range :i4; int8range :i8; numrange :n; daterange :d; tsrange :t; tstzrange :tz}
2979
- h = {}
2980
- @r.keys.each{|k| h[k] = :"$#{k}"}
2981
- r2 = {}
2982
- @r.each{|k, v| r2[k] = Range.new(v.begin, v.end+2)}
2983
- @ds.call(:insert, @r, h)
2984
- @ds.first.should == @r
2985
- @ds.filter(h).call(:first, @r).should == @r
2986
- @ds.filter(h).call(:first, @pgr).should == @r
2987
- @ds.filter(h).call(:first, r2).should == nil
2988
- @ds.filter(h).call(:delete, @r).should == 1
2989
-
2990
- @db.create_table!(:items){column :i4, 'int4range[]'; column :i8, 'int8range[]'; column :n, 'numrange[]'; column :d, 'daterange[]'; column :t, 'tsrange[]'; column :tz, 'tstzrange[]'}
2991
- @r.each{|k, v| r2[k] = [Range.new(v.begin, v.end+2)]}
2992
- @ds.call(:insert, @ra, h)
2993
- @ds.filter(h).call(:first, @ra).each{|k, v| v.should == @ra[k].to_a}
2994
- @ds.filter(h).call(:first, @pgra).each{|k, v| v.should == @ra[k].to_a}
2995
- @ds.filter(h).call(:first, r2).should == nil
2996
- @ds.filter(h).call(:delete, @ra).should == 1
2997
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
2998
-
2999
- specify 'with models' do
3000
- @db.create_table!(:items){primary_key :id; int4range :i4; int8range :i8; numrange :n; daterange :d; tsrange :t; tstzrange :tz}
3001
- c = Class.new(Sequel::Model(@db[:items]))
3002
- c.plugin :pg_typecast_on_load, :i4, :i8, :n, :d, :t, :tz unless @native
3003
- v = c.create(@r).values
3004
- v.delete(:id)
3005
- v.should == @r
3006
-
3007
- @db.create_table!(:items){primary_key :id; column :i4, 'int4range[]'; column :i8, 'int8range[]'; column :n, 'numrange[]'; column :d, 'daterange[]'; column :t, 'tsrange[]'; column :tz, 'tstzrange[]'}
3008
- c = Class.new(Sequel::Model(@db[:items]))
3009
- c.plugin :pg_typecast_on_load, :i4, :i8, :n, :d, :t, :tz unless @native
3010
- v = c.create(@ra).values
3011
- v.delete(:id)
3012
- v.each{|k,v1| v1.should == @ra[k].to_a}
3013
- end
3014
-
3015
- specify 'operations/functions with pg_range_ops' do
3016
- Sequel.extension :pg_range_ops
3017
-
3018
- @db.get(Sequel.pg_range(1..5, :int4range).op.contains(2..4)).should == true
3019
- @db.get(Sequel.pg_range(1..5, :int4range).op.contains(3..6)).should == false
3020
- @db.get(Sequel.pg_range(1..5, :int4range).op.contains(0..6)).should == false
3021
-
3022
- @db.get(Sequel.pg_range(1..5, :int4range).op.contained_by(0..6)).should == true
3023
- @db.get(Sequel.pg_range(1..5, :int4range).op.contained_by(3..6)).should == false
3024
- @db.get(Sequel.pg_range(1..5, :int4range).op.contained_by(2..4)).should == false
3025
-
3026
- @db.get(Sequel.pg_range(1..5, :int4range).op.overlaps(5..6)).should == true
3027
- @db.get(Sequel.pg_range(1...5, :int4range).op.overlaps(5..6)).should == false
3028
-
3029
- @db.get(Sequel.pg_range(1..5, :int4range).op.left_of(6..10)).should == true
3030
- @db.get(Sequel.pg_range(1..5, :int4range).op.left_of(5..10)).should == false
3031
- @db.get(Sequel.pg_range(1..5, :int4range).op.left_of(-1..0)).should == false
3032
- @db.get(Sequel.pg_range(1..5, :int4range).op.left_of(-1..3)).should == false
3033
-
3034
- @db.get(Sequel.pg_range(1..5, :int4range).op.right_of(6..10)).should == false
3035
- @db.get(Sequel.pg_range(1..5, :int4range).op.right_of(5..10)).should == false
3036
- @db.get(Sequel.pg_range(1..5, :int4range).op.right_of(-1..0)).should == true
3037
- @db.get(Sequel.pg_range(1..5, :int4range).op.right_of(-1..3)).should == false
3038
-
3039
- @db.get(Sequel.pg_range(1..5, :int4range).op.ends_before(6..10)).should == true
3040
- @db.get(Sequel.pg_range(1..5, :int4range).op.ends_before(5..10)).should == true
3041
- @db.get(Sequel.pg_range(1..5, :int4range).op.ends_before(-1..0)).should == false
3042
- @db.get(Sequel.pg_range(1..5, :int4range).op.ends_before(-1..3)).should == false
3043
- @db.get(Sequel.pg_range(1..5, :int4range).op.ends_before(-1..7)).should == true
3044
-
3045
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(6..10)).should == false
3046
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(5..10)).should == false
3047
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(3..10)).should == false
3048
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(-1..10)).should == true
3049
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(-1..0)).should == true
3050
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(-1..3)).should == true
3051
- @db.get(Sequel.pg_range(1..5, :int4range).op.starts_after(-5..-1)).should == true
3052
-
3053
- @db.get(Sequel.pg_range(1..5, :int4range).op.adjacent_to(6..10)).should == true
3054
- @db.get(Sequel.pg_range(1...5, :int4range).op.adjacent_to(6..10)).should == false
3055
-
3056
- @db.get((Sequel.pg_range(1..5, :int4range).op + (6..10)).adjacent_to(6..10)).should == false
3057
- @db.get((Sequel.pg_range(1..5, :int4range).op + (6..10)).adjacent_to(11..20)).should == true
3058
-
3059
- @db.get((Sequel.pg_range(1..5, :int4range).op * (2..6)).adjacent_to(6..10)).should == true
3060
- @db.get((Sequel.pg_range(1..4, :int4range).op * (2..6)).adjacent_to(6..10)).should == false
3061
-
3062
- @db.get((Sequel.pg_range(1..5, :int4range).op - (2..6)).adjacent_to(2..10)).should == true
3063
- @db.get((Sequel.pg_range(0..4, :int4range).op - (3..6)).adjacent_to(4..10)).should == false
3064
-
3065
- @db.get(Sequel.pg_range(0..4, :int4range).op.lower).should == 0
3066
- @db.get(Sequel.pg_range(0..4, :int4range).op.upper).should == 5
3067
-
3068
- @db.get(Sequel.pg_range(0..4, :int4range).op.isempty).should == false
3069
- @db.get(Sequel::Postgres::PGRange.empty(:int4range).op.isempty).should == true
3070
-
3071
- @db.get(Sequel.pg_range(1..5, :numrange).op.lower_inc).should == true
3072
- @db.get(Sequel::Postgres::PGRange.new(1, 5, :exclude_begin=>true, :db_type=>:numrange).op.lower_inc).should == false
3073
-
3074
- @db.get(Sequel.pg_range(1..5, :numrange).op.upper_inc).should == true
3075
- @db.get(Sequel.pg_range(1...5, :numrange).op.upper_inc).should == false
3076
-
3077
- @db.get(Sequel::Postgres::PGRange.new(1, 5, :db_type=>:int4range).op.lower_inf).should == false
3078
- @db.get(Sequel::Postgres::PGRange.new(nil, 5, :db_type=>:int4range).op.lower_inf).should == true
3079
-
3080
- @db.get(Sequel::Postgres::PGRange.new(1, 5, :db_type=>:int4range).op.upper_inf).should == false
3081
- @db.get(Sequel::Postgres::PGRange.new(1, nil, :db_type=>:int4range).op.upper_inf).should == true
3082
- end
3083
- end if DB.server_version >= 90200
3084
-
3085
- describe 'PostgreSQL interval types' do
3086
- before(:all) do
3087
- @db = DB
3088
- @db.extension :pg_array, :pg_interval
3089
- @ds = @db[:items]
3090
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
3091
- end
3092
- after(:all) do
3093
- Sequel::Postgres::PG_TYPES.delete(1186)
3094
- end
3095
- after do
3096
- @db.drop_table?(:items)
3097
- end
3098
-
3099
- specify 'insert and retrieve interval values' do
3100
- @db.create_table!(:items){interval :i}
3101
- [
3102
- ['0', '00:00:00', 0, []],
3103
- ['1', '00:00:01', 1, [[:seconds, 1]]],
3104
- ['1 microsecond', '00:00:00.000001', 0.000001, [[:seconds, 0.000001]]],
3105
- ['1 millisecond', '00:00:00.001', 0.001, [[:seconds, 0.001]]],
3106
- ['1 second', '00:00:01', 1, [[:seconds, 1]]],
3107
- ['1 minute', '00:01:00', 60, [[:seconds, 60]]],
3108
- ['1 hour', '01:00:00', 3600, [[:seconds, 3600]]],
3109
- ['123000 hours', '123000:00:00', 442800000, [[:seconds, 442800000]]],
3110
- ['1 day', '1 day', 86400, [[:days, 1]]],
3111
- ['1 week', '7 days', 86400*7, [[:days, 7]]],
3112
- ['1 month', '1 mon', 86400*30, [[:months, 1]]],
3113
- ['1 year', '1 year', 31557600, [[:years, 1]]],
3114
- ['1 decade', '10 years', 31557600*10, [[:years, 10]]],
3115
- ['1 century', '100 years', 31557600*100, [[:years, 100]]],
3116
- ['1 millennium', '1000 years', 31557600*1000, [[:years, 1000]]],
3117
- ['1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds', '1 year 2 mons 25 days 05:06:07', 31557600 + 2*86400*30 + 3*86400*7 + 4*86400 + 5*3600 + 6*60 + 7, [[:years, 1], [:months, 2], [:days, 25], [:seconds, 18367]]],
3118
- ['-1 year +2 months -3 weeks +4 days -5 hours +6 minutes -7 seconds', '-10 mons -17 days -04:54:07', -10*86400*30 - 3*86400*7 + 4*86400 - 5*3600 + 6*60 - 7, [[:months, -10], [:days, -17], [:seconds, -17647]]],
3119
- ['+2 years -1 months +3 weeks -4 days +5 hours -6 minutes +7 seconds', '1 year 11 mons 17 days 04:54:07', 31557600 + 11*86400*30 + 3*86400*7 - 4*86400 + 5*3600 - 6*60 + 7, [[:years, 1], [:months, 11], [:days, 17], [:seconds, 17647]]],
3120
- ].each do |instr, outstr, value, parts|
3121
- @ds.insert(instr)
3122
- @ds.count.should == 1
3123
- if @native
3124
- @ds.get(Sequel.cast(:i, String)).should == outstr
3125
- rs = @ds.all
3126
- rs.first[:i].is_a?(ActiveSupport::Duration).should == true
3127
- rs.first[:i].should == ActiveSupport::Duration.new(value, parts)
3128
- rs.first[:i].parts.sort_by{|k,v| k.to_s}.reject{|k,v| v == 0}.should == parts.sort_by{|k,v| k.to_s}
3129
- @ds.delete
3130
- @ds.insert(rs.first)
3131
- @ds.all.should == rs
3132
- end
3133
- @ds.delete
3134
- end
3135
- end
3136
-
3137
- specify 'insert and retrieve interval array values' do
3138
- @db.create_table!(:items){column :i, 'interval[]'}
3139
- @ds.insert(Sequel.pg_array(['1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds'], 'interval'))
3140
- @ds.count.should == 1
3141
- if @native
3142
- rs = @ds.all
3143
- rs.first[:i].is_a?(Sequel::Postgres::PGArray).should == true
3144
- rs.first[:i].first.is_a?(ActiveSupport::Duration).should == true
3145
- rs.first[:i].first.should == ActiveSupport::Duration.new(31557600 + 2*86400*30 + 3*86400*7 + 4*86400 + 5*3600 + 6*60 + 7, [[:years, 1], [:months, 2], [:days, 25], [:seconds, 18367]])
3146
- rs.first[:i].first.parts.sort_by{|k,v| k.to_s}.should == [[:years, 1], [:months, 2], [:days, 25], [:seconds, 18367]].sort_by{|k,v| k.to_s}
3147
- @ds.delete
3148
- @ds.insert(rs.first)
3149
- @ds.all.should == rs
3150
- end
3151
- end
3152
-
3153
- specify 'use intervals in bound variables' do
3154
- @db.create_table!(:items){interval :i}
3155
- @ds.insert('1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds')
3156
- d = @ds.get(:i)
3157
- @ds.delete
3158
-
3159
- @ds.call(:insert, {:i=>d}, {:i=>:$i})
3160
- @ds.get(:i).should == d
3161
- @ds.filter(:i=>:$i).call(:first, :i=>d).should == {:i=>d}
3162
- @ds.filter(:i=>:$i).call(:first, :i=>'0').should == nil
3163
- @ds.filter(:i=>:$i).call(:delete, :i=>d).should == 1
3164
-
3165
- @db.create_table!(:items){column :i, 'interval[]'}
3166
- @ds.call(:insert, {:i=>[d]}, {:i=>:$i})
3167
- @ds.filter(:i=>:$i).call(:first, :i=>[d]).should == {:i=>[d]}
3168
- @ds.filter(:i=>:$i).call(:first, :i=>[]).should == nil
3169
- @ds.filter(:i=>:$i).call(:delete, :i=>[d]).should == 1
3170
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
3171
-
3172
- specify 'with models' do
3173
- @db.create_table!(:items) do
3174
- primary_key :id
3175
- interval :i
3176
- end
3177
- c = Class.new(Sequel::Model(@db[:items]))
3178
- c.plugin :pg_typecast_on_load, :i, :c unless @native
3179
- v = c.create(:i=>'1 year 2 mons 25 days 05:06:07').i
3180
- v.is_a?(ActiveSupport::Duration).should == true
3181
- v.should == ActiveSupport::Duration.new(31557600 + 2*86400*30 + 3*86400*7 + 4*86400 + 5*3600 + 6*60 + 7, [[:years, 1], [:months, 2], [:days, 25], [:seconds, 18367]])
3182
- v.parts.sort_by{|k,_| k.to_s}.should == [[:years, 1], [:months, 2], [:days, 25], [:seconds, 18367]].sort_by{|k,_| k.to_s}
3183
- end
3184
- end if (begin require 'active_support/duration'; require 'active_support/inflector'; require 'active_support/core_ext/string/inflections'; true; rescue LoadError; false end)
3185
-
3186
- describe 'PostgreSQL row-valued/composite types' do
3187
- before(:all) do
3188
- @db = DB
3189
- @db.extension :pg_array, :pg_row
3190
- Sequel.extension :pg_array_ops, :pg_row_ops
3191
- @ds = @db[:person]
3192
-
3193
- @db.create_table!(:address) do
3194
- String :street
3195
- String :city
3196
- String :zip
3197
- end
3198
- @db.create_table!(:person) do
3199
- Integer :id
3200
- address :address
3201
- end
3202
- @db.create_table!(:company) do
3203
- Integer :id
3204
- column :employees, 'person[]'
3205
- end
3206
- @db.register_row_type(:address)
3207
- @db.register_row_type(Sequel.qualify(:public, :person))
3208
- @db.register_row_type(:public__company)
3209
-
3210
- @native = DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
3211
- end
3212
- after(:all) do
3213
- @db.drop_table?(:company, :person, :address)
3214
- @db.row_types.clear
3215
- @db.reset_conversion_procs if @native
3216
- end
3217
- after do
3218
- [:company, :person, :address].each{|t| @db[t].delete}
3219
- end
3220
-
3221
- specify 'insert and retrieve row types' do
3222
- @ds.insert(:id=>1, :address=>Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345']))
3223
- @ds.count.should == 1
3224
- if @native
3225
- # Single row valued type
3226
- rs = @ds.all
3227
- v = rs.first[:address]
3228
- v.should_not be_a_kind_of(Hash)
3229
- v.to_hash.should be_a_kind_of(Hash)
3230
- v.to_hash.should == {:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}
3231
- @ds.delete
3232
- @ds.insert(rs.first)
3233
- @ds.all.should == rs
3234
-
3235
- # Nested row value type
3236
- p = @ds.get(:person)
3237
- p[:id].should == 1
3238
- p[:address].should == v
3239
- end
3240
- end
3241
-
3242
- specify 'insert and retrieve row types containing domains' do
3243
- begin
3244
- @db << "DROP DOMAIN IF EXISTS positive_integer CASCADE"
3245
- @db << "CREATE DOMAIN positive_integer AS integer CHECK (VALUE > 0)"
3246
- @db.create_table!(:domain_check) do
3247
- positive_integer :id
3248
- end
3249
- @db.register_row_type(:domain_check)
3250
- @db.get(@db.row_type(:domain_check, [1])).should == {:id=>1}
3251
- ensure
3252
- @db.drop_table(:domain_check)
3253
- @db << "DROP DOMAIN positive_integer"
3254
- end
3255
- end if DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
3256
-
3257
- specify 'insert and retrieve arrays of row types' do
3258
- @ds = @db[:company]
3259
- @ds.insert(:id=>1, :employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345'])])]))
3260
- @ds.count.should == 1
3261
- if @native
3262
- v = @ds.get(:company)
3263
- v.should_not be_a_kind_of(Hash)
3264
- v.to_hash.should be_a_kind_of(Hash)
3265
- v[:id].should == 1
3266
- employees = v[:employees]
3267
- employees.should_not be_a_kind_of(Array)
3268
- employees.to_a.should be_a_kind_of(Array)
3269
- employees.should == [{:id=>1, :address=>{:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}}]
3270
- @ds.delete
3271
- @ds.insert(v[:id], v[:employees])
3272
- @ds.get(:company).should == v
3273
- end
3274
- end
3275
-
3276
- specify 'use row types in bound variables' do
3277
- @ds.call(:insert, {:address=>Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345'])}, {:address=>:$address, :id=>1})
3278
- @ds.get(:address).should == {:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}
3279
- @ds.filter(:address=>Sequel.cast(:$address, :address)).call(:first, :address=>Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345']))[:id].should == 1
3280
- @ds.filter(:address=>Sequel.cast(:$address, :address)).call(:first, :address=>Sequel.pg_row(['123 Sesame St', 'Somewhere', '12356'])).should == nil
3281
-
3282
- @ds.delete
3283
- @ds.call(:insert, {:address=>Sequel.pg_row([nil, nil, nil])}, {:address=>:$address, :id=>1})
3284
- @ds.get(:address).should == {:street=>nil, :city=>nil, :zip=>nil}
3285
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
3286
-
3287
- specify 'use arrays of row types in bound variables' do
3288
- @ds = @db[:company]
3289
- @ds.call(:insert, {:employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345'])])])}, {:employees=>:$employees, :id=>1})
3290
- @ds.get(:company).should == {:id=>1, :employees=>[{:id=>1, :address=>{:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}}]}
3291
- @ds.filter(:employees=>Sequel.cast(:$employees, 'person[]')).call(:first, :employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345'])])]))[:id].should == 1
3292
- @ds.filter(:employees=>Sequel.cast(:$employees, 'person[]')).call(:first, :employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row(['123 Sesame St', 'Somewhere', '12356'])])])).should == nil
3293
-
3294
- @ds.delete
3295
- @ds.call(:insert, {:employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row([nil, nil, nil])])])}, {:employees=>:$employees, :id=>1})
3296
- @ds.get(:employees).should == [{:address=>{:city=>nil, :zip=>nil, :street=>nil}, :id=>1}]
3297
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
3298
-
3299
- specify 'operations/functions with pg_row_ops' do
3300
- @ds.insert(:id=>1, :address=>Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345']))
3301
- @ds.get(Sequel.pg_row(:address)[:street]).should == '123 Sesame St'
3302
- @ds.get(Sequel.pg_row(:address)[:city]).should == 'Somewhere'
3303
- @ds.get(Sequel.pg_row(:address)[:zip]).should == '12345'
3304
-
3305
- @ds = @db[:company]
3306
- @ds.insert(:id=>1, :employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row(['123 Sesame St', 'Somewhere', '12345'])])]))
3307
- @ds.get(Sequel.pg_row(:company)[:id]).should == 1
3308
- if @native
3309
- @ds.get(Sequel.pg_row(:company)[:employees]).should == [{:id=>1, :address=>{:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}}]
3310
- @ds.get(Sequel.pg_row(:company)[:employees][1]).should == {:id=>1, :address=>{:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}}
3311
- @ds.get(Sequel.pg_row(:company)[:employees][1][:address]).should == {:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}
3312
- end
3313
- @ds.get(Sequel.pg_row(:company)[:employees][1][:id]).should == 1
3314
- @ds.get(Sequel.pg_row(:company)[:employees][1][:address][:street]).should == '123 Sesame St'
3315
- @ds.get(Sequel.pg_row(:company)[:employees][1][:address][:city]).should == 'Somewhere'
3316
- @ds.get(Sequel.pg_row(:company)[:employees][1][:address][:zip]).should == '12345'
3317
- end
3318
-
3319
- context "#splat and #*" do
3320
- before(:all) do
3321
- @db.create_table!(:a){Integer :a}
3322
- @db.create_table!(:b){a :b; Integer :a}
3323
- @db.register_row_type(:a)
3324
- @db.register_row_type(:b)
3325
- @db[:b].insert(:a=>1, :b=>@db.row_type(:a, [2]))
3326
- end
3327
- after(:all) do
3328
- @db.drop_table?(:b, :a)
3329
- end
3330
-
3331
- specify "splat should reference the table type" do
3332
- @db[:b].select(:a).first.should == {:a=>1}
3333
- @db[:b].select(:b__a).first.should == {:a=>1}
3334
- @db[:b].select(Sequel.pg_row(:b)[:a]).first.should == {:a=>2}
3335
- @db[:b].select(Sequel.pg_row(:b).splat[:a]).first.should == {:a=>1}
3336
-
3337
- if @native
3338
- @db[:b].select(:b).first.should == {:b=>{:a=>2}}
3339
- @db[:b].select(Sequel.pg_row(:b).splat).first.should == {:a=>1, :b=>{:a=>2}}
3340
- @db[:b].select(Sequel.pg_row(:b).splat(:b)).first.should == {:b=>{:a=>1, :b=>{:a=>2}}}
3341
- end
3342
- end
3343
-
3344
- specify "* should expand the table type into separate columns" do
3345
- ds = @db[:b].select(Sequel.pg_row(:b).splat(:b)).from_self(:alias=>:t)
3346
- if @native
3347
- ds.first.should == {:b=>{:a=>1, :b=>{:a=>2}}}
3348
- ds.select(Sequel.pg_row(:b).*).first.should == {:a=>1, :b=>{:a=>2}}
3349
- ds.select(Sequel.pg_row(:b)[:b]).first.should == {:b=>{:a=>2}}
3350
- ds.select(Sequel.pg_row(:t__b).*).first.should == {:a=>1, :b=>{:a=>2}}
3351
- ds.select(Sequel.pg_row(:t__b)[:b]).first.should == {:b=>{:a=>2}}
3352
- end
3353
- ds.select(Sequel.pg_row(:b)[:a]).first.should == {:a=>1}
3354
- ds.select(Sequel.pg_row(:t__b)[:a]).first.should == {:a=>1}
3355
- end
3356
- end
3357
-
3358
- context "with models" do
3359
- before(:all) do
3360
- class Address < Sequel::Model(:address)
3361
- plugin :pg_row
3362
- end
3363
- class Person < Sequel::Model(:person)
3364
- plugin :pg_row
3365
- end
3366
- class Company < Sequel::Model(:company)
3367
- plugin :pg_row
3368
- end
3369
- @a = Address.new(:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345')
3370
- @es = Sequel.pg_array([Person.new(:id=>1, :address=>@a)])
3371
- end
3372
- after(:all) do
3373
- Object.send(:remove_const, :Address) rescue nil
3374
- Object.send(:remove_const, :Person) rescue nil
3375
- Object.send(:remove_const, :Company) rescue nil
3376
- end
3377
-
3378
- specify 'insert and retrieve row types as model objects' do
3379
- @ds.insert(:id=>1, :address=>@a)
3380
- @ds.count.should == 1
3381
- if @native
3382
- # Single row valued type
3383
- rs = @ds.all
3384
- v = rs.first[:address]
3385
- v.should be_a_kind_of(Address)
3386
- v.should == @a
3387
- @ds.delete
3388
- @ds.insert(rs.first)
3389
- @ds.all.should == rs
3390
-
3391
- # Nested row value type
3392
- p = @ds.get(:person)
3393
- p.should be_a_kind_of(Person)
3394
- p.id.should == 1
3395
- p.address.should be_a_kind_of(Address)
3396
- p.address.should == @a
3397
- end
3398
- end
3399
-
3400
- specify 'insert and retrieve arrays of row types as model objects' do
3401
- @ds = @db[:company]
3402
- @ds.insert(:id=>1, :employees=>@es)
3403
- @ds.count.should == 1
3404
- if @native
3405
- v = @ds.get(:company)
3406
- v.should be_a_kind_of(Company)
3407
- v.id.should == 1
3408
- employees = v[:employees]
3409
- employees.should_not be_a_kind_of(Array)
3410
- employees.to_a.should be_a_kind_of(Array)
3411
- employees.should == @es
3412
- @ds.delete
3413
- @ds.insert(v.id, v.employees)
3414
- @ds.get(:company).should == v
3415
- end
3416
- end
3417
-
3418
- specify 'use model objects in bound variables' do
3419
- @ds.call(:insert, {:address=>@a}, {:address=>:$address, :id=>1})
3420
- @ds.get(:address).should == @a
3421
- @ds.filter(:address=>Sequel.cast(:$address, :address)).call(:first, :address=>@a)[:id].should == 1
3422
- @ds.filter(:address=>Sequel.cast(:$address, :address)).call(:first, :address=>Address.new(:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12356')).should == nil
3423
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
3424
-
3425
- specify 'use arrays of model objects in bound variables' do
3426
- @ds = @db[:company]
3427
- @ds.call(:insert, {:employees=>@es}, {:employees=>:$employees, :id=>1})
3428
- @ds.get(:company).should == Company.new(:id=>1, :employees=>@es)
3429
- @ds.filter(:employees=>Sequel.cast(:$employees, 'person[]')).call(:first, :employees=>@es)[:id].should == 1
3430
- @ds.filter(:employees=>Sequel.cast(:$employees, 'person[]')).call(:first, :employees=>Sequel.pg_array([@db.row_type(:person, [1, Sequel.pg_row(['123 Sesame St', 'Somewhere', '12356'])])])).should == nil
3431
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG
3432
-
3433
- specify 'model typecasting' do
3434
- Person.plugin :pg_typecast_on_load, :address unless @native
3435
- a = Address.new(:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345')
3436
- o = Person.create(:id=>1, :address=>['123 Sesame St', 'Somewhere', '12345'])
3437
- o.address.should == a
3438
- o = Person.create(:id=>1, :address=>{:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'})
3439
- o.address.should == a
3440
- o = Person.create(:id=>1, :address=>a)
3441
- o.address.should == a
3442
-
3443
- Company.plugin :pg_typecast_on_load, :employees unless @native
3444
- e = Person.new(:id=>1, :address=>a)
3445
- o = Company.create(:id=>1, :employees=>[{:id=>1, :address=>{:street=>'123 Sesame St', :city=>'Somewhere', :zip=>'12345'}}])
3446
- o.employees.should == [e]
3447
- o = Company.create(:id=>1, :employees=>[e])
3448
- o.employees.should == [e]
3449
- end
3450
- end
3451
- end
3452
-
3453
- describe 'pg_static_cache_updater extension' do
3454
- before(:all) do
3455
- @db = DB
3456
- @db.extension :pg_static_cache_updater
3457
- @db.drop_function(@db.default_static_cache_update_name, :cascade=>true, :if_exists=>true)
3458
- @db.create_static_cache_update_function
3459
-
3460
- @db.create_table!(:things) do
3461
- primary_key :id
3462
- String :name
3463
- end
3464
- @Thing = Class.new(Sequel::Model(:things))
3465
- @Thing.plugin :static_cache
3466
- @db.create_static_cache_update_trigger(:things)
3467
- end
3468
- after(:all) do
3469
- @db.drop_table(:things)
3470
- @db.drop_function(@db.default_static_cache_update_name)
3471
- end
3472
-
3473
- specify "should reload model static cache when underlying table changes" do
3474
- @Thing.all.should == []
3475
- q = Queue.new
3476
- q1 = Queue.new
3477
-
3478
- @db.listen_for_static_cache_updates(@Thing, :timeout=>0, :loop=>proc{q.push(nil); q1.pop.call}, :before_thread_exit=>proc{q.push(nil)})
3479
-
3480
- q.pop
3481
- q1.push(proc{@db[:things].insert(1, 'A')})
3482
- q.pop
3483
- @Thing.all.should == [@Thing.load(:id=>1, :name=>'A')]
3484
-
3485
- q1.push(proc{@db[:things].update(:name=>'B')})
3486
- q.pop
3487
- @Thing.all.should == [@Thing.load(:id=>1, :name=>'B')]
3488
-
3489
- q1.push(proc{@db[:things].delete})
3490
- q.pop
3491
- @Thing.all.should == []
3492
-
3493
- q1.push(proc{throw :stop})
3494
- q.pop
3495
- end
3496
- end if DB.adapter_scheme == :postgres && SEQUEL_POSTGRES_USES_PG && DB.server_version >= 90000
3497
-
3498
- describe 'PostgreSQL enum types' do
3499
- before(:all) do
3500
- @db = DB
3501
- @db.extension :pg_array, :pg_enum
3502
- @db.create_enum(:test_enum, %w'a b c d')
3503
-
3504
- @db.create_table!(:test_enumt) do
3505
- test_enum :t
3506
- end
3507
- end
3508
- after(:all) do
3509
- @db.drop_table?(:test_enumt)
3510
- @db.drop_enum(:test_enum)
3511
- end
3512
-
3513
- specify "should return correct entries in the schema" do
3514
- s = @db.schema(:test_enumt)
3515
- s.first.last[:type].should == :enum
3516
- s.first.last[:enum_values].should == %w'a b c d'
3517
- end
3518
-
3519
- it "should add array parsers for enum values" do
3520
- @db.get(Sequel.pg_array(%w'a b', :test_enum)).should == %w'a b'
3521
- end if DB.adapter_scheme == :postgres || DB.adapter_scheme == :jdbc
3522
-
3523
- it "should set up model typecasting correctly" do
3524
- c = Class.new(Sequel::Model(:test_enumt))
3525
- o = c.new
3526
- o.t = :a
3527
- o.t.should == 'a'
3528
- end
3529
-
3530
- it "should add values to existing enum" do
3531
- @db.add_enum_value(:test_enum, 'e')
3532
- @db.add_enum_value(:test_enum, 'f', :after=>'a')
3533
- @db.add_enum_value(:test_enum, 'g', :before=>'b')
3534
- @db.add_enum_value(:test_enum, 'a', :if_not_exists=>true) if @db.server_version >= 90300
3535
- @db.schema(:test_enumt, :reload=>true).first.last[:enum_values].should == %w'a f g b c d e'
3536
- end if DB.server_version >= 90100
3537
- end