spree 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spree might be problematic. Click here for more details.

Files changed (3348) hide show
  1. data/CHANGELOG +22 -0
  2. data/CONTRIBUTORS +18 -1
  3. data/README.markdown +68 -9
  4. data/app/controllers/account_controller.rb +4 -18
  5. data/app/controllers/addresses_controller.rb +53 -0
  6. data/app/controllers/admin/base_controller.rb +0 -2
  7. data/app/controllers/admin/configurations_controller.rb +10 -0
  8. data/app/controllers/admin/images_controller.rb +10 -9
  9. data/app/controllers/admin/inventory_units_controller.rb +1 -25
  10. data/app/controllers/admin/mail_settings_controller.rb +14 -0
  11. data/app/controllers/admin/option_types_controller.rb +53 -61
  12. data/app/controllers/admin/orders_controller.rb +38 -250
  13. data/app/controllers/admin/product_properties_controller.rb +7 -0
  14. data/app/controllers/admin/products_controller.rb +38 -148
  15. data/app/controllers/admin/properties_controller.rb +25 -0
  16. data/app/controllers/admin/prototypes_controller.rb +49 -0
  17. data/app/controllers/admin/states_controller.rb +26 -0
  18. data/app/controllers/admin/tax_categories_controller.rb +11 -0
  19. data/app/controllers/admin/taxonomies_controller.rb +26 -0
  20. data/app/controllers/admin/taxons_controller.rb +137 -0
  21. data/app/controllers/admin/users_controller.rb +3 -0
  22. data/app/controllers/admin/variants_controller.rb +25 -0
  23. data/app/controllers/admin/zones_controller.rb +49 -0
  24. data/app/controllers/application.rb +9 -6
  25. data/app/controllers/countries_controller.rb +11 -0
  26. data/app/controllers/creditcard_payments_controller.rb +63 -0
  27. data/app/controllers/line_items_controller.rb +6 -0
  28. data/app/controllers/orders_controller.rb +70 -0
  29. data/app/controllers/products_controller.rb +33 -0
  30. data/app/controllers/spree/base_controller.rb +18 -23
  31. data/app/controllers/states_controller.rb +10 -0
  32. data/app/controllers/taxons_controller.rb +19 -0
  33. data/app/controllers/users_controller.rb +16 -7
  34. data/app/helpers/admin/base_helper.rb +7 -10
  35. data/app/helpers/admin/configurations_helper.rb +2 -0
  36. data/app/helpers/admin/mail_settings_helper.rb +2 -0
  37. data/app/helpers/admin/orders_helper.rb +18 -6
  38. data/app/helpers/admin/product_properties_helper.rb +13 -0
  39. data/app/helpers/admin/products_helper.rb +13 -1
  40. data/app/helpers/admin/properties_helper.rb +9 -0
  41. data/app/helpers/admin/prototypes_helper.rb +18 -0
  42. data/app/helpers/admin/taxonomies_helper.rb +62 -0
  43. data/app/helpers/admin/taxons_helper.rb +5 -0
  44. data/app/helpers/admin/variants_helper.rb +2 -0
  45. data/app/helpers/admin/zones_helper.rb +11 -0
  46. data/app/helpers/application_helper.rb +11 -0
  47. data/app/helpers/orders_helper.rb +14 -0
  48. data/app/helpers/payments_helper.rb +2 -0
  49. data/app/helpers/products_helper.rb +34 -0
  50. data/app/helpers/spree/base_helper.rb +10 -12
  51. data/app/helpers/store_helper.rb +0 -19
  52. data/app/helpers/tax_categories_helper.rb +2 -0
  53. data/app/helpers/taxons_helper.rb +31 -0
  54. data/app/models/address.rb +7 -2
  55. data/app/models/app_configuration.rb +27 -0
  56. data/app/models/configuration.rb +3 -0
  57. data/app/models/country.rb +1 -0
  58. data/app/models/creditcard.rb +6 -0
  59. data/app/models/creditcard_payment.rb +40 -0
  60. data/app/models/creditcard_txn.rb +6 -0
  61. data/app/models/image.rb +1 -2
  62. data/app/models/inventory_unit.rb +22 -9
  63. data/app/models/line_item.rb +21 -8
  64. data/app/models/option_type.rb +2 -2
  65. data/app/models/order.rb +105 -62
  66. data/app/models/order_filter.rb +25 -0
  67. data/app/models/order_mailer.rb +9 -4
  68. data/app/models/preference.rb +51 -0
  69. data/app/models/product.rb +63 -10
  70. data/app/models/product_property.rb +15 -0
  71. data/app/models/property.rb +18 -0
  72. data/app/models/prototype.rb +4 -0
  73. data/app/models/state.rb +3 -0
  74. data/app/models/state_event.rb +8 -0
  75. data/app/models/tax_category.rb +3 -0
  76. data/app/models/taxon.rb +5 -0
  77. data/app/models/taxonomy.rb +5 -0
  78. data/app/models/user.rb +10 -15
  79. data/app/models/variant.rb +38 -13
  80. data/app/models/variants.rb +2 -0
  81. data/app/models/zone.rb +37 -0
  82. data/app/models/zone_member.rb +4 -0
  83. data/app/presenters/payment_presenter.rb +4 -0
  84. data/app/views/account/login.html.erb +14 -0
  85. data/app/views/addresses/_form.html.erb +48 -0
  86. data/app/views/addresses/_states.html.erb +8 -0
  87. data/app/views/addresses/edit.html.erb +8 -0
  88. data/app/views/addresses/new.html.erb +8 -0
  89. data/app/views/admin/configurations/index.html.erb +42 -0
  90. data/app/views/admin/configurations/new.html.erb +13 -0
  91. data/app/views/admin/extensions/index.html.erb +22 -22
  92. data/app/views/admin/images/new.html.erb +3 -3
  93. data/app/views/admin/inventory_units/adjust.html.erb +27 -26
  94. data/app/views/admin/mail_settings/edit.html.erb +85 -0
  95. data/app/views/admin/mail_settings/show.html.erb +45 -0
  96. data/app/views/admin/option_types/_form.html.erb +37 -0
  97. data/app/views/admin/option_types/_option_value.html.erb +5 -0
  98. data/app/views/admin/option_types/available.html.erb +32 -0
  99. data/app/views/admin/option_types/edit.html.erb +8 -0
  100. data/app/views/admin/option_types/index.html.erb +38 -0
  101. data/app/views/admin/option_types/new.html.erb +8 -0
  102. data/app/views/admin/option_types/selected.html.erb +38 -0
  103. data/app/views/admin/orders/{_address.rhtml → _address.html.erb} +0 -0
  104. data/app/views/admin/orders/index.html.erb +95 -0
  105. data/app/views/admin/orders/show.html.erb +76 -0
  106. data/app/views/admin/overview/index.html.erb +3 -0
  107. data/app/views/admin/product_properties/_product_property.html.erb +22 -0
  108. data/app/views/admin/product_properties/index.html.erb +39 -0
  109. data/app/views/admin/products/_form.html.erb +58 -0
  110. data/app/views/admin/products/_images.html.erb +45 -0
  111. data/app/views/admin/products/{_option_types.rhtml → _option_types.html.erb} +0 -0
  112. data/app/views/admin/products/edit.html.erb +7 -0
  113. data/app/views/admin/products/index.html.erb +59 -0
  114. data/app/views/admin/products/new.html.erb +7 -0
  115. data/app/views/admin/products/show.html.erb +4 -0
  116. data/app/views/admin/properties/_form.html.erb +14 -0
  117. data/app/views/admin/properties/edit.html.erb +9 -0
  118. data/app/views/admin/properties/filtered.html.erb +1 -0
  119. data/app/views/admin/properties/index.html.erb +36 -0
  120. data/app/views/admin/properties/new.html.erb +9 -0
  121. data/app/views/admin/prototypes/_form.html.erb +21 -0
  122. data/app/views/admin/prototypes/available.html.erb +27 -0
  123. data/app/views/admin/prototypes/edit.html.erb +9 -0
  124. data/app/views/admin/prototypes/index.html.erb +34 -0
  125. data/app/views/admin/prototypes/new.html.erb +9 -0
  126. data/app/views/admin/prototypes/select.rjs +5 -0
  127. data/app/views/admin/reports/index.html.erb +28 -0
  128. data/app/views/admin/reports/sales_total.html.erb +28 -0
  129. data/app/views/admin/states/_form.html.erb +10 -0
  130. data/app/views/admin/states/_state_list.html.erb +25 -0
  131. data/app/views/admin/states/edit.html.erb +10 -0
  132. data/app/views/admin/states/index.html.erb +18 -0
  133. data/app/views/admin/states/new.html.erb +10 -0
  134. data/app/views/admin/tax_categories/_form.html.erb +11 -0
  135. data/app/views/admin/tax_categories/edit.html.erb +10 -0
  136. data/app/views/admin/tax_categories/index.html.erb +27 -0
  137. data/app/views/admin/tax_categories/new.html.erb +10 -0
  138. data/{foozah/README → app/views/admin/tax_categories/show.html.erb} +0 -0
  139. data/app/views/admin/taxonomies/_form.html.erb +9 -0
  140. data/app/views/admin/taxonomies/_list.html.erb +18 -0
  141. data/app/views/admin/taxonomies/_manage_products.rhtml +31 -0
  142. data/app/views/admin/taxonomies/_success.rhtml +1 -0
  143. data/app/views/admin/taxonomies/_yui_head.html.erb +31 -0
  144. data/app/views/admin/taxonomies/edit.html.erb +16 -0
  145. data/app/views/admin/taxonomies/index.html.erb +7 -0
  146. data/app/views/admin/taxonomies/new.html.erb +9 -0
  147. data/app/views/admin/taxons/_taxon_table.html.erb +28 -0
  148. data/app/views/admin/taxons/available.js.erb +36 -0
  149. data/app/views/admin/taxons/remove.html.erb +1 -0
  150. data/app/views/admin/taxons/select.html.erb +1 -0
  151. data/app/views/admin/taxons/selected.html.erb +24 -0
  152. data/app/views/admin/users/_form.html.erb +22 -0
  153. data/app/views/admin/users/edit.html.erb +9 -0
  154. data/app/views/admin/users/index.html.erb +21 -0
  155. data/app/views/admin/users/new.html.erb +11 -0
  156. data/app/views/admin/users/show.html.erb +11 -0
  157. data/app/views/admin/variants/_form.html.erb +32 -0
  158. data/app/views/admin/variants/edit.html.erb +9 -0
  159. data/app/views/admin/variants/index.html.erb +48 -0
  160. data/app/views/admin/variants/new.html.erb +8 -0
  161. data/app/views/admin/zones/_country.html.erb +15 -0
  162. data/app/views/admin/zones/_form.html.erb +68 -0
  163. data/app/views/admin/zones/_function.rjs +11 -0
  164. data/app/views/admin/zones/_state.html.erb +15 -0
  165. data/app/views/admin/zones/_zone.html.erb +15 -0
  166. data/app/views/admin/zones/edit.html.erb +10 -0
  167. data/app/views/admin/zones/index.html.erb +26 -0
  168. data/app/views/admin/zones/index.js.erb +1 -0
  169. data/app/views/admin/zones/new.html.erb +10 -0
  170. data/app/views/admin/zones/show.html.erb +4 -0
  171. data/app/views/countries/index.js.erb +1 -0
  172. data/app/views/creditcard_payments/_form_billing.html.erb +49 -0
  173. data/app/views/creditcard_payments/_form_credit_card.html.erb +30 -0
  174. data/app/views/creditcard_payments/_states.html.erb +8 -0
  175. data/app/views/creditcard_payments/cvv.html.erb +15 -0
  176. data/app/views/creditcard_payments/new.html.erb +17 -0
  177. data/app/views/layouts/admin.html.erb +67 -0
  178. data/app/views/layouts/application.html.erb +79 -0
  179. data/app/views/line_items/index.html.erb +1 -0
  180. data/app/views/order_mailer/cancel.html.erb +15 -0
  181. data/app/views/order_mailer/confirm.html.erb +18 -0
  182. data/app/views/orders/_form.html.erb +15 -0
  183. data/app/views/orders/_line_item.html.erb +20 -0
  184. data/app/views/orders/edit.html.erb +20 -0
  185. data/app/views/orders/new.html.erb +6 -0
  186. data/app/views/orders/show.html.erb +11 -0
  187. data/app/views/{store → products}/_image.html.erb +0 -0
  188. data/app/views/products/_products.html.erb +10 -0
  189. data/app/views/products/_thumbnails.html.erb +8 -0
  190. data/app/views/products/index.html.erb +11 -0
  191. data/app/views/products/show.html.erb +60 -0
  192. data/app/views/shared/_edit_resource_links.html.erb +1 -0
  193. data/app/views/shared/_footer.html.erb +5 -0
  194. data/app/views/shared/_new_resource_links.html.erb +1 -0
  195. data/app/views/shared/_order_details.html.erb +35 -0
  196. data/app/views/shared/_paginate.html.erb +34 -0
  197. data/app/views/shared/_product_sub_menu.html.erb +10 -0
  198. data/app/views/shared/_product_tabs.html.erb +29 -0
  199. data/app/views/shared/_products.html.erb +13 -0
  200. data/app/views/shared/_report_criteria.html.erb +33 -0
  201. data/app/views/shared/_show_resource_links.html.erb +3 -0
  202. data/app/views/shared/_store_menu.html.erb +5 -0
  203. data/app/views/shared/_taxonomies.html.erb +8 -0
  204. data/app/views/states/index.js.erb +1 -0
  205. data/app/views/taxons/_taxon.html.erb +5 -0
  206. data/app/views/taxons/show.html.erb +8 -0
  207. data/app/views/users/_form.html.erb +8 -6
  208. data/app/views/users/edit.html.erb +3 -3
  209. data/app/views/users/index.html.erb +16 -16
  210. data/app/views/users/new.html.erb +3 -5
  211. data/app/views/users/show.html.erb +3 -3
  212. data/bin/spree +9 -3
  213. data/config/boot.rb +62 -53
  214. data/config/database.yml +32 -10
  215. data/config/easy_role_permissions.yml +75 -0
  216. data/config/environment.rb +51 -72
  217. data/config/environments/development.rb +3 -1
  218. data/config/environments/staging.rb +13 -0
  219. data/config/environments/test.rb +4 -1
  220. data/config/initializers/mime_types.rb +8 -0
  221. data/config/initializers/spree.rb +40 -0
  222. data/config/routes.rb +39 -9
  223. data/db/migrate/20080620113300_create_taxonomies.rb +13 -0
  224. data/db/migrate/20080620113400_create_taxons.rb +16 -0
  225. data/db/migrate/20080622173128_drop_extension_meta.rb +13 -0
  226. data/db/migrate/20080622194800_create_prototypes.rb +13 -0
  227. data/db/migrate/20080622194830_create_properties.rb +13 -0
  228. data/db/migrate/20080622195000_create_properties_prototypes.rb +12 -0
  229. data/db/migrate/20080622195100_create_property_values.rb +14 -0
  230. data/db/migrate/20080630003326_create_zones.rb +13 -0
  231. data/db/migrate/20080630150630_create_preferences.rb +19 -0
  232. data/db/migrate/20080630152702_add_iso_country_information.rb +248 -0
  233. data/db/migrate/20080630154400_create_countries_zones.rb +12 -0
  234. data/db/migrate/20080630215310_create_zone_members.rb +13 -0
  235. data/db/migrate/20080703184654_update_country_rename_name.rb +20 -0
  236. data/db/migrate/20080704181428_create_app_configurations.rb +12 -0
  237. data/db/migrate/20080704190355_add_permalink_and_published_to_products.rb +15 -0
  238. data/db/migrate/20080706233224_create_eu_vat_zone.rb +19 -0
  239. data/db/migrate/20080707002329_create_tax_categories.rb +21 -0
  240. data/db/migrate/20080708170103_remove_login.rb +9 -0
  241. data/db/migrate/20080715014028_add_optimistic_locking_to_cart.rb +13 -0
  242. data/db/migrate/20080716155613_products_taxons.rb +12 -0
  243. data/db/migrate/20080720190623_rename_txn_table.rb +9 -0
  244. data/db/migrate/20080729213052_drop_categories.rb +8 -0
  245. data/db/migrate/20080803010846_remove_prototype_presentation.rb +13 -0
  246. data/db/migrate/20080807214829_create_product_property.rb +15 -0
  247. data/db/migrate/20080815173251_remove_cart.rb +10 -0
  248. data/db/migrate/20080830173354_add_checkout_state_to_order.rb +13 -0
  249. data/db/migrate/20080901002711_address_refactor.rb +14 -0
  250. data/db/migrate/20080902001408_create_creditcard_payments.rb +17 -0
  251. data/db/migrate/20080904150723_refactor_order_state.rb +33 -0
  252. data/db/migrate/20080904234457_create_state_events.rb +15 -0
  253. data/db/migrate/20080905012833_add_inventory_state.rb +13 -0
  254. data/db/migrate/20080906174748_change_inventory_state_type.rb +8 -0
  255. data/db/migrate/20080909100504_add_state_name_to_address.rb +9 -0
  256. data/db/migrate/20080915211650_remove_user_address.rb +10 -0
  257. data/db/migrate/20080918083321_remove_presentation_from_taxonomy.rb +11 -0
  258. data/db/migrate/20080918140438_rename_app_configuration.rb +16 -0
  259. data/db/sample/addresses.yml +8 -7
  260. data/db/sample/creditcard_payments.yml +10 -0
  261. data/db/sample/creditcard_txns.yml +7 -0
  262. data/db/sample/images.yml +51 -1
  263. data/db/sample/inventory_units.yml +19 -24
  264. data/db/sample/orders.yml +2 -4
  265. data/db/sample/product_properties.yml +136 -0
  266. data/db/sample/products.yml +26 -7
  267. data/db/sample/properties.yml +39 -0
  268. data/db/sample/prototypes.yml +9 -0
  269. data/db/sample/states.yml +52 -2
  270. data/db/sample/tax_categories.yml +6 -0
  271. data/db/sample/taxonomies.yml +4 -0
  272. data/db/sample/taxons.yml +61 -0
  273. data/db/sample/users.yml +0 -1
  274. data/db/sample/variants.yml +9 -1
  275. data/lang/ui/de-DE.yml +207 -0
  276. data/lang/ui/en-US.yml +225 -0
  277. data/lang/ui/es-ES.yml +202 -0
  278. data/lang/ui/it-IT.yml +194 -0
  279. data/lang/ui/pl-PL.yml +213 -0
  280. data/lang/ui/pt-BR.yml +219 -0
  281. data/lib/authenticated_system.rb +3 -3
  282. data/lib/authenticated_test_helper.rb +1 -1
  283. data/lib/commands/extension.rb +250 -0
  284. data/lib/easy_role_requirement_system.rb +1 -1
  285. data/lib/gateway_error.rb +1 -0
  286. data/lib/generators/extension/extension_generator.rb +11 -10
  287. data/lib/generators/extension/templates/{README → README.markdown} +0 -0
  288. data/lib/generators/extension/templates/Rakefile +0 -0
  289. data/lib/generators/extension/templates/tasks.rake +1 -12
  290. data/lib/generators/extension_controller/extension_controller_generator.rb +19 -19
  291. data/lib/generators/extension_controller/templates/{view.rhtml → view.html.erb} +0 -0
  292. data/lib/generators/instance/instance_generator.rb +24 -8
  293. data/lib/plugins/extension_patches/init.rb +2 -1
  294. data/lib/plugins/extension_patches/lib/asset_copy.rb +63 -0
  295. data/lib/plugins/extension_patches/lib/routing_extension.rb +1 -1
  296. data/lib/preference_access.rb +27 -0
  297. data/lib/profiler/add_to_cart_profiler.rb +2 -0
  298. data/lib/profiler/product_details_profiler.rb +2 -0
  299. data/lib/role_requirement_system.rb +10 -8
  300. data/lib/spree.rb +1 -1
  301. data/lib/spree/config.rb +20 -0
  302. data/lib/spree/gateway_error.rb +3 -0
  303. data/lib/spree/initializer.rb +19 -16
  304. data/lib/spree/preferences/mail_settings.rb +57 -0
  305. data/lib/spree/preferences/model_hooks.rb +290 -0
  306. data/lib/spree/preferences/preference_definition.rb +53 -0
  307. data/lib/spree/setup.rb +9 -29
  308. data/lib/spree/support/core_extensions/array.rb +23 -0
  309. data/lib/spree/support/core_extensions/string.rb +18 -0
  310. data/lib/tasks/database.rake +13 -22
  311. data/lib/tasks/extensions.rake +65 -59
  312. data/lib/tasks/framework.rake +34 -31
  313. data/lib/tasks/release.rake +4 -1
  314. data/lib/tasks/sample/products/0000/1004/apache_baseball.png +0 -0
  315. data/lib/tasks/sample/products/0000/1004/apache_baseball_mini.png +0 -0
  316. data/lib/tasks/sample/products/0000/1004/apache_baseball_product.png +0 -0
  317. data/lib/tasks/sample/products/0000/1004/apache_baseball_small.png +0 -0
  318. data/lib/tasks/sample/products/0000/1008/ruby_baseball.png +0 -0
  319. data/lib/tasks/sample/products/0000/1008/ruby_baseball_mini.png +0 -0
  320. data/lib/tasks/sample/products/0000/1008/ruby_baseball_product.png +0 -0
  321. data/lib/tasks/sample/products/0000/1008/ruby_baseball_small.png +0 -0
  322. data/public/{.htaccess → .htaccess.example} +0 -0
  323. data/public/images/breadcrumb.gif +0 -0
  324. data/public/images/flags/ad.png +0 -0
  325. data/public/images/flags/ae.png +0 -0
  326. data/public/images/flags/af.png +0 -0
  327. data/public/images/flags/ag.png +0 -0
  328. data/public/images/flags/ai.png +0 -0
  329. data/public/images/flags/al.png +0 -0
  330. data/public/images/flags/am.png +0 -0
  331. data/public/images/flags/an.png +0 -0
  332. data/public/images/flags/ao.png +0 -0
  333. data/public/images/flags/ar.png +0 -0
  334. data/public/images/flags/as.png +0 -0
  335. data/public/images/flags/at.png +0 -0
  336. data/public/images/flags/au.png +0 -0
  337. data/public/images/flags/aw.png +0 -0
  338. data/public/images/flags/ax.png +0 -0
  339. data/public/images/flags/az.png +0 -0
  340. data/public/images/flags/ba.png +0 -0
  341. data/public/images/flags/bb.png +0 -0
  342. data/public/images/flags/bd.png +0 -0
  343. data/public/images/flags/be.png +0 -0
  344. data/public/images/flags/bf.png +0 -0
  345. data/public/images/flags/bg.png +0 -0
  346. data/public/images/flags/bh.png +0 -0
  347. data/public/images/flags/bi.png +0 -0
  348. data/public/images/flags/bj.png +0 -0
  349. data/public/images/flags/bm.png +0 -0
  350. data/public/images/flags/bn.png +0 -0
  351. data/public/images/flags/bo.png +0 -0
  352. data/public/images/flags/br.png +0 -0
  353. data/public/images/flags/bs.png +0 -0
  354. data/public/images/flags/bt.png +0 -0
  355. data/public/images/flags/bv.png +0 -0
  356. data/public/images/flags/bw.png +0 -0
  357. data/public/images/flags/by.png +0 -0
  358. data/public/images/flags/bz.png +0 -0
  359. data/public/images/flags/ca.png +0 -0
  360. data/public/images/flags/catalonia.png +0 -0
  361. data/public/images/flags/cc.png +0 -0
  362. data/public/images/flags/cd.png +0 -0
  363. data/public/images/flags/cf.png +0 -0
  364. data/public/images/flags/cg.png +0 -0
  365. data/public/images/flags/ch.png +0 -0
  366. data/public/images/flags/ci.png +0 -0
  367. data/public/images/flags/ck.png +0 -0
  368. data/public/images/flags/cl.png +0 -0
  369. data/public/images/flags/cm.png +0 -0
  370. data/public/images/flags/cn.png +0 -0
  371. data/public/images/flags/co.png +0 -0
  372. data/public/images/flags/cr.png +0 -0
  373. data/public/images/flags/cs.png +0 -0
  374. data/public/images/flags/cu.png +0 -0
  375. data/public/images/flags/cv.png +0 -0
  376. data/public/images/flags/cx.png +0 -0
  377. data/public/images/flags/cy.png +0 -0
  378. data/public/images/flags/cz.png +0 -0
  379. data/public/images/flags/de.png +0 -0
  380. data/public/images/flags/dj.png +0 -0
  381. data/public/images/flags/dk.png +0 -0
  382. data/public/images/flags/dm.png +0 -0
  383. data/public/images/flags/do.png +0 -0
  384. data/public/images/flags/dz.png +0 -0
  385. data/public/images/flags/ec.png +0 -0
  386. data/public/images/flags/ee.png +0 -0
  387. data/public/images/flags/eg.png +0 -0
  388. data/public/images/flags/eh.png +0 -0
  389. data/public/images/flags/england.png +0 -0
  390. data/public/images/flags/er.png +0 -0
  391. data/public/images/flags/es.png +0 -0
  392. data/public/images/flags/et.png +0 -0
  393. data/public/images/flags/europeanunion.png +0 -0
  394. data/public/images/flags/fam.png +0 -0
  395. data/public/images/flags/fi.png +0 -0
  396. data/public/images/flags/fj.png +0 -0
  397. data/public/images/flags/fk.png +0 -0
  398. data/public/images/flags/fm.png +0 -0
  399. data/public/images/flags/fo.png +0 -0
  400. data/public/images/flags/fr.png +0 -0
  401. data/public/images/flags/ga.png +0 -0
  402. data/public/images/flags/gb.png +0 -0
  403. data/public/images/flags/gd.png +0 -0
  404. data/public/images/flags/ge.png +0 -0
  405. data/public/images/flags/gf.png +0 -0
  406. data/public/images/flags/gh.png +0 -0
  407. data/public/images/flags/gi.png +0 -0
  408. data/public/images/flags/gl.png +0 -0
  409. data/public/images/flags/gm.png +0 -0
  410. data/public/images/flags/gn.png +0 -0
  411. data/public/images/flags/gp.png +0 -0
  412. data/public/images/flags/gq.png +0 -0
  413. data/public/images/flags/gr.png +0 -0
  414. data/public/images/flags/gs.png +0 -0
  415. data/public/images/flags/gt.png +0 -0
  416. data/public/images/flags/gu.png +0 -0
  417. data/public/images/flags/gw.png +0 -0
  418. data/public/images/flags/gy.png +0 -0
  419. data/public/images/flags/hk.png +0 -0
  420. data/public/images/flags/hm.png +0 -0
  421. data/public/images/flags/hn.png +0 -0
  422. data/public/images/flags/hr.png +0 -0
  423. data/public/images/flags/ht.png +0 -0
  424. data/public/images/flags/hu.png +0 -0
  425. data/public/images/flags/id.png +0 -0
  426. data/public/images/flags/ie.png +0 -0
  427. data/public/images/flags/il.png +0 -0
  428. data/public/images/flags/in.png +0 -0
  429. data/public/images/flags/io.png +0 -0
  430. data/public/images/flags/iq.png +0 -0
  431. data/public/images/flags/ir.png +0 -0
  432. data/public/images/flags/is.png +0 -0
  433. data/public/images/flags/it.png +0 -0
  434. data/public/images/flags/jm.png +0 -0
  435. data/public/images/flags/jo.png +0 -0
  436. data/public/images/flags/jp.png +0 -0
  437. data/public/images/flags/ke.png +0 -0
  438. data/public/images/flags/kg.png +0 -0
  439. data/public/images/flags/kh.png +0 -0
  440. data/public/images/flags/ki.png +0 -0
  441. data/public/images/flags/km.png +0 -0
  442. data/public/images/flags/kn.png +0 -0
  443. data/public/images/flags/kp.png +0 -0
  444. data/public/images/flags/kr.png +0 -0
  445. data/public/images/flags/kw.png +0 -0
  446. data/public/images/flags/ky.png +0 -0
  447. data/public/images/flags/kz.png +0 -0
  448. data/public/images/flags/la.png +0 -0
  449. data/public/images/flags/lb.png +0 -0
  450. data/public/images/flags/lc.png +0 -0
  451. data/public/images/flags/li.png +0 -0
  452. data/public/images/flags/lk.png +0 -0
  453. data/public/images/flags/lr.png +0 -0
  454. data/public/images/flags/ls.png +0 -0
  455. data/public/images/flags/lt.png +0 -0
  456. data/public/images/flags/lu.png +0 -0
  457. data/public/images/flags/lv.png +0 -0
  458. data/public/images/flags/ly.png +0 -0
  459. data/public/images/flags/ma.png +0 -0
  460. data/public/images/flags/mc.png +0 -0
  461. data/public/images/flags/md.png +0 -0
  462. data/public/images/flags/me.png +0 -0
  463. data/public/images/flags/mg.png +0 -0
  464. data/public/images/flags/mh.png +0 -0
  465. data/public/images/flags/mk.png +0 -0
  466. data/public/images/flags/ml.png +0 -0
  467. data/public/images/flags/mm.png +0 -0
  468. data/public/images/flags/mn.png +0 -0
  469. data/public/images/flags/mo.png +0 -0
  470. data/public/images/flags/mp.png +0 -0
  471. data/public/images/flags/mq.png +0 -0
  472. data/public/images/flags/mr.png +0 -0
  473. data/public/images/flags/ms.png +0 -0
  474. data/public/images/flags/mt.png +0 -0
  475. data/public/images/flags/mu.png +0 -0
  476. data/public/images/flags/mv.png +0 -0
  477. data/public/images/flags/mw.png +0 -0
  478. data/public/images/flags/mx.png +0 -0
  479. data/public/images/flags/my.png +0 -0
  480. data/public/images/flags/mz.png +0 -0
  481. data/public/images/flags/na.png +0 -0
  482. data/public/images/flags/nc.png +0 -0
  483. data/public/images/flags/ne.png +0 -0
  484. data/public/images/flags/nf.png +0 -0
  485. data/public/images/flags/ng.png +0 -0
  486. data/public/images/flags/ni.png +0 -0
  487. data/public/images/flags/nl.png +0 -0
  488. data/public/images/flags/no.png +0 -0
  489. data/public/images/flags/np.png +0 -0
  490. data/public/images/flags/nr.png +0 -0
  491. data/public/images/flags/nu.png +0 -0
  492. data/public/images/flags/nz.png +0 -0
  493. data/public/images/flags/om.png +0 -0
  494. data/public/images/flags/pa.png +0 -0
  495. data/public/images/flags/pe.png +0 -0
  496. data/public/images/flags/pf.png +0 -0
  497. data/public/images/flags/pg.png +0 -0
  498. data/public/images/flags/ph.png +0 -0
  499. data/public/images/flags/pk.png +0 -0
  500. data/public/images/flags/pl.png +0 -0
  501. data/public/images/flags/pm.png +0 -0
  502. data/public/images/flags/pn.png +0 -0
  503. data/public/images/flags/pr.png +0 -0
  504. data/public/images/flags/ps.png +0 -0
  505. data/public/images/flags/pt.png +0 -0
  506. data/public/images/flags/pw.png +0 -0
  507. data/public/images/flags/py.png +0 -0
  508. data/public/images/flags/qa.png +0 -0
  509. data/public/images/flags/re.png +0 -0
  510. data/public/images/flags/ro.png +0 -0
  511. data/public/images/flags/rs.png +0 -0
  512. data/public/images/flags/ru.png +0 -0
  513. data/public/images/flags/rw.png +0 -0
  514. data/public/images/flags/sa.png +0 -0
  515. data/public/images/flags/sb.png +0 -0
  516. data/public/images/flags/sc.png +0 -0
  517. data/public/images/flags/scotland.png +0 -0
  518. data/public/images/flags/sd.png +0 -0
  519. data/public/images/flags/se.png +0 -0
  520. data/public/images/flags/sg.png +0 -0
  521. data/public/images/flags/sh.png +0 -0
  522. data/public/images/flags/si.png +0 -0
  523. data/public/images/flags/sj.png +0 -0
  524. data/public/images/flags/sk.png +0 -0
  525. data/public/images/flags/sl.png +0 -0
  526. data/public/images/flags/sm.png +0 -0
  527. data/public/images/flags/sn.png +0 -0
  528. data/public/images/flags/so.png +0 -0
  529. data/public/images/flags/sr.png +0 -0
  530. data/public/images/flags/st.png +0 -0
  531. data/public/images/flags/sv.png +0 -0
  532. data/public/images/flags/sy.png +0 -0
  533. data/public/images/flags/sz.png +0 -0
  534. data/public/images/flags/tc.png +0 -0
  535. data/public/images/flags/td.png +0 -0
  536. data/public/images/flags/tf.png +0 -0
  537. data/public/images/flags/tg.png +0 -0
  538. data/public/images/flags/th.png +0 -0
  539. data/public/images/flags/tj.png +0 -0
  540. data/public/images/flags/tk.png +0 -0
  541. data/public/images/flags/tl.png +0 -0
  542. data/public/images/flags/tm.png +0 -0
  543. data/public/images/flags/tn.png +0 -0
  544. data/public/images/flags/to.png +0 -0
  545. data/public/images/flags/tr.png +0 -0
  546. data/public/images/flags/tt.png +0 -0
  547. data/public/images/flags/tv.png +0 -0
  548. data/public/images/flags/tw.png +0 -0
  549. data/public/images/flags/tz.png +0 -0
  550. data/public/images/flags/ua.png +0 -0
  551. data/public/images/flags/ug.png +0 -0
  552. data/public/images/flags/um.png +0 -0
  553. data/public/images/flags/us.png +0 -0
  554. data/public/images/flags/uy.png +0 -0
  555. data/public/images/flags/uz.png +0 -0
  556. data/public/images/flags/va.png +0 -0
  557. data/public/images/flags/vc.png +0 -0
  558. data/public/images/flags/ve.png +0 -0
  559. data/public/images/flags/vg.png +0 -0
  560. data/public/images/flags/vi.png +0 -0
  561. data/public/images/flags/vn.png +0 -0
  562. data/public/images/flags/vu.png +0 -0
  563. data/public/images/flags/wales.png +0 -0
  564. data/public/images/flags/wf.png +0 -0
  565. data/public/images/flags/ws.png +0 -0
  566. data/public/images/flags/ye.png +0 -0
  567. data/public/images/flags/yt.png +0 -0
  568. data/public/images/flags/za.png +0 -0
  569. data/public/images/flags/zm.png +0 -0
  570. data/public/images/flags/zw.png +0 -0
  571. data/public/images/pp_checkout.gif +0 -0
  572. data/public/images/tab_bottom.gif +0 -0
  573. data/public/images/tree-nav-icons/bullet.gif +0 -0
  574. data/public/images/tree-nav-icons/minus.gif +0 -0
  575. data/public/images/tree-nav-icons/plus.gif +0 -0
  576. data/public/javascripts/controls.js +484 -354
  577. data/public/javascripts/dragdrop.js +88 -58
  578. data/public/javascripts/effects.js +396 -364
  579. data/public/javascripts/prototype.js +132 -91
  580. data/public/javascripts/spree-yui.js +693 -0
  581. data/public/javascripts/spree.js +9 -0
  582. data/public/stylesheets/application.css +4 -1
  583. data/public/stylesheets/orders/_controller.css +105 -1
  584. data/public/stylesheets/prototypes/_controller.css +9 -0
  585. data/public/stylesheets/spree-admin.css +174 -4
  586. data/public/stylesheets/spree.css +142 -42
  587. data/script/about +0 -0
  588. data/script/breakpointer +0 -0
  589. data/script/console +0 -0
  590. data/script/dbconsole +3 -0
  591. data/script/destroy +0 -0
  592. data/script/extension +3 -0
  593. data/script/generate +0 -0
  594. data/{vendor/rails/railties/bin → script}/performance/request +0 -0
  595. data/script/plugin +0 -0
  596. data/script/runner +0 -0
  597. data/script/server +0 -0
  598. data/script/spec +0 -0
  599. data/script/spec_server +0 -0
  600. data/spec/controllers/admin/configurations_controller_spec.rb +9 -0
  601. data/spec/controllers/admin/mail_settings_controller_spec.rb +24 -0
  602. data/spec/controllers/orders_controller_spec.rb +30 -0
  603. data/spec/controllers/tax_categories_routing_spec.rb +61 -0
  604. data/spec/controllers/zones_routing_spec.rb +61 -0
  605. data/spec/fixtures/app_configurations.yml +7 -0
  606. data/spec/fixtures/preferences.yml +7 -0
  607. data/spec/fixtures/tax_categories.yml +4 -0
  608. data/spec/fixtures/users.yml +1 -2
  609. data/spec/fixtures/zone_members.yml +7 -0
  610. data/spec/fixtures/zones.yml +4 -0
  611. data/spec/helpers/admin/configurations_helper_spec.rb +11 -0
  612. data/spec/helpers/admin/mail_settings_helper_spec.rb +11 -0
  613. data/spec/helpers/products_helper_spec.rb +12 -0
  614. data/spec/helpers/spree/base_helper_spec.rb +25 -1
  615. data/spec/helpers/tax_categories_helper_spec.rb +11 -0
  616. data/spec/models/app_configuration_spec.rb +13 -0
  617. data/spec/models/creditcard_payment_spec.rb +12 -0
  618. data/spec/models/line_item_spec.rb +66 -21
  619. data/spec/models/order_spec.rb +80 -25
  620. data/spec/models/preference_definition_spec.rb +185 -0
  621. data/spec/models/preference_spec.rb +185 -0
  622. data/spec/models/product_spec.rb +74 -2
  623. data/spec/models/state_event_spec.rb +12 -0
  624. data/spec/models/tax_category_spec.rb +11 -0
  625. data/spec/models/zone_member_spec.rb +5 -0
  626. data/spec/models/zone_spec.rb +113 -0
  627. data/spec/preference_factory.rb +58 -0
  628. data/spec/spec_helper.rb +1 -0
  629. data/spec/views/admin/configurations/index.html.erb_spec.rb +8 -0
  630. data/spec/views/admin/mail_settings/edit.html.erb_spec.rb +14 -0
  631. data/spec/views/admin/mail_settings/show.html.erb_spec.rb +12 -0
  632. data/{vendor/rails/railties/helpers → test}/test_helper.rb +0 -0
  633. data/vendor/extensions/localization/README.rdoc +5 -0
  634. data/vendor/extensions/localization/Rakefile +120 -0
  635. data/vendor/extensions/localization/app/controllers/admin/localization_controller.rb +6 -0
  636. data/vendor/extensions/localization/app/controllers/locale_controller.rb +12 -0
  637. data/vendor/extensions/localization/app/helpers/locale_helper.rb +2 -0
  638. data/vendor/extensions/localization/app/helpers/localization_helper.rb +2 -0
  639. data/vendor/extensions/localization/app/views/shared/_language_bar.html.erb +10 -0
  640. data/vendor/extensions/localization/lang/ui/de-DE.yml +2 -0
  641. data/vendor/extensions/localization/lang/ui/en-US.yml +2 -0
  642. data/vendor/extensions/localization/lang/ui/es-ES.yml +2 -0
  643. data/vendor/extensions/localization/lang/ui/it-IT.yml +2 -0
  644. data/vendor/extensions/localization/lib/localization.rb +93 -0
  645. data/vendor/extensions/localization/lib/localization/user_preferences.rb +9 -0
  646. data/vendor/extensions/localization/lib/tasks/localization_extension_tasks.rake +17 -0
  647. data/vendor/extensions/localization/localization_extension.rb +37 -0
  648. data/vendor/extensions/localization/public/images/flags/ad.png +0 -0
  649. data/vendor/extensions/localization/public/images/flags/ae.png +0 -0
  650. data/vendor/extensions/localization/public/images/flags/af.png +0 -0
  651. data/vendor/extensions/localization/public/images/flags/ag.png +0 -0
  652. data/vendor/extensions/localization/public/images/flags/ai.png +0 -0
  653. data/vendor/extensions/localization/public/images/flags/al.png +0 -0
  654. data/vendor/extensions/localization/public/images/flags/am.png +0 -0
  655. data/vendor/extensions/localization/public/images/flags/an.png +0 -0
  656. data/vendor/extensions/localization/public/images/flags/ao.png +0 -0
  657. data/vendor/extensions/localization/public/images/flags/ar.png +0 -0
  658. data/vendor/extensions/localization/public/images/flags/as.png +0 -0
  659. data/vendor/extensions/localization/public/images/flags/at.png +0 -0
  660. data/vendor/extensions/localization/public/images/flags/au.png +0 -0
  661. data/vendor/extensions/localization/public/images/flags/aw.png +0 -0
  662. data/vendor/extensions/localization/public/images/flags/ax.png +0 -0
  663. data/vendor/extensions/localization/public/images/flags/az.png +0 -0
  664. data/vendor/extensions/localization/public/images/flags/ba.png +0 -0
  665. data/vendor/extensions/localization/public/images/flags/bb.png +0 -0
  666. data/vendor/extensions/localization/public/images/flags/bd.png +0 -0
  667. data/vendor/extensions/localization/public/images/flags/be.png +0 -0
  668. data/vendor/extensions/localization/public/images/flags/bf.png +0 -0
  669. data/vendor/extensions/localization/public/images/flags/bg.png +0 -0
  670. data/vendor/extensions/localization/public/images/flags/bh.png +0 -0
  671. data/vendor/extensions/localization/public/images/flags/bi.png +0 -0
  672. data/vendor/extensions/localization/public/images/flags/bj.png +0 -0
  673. data/vendor/extensions/localization/public/images/flags/bm.png +0 -0
  674. data/vendor/extensions/localization/public/images/flags/bn.png +0 -0
  675. data/vendor/extensions/localization/public/images/flags/bo.png +0 -0
  676. data/vendor/extensions/localization/public/images/flags/br.png +0 -0
  677. data/vendor/extensions/localization/public/images/flags/bs.png +0 -0
  678. data/vendor/extensions/localization/public/images/flags/bt.png +0 -0
  679. data/vendor/extensions/localization/public/images/flags/bv.png +0 -0
  680. data/vendor/extensions/localization/public/images/flags/bw.png +0 -0
  681. data/vendor/extensions/localization/public/images/flags/by.png +0 -0
  682. data/vendor/extensions/localization/public/images/flags/bz.png +0 -0
  683. data/vendor/extensions/localization/public/images/flags/ca.png +0 -0
  684. data/vendor/extensions/localization/public/images/flags/catalonia.png +0 -0
  685. data/vendor/extensions/localization/public/images/flags/cc.png +0 -0
  686. data/vendor/extensions/localization/public/images/flags/cd.png +0 -0
  687. data/vendor/extensions/localization/public/images/flags/cf.png +0 -0
  688. data/vendor/extensions/localization/public/images/flags/cg.png +0 -0
  689. data/vendor/extensions/localization/public/images/flags/ch.png +0 -0
  690. data/vendor/extensions/localization/public/images/flags/ci.png +0 -0
  691. data/vendor/extensions/localization/public/images/flags/ck.png +0 -0
  692. data/vendor/extensions/localization/public/images/flags/cl.png +0 -0
  693. data/vendor/extensions/localization/public/images/flags/cm.png +0 -0
  694. data/vendor/extensions/localization/public/images/flags/cn.png +0 -0
  695. data/vendor/extensions/localization/public/images/flags/co.png +0 -0
  696. data/vendor/extensions/localization/public/images/flags/cr.png +0 -0
  697. data/vendor/extensions/localization/public/images/flags/cs.png +0 -0
  698. data/vendor/extensions/localization/public/images/flags/cu.png +0 -0
  699. data/vendor/extensions/localization/public/images/flags/cv.png +0 -0
  700. data/vendor/extensions/localization/public/images/flags/cx.png +0 -0
  701. data/vendor/extensions/localization/public/images/flags/cy.png +0 -0
  702. data/vendor/extensions/localization/public/images/flags/cz.png +0 -0
  703. data/vendor/extensions/localization/public/images/flags/de.png +0 -0
  704. data/vendor/extensions/localization/public/images/flags/dj.png +0 -0
  705. data/vendor/extensions/localization/public/images/flags/dk.png +0 -0
  706. data/vendor/extensions/localization/public/images/flags/dm.png +0 -0
  707. data/vendor/extensions/localization/public/images/flags/do.png +0 -0
  708. data/vendor/extensions/localization/public/images/flags/dz.png +0 -0
  709. data/vendor/extensions/localization/public/images/flags/ec.png +0 -0
  710. data/vendor/extensions/localization/public/images/flags/ee.png +0 -0
  711. data/vendor/extensions/localization/public/images/flags/eg.png +0 -0
  712. data/vendor/extensions/localization/public/images/flags/eh.png +0 -0
  713. data/vendor/extensions/localization/public/images/flags/england.png +0 -0
  714. data/vendor/extensions/localization/public/images/flags/er.png +0 -0
  715. data/vendor/extensions/localization/public/images/flags/es.png +0 -0
  716. data/vendor/extensions/localization/public/images/flags/et.png +0 -0
  717. data/vendor/extensions/localization/public/images/flags/europeanunion.png +0 -0
  718. data/vendor/extensions/localization/public/images/flags/fam.png +0 -0
  719. data/vendor/extensions/localization/public/images/flags/fi.png +0 -0
  720. data/vendor/extensions/localization/public/images/flags/fj.png +0 -0
  721. data/vendor/extensions/localization/public/images/flags/fk.png +0 -0
  722. data/vendor/extensions/localization/public/images/flags/fm.png +0 -0
  723. data/vendor/extensions/localization/public/images/flags/fo.png +0 -0
  724. data/vendor/extensions/localization/public/images/flags/fr.png +0 -0
  725. data/vendor/extensions/localization/public/images/flags/ga.png +0 -0
  726. data/vendor/extensions/localization/public/images/flags/gb.png +0 -0
  727. data/vendor/extensions/localization/public/images/flags/gd.png +0 -0
  728. data/vendor/extensions/localization/public/images/flags/ge.png +0 -0
  729. data/vendor/extensions/localization/public/images/flags/gf.png +0 -0
  730. data/vendor/extensions/localization/public/images/flags/gh.png +0 -0
  731. data/vendor/extensions/localization/public/images/flags/gi.png +0 -0
  732. data/vendor/extensions/localization/public/images/flags/gl.png +0 -0
  733. data/vendor/extensions/localization/public/images/flags/gm.png +0 -0
  734. data/vendor/extensions/localization/public/images/flags/gn.png +0 -0
  735. data/vendor/extensions/localization/public/images/flags/gp.png +0 -0
  736. data/vendor/extensions/localization/public/images/flags/gq.png +0 -0
  737. data/vendor/extensions/localization/public/images/flags/gr.png +0 -0
  738. data/vendor/extensions/localization/public/images/flags/gs.png +0 -0
  739. data/vendor/extensions/localization/public/images/flags/gt.png +0 -0
  740. data/vendor/extensions/localization/public/images/flags/gu.png +0 -0
  741. data/vendor/extensions/localization/public/images/flags/gw.png +0 -0
  742. data/vendor/extensions/localization/public/images/flags/gy.png +0 -0
  743. data/vendor/extensions/localization/public/images/flags/hk.png +0 -0
  744. data/vendor/extensions/localization/public/images/flags/hm.png +0 -0
  745. data/vendor/extensions/localization/public/images/flags/hn.png +0 -0
  746. data/vendor/extensions/localization/public/images/flags/hr.png +0 -0
  747. data/vendor/extensions/localization/public/images/flags/ht.png +0 -0
  748. data/vendor/extensions/localization/public/images/flags/hu.png +0 -0
  749. data/vendor/extensions/localization/public/images/flags/id.png +0 -0
  750. data/vendor/extensions/localization/public/images/flags/ie.png +0 -0
  751. data/vendor/extensions/localization/public/images/flags/il.png +0 -0
  752. data/vendor/extensions/localization/public/images/flags/in.png +0 -0
  753. data/vendor/extensions/localization/public/images/flags/io.png +0 -0
  754. data/vendor/extensions/localization/public/images/flags/iq.png +0 -0
  755. data/vendor/extensions/localization/public/images/flags/ir.png +0 -0
  756. data/vendor/extensions/localization/public/images/flags/is.png +0 -0
  757. data/vendor/extensions/localization/public/images/flags/it.png +0 -0
  758. data/vendor/extensions/localization/public/images/flags/jm.png +0 -0
  759. data/vendor/extensions/localization/public/images/flags/jo.png +0 -0
  760. data/vendor/extensions/localization/public/images/flags/jp.png +0 -0
  761. data/vendor/extensions/localization/public/images/flags/ke.png +0 -0
  762. data/vendor/extensions/localization/public/images/flags/kg.png +0 -0
  763. data/vendor/extensions/localization/public/images/flags/kh.png +0 -0
  764. data/vendor/extensions/localization/public/images/flags/ki.png +0 -0
  765. data/vendor/extensions/localization/public/images/flags/km.png +0 -0
  766. data/vendor/extensions/localization/public/images/flags/kn.png +0 -0
  767. data/vendor/extensions/localization/public/images/flags/kp.png +0 -0
  768. data/vendor/extensions/localization/public/images/flags/kr.png +0 -0
  769. data/vendor/extensions/localization/public/images/flags/kw.png +0 -0
  770. data/vendor/extensions/localization/public/images/flags/ky.png +0 -0
  771. data/vendor/extensions/localization/public/images/flags/kz.png +0 -0
  772. data/vendor/extensions/localization/public/images/flags/la.png +0 -0
  773. data/vendor/extensions/localization/public/images/flags/lb.png +0 -0
  774. data/vendor/extensions/localization/public/images/flags/lc.png +0 -0
  775. data/vendor/extensions/localization/public/images/flags/li.png +0 -0
  776. data/vendor/extensions/localization/public/images/flags/lk.png +0 -0
  777. data/vendor/extensions/localization/public/images/flags/lr.png +0 -0
  778. data/vendor/extensions/localization/public/images/flags/ls.png +0 -0
  779. data/vendor/extensions/localization/public/images/flags/lt.png +0 -0
  780. data/vendor/extensions/localization/public/images/flags/lu.png +0 -0
  781. data/vendor/extensions/localization/public/images/flags/lv.png +0 -0
  782. data/vendor/extensions/localization/public/images/flags/ly.png +0 -0
  783. data/vendor/extensions/localization/public/images/flags/ma.png +0 -0
  784. data/vendor/extensions/localization/public/images/flags/mc.png +0 -0
  785. data/vendor/extensions/localization/public/images/flags/md.png +0 -0
  786. data/vendor/extensions/localization/public/images/flags/me.png +0 -0
  787. data/vendor/extensions/localization/public/images/flags/mg.png +0 -0
  788. data/vendor/extensions/localization/public/images/flags/mh.png +0 -0
  789. data/vendor/extensions/localization/public/images/flags/mk.png +0 -0
  790. data/vendor/extensions/localization/public/images/flags/ml.png +0 -0
  791. data/vendor/extensions/localization/public/images/flags/mm.png +0 -0
  792. data/vendor/extensions/localization/public/images/flags/mn.png +0 -0
  793. data/vendor/extensions/localization/public/images/flags/mo.png +0 -0
  794. data/vendor/extensions/localization/public/images/flags/mp.png +0 -0
  795. data/vendor/extensions/localization/public/images/flags/mq.png +0 -0
  796. data/vendor/extensions/localization/public/images/flags/mr.png +0 -0
  797. data/vendor/extensions/localization/public/images/flags/ms.png +0 -0
  798. data/vendor/extensions/localization/public/images/flags/mt.png +0 -0
  799. data/vendor/extensions/localization/public/images/flags/mu.png +0 -0
  800. data/vendor/extensions/localization/public/images/flags/mv.png +0 -0
  801. data/vendor/extensions/localization/public/images/flags/mw.png +0 -0
  802. data/vendor/extensions/localization/public/images/flags/mx.png +0 -0
  803. data/vendor/extensions/localization/public/images/flags/my.png +0 -0
  804. data/vendor/extensions/localization/public/images/flags/mz.png +0 -0
  805. data/vendor/extensions/localization/public/images/flags/na.png +0 -0
  806. data/vendor/extensions/localization/public/images/flags/nc.png +0 -0
  807. data/vendor/extensions/localization/public/images/flags/ne.png +0 -0
  808. data/vendor/extensions/localization/public/images/flags/nf.png +0 -0
  809. data/vendor/extensions/localization/public/images/flags/ng.png +0 -0
  810. data/vendor/extensions/localization/public/images/flags/ni.png +0 -0
  811. data/vendor/extensions/localization/public/images/flags/nl.png +0 -0
  812. data/vendor/extensions/localization/public/images/flags/no.png +0 -0
  813. data/vendor/extensions/localization/public/images/flags/np.png +0 -0
  814. data/vendor/extensions/localization/public/images/flags/nr.png +0 -0
  815. data/vendor/extensions/localization/public/images/flags/nu.png +0 -0
  816. data/vendor/extensions/localization/public/images/flags/nz.png +0 -0
  817. data/vendor/extensions/localization/public/images/flags/om.png +0 -0
  818. data/vendor/extensions/localization/public/images/flags/pa.png +0 -0
  819. data/vendor/extensions/localization/public/images/flags/pe.png +0 -0
  820. data/vendor/extensions/localization/public/images/flags/pf.png +0 -0
  821. data/vendor/extensions/localization/public/images/flags/pg.png +0 -0
  822. data/vendor/extensions/localization/public/images/flags/ph.png +0 -0
  823. data/vendor/extensions/localization/public/images/flags/pk.png +0 -0
  824. data/vendor/extensions/localization/public/images/flags/pl.png +0 -0
  825. data/vendor/extensions/localization/public/images/flags/pm.png +0 -0
  826. data/vendor/extensions/localization/public/images/flags/pn.png +0 -0
  827. data/vendor/extensions/localization/public/images/flags/pr.png +0 -0
  828. data/vendor/extensions/localization/public/images/flags/ps.png +0 -0
  829. data/vendor/extensions/localization/public/images/flags/pt.png +0 -0
  830. data/vendor/extensions/localization/public/images/flags/pw.png +0 -0
  831. data/vendor/extensions/localization/public/images/flags/py.png +0 -0
  832. data/vendor/extensions/localization/public/images/flags/qa.png +0 -0
  833. data/vendor/extensions/localization/public/images/flags/re.png +0 -0
  834. data/vendor/extensions/localization/public/images/flags/ro.png +0 -0
  835. data/vendor/extensions/localization/public/images/flags/rs.png +0 -0
  836. data/vendor/extensions/localization/public/images/flags/ru.png +0 -0
  837. data/vendor/extensions/localization/public/images/flags/rw.png +0 -0
  838. data/vendor/extensions/localization/public/images/flags/sa.png +0 -0
  839. data/vendor/extensions/localization/public/images/flags/sb.png +0 -0
  840. data/vendor/extensions/localization/public/images/flags/sc.png +0 -0
  841. data/vendor/extensions/localization/public/images/flags/scotland.png +0 -0
  842. data/vendor/extensions/localization/public/images/flags/sd.png +0 -0
  843. data/vendor/extensions/localization/public/images/flags/se.png +0 -0
  844. data/vendor/extensions/localization/public/images/flags/sg.png +0 -0
  845. data/vendor/extensions/localization/public/images/flags/sh.png +0 -0
  846. data/vendor/extensions/localization/public/images/flags/si.png +0 -0
  847. data/vendor/extensions/localization/public/images/flags/sj.png +0 -0
  848. data/vendor/extensions/localization/public/images/flags/sk.png +0 -0
  849. data/vendor/extensions/localization/public/images/flags/sl.png +0 -0
  850. data/vendor/extensions/localization/public/images/flags/sm.png +0 -0
  851. data/vendor/extensions/localization/public/images/flags/sn.png +0 -0
  852. data/vendor/extensions/localization/public/images/flags/so.png +0 -0
  853. data/vendor/extensions/localization/public/images/flags/sr.png +0 -0
  854. data/vendor/extensions/localization/public/images/flags/st.png +0 -0
  855. data/vendor/extensions/localization/public/images/flags/sv.png +0 -0
  856. data/vendor/extensions/localization/public/images/flags/sy.png +0 -0
  857. data/vendor/extensions/localization/public/images/flags/sz.png +0 -0
  858. data/vendor/extensions/localization/public/images/flags/tc.png +0 -0
  859. data/vendor/extensions/localization/public/images/flags/td.png +0 -0
  860. data/vendor/extensions/localization/public/images/flags/tf.png +0 -0
  861. data/vendor/extensions/localization/public/images/flags/tg.png +0 -0
  862. data/vendor/extensions/localization/public/images/flags/th.png +0 -0
  863. data/vendor/extensions/localization/public/images/flags/tj.png +0 -0
  864. data/vendor/extensions/localization/public/images/flags/tk.png +0 -0
  865. data/vendor/extensions/localization/public/images/flags/tl.png +0 -0
  866. data/vendor/extensions/localization/public/images/flags/tm.png +0 -0
  867. data/vendor/extensions/localization/public/images/flags/tn.png +0 -0
  868. data/vendor/extensions/localization/public/images/flags/to.png +0 -0
  869. data/vendor/extensions/localization/public/images/flags/tr.png +0 -0
  870. data/vendor/extensions/localization/public/images/flags/tt.png +0 -0
  871. data/vendor/extensions/localization/public/images/flags/tv.png +0 -0
  872. data/vendor/extensions/localization/public/images/flags/tw.png +0 -0
  873. data/vendor/extensions/localization/public/images/flags/tz.png +0 -0
  874. data/vendor/extensions/localization/public/images/flags/ua.png +0 -0
  875. data/vendor/extensions/localization/public/images/flags/ug.png +0 -0
  876. data/vendor/extensions/localization/public/images/flags/um.png +0 -0
  877. data/vendor/extensions/localization/public/images/flags/us.png +0 -0
  878. data/vendor/extensions/localization/public/images/flags/uy.png +0 -0
  879. data/vendor/extensions/localization/public/images/flags/uz.png +0 -0
  880. data/vendor/extensions/localization/public/images/flags/va.png +0 -0
  881. data/vendor/extensions/localization/public/images/flags/vc.png +0 -0
  882. data/vendor/extensions/localization/public/images/flags/ve.png +0 -0
  883. data/vendor/extensions/localization/public/images/flags/vg.png +0 -0
  884. data/vendor/extensions/localization/public/images/flags/vi.png +0 -0
  885. data/vendor/extensions/localization/public/images/flags/vn.png +0 -0
  886. data/vendor/extensions/localization/public/images/flags/vu.png +0 -0
  887. data/vendor/extensions/localization/public/images/flags/wales.png +0 -0
  888. data/vendor/extensions/localization/public/images/flags/wf.png +0 -0
  889. data/vendor/extensions/localization/public/images/flags/ws.png +0 -0
  890. data/vendor/extensions/localization/public/images/flags/ye.png +0 -0
  891. data/vendor/extensions/localization/public/images/flags/yt.png +0 -0
  892. data/vendor/extensions/localization/public/images/flags/za.png +0 -0
  893. data/vendor/extensions/localization/public/images/flags/zm.png +0 -0
  894. data/vendor/extensions/localization/public/images/flags/zw.png +0 -0
  895. data/vendor/extensions/localization/spec/controllers/admin/localization_controller_spec.rb +10 -0
  896. data/vendor/extensions/localization/spec/controllers/locale_controller_spec.rb +35 -0
  897. data/vendor/extensions/localization/spec/helpers/locale_helper_spec.rb +5 -0
  898. data/vendor/extensions/localization/spec/helpers/localization_helper_spec.rb +5 -0
  899. data/vendor/{plugins/rspec_on_rails/generators/rspec/templates → extensions/localization/spec}/spec.opts +0 -0
  900. data/vendor/extensions/localization/spec/spec_helper.rb +37 -0
  901. data/vendor/extensions/payment_gateway/README_PAYPAL.markdown +21 -0
  902. data/vendor/extensions/payment_gateway/app/controllers/admin/gateway_configurations_controller.rb +2 -0
  903. data/vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb +2 -0
  904. data/vendor/extensions/payment_gateway/app/controllers/admin/gateways_controller.rb +1 -0
  905. data/vendor/extensions/payment_gateway/app/views/admin/gateway_configurations/_form.html.erb +3 -3
  906. data/vendor/extensions/payment_gateway/db/migrate/{001_create_gateway_configurations.rb → 20080620120002_create_gateway_configurations.rb} +0 -0
  907. data/vendor/extensions/payment_gateway/db/migrate/{002_create_gateways.rb → 20080620120003_create_gateways.rb} +0 -0
  908. data/vendor/extensions/payment_gateway/db/migrate/{003_create_gateway_options.rb → 20080620120004_create_gateway_options.rb} +0 -0
  909. data/vendor/extensions/payment_gateway/db/migrate/{004_create_gateway_option_values.rb → 20080620120005_create_gateway_option_values.rb} +0 -0
  910. data/vendor/extensions/payment_gateway/db/migrate/{005_create_bogus_gateway.rb → 20080620120006_create_bogus_gateway.rb} +0 -0
  911. data/vendor/extensions/payment_gateway/db/migrate/{006_create_linkpoint_gateway.rb → 20080620120007_create_linkpoint_gateway.rb} +0 -0
  912. data/vendor/extensions/payment_gateway/db/migrate/20080703120008_create_paypal_gateway.rb +19 -0
  913. data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +60 -2
  914. data/vendor/extensions/payment_gateway/lib/tasks/payment_gateway_extension_tasks.rake +1 -11
  915. data/vendor/extensions/payment_gateway/payment_gateway_extension.rb +9 -2
  916. data/vendor/extensions/payment_gateway/spec/helpers/admin/gateways_helper_spec.rb +0 -5
  917. data/vendor/extensions/payment_gateway/spec/models/creditcard_payment_spec.rb +24 -0
  918. data/vendor/extensions/payment_gateway/spec/models/order_spec.rb +42 -0
  919. data/vendor/extensions/tax_calculator/app/controllers/admin/tax_rates_controller.rb +19 -3
  920. data/vendor/extensions/tax_calculator/app/models/tax_rate.rb +7 -4
  921. data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/_form.html.erb +14 -4
  922. data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/edit.html.erb +2 -1
  923. data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/index.html.erb +14 -10
  924. data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/new.html.erb +3 -5
  925. data/vendor/extensions/tax_calculator/db/migrate/20080620100001_create_tax_rates.rb +13 -0
  926. data/vendor/extensions/tax_calculator/db/migrate/20080704192456_update_tax_rates_add_zones_etc.rb +17 -0
  927. data/vendor/extensions/tax_calculator/lang/en-US.yml +11 -0
  928. data/vendor/extensions/tax_calculator/lang/pt-BR.yml +11 -0
  929. data/vendor/extensions/tax_calculator/lib/spree/sales_tax_calculator.rb +23 -0
  930. data/vendor/extensions/tax_calculator/lib/spree/tax/config.rb +22 -0
  931. data/vendor/extensions/tax_calculator/lib/spree/tax_calculator.rb +15 -14
  932. data/vendor/extensions/tax_calculator/lib/spree/vat_calculator.rb +47 -0
  933. data/vendor/extensions/tax_calculator/lib/tasks/tax_calculator_extension_tasks.rake +0 -10
  934. data/vendor/extensions/tax_calculator/lib/tax_configuration.rb +7 -0
  935. data/vendor/extensions/tax_calculator/spec/controllers/tax_calculator_spec.rb +3 -20
  936. data/vendor/extensions/tax_calculator/spec/helpers/admin/tax_rates_helper_spec.rb +1 -6
  937. data/vendor/extensions/tax_calculator/spec/helpers/products_helper_spec.rb +85 -0
  938. data/vendor/extensions/tax_calculator/spec/models/order_spec.rb +22 -0
  939. data/vendor/extensions/tax_calculator/spec/models/sales_tax_calculator_spec.rb +53 -0
  940. data/vendor/extensions/tax_calculator/spec/models/tax_calculator_spec.rb +54 -0
  941. data/vendor/extensions/tax_calculator/spec/models/tax_rate_spec.rb +5 -14
  942. data/vendor/extensions/tax_calculator/spec/models/vat_calculator_spec.rb +56 -0
  943. data/vendor/extensions/tax_calculator/tax_calculator_extension.rb +29 -3
  944. data/vendor/gems/active_presenter-0.0.4/LICENSE +22 -0
  945. data/vendor/gems/active_presenter-0.0.4/README +75 -0
  946. data/vendor/gems/active_presenter-0.0.4/Rakefile +10 -0
  947. data/vendor/gems/active_presenter-0.0.4/lib/active_presenter.rb +7 -0
  948. data/vendor/gems/active_presenter-0.0.4/lib/active_presenter/base.rb +174 -0
  949. data/vendor/gems/active_presenter-0.0.4/lib/active_presenter/version.rb +9 -0
  950. data/vendor/gems/active_presenter-0.0.4/lib/tasks/doc.rake +19 -0
  951. data/vendor/gems/active_presenter-0.0.4/lib/tasks/gem.rake +62 -0
  952. data/vendor/gems/active_presenter-0.0.4/test/base_test.rb +152 -0
  953. data/vendor/gems/active_presenter-0.0.4/test/test_helper.rb +38 -0
  954. data/vendor/plugins/acts_as_adjacency_list/MIT-LICENSE +20 -0
  955. data/vendor/plugins/acts_as_adjacency_list/README +13 -0
  956. data/vendor/plugins/acts_as_adjacency_list/Rakefile +22 -0
  957. data/vendor/plugins/acts_as_adjacency_list/init.rb +9 -0
  958. data/vendor/{rails/railties/lib/rails_generator/generators/components/plugin/templates → plugins/acts_as_adjacency_list}/install.rb +0 -0
  959. data/vendor/plugins/acts_as_adjacency_list/lib/active_record/acts/adjacency_list.rb +237 -0
  960. data/vendor/plugins/acts_as_adjacency_list/tasks/acts_as_adjacency_list_tasks.rake +4 -0
  961. data/vendor/plugins/acts_as_adjacency_list/test/acts_as_adjacency_list_test.rb +293 -0
  962. data/vendor/{rails/railties/lib/rails_generator/generators/components/plugin/templates → plugins/acts_as_adjacency_list}/uninstall.rb +0 -0
  963. data/vendor/plugins/attachment_fu/CHANGELOG +12 -1
  964. data/vendor/plugins/attachment_fu/README +25 -1
  965. data/vendor/plugins/attachment_fu/init.rb +3 -1
  966. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb +171 -108
  967. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb +8 -4
  968. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb +6 -12
  969. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/core_image_processor.rb +59 -0
  970. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/gd2_processor.rb +54 -0
  971. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb +1 -1
  972. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb +12 -9
  973. data/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb +5 -4
  974. data/vendor/plugins/attachment_fu/test/backends/remote/s3_test.rb +17 -1
  975. data/vendor/plugins/attachment_fu/test/base_attachment_tests.rb +20 -0
  976. data/vendor/plugins/attachment_fu/test/basic_test.rb +6 -0
  977. data/vendor/plugins/attachment_fu/test/extra_attachment_test.rb +10 -0
  978. data/vendor/plugins/attachment_fu/test/fixtures/attachment.rb +22 -1
  979. data/vendor/plugins/attachment_fu/test/processors/core_image_test.rb +37 -0
  980. data/vendor/plugins/attachment_fu/test/processors/gd2_test.rb +31 -0
  981. data/vendor/plugins/attachment_fu/test/processors/rmagick_test.rb +19 -5
  982. data/vendor/plugins/attachment_fu/test/schema.rb +22 -0
  983. data/vendor/plugins/attachment_fu/test/test_helper.rb +10 -2
  984. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/color.rb +27 -0
  985. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb +31 -0
  986. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/perspective.rb +25 -0
  987. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/quality.rb +25 -0
  988. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/scale.rb +47 -0
  989. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/watermark.rb +32 -0
  990. data/vendor/plugins/attachment_fu/vendor/red_artisan/core_image/processor.rb +123 -0
  991. data/vendor/plugins/attribute_fu/MIT-LICENSE +20 -0
  992. data/vendor/plugins/attribute_fu/README +115 -0
  993. data/vendor/plugins/attribute_fu/Rakefile +22 -0
  994. data/vendor/plugins/attribute_fu/init.rb +4 -0
  995. data/vendor/plugins/attribute_fu/lib/attribute_fu.rb +2 -0
  996. data/vendor/plugins/attribute_fu/lib/attribute_fu/associated_form_helper.rb +139 -0
  997. data/vendor/plugins/attribute_fu/lib/attribute_fu/associations.rb +124 -0
  998. data/vendor/plugins/attribute_fu/tasks/attribute_fu_tasks.rake +4 -0
  999. data/vendor/{rails/railties/fresh_rakefile → plugins/attribute_fu/test/Rakefile} +0 -0
  1000. data/vendor/plugins/attribute_fu/test/app/controllers/application.rb +10 -0
  1001. data/vendor/{rails/railties → plugins/attribute_fu/test/app}/helpers/application_helper.rb +0 -0
  1002. data/vendor/plugins/attribute_fu/test/app/models/comment.rb +8 -0
  1003. data/vendor/plugins/attribute_fu/test/app/models/photo.rb +3 -0
  1004. data/vendor/plugins/attribute_fu/test/config/boot.rb +97 -0
  1005. data/vendor/plugins/attribute_fu/test/config/database.yml +15 -0
  1006. data/vendor/plugins/attribute_fu/test/config/environment.rb +15 -0
  1007. data/vendor/plugins/attribute_fu/test/config/environments/development.rb +18 -0
  1008. data/vendor/{rails/railties → plugins/attribute_fu/test/config}/environments/test.rb +0 -0
  1009. data/vendor/{rails/railties/configs → plugins/attribute_fu/test/config}/routes.rb +0 -0
  1010. data/vendor/plugins/attribute_fu/test/db/migrate/001_create_photos.rb +14 -0
  1011. data/vendor/plugins/attribute_fu/test/db/migrate/002_create_comments.rb +15 -0
  1012. data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/console +0 -0
  1013. data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/destroy +0 -0
  1014. data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/generate +0 -0
  1015. data/vendor/{rails/railties/bin → plugins/attribute_fu/test/script}/server +0 -0
  1016. data/vendor/plugins/attribute_fu/test/test/test_helper.rb +6 -0
  1017. data/vendor/plugins/attribute_fu/test/test/unit/associated_form_helper_test.rb +376 -0
  1018. data/vendor/plugins/attribute_fu/test/test/unit/comment_test.rb +6 -0
  1019. data/vendor/plugins/attribute_fu/test/test/unit/photo_test.rb +149 -0
  1020. data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/init.rb +3 -0
  1021. data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda.rb +20 -0
  1022. data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/active_record_helpers.rb +338 -0
  1023. data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/context.rb +143 -0
  1024. data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/general.rb +119 -0
  1025. data/vendor/plugins/attribute_fu/test/vendor/plugins/shoulda/lib/shoulda/private_helpers.rb +17 -0
  1026. data/vendor/plugins/attribute_fu/uninstall.rb +1 -0
  1027. data/vendor/plugins/auto_complete/README +23 -0
  1028. data/vendor/plugins/auto_complete/Rakefile +22 -0
  1029. data/vendor/plugins/auto_complete/init.rb +2 -0
  1030. data/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
  1031. data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +142 -0
  1032. data/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
  1033. data/vendor/plugins/enumerable_constants/lib/enumerable_constants.rb +4 -0
  1034. data/vendor/plugins/find_by_param/MIT-LICENSE +20 -0
  1035. data/vendor/plugins/find_by_param/README +48 -0
  1036. data/vendor/plugins/find_by_param/Rakefile +22 -0
  1037. data/vendor/plugins/find_by_param/init.rb +18 -0
  1038. data/vendor/plugins/find_by_param/install.rb +1 -0
  1039. data/vendor/plugins/find_by_param/lib/find_by_param.rb +143 -0
  1040. data/vendor/plugins/find_by_param/tasks/find_by_param_tasks.rake +4 -0
  1041. data/vendor/plugins/find_by_param/test/find_by_param_test.rb +74 -0
  1042. data/vendor/plugins/find_by_param/test/schema.rb +16 -0
  1043. data/vendor/plugins/find_by_param/test/test_helper.rb +17 -0
  1044. data/vendor/plugins/find_by_param/uninstall.rb +1 -0
  1045. data/vendor/plugins/globalite/CHANGELOG +22 -0
  1046. data/vendor/plugins/globalite/README +199 -0
  1047. data/vendor/plugins/globalite/README.rdoc +199 -0
  1048. data/vendor/plugins/globalite/Rakefile +32 -0
  1049. data/vendor/plugins/globalite/globalite.gemspec +14 -0
  1050. data/vendor/plugins/globalite/init.rb +1 -0
  1051. data/vendor/plugins/globalite/install.rb +1 -0
  1052. data/vendor/plugins/globalite/lang/rails/de-DE.yml +357 -0
  1053. data/vendor/plugins/globalite/lang/rails/en-UK.yml +357 -0
  1054. data/vendor/plugins/globalite/lang/rails/en-US.yml +357 -0
  1055. data/vendor/plugins/globalite/lang/rails/es-AR.yml +357 -0
  1056. data/vendor/plugins/globalite/lang/rails/es-ES.yml +359 -0
  1057. data/vendor/plugins/globalite/lang/rails/fi-FI.yml +357 -0
  1058. data/vendor/plugins/globalite/lang/rails/fr-FR.yml +359 -0
  1059. data/vendor/plugins/globalite/lang/rails/hu-HU.yml +357 -0
  1060. data/vendor/plugins/globalite/lang/rails/it.yml +358 -0
  1061. data/vendor/plugins/globalite/lang/rails/nl-NL.yml +347 -0
  1062. data/vendor/plugins/globalite/lang/rails/pl-PL.yml +358 -0
  1063. data/vendor/plugins/globalite/lang/rails/pt-BR.yml +324 -0
  1064. data/vendor/plugins/globalite/lang/rails/pt-PT.yml +324 -0
  1065. data/vendor/plugins/globalite/lang/rails/ru-RU.yml +357 -0
  1066. data/vendor/plugins/globalite/lang/rails/sr-CP.yml +357 -0
  1067. data/vendor/plugins/globalite/lang/rails/sr-SR.yml +357 -0
  1068. data/vendor/plugins/globalite/lang/rails/tr.yml +186 -0
  1069. data/vendor/plugins/globalite/lang/rails/zh-CN.yml +357 -0
  1070. data/vendor/plugins/globalite/lang/rails/zh-HK.yml +357 -0
  1071. data/vendor/plugins/globalite/lang/rails/zh-TW.yml +357 -0
  1072. data/vendor/plugins/globalite/lib/globalite.rb +28 -0
  1073. data/vendor/plugins/globalite/lib/globalite/l10n.rb +302 -0
  1074. data/vendor/plugins/globalite/lib/globalite/locale.rb +56 -0
  1075. data/vendor/plugins/globalite/lib/rails/core_ext.rb +19 -0
  1076. data/vendor/plugins/globalite/lib/rails/localization.rb +58 -0
  1077. data/vendor/plugins/globalite/lib/rails/localized_action_view.rb +211 -0
  1078. data/vendor/plugins/globalite/lib/rails/localized_active_record.rb +80 -0
  1079. data/vendor/plugins/globalite/spec/core_localization_spec.rb +116 -0
  1080. data/vendor/plugins/globalite/spec/helpers/spec_helper.rb +16 -0
  1081. data/vendor/plugins/globalite/spec/l10n_spec.rb +251 -0
  1082. data/vendor/plugins/globalite/spec/lang/rails/zz.yml +13 -0
  1083. data/vendor/plugins/globalite/spec/lang/ui/en-UK.yml +3 -0
  1084. data/vendor/plugins/globalite/spec/lang/ui/en-US.yml +3 -0
  1085. data/vendor/plugins/globalite/spec/lang/ui/es.yml +3 -0
  1086. data/vendor/plugins/globalite/spec/lang/ui/fr-FR.yml +8 -0
  1087. data/vendor/plugins/globalite/tasks/cruise.rake +4 -0
  1088. data/vendor/plugins/globalite/tasks/globalite_tasks.rake +47 -0
  1089. data/vendor/plugins/globalite/uninstall.rb +1 -0
  1090. data/vendor/plugins/in_place_editing/lib/in_place_macros_helper.rb +7 -1
  1091. data/vendor/plugins/in_place_editing/test/in_place_editing_test.rb +25 -5
  1092. data/vendor/plugins/resource_controller/LICENSE +1 -1
  1093. data/vendor/plugins/resource_controller/README.rdoc +282 -0
  1094. data/vendor/plugins/resource_controller/Rakefile +14 -1
  1095. data/vendor/plugins/resource_controller/TODO +1 -0
  1096. data/vendor/plugins/resource_controller/generators/scaffold_resource/scaffold_resource_generator.rb +99 -34
  1097. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/functional_spec.rb +255 -0
  1098. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/helper_spec.rb +11 -0
  1099. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/routing_spec.rb +61 -0
  1100. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/unit_spec.rb +11 -0
  1101. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/edit_spec.rb +28 -0
  1102. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/index_spec.rb +26 -0
  1103. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/new_spec.rb +30 -0
  1104. data/vendor/plugins/resource_controller/generators/scaffold_resource/templates/rspec/views/show_spec.rb +25 -0
  1105. data/vendor/plugins/resource_controller/init.rb +1 -6
  1106. data/vendor/plugins/resource_controller/lib/resource_controller.rb +15 -6
  1107. data/vendor/plugins/resource_controller/lib/resource_controller/accessors.rb +11 -14
  1108. data/vendor/plugins/resource_controller/lib/resource_controller/action_options.rb +12 -0
  1109. data/vendor/plugins/resource_controller/lib/resource_controller/class_methods.rb +3 -1
  1110. data/vendor/plugins/resource_controller/lib/resource_controller/controller.rb +10 -4
  1111. data/vendor/plugins/resource_controller/lib/resource_controller/failable_action_options.rb +9 -1
  1112. data/vendor/plugins/resource_controller/lib/resource_controller/helpers/current_objects.rb +11 -1
  1113. data/vendor/plugins/resource_controller/lib/resource_controller/helpers/internal.rb +19 -2
  1114. data/vendor/plugins/resource_controller/lib/resource_controller/helpers/nested.rb +27 -3
  1115. data/vendor/plugins/resource_controller/lib/resource_controller/helpers/singleton_customizations.rb +60 -0
  1116. data/vendor/plugins/resource_controller/lib/resource_controller/helpers/urls.rb +6 -2
  1117. data/vendor/plugins/resource_controller/lib/resource_controller/response_collector.rb +6 -0
  1118. data/vendor/plugins/resource_controller/lib/resource_controller/singleton.rb +15 -0
  1119. data/vendor/plugins/resource_controller/lib/resource_controller/version.rb +9 -0
  1120. data/vendor/plugins/resource_controller/rails/init.rb +6 -0
  1121. data/vendor/plugins/resource_controller/resource_controller.gemspec +343 -0
  1122. data/vendor/plugins/resource_controller/test/Rakefile +10 -0
  1123. data/vendor/plugins/resource_controller/test/app/controllers/accounts_controller.rb +6 -0
  1124. data/vendor/plugins/resource_controller/test/app/controllers/application.rb +7 -0
  1125. data/vendor/plugins/resource_controller/test/app/controllers/cms/options_controller.rb +3 -0
  1126. data/vendor/plugins/resource_controller/test/app/controllers/cms/products_controller.rb +3 -0
  1127. data/vendor/plugins/resource_controller/test/app/controllers/comments_controller.rb +3 -0
  1128. data/vendor/plugins/resource_controller/test/app/controllers/images_controller.rb +4 -0
  1129. data/vendor/plugins/resource_controller/test/app/controllers/options_controller.rb +8 -0
  1130. data/vendor/plugins/resource_controller/test/app/controllers/people_controller.rb +9 -0
  1131. data/vendor/plugins/resource_controller/test/app/controllers/photos_controller.rb +11 -0
  1132. data/vendor/plugins/resource_controller/test/app/controllers/posts_controller.rb +10 -0
  1133. data/vendor/plugins/resource_controller/test/app/controllers/projects_controller.rb +3 -0
  1134. data/vendor/plugins/resource_controller/test/app/controllers/somethings_controller.rb +3 -0
  1135. data/vendor/plugins/resource_controller/test/app/controllers/tags_controller.rb +13 -0
  1136. data/vendor/plugins/resource_controller/test/app/controllers/users_controller.rb +12 -0
  1137. data/vendor/plugins/resource_controller/test/app/helpers/accounts_helper.rb +2 -0
  1138. data/vendor/plugins/resource_controller/test/app/helpers/application_helper.rb +3 -0
  1139. data/vendor/plugins/resource_controller/test/app/helpers/cms/products_helper.rb +2 -0
  1140. data/vendor/plugins/resource_controller/test/app/helpers/comments_helper.rb +2 -0
  1141. data/vendor/plugins/resource_controller/test/app/helpers/images_helper.rb +2 -0
  1142. data/vendor/plugins/resource_controller/test/app/helpers/options_helper.rb +2 -0
  1143. data/vendor/plugins/resource_controller/test/app/helpers/people_helper.rb +2 -0
  1144. data/vendor/plugins/resource_controller/test/app/helpers/photos_helper.rb +2 -0
  1145. data/vendor/plugins/resource_controller/test/app/helpers/posts_helper.rb +2 -0
  1146. data/vendor/plugins/resource_controller/test/app/helpers/projects_helper.rb +2 -0
  1147. data/vendor/plugins/resource_controller/test/app/helpers/somethings_helper.rb +2 -0
  1148. data/vendor/plugins/resource_controller/test/app/helpers/tags_helper.rb +2 -0
  1149. data/vendor/plugins/resource_controller/test/app/helpers/users_helper.rb +2 -0
  1150. data/vendor/plugins/resource_controller/test/app/models/account.rb +4 -0
  1151. data/vendor/plugins/resource_controller/test/app/models/comment.rb +3 -0
  1152. data/vendor/plugins/resource_controller/test/app/models/image.rb +3 -0
  1153. data/vendor/plugins/resource_controller/test/app/models/option.rb +3 -0
  1154. data/vendor/plugins/resource_controller/test/app/models/photo.rb +4 -0
  1155. data/vendor/plugins/resource_controller/test/app/models/post.rb +3 -0
  1156. data/vendor/plugins/resource_controller/test/app/models/product.rb +3 -0
  1157. data/vendor/plugins/resource_controller/test/app/models/project.rb +2 -0
  1158. data/vendor/plugins/resource_controller/test/app/models/something.rb +2 -0
  1159. data/vendor/plugins/resource_controller/test/app/models/tag.rb +3 -0
  1160. data/vendor/plugins/resource_controller/test/app/models/user.rb +3 -0
  1161. data/vendor/plugins/resource_controller/test/app/views/accounts/_form.html.erb +4 -0
  1162. data/vendor/plugins/resource_controller/test/app/views/accounts/edit.html.erb +14 -0
  1163. data/vendor/plugins/resource_controller/test/app/views/accounts/new.html.erb +12 -0
  1164. data/vendor/plugins/resource_controller/test/app/views/accounts/show.html.erb +5 -0
  1165. data/vendor/plugins/resource_controller/test/app/views/cms/options/edit.rhtml +17 -0
  1166. data/vendor/plugins/resource_controller/test/app/views/cms/options/index.rhtml +20 -0
  1167. data/vendor/plugins/resource_controller/test/app/views/cms/options/new.rhtml +16 -0
  1168. data/vendor/plugins/resource_controller/test/app/views/cms/options/show.rhtml +8 -0
  1169. data/vendor/plugins/resource_controller/test/app/views/cms/products/edit.rhtml +17 -0
  1170. data/vendor/plugins/resource_controller/test/app/views/cms/products/index.rhtml +20 -0
  1171. data/vendor/plugins/resource_controller/test/app/views/cms/products/new.rhtml +16 -0
  1172. data/vendor/plugins/resource_controller/test/app/views/cms/products/show.rhtml +8 -0
  1173. data/vendor/plugins/resource_controller/test/app/views/comments/edit.rhtml +27 -0
  1174. data/vendor/plugins/resource_controller/test/app/views/comments/index.rhtml +24 -0
  1175. data/vendor/plugins/resource_controller/test/app/views/comments/new.rhtml +26 -0
  1176. data/vendor/plugins/resource_controller/test/app/views/comments/show.rhtml +18 -0
  1177. data/vendor/plugins/resource_controller/test/app/views/images/_form.html.erb +4 -0
  1178. data/vendor/plugins/resource_controller/test/app/views/images/edit.html.erb +14 -0
  1179. data/vendor/plugins/resource_controller/test/app/views/images/new.html.erb +12 -0
  1180. data/vendor/plugins/resource_controller/test/app/views/layouts/application.rhtml +17 -0
  1181. data/vendor/plugins/resource_controller/test/app/views/layouts/comments.rhtml +17 -0
  1182. data/vendor/plugins/resource_controller/test/app/views/layouts/options.rhtml +17 -0
  1183. data/vendor/plugins/resource_controller/test/app/views/layouts/people.rhtml +17 -0
  1184. data/vendor/plugins/resource_controller/test/app/views/layouts/photos.rhtml +17 -0
  1185. data/vendor/plugins/resource_controller/test/app/views/layouts/projects.rhtml +17 -0
  1186. data/vendor/plugins/resource_controller/test/app/views/layouts/somethings.rhtml +17 -0
  1187. data/vendor/plugins/resource_controller/test/app/views/layouts/tags.rhtml +17 -0
  1188. data/vendor/plugins/resource_controller/test/app/views/options/_form.html.erb +8 -0
  1189. data/vendor/plugins/resource_controller/test/app/views/options/edit.html.erb +16 -0
  1190. data/vendor/plugins/resource_controller/test/app/views/options/index.html.erb +21 -0
  1191. data/vendor/plugins/resource_controller/test/app/views/options/new.html.erb +12 -0
  1192. data/vendor/plugins/resource_controller/test/app/views/options/show.html.erb +10 -0
  1193. data/vendor/plugins/resource_controller/test/app/views/people/edit.rhtml +17 -0
  1194. data/vendor/plugins/resource_controller/test/app/views/people/index.rhtml +20 -0
  1195. data/vendor/plugins/resource_controller/test/app/views/people/new.rhtml +16 -0
  1196. data/vendor/plugins/resource_controller/test/app/views/people/show.rhtml +8 -0
  1197. data/vendor/plugins/resource_controller/test/app/views/photos/edit.rhtml +17 -0
  1198. data/vendor/plugins/resource_controller/test/app/views/photos/index.rhtml +20 -0
  1199. data/vendor/plugins/resource_controller/test/app/views/photos/new.rhtml +16 -0
  1200. data/vendor/plugins/resource_controller/test/app/views/photos/show.rhtml +8 -0
  1201. data/vendor/plugins/resource_controller/test/app/views/posts/edit.rhtml +22 -0
  1202. data/vendor/plugins/resource_controller/test/app/views/posts/index.rhtml +22 -0
  1203. data/vendor/plugins/resource_controller/test/app/views/posts/new.rhtml +21 -0
  1204. data/vendor/plugins/resource_controller/test/app/views/posts/show.rhtml +13 -0
  1205. data/vendor/plugins/resource_controller/test/app/views/projects/edit.rhtml +17 -0
  1206. data/vendor/plugins/resource_controller/test/app/views/projects/index.rhtml +20 -0
  1207. data/vendor/plugins/resource_controller/test/app/views/projects/new.rhtml +16 -0
  1208. data/vendor/plugins/resource_controller/test/app/views/projects/show.rhtml +8 -0
  1209. data/vendor/plugins/resource_controller/test/app/views/somethings/edit.rhtml +17 -0
  1210. data/vendor/plugins/resource_controller/test/app/views/somethings/index.rhtml +20 -0
  1211. data/vendor/plugins/resource_controller/test/app/views/somethings/new.rhtml +16 -0
  1212. data/vendor/plugins/resource_controller/test/app/views/somethings/show.rhtml +8 -0
  1213. data/vendor/plugins/resource_controller/test/app/views/tags/edit.rhtml +17 -0
  1214. data/vendor/plugins/resource_controller/test/app/views/tags/index.rhtml +20 -0
  1215. data/{foozah/public/favicon.ico → vendor/plugins/resource_controller/test/app/views/tags/index.rjs} +0 -0
  1216. data/vendor/plugins/resource_controller/test/app/views/tags/new.rhtml +16 -0
  1217. data/vendor/plugins/resource_controller/test/app/views/tags/show.rhtml +8 -0
  1218. data/vendor/plugins/resource_controller/test/app/views/users/edit.rhtml +17 -0
  1219. data/vendor/plugins/resource_controller/test/app/views/users/index.rhtml +20 -0
  1220. data/vendor/plugins/resource_controller/test/app/views/users/new.rhtml +16 -0
  1221. data/vendor/plugins/resource_controller/test/app/views/users/show.rhtml +8 -0
  1222. data/vendor/plugins/resource_controller/test/config/boot.rb +109 -0
  1223. data/vendor/plugins/resource_controller/test/config/environment.rb +64 -0
  1224. data/vendor/plugins/resource_controller/test/config/environments/development.rb +21 -0
  1225. data/{foozah → vendor/plugins/resource_controller/test}/config/environments/test.rb +0 -0
  1226. data/vendor/plugins/resource_controller/test/config/routes.rb +58 -0
  1227. data/vendor/plugins/resource_controller/test/db/migrate/001_create_posts.rb +12 -0
  1228. data/vendor/plugins/resource_controller/test/db/migrate/002_create_products.rb +11 -0
  1229. data/vendor/plugins/resource_controller/test/db/migrate/003_create_comments.rb +13 -0
  1230. data/vendor/plugins/resource_controller/test/db/migrate/004_create_options.rb +13 -0
  1231. data/vendor/plugins/resource_controller/test/db/migrate/005_create_photos.rb +11 -0
  1232. data/vendor/plugins/resource_controller/test/db/migrate/006_create_tags.rb +17 -0
  1233. data/vendor/plugins/resource_controller/test/db/migrate/007_create_somethings.rb +11 -0
  1234. data/vendor/plugins/resource_controller/test/db/migrate/008_create_accounts.rb +11 -0
  1235. data/vendor/plugins/resource_controller/test/db/migrate/009_add_account_id_to_photos.rb +9 -0
  1236. data/vendor/plugins/resource_controller/test/db/migrate/010_create_projects.rb +11 -0
  1237. data/vendor/plugins/resource_controller/test/db/migrate/011_create_images.rb +12 -0
  1238. data/vendor/plugins/resource_controller/test/db/migrate/012_create_users.rb +11 -0
  1239. data/{foozah → vendor/plugins/resource_controller/test}/script/console +0 -0
  1240. data/vendor/plugins/resource_controller/test/script/destroy +3 -0
  1241. data/vendor/plugins/resource_controller/test/script/generate +3 -0
  1242. data/{foozah → vendor/plugins/resource_controller/test}/script/server +0 -0
  1243. data/vendor/plugins/resource_controller/test/test/fixtures/accounts.yml +7 -0
  1244. data/vendor/plugins/resource_controller/test/test/fixtures/comments.yml +11 -0
  1245. data/vendor/plugins/resource_controller/test/test/fixtures/images.yml +6 -0
  1246. data/vendor/plugins/resource_controller/test/test/fixtures/options.yml +9 -0
  1247. data/vendor/plugins/resource_controller/test/test/fixtures/photos.yml +9 -0
  1248. data/vendor/plugins/resource_controller/test/test/fixtures/photos_tags.yml +3 -0
  1249. data/vendor/plugins/resource_controller/test/test/fixtures/posts.yml +9 -0
  1250. data/vendor/plugins/resource_controller/test/test/fixtures/products.yml +7 -0
  1251. data/vendor/plugins/resource_controller/test/test/fixtures/projects.yml +7 -0
  1252. data/vendor/plugins/resource_controller/test/test/fixtures/somethings.yml +7 -0
  1253. data/vendor/plugins/resource_controller/test/test/fixtures/tags.yml +7 -0
  1254. data/vendor/plugins/resource_controller/test/test/fixtures/users.yml +5 -0
  1255. data/vendor/plugins/resource_controller/test/test/functional/cms/options_controller_test.rb +23 -0
  1256. data/vendor/plugins/resource_controller/test/test/functional/cms/products_controller_test.rb +23 -0
  1257. data/vendor/plugins/resource_controller/test/test/functional/comments_controller_test.rb +26 -0
  1258. data/vendor/plugins/resource_controller/test/test/functional/images_controller_test.rb +37 -0
  1259. data/vendor/plugins/resource_controller/test/test/functional/people_controller_test.rb +34 -0
  1260. data/vendor/plugins/resource_controller/test/test/functional/photos_controller_test.rb +130 -0
  1261. data/vendor/plugins/resource_controller/test/test/functional/posts_controller_test.rb +34 -0
  1262. data/vendor/plugins/resource_controller/test/test/functional/projects_controller_test.rb +18 -0
  1263. data/vendor/plugins/resource_controller/test/test/functional/somethings_controller_test.rb +28 -0
  1264. data/vendor/plugins/resource_controller/test/test/functional/tags_controller_test.rb +64 -0
  1265. data/vendor/plugins/resource_controller/test/test/functional/users_controller_test.rb +24 -0
  1266. data/vendor/plugins/resource_controller/test/test/test_helper.rb +12 -0
  1267. data/vendor/plugins/resource_controller/test/test/unit/accessors_test.rb +110 -0
  1268. data/vendor/plugins/resource_controller/test/test/unit/account_test.rb +7 -0
  1269. data/vendor/plugins/resource_controller/test/test/unit/action_options_test.rb +109 -0
  1270. data/vendor/plugins/resource_controller/test/test/unit/base_test.rb +11 -0
  1271. data/vendor/plugins/resource_controller/test/test/unit/comment_test.rb +10 -0
  1272. data/vendor/plugins/resource_controller/test/test/unit/failable_action_options_test.rb +77 -0
  1273. data/vendor/plugins/resource_controller/test/test/unit/helpers/current_objects_test.rb +133 -0
  1274. data/vendor/plugins/resource_controller/test/test/unit/helpers/internal_test.rb +106 -0
  1275. data/vendor/plugins/resource_controller/test/test/unit/helpers/nested_test.rb +86 -0
  1276. data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_current_objects_test.rb +68 -0
  1277. data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_nested_test.rb +77 -0
  1278. data/vendor/plugins/resource_controller/test/test/unit/helpers/singleton_urls_test.rb +67 -0
  1279. data/vendor/plugins/resource_controller/test/test/unit/helpers/urls_test.rb +75 -0
  1280. data/vendor/plugins/resource_controller/test/test/unit/helpers_test.rb +25 -0
  1281. data/vendor/plugins/resource_controller/test/test/unit/image_test.rb +7 -0
  1282. data/vendor/plugins/resource_controller/test/test/unit/option_test.rb +10 -0
  1283. data/vendor/plugins/resource_controller/test/test/unit/photo_test.rb +10 -0
  1284. data/vendor/plugins/resource_controller/test/test/unit/post_test.rb +10 -0
  1285. data/vendor/plugins/resource_controller/test/test/unit/project_test.rb +10 -0
  1286. data/vendor/plugins/resource_controller/test/test/unit/response_collector_test.rb +49 -0
  1287. data/vendor/plugins/resource_controller/test/test/unit/something_test.rb +10 -0
  1288. data/vendor/plugins/resource_controller/test/test/unit/tag_test.rb +10 -0
  1289. data/vendor/plugins/resource_controller/test/test/unit/urligence_test.rb +203 -0
  1290. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/Rakefile +32 -0
  1291. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/bin/convert_to_should_syntax +40 -0
  1292. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/init.rb +3 -0
  1293. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda.rb +43 -0
  1294. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/active_record_helpers.rb +580 -0
  1295. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/color.rb +77 -0
  1296. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/controller_tests.rb +467 -0
  1297. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/formats/html.rb +201 -0
  1298. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/controller_tests/formats/xml.rb +170 -0
  1299. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/gem/proc_extensions.rb +14 -0
  1300. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb +239 -0
  1301. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/general.rb +118 -0
  1302. data/vendor/plugins/resource_controller/test/vendor/plugins/shoulda/lib/shoulda/private_helpers.rb +22 -0
  1303. data/vendor/plugins/rspec-rails/CHANGES +26 -0
  1304. data/vendor/plugins/{rspec_on_rails → rspec-rails}/MIT-LICENSE +0 -0
  1305. data/vendor/plugins/{rspec_on_rails → rspec-rails}/README +0 -0
  1306. data/vendor/plugins/rspec-rails/Rakefile +64 -0
  1307. data/vendor/plugins/rspec-rails/UPGRADE +7 -0
  1308. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/CHANGES +0 -0
  1309. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/rspec_generator.rb +0 -0
  1310. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/all_stories.rb +0 -0
  1311. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/previous_failures.txt +0 -0
  1312. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/rcov.opts +0 -0
  1313. data/{foozah → vendor/plugins/rspec-rails/generators/rspec/templates}/script/spec +0 -0
  1314. data/vendor/plugins/rspec-rails/generators/rspec/templates/script/spec_server +116 -0
  1315. data/vendor/plugins/rspec-rails/generators/rspec/templates/spec.opts +4 -0
  1316. data/vendor/plugins/rspec-rails/generators/rspec/templates/spec_helper.rb +47 -0
  1317. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec/templates/stories_helper.rb +0 -0
  1318. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/USAGE +0 -0
  1319. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_controller/rspec_controller_generator.rb +0 -0
  1320. data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb +25 -0
  1321. data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb +11 -0
  1322. data/vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb +12 -0
  1323. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_model/USAGE +0 -0
  1324. data/vendor/plugins/{rspec_on_rails → rspec-rails}/generators/rspec_model/rspec_model_generator.rb +0 -0
  1325. data/vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb +15 -0
  1326. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +166 -0
  1327. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/controller_spec.rb +327 -0
  1328. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +26 -0
  1329. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/helper_spec.rb +11 -0
  1330. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/index_erb_spec.rb +27 -0
  1331. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/new_erb_spec.rb +26 -0
  1332. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/routing_spec.rb +61 -0
  1333. data/vendor/plugins/rspec-rails/generators/rspec_scaffold/templates/show_erb_spec.rb +23 -0
  1334. data/vendor/plugins/{rspec_on_rails → rspec-rails}/init.rb +0 -0
  1335. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/autotest/discover.rb +0 -0
  1336. data/vendor/plugins/rspec-rails/lib/autotest/rails_rspec.rb +81 -0
  1337. data/vendor/plugins/rspec-rails/lib/spec/rails.rb +52 -0
  1338. data/vendor/plugins/rspec-rails/lib/spec/rails/example.rb +46 -0
  1339. data/vendor/plugins/rspec-rails/lib/spec/rails/example/assigns_hash_proxy.rb +43 -0
  1340. data/vendor/plugins/rspec-rails/lib/spec/rails/example/controller_example_group.rb +271 -0
  1341. data/vendor/plugins/rspec-rails/lib/spec/rails/example/functional_example_group.rb +59 -0
  1342. data/vendor/plugins/rspec-rails/lib/spec/rails/example/helper_example_group.rb +164 -0
  1343. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/example/model_example_group.rb +0 -0
  1344. data/vendor/plugins/rspec-rails/lib/spec/rails/example/rails_example_group.rb +29 -0
  1345. data/vendor/plugins/rspec-rails/lib/spec/rails/example/render_observer.rb +90 -0
  1346. data/vendor/plugins/rspec-rails/lib/spec/rails/example/view_example_group.rb +178 -0
  1347. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions.rb +0 -0
  1348. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/base.rb +0 -0
  1349. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/rescue.rb +0 -0
  1350. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_controller/test_response.rb +0 -0
  1351. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/action_view/base.rb +0 -0
  1352. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/active_record/base.rb +0 -0
  1353. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/object.rb +0 -0
  1354. data/vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/example/configuration.rb +71 -0
  1355. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/extensions/spec/matchers/have.rb +0 -0
  1356. data/vendor/plugins/rspec-rails/lib/spec/rails/matchers.rb +30 -0
  1357. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/assert_select.rb +0 -0
  1358. data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/have_text.rb +57 -0
  1359. data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/include_text.rb +54 -0
  1360. data/vendor/plugins/rspec-rails/lib/spec/rails/matchers/redirect_to.rb +113 -0
  1361. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/matchers/render_template.rb +0 -0
  1362. data/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb +126 -0
  1363. data/vendor/plugins/{rspec_on_rails → rspec-rails}/lib/spec/rails/story_adapter.rb +0 -0
  1364. data/vendor/plugins/rspec-rails/lib/spec/rails/version.rb +39 -0
  1365. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/autotest/mappings_spec.rb +0 -0
  1366. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/autotest/rails_rspec_spec.rb +0 -0
  1367. data/vendor/plugins/rspec-rails/spec/rails/example/assigns_hash_proxy_spec.rb +60 -0
  1368. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/configuration_spec.rb +0 -0
  1369. data/vendor/plugins/rspec-rails/spec/rails/example/controller_isolation_spec.rb +62 -0
  1370. data/vendor/plugins/rspec-rails/spec/rails/example/controller_spec_spec.rb +206 -0
  1371. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/example_group_factory_spec.rb +0 -0
  1372. data/vendor/plugins/rspec-rails/spec/rails/example/helper_spec_spec.rb +161 -0
  1373. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/model_spec_spec.rb +0 -0
  1374. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/shared_behaviour_spec.rb +0 -0
  1375. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/example/test_unit_assertion_accessibility_spec.rb +0 -0
  1376. data/vendor/plugins/rspec-rails/spec/rails/example/view_spec_spec.rb +272 -0
  1377. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/action_controller_rescue_action_spec.rb +0 -0
  1378. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/action_view_base_spec.rb +0 -0
  1379. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/extensions/active_record_spec.rb +0 -0
  1380. data/vendor/plugins/rspec-rails/spec/rails/matchers/assert_select_spec.rb +806 -0
  1381. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/description_generation_spec.rb +0 -0
  1382. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/errors_on_spec.rb +0 -0
  1383. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/have_text_spec.rb +0 -0
  1384. data/vendor/plugins/rspec-rails/spec/rails/matchers/include_text_spec.rb +70 -0
  1385. data/vendor/plugins/rspec-rails/spec/rails/matchers/redirect_to_spec.rb +209 -0
  1386. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/matchers/render_spec.rb +0 -0
  1387. data/vendor/plugins/rspec-rails/spec/rails/mocks/ar_classes.rb +10 -0
  1388. data/vendor/plugins/rspec-rails/spec/rails/mocks/mock_model_spec.rb +64 -0
  1389. data/vendor/plugins/rspec-rails/spec/rails/mocks/stub_model_spec.rb +79 -0
  1390. data/vendor/plugins/rspec-rails/spec/rails/sample_modified_fixture.rb +8 -0
  1391. data/vendor/plugins/rspec-rails/spec/rails/sample_spec.rb +8 -0
  1392. data/vendor/plugins/rspec-rails/spec/rails/spec_server_spec.rb +96 -0
  1393. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails/spec_spec.rb +0 -0
  1394. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/rails_suite.rb +0 -0
  1395. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec/spec_helper.rb +0 -0
  1396. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/action_view_base_spec_controller.rb +0 -0
  1397. data/vendor/plugins/rspec-rails/spec_resources/controllers/controller_spec_controller.rb +68 -0
  1398. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/redirect_spec_controller.rb +0 -0
  1399. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/render_spec_controller.rb +0 -0
  1400. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/controllers/rjs_spec_controller.rb +0 -0
  1401. data/vendor/plugins/rspec-rails/spec_resources/helpers/explicit_helper.rb +34 -0
  1402. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/more_explicit_helper.rb +0 -0
  1403. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/plugin_application_helper.rb +0 -0
  1404. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/helpers/view_spec_helper.rb +0 -0
  1405. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/_partial.rhtml +0 -0
  1406. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_flash_after_session_reset.rhtml +0 -0
  1407. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_flash_before_session_reset.rhtml +0 -0
  1408. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_setting_the_assigns_hash.rhtml +0 -0
  1409. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_with_errors_in_template.rhtml +0 -0
  1410. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/controller_spec/action_with_template.rhtml +0 -0
  1411. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/_a_partial.rhtml +0 -0
  1412. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.js.rjs +0 -0
  1413. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.rhtml +0 -0
  1414. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/render_spec/some_action.rjs +0 -0
  1415. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/_replacement_partial.rhtml +0 -0
  1416. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/hide_div.rjs +0 -0
  1417. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/hide_page_element.rjs +0 -0
  1418. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/insert_html.rjs +0 -0
  1419. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace.rjs +0 -0
  1420. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace_html.rjs +0 -0
  1421. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/replace_html_with_partial.rjs +0 -0
  1422. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/visual_effect.rjs +0 -0
  1423. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/rjs_spec/visual_toggle_effect.rjs +0 -0
  1424. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/no_tags.rhtml +0 -0
  1425. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/single_div_with_no_attributes.rhtml +0 -0
  1426. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/tag_spec/single_div_with_one_attribute.rhtml +0 -0
  1427. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial.rhtml +0 -0
  1428. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_used_twice.rhtml +0 -0
  1429. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_with_local_variable.rhtml +0 -0
  1430. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_partial_with_sub_partial.rhtml +0 -0
  1431. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/_spacer.rhtml +0 -0
  1432. data/vendor/plugins/rspec-rails/spec_resources/views/view_spec/accessor.rhtml +5 -0
  1433. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/entry_form.rhtml +0 -0
  1434. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/explicit_helper.rhtml +0 -0
  1435. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/foo/show.rhtml +0 -0
  1436. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/implicit_helper.rhtml +0 -0
  1437. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/multiple_helpers.rhtml +0 -0
  1438. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial.rhtml +0 -0
  1439. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial_using_collection.rhtml +0 -0
  1440. data/vendor/plugins/{rspec_on_rails → rspec-rails}/spec_resources/views/view_spec/template_with_partial_with_array.rhtml +0 -0
  1441. data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/all.rb +0 -0
  1442. data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/helper.rb +0 -0
  1443. data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/steps/people.rb +0 -0
  1444. data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/transactions_should_rollback +0 -0
  1445. data/vendor/plugins/{rspec_on_rails → rspec-rails}/stories/transactions_should_rollback.rb +0 -0
  1446. data/vendor/plugins/rspec-rails/tasks/rspec.rake +137 -0
  1447. data/vendor/plugins/rspec/CHANGES +59 -0
  1448. data/vendor/plugins/rspec/MIT-LICENSE +1 -1
  1449. data/vendor/plugins/rspec/README +9 -44
  1450. data/vendor/plugins/rspec/Rakefile +34 -51
  1451. data/vendor/plugins/rspec/TODO +0 -1
  1452. data/vendor/plugins/rspec/bin/autospec +3 -0
  1453. data/vendor/plugins/rspec/bin/spec +0 -0
  1454. data/vendor/plugins/rspec/bin/spec_translator +0 -0
  1455. data/vendor/plugins/rspec/examples/pure/behave_as_example.rb +0 -0
  1456. data/vendor/plugins/rspec/examples/pure/partial_mock_example.rb +1 -0
  1457. data/vendor/plugins/rspec/examples/stories/calculator.rb +1 -1
  1458. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/everything.rb +1 -1
  1459. data/vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +17 -17
  1460. data/vendor/plugins/rspec/lib/autotest/discover.rb +1 -1
  1461. data/vendor/plugins/rspec/lib/autotest/rspec.rb +7 -9
  1462. data/vendor/plugins/rspec/lib/spec.rb +10 -9
  1463. data/vendor/plugins/rspec/lib/spec/adapters.rb +1 -0
  1464. data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine.rb +26 -0
  1465. data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine/mri.rb +8 -0
  1466. data/vendor/plugins/rspec/lib/spec/adapters/ruby_engine/rubinius.rb +8 -0
  1467. data/vendor/plugins/rspec/lib/spec/example.rb +1 -1
  1468. data/vendor/plugins/rspec/lib/spec/example/configuration.rb +30 -16
  1469. data/vendor/plugins/rspec/lib/spec/example/example_group.rb +2 -1
  1470. data/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb +23 -21
  1471. data/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb +23 -7
  1472. data/vendor/plugins/rspec/lib/spec/example/example_matcher.rb +2 -0
  1473. data/vendor/plugins/rspec/lib/spec/example/example_methods.rb +6 -0
  1474. data/vendor/plugins/rspec/lib/spec/example/module_inclusion_warnings.rb +37 -0
  1475. data/vendor/plugins/rspec/lib/spec/expectations/differs/default.rb +1 -1
  1476. data/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb +4 -12
  1477. data/vendor/plugins/rspec/lib/spec/expectations/handler.rb +10 -0
  1478. data/vendor/plugins/rspec/lib/spec/extensions.rb +1 -0
  1479. data/vendor/plugins/rspec/lib/spec/extensions/metaclass.rb +7 -0
  1480. data/vendor/plugins/rspec/lib/spec/extensions/object.rb +0 -4
  1481. data/vendor/plugins/rspec/lib/spec/matchers/change.rb +14 -10
  1482. data/vendor/plugins/rspec/lib/spec/matchers/has.rb +1 -11
  1483. data/vendor/plugins/rspec/lib/spec/matchers/have.rb +5 -1
  1484. data/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb +2 -2
  1485. data/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb +53 -30
  1486. data/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb +113 -10
  1487. data/vendor/plugins/rspec/lib/spec/mocks.rb +1 -1
  1488. data/vendor/plugins/rspec/lib/spec/mocks/argument_constraint_matchers.rb +5 -1
  1489. data/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb +34 -1
  1490. data/vendor/plugins/rspec/lib/spec/mocks/extensions.rb +1 -0
  1491. data/vendor/plugins/rspec/lib/spec/mocks/framework.rb +15 -0
  1492. data/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb +30 -7
  1493. data/vendor/plugins/rspec/lib/spec/mocks/mock.rb +13 -7
  1494. data/vendor/plugins/rspec/lib/spec/mocks/proxy.rb +26 -12
  1495. data/vendor/plugins/rspec/lib/spec/rake/spectask.rb +18 -26
  1496. data/vendor/plugins/rspec/lib/spec/runner.rb +3 -4
  1497. data/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb +1 -1
  1498. data/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb +1 -1
  1499. data/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb +2 -3
  1500. data/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb +2 -2
  1501. data/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb +4 -8
  1502. data/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb +18 -14
  1503. data/vendor/plugins/rspec/lib/spec/runner/formatter/nested_text_formatter.rb +65 -0
  1504. data/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb +4 -0
  1505. data/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb +5 -1
  1506. data/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb +1 -1
  1507. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/html_formatter.rb +48 -15
  1508. data/vendor/plugins/rspec/lib/spec/runner/formatter/story/plain_text_formatter.rb +69 -12
  1509. data/vendor/plugins/rspec/lib/spec/runner/option_parser.rb +17 -15
  1510. data/vendor/plugins/rspec/lib/spec/runner/options.rb +38 -15
  1511. data/vendor/plugins/rspec/lib/spec/runner/reporter.rb +15 -11
  1512. data/vendor/plugins/rspec/lib/spec/story/extensions/regexp.rb +2 -2
  1513. data/vendor/plugins/rspec/lib/spec/story/extensions/string.rb +2 -2
  1514. data/vendor/plugins/rspec/lib/spec/story/runner.rb +9 -5
  1515. data/vendor/plugins/rspec/lib/spec/story/runner/plain_text_story_runner.rb +2 -2
  1516. data/vendor/plugins/rspec/lib/spec/story/runner/scenario_runner.rb +8 -0
  1517. data/vendor/plugins/rspec/lib/spec/story/runner/story_mediator.rb +15 -1
  1518. data/vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb +20 -0
  1519. data/vendor/plugins/rspec/lib/spec/story/runner/story_runner.rb +3 -1
  1520. data/vendor/plugins/rspec/lib/spec/story/step.rb +43 -31
  1521. data/vendor/plugins/rspec/lib/spec/story/story.rb +8 -11
  1522. data/vendor/plugins/rspec/lib/spec/story/world.rb +6 -3
  1523. data/vendor/plugins/rspec/lib/spec/version.rb +2 -2
  1524. data/vendor/plugins/rspec/plugins/mock_frameworks/rspec.rb +2 -0
  1525. data/vendor/plugins/rspec/spec/autotest/rspec_spec.rb +140 -129
  1526. data/vendor/plugins/rspec/spec/spec/adapters/ruby_engine_spec.rb +16 -0
  1527. data/vendor/plugins/rspec/spec/spec/example/configuration_spec.rb +0 -0
  1528. data/vendor/plugins/rspec/spec/spec/example/example_group/described_module_spec.rb +20 -0
  1529. data/vendor/plugins/rspec/spec/spec/example/example_group/warning_messages_spec.rb +76 -0
  1530. data/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb +117 -102
  1531. data/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb +102 -19
  1532. data/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb +13 -1
  1533. data/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb +28 -6
  1534. data/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb +12 -0
  1535. data/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb +11 -0
  1536. data/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb +0 -0
  1537. data/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb +27 -9
  1538. data/vendor/plugins/rspec/spec/spec/matchers/be_spec.rb +24 -0
  1539. data/vendor/plugins/rspec/spec/spec/matchers/change_spec.rb +4 -6
  1540. data/vendor/plugins/rspec/spec/spec/matchers/handler_spec.rb +58 -37
  1541. data/vendor/plugins/rspec/spec/spec/matchers/has_spec.rb +16 -0
  1542. data/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb +7 -5
  1543. data/vendor/plugins/rspec/spec/spec/matchers/operator_matcher_spec.rb +11 -1
  1544. data/vendor/plugins/rspec/spec/spec/matchers/raise_error_spec.rb +124 -0
  1545. data/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb +64 -2
  1546. data/vendor/plugins/rspec/spec/spec/mocks/{bug_report_10263.rb → bug_report_10263_spec.rb} +0 -0
  1547. data/vendor/plugins/rspec/spec/spec/mocks/bug_report_11545_spec.rb +2 -0
  1548. data/vendor/plugins/rspec/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +15 -0
  1549. data/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb +32 -0
  1550. data/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb +62 -43
  1551. data/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb +41 -5
  1552. data/vendor/plugins/rspec/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +21 -0
  1553. data/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb +1 -1
  1554. data/vendor/plugins/rspec/spec/spec/runner/execution_context_spec.rb +7 -1
  1555. data/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +3 -2
  1556. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatted-1.8.6.html +30 -25
  1557. data/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb +0 -3
  1558. data/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb +333 -0
  1559. data/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +12 -2
  1560. data/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +2 -2
  1561. data/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb +110 -78
  1562. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/html_formatter_spec.rb +28 -2
  1563. data/vendor/plugins/rspec/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +214 -1
  1564. data/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +33 -28
  1565. data/vendor/plugins/rspec/spec/spec/runner/option_parser_spec.rb +65 -49
  1566. data/vendor/plugins/rspec/spec/spec/runner/options_spec.rb +103 -17
  1567. data/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb +10 -7
  1568. data/vendor/plugins/rspec/spec/spec/runner/spec_drb.opts +1 -0
  1569. data/vendor/plugins/rspec/spec/spec/runner/spec_parser_spec.rb +10 -4
  1570. data/vendor/plugins/rspec/spec/spec/story/runner/plain_text_story_runner_spec.rb +14 -13
  1571. data/vendor/plugins/rspec/spec/spec/story/runner/scenario_runner_spec.rb +124 -52
  1572. data/vendor/plugins/rspec/spec/spec/story/runner/story_mediator_spec.rb +12 -2
  1573. data/vendor/plugins/rspec/spec/spec/story/runner/story_parser_spec.rb +23 -6
  1574. data/vendor/plugins/rspec/spec/spec/story/runner/story_runner_spec.rb +40 -2
  1575. data/vendor/plugins/rspec/spec/spec/story/runner_spec.rb +59 -72
  1576. data/vendor/plugins/rspec/spec/spec/story/step_spec.rb +53 -3
  1577. data/vendor/plugins/rspec/spec/spec/story/story_spec.rb +2 -2
  1578. data/vendor/plugins/rspec/spec/spec/story/world_spec.rb +1 -1
  1579. data/vendor/plugins/rspec/stories/all.rb +1 -1
  1580. data/vendor/plugins/rspec/stories/mock_framework_integration/stories.rb +7 -0
  1581. data/vendor/plugins/rspec/stories/mock_framework_integration/use_flexmock.story +9 -0
  1582. data/vendor/plugins/rspec/stories/resources/spec/spec_with_flexmock.rb +18 -0
  1583. data/vendor/plugins/rspec/stories/stories/multiline_steps.story +23 -0
  1584. data/vendor/plugins/rspec/stories/stories/steps/multiline_steps.rb +13 -0
  1585. data/vendor/plugins/rspec/stories/stories/stories.rb +6 -0
  1586. data/vendor/plugins/state_machine/CHANGELOG.rdoc +97 -0
  1587. data/vendor/plugins/state_machine/LICENSE +20 -0
  1588. data/vendor/plugins/state_machine/README.rdoc +182 -0
  1589. data/vendor/plugins/state_machine/Rakefile +88 -0
  1590. data/vendor/plugins/state_machine/init.rb +1 -0
  1591. data/vendor/plugins/state_machine/lib/state_machine.rb +129 -0
  1592. data/vendor/plugins/state_machine/lib/state_machine/event.rb +116 -0
  1593. data/vendor/plugins/state_machine/lib/state_machine/machine.rb +412 -0
  1594. data/vendor/plugins/state_machine/lib/state_machine/transition.rb +227 -0
  1595. data/vendor/plugins/state_machine/test/app_root/app/models/auto_shop.rb +34 -0
  1596. data/vendor/plugins/state_machine/test/app_root/app/models/car.rb +19 -0
  1597. data/vendor/plugins/state_machine/test/app_root/app/models/highway.rb +3 -0
  1598. data/vendor/plugins/state_machine/test/app_root/app/models/motorcycle.rb +3 -0
  1599. data/vendor/plugins/state_machine/test/app_root/app/models/switch.rb +23 -0
  1600. data/vendor/plugins/state_machine/test/app_root/app/models/switch_observer.rb +20 -0
  1601. data/vendor/plugins/state_machine/test/app_root/app/models/toggle_switch.rb +2 -0
  1602. data/vendor/plugins/state_machine/test/app_root/app/models/vehicle.rb +78 -0
  1603. data/vendor/plugins/state_machine/test/app_root/config/environment.rb +7 -0
  1604. data/vendor/plugins/state_machine/test/app_root/db/migrate/001_create_switches.rb +12 -0
  1605. data/vendor/plugins/state_machine/test/app_root/db/migrate/002_create_auto_shops.rb +13 -0
  1606. data/vendor/plugins/state_machine/test/app_root/db/migrate/003_create_highways.rb +11 -0
  1607. data/vendor/plugins/state_machine/test/app_root/db/migrate/004_create_vehicles.rb +16 -0
  1608. data/vendor/plugins/state_machine/test/factory.rb +73 -0
  1609. data/vendor/plugins/state_machine/test/functional/state_machine_test.rb +499 -0
  1610. data/vendor/plugins/state_machine/test/test_helper.rb +13 -0
  1611. data/vendor/plugins/state_machine/test/unit/event_test.rb +235 -0
  1612. data/vendor/plugins/state_machine/test/unit/invalid_transition_test.rb +7 -0
  1613. data/vendor/plugins/state_machine/test/unit/machine_test.rb +306 -0
  1614. data/vendor/plugins/state_machine/test/unit/state_machine_test.rb +130 -0
  1615. data/vendor/plugins/state_machine/test/unit/transition_test.rb +633 -0
  1616. metadata +1607 -2266
  1617. data/app/controllers/admin/categories_controller.rb +0 -59
  1618. data/app/controllers/cart_controller.rb +0 -44
  1619. data/app/controllers/checkout_controller.rb +0 -173
  1620. data/app/controllers/store_controller.rb +0 -27
  1621. data/app/helpers/admin/categories_helper.rb +0 -3
  1622. data/app/helpers/cart_helper.rb +0 -6
  1623. data/app/helpers/checkout_helper.rb +0 -14
  1624. data/app/models/cart_item.rb +0 -29
  1625. data/app/models/category.rb +0 -22
  1626. data/app/models/credit_card.rb +0 -24
  1627. data/app/models/inventory_level.rb +0 -19
  1628. data/app/models/order_operation.rb +0 -7
  1629. data/app/models/payment.rb +0 -49
  1630. data/app/models/search_criteria.rb +0 -27
  1631. data/app/models/txn.rb +0 -7
  1632. data/app/views/account/index.rhtml +0 -3
  1633. data/app/views/account/login.rhtml +0 -12
  1634. data/app/views/account/signup.rhtml +0 -16
  1635. data/app/views/admin/categories/_form.rhtml +0 -10
  1636. data/app/views/admin/categories/edit.rhtml +0 -9
  1637. data/app/views/admin/categories/list.rhtml +0 -47
  1638. data/app/views/admin/categories/new.rhtml +0 -8
  1639. data/app/views/admin/option_types/_form.rhtml +0 -16
  1640. data/app/views/admin/option_types/_new_option_value.rhtml +0 -13
  1641. data/app/views/admin/option_types/_option_values.rhtml +0 -43
  1642. data/app/views/admin/option_types/edit.rhtml +0 -8
  1643. data/app/views/admin/option_types/index.rhtml +0 -23
  1644. data/app/views/admin/option_types/new.rhtml +0 -8
  1645. data/app/views/admin/option_types/select.rhtml +0 -28
  1646. data/app/views/admin/orders/index.rhtml +0 -99
  1647. data/app/views/admin/orders/show.rhtml +0 -72
  1648. data/app/views/admin/overview/index.rhtml +0 -3
  1649. data/app/views/admin/products/_form.rhtml +0 -59
  1650. data/app/views/admin/products/_menu.rhtml +0 -7
  1651. data/app/views/admin/products/_new_variant.rhtml +0 -11
  1652. data/app/views/admin/products/_variants.rhtml +0 -52
  1653. data/app/views/admin/products/edit.rhtml +0 -8
  1654. data/app/views/admin/products/index.rhtml +0 -63
  1655. data/app/views/admin/products/new.rhtml +0 -9
  1656. data/app/views/admin/reports/index.rhtml +0 -29
  1657. data/app/views/admin/reports/sales_total.rhtml +0 -28
  1658. data/app/views/cart/index.rhtml +0 -49
  1659. data/app/views/checkout/_address.rhtml +0 -51
  1660. data/app/views/checkout/_address_ro.rhtml +0 -18
  1661. data/app/views/checkout/_cart_item.rhtml +0 -5
  1662. data/app/views/checkout/_extra.rhtml +0 -1
  1663. data/app/views/checkout/addresses.rhtml +0 -51
  1664. data/app/views/checkout/cvv.rhtml +0 -15
  1665. data/app/views/checkout/empty_cart.rhtml +0 -4
  1666. data/app/views/checkout/final_confirmation.rhtml +0 -92
  1667. data/app/views/checkout/incomplete.rhtml +0 -7
  1668. data/app/views/checkout/thank_you.rhtml +0 -11
  1669. data/app/views/layouts/admin.rhtml +0 -71
  1670. data/app/views/layouts/application.rhtml +0 -64
  1671. data/app/views/layouts/products.rhtml +0 -19
  1672. data/app/views/order_mailer/cancel.rhtml +0 -15
  1673. data/app/views/order_mailer/confirm.rhtml +0 -18
  1674. data/app/views/shared/_images.html.erb +0 -43
  1675. data/app/views/shared/_order_details.rhtml +0 -35
  1676. data/app/views/shared/_paginate.rhtml +0 -34
  1677. data/app/views/shared/_report_criteria.rhtml +0 -32
  1678. data/app/views/shared/_store_menu.rhtml +0 -6
  1679. data/app/views/store/_products.rhtml +0 -10
  1680. data/app/views/store/_thumbnails.html.erb +0 -9
  1681. data/app/views/store/list.rhtml +0 -12
  1682. data/app/views/store/show.rhtml +0 -62
  1683. data/db/development_structure.sql +0 -294
  1684. data/db/sample/categories.yml +0 -35
  1685. data/db/sample/countries.yml +0 -3
  1686. data/db/sample/credit_cards.yml +0 -12
  1687. data/db/sample/txns.yml +0 -7
  1688. data/foozah/CHANGELOG +0 -47
  1689. data/foozah/CONTRIBUTORS +0 -27
  1690. data/foozah/INSTALL +0 -27
  1691. data/foozah/LICENSE +0 -26
  1692. data/foozah/README.markdown +0 -88
  1693. data/foozah/Rakefile +0 -3
  1694. data/foozah/config/boot.rb +0 -148
  1695. data/foozah/config/database.yml +0 -16
  1696. data/foozah/config/environment.rb +0 -106
  1697. data/foozah/config/environments/development.rb +0 -24
  1698. data/foozah/config/environments/production.rb +0 -21
  1699. data/foozah/config/routes.rb +0 -1
  1700. data/foozah/db/development.sqlite3.db +0 -0
  1701. data/foozah/public/404.html +0 -30
  1702. data/foozah/public/500.html +0 -30
  1703. data/foozah/public/dispatch.cgi +0 -10
  1704. data/foozah/public/dispatch.fcgi +0 -24
  1705. data/foozah/public/dispatch.rb +0 -10
  1706. data/foozah/public/images/amex_cid.gif +0 -0
  1707. data/foozah/public/images/calendar_date_select/calendar.gif +0 -0
  1708. data/foozah/public/images/creditcard.gif +0 -0
  1709. data/foozah/public/images/discover_cid.gif +0 -0
  1710. data/foozah/public/images/master_cid.jpg +0 -0
  1711. data/foozah/public/images/rails.png +0 -0
  1712. data/foozah/public/images/spinner.gif +0 -0
  1713. data/foozah/public/images/spree.jpg +0 -0
  1714. data/foozah/public/images/spree/progress.gif +0 -0
  1715. data/foozah/public/images/spree/spinner.gif +0 -0
  1716. data/foozah/public/images/spree/spree.jpg +0 -0
  1717. data/foozah/public/images/visa_cid.gif +0 -0
  1718. data/foozah/public/javascripts/application.js +0 -2
  1719. data/foozah/public/javascripts/calendar_date_select/calendar_date_select.js +0 -439
  1720. data/foozah/public/javascripts/calendar_date_select/format_american.js +0 -34
  1721. data/foozah/public/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
  1722. data/foozah/public/javascripts/calendar_date_select/format_finnish.js +0 -24
  1723. data/foozah/public/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
  1724. data/foozah/public/javascripts/calendar_date_select/format_italian.js +0 -24
  1725. data/foozah/public/javascripts/controls.js +0 -833
  1726. data/foozah/public/javascripts/dragdrop.js +0 -942
  1727. data/foozah/public/javascripts/effects.js +0 -1088
  1728. data/foozah/public/javascripts/prototype.js +0 -4184
  1729. data/foozah/public/plugin_assets/README +0 -5
  1730. data/foozah/public/plugin_assets/calendar_date_select/images/calendar_date_select/calendar.gif +0 -0
  1731. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js +0 -439
  1732. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_american.js +0 -34
  1733. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
  1734. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_finnish.js +0 -24
  1735. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
  1736. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_italian.js +0 -24
  1737. data/foozah/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/locale/fi.js +0 -10
  1738. data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/blue.css +0 -130
  1739. data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/default.css +0 -135
  1740. data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/plain.css +0 -128
  1741. data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/red.css +0 -135
  1742. data/foozah/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/silver.css +0 -133
  1743. data/foozah/public/plugin_assets/spree/404.html +0 -30
  1744. data/foozah/public/plugin_assets/spree/500.html +0 -30
  1745. data/foozah/public/plugin_assets/spree/dispatch.cgi +0 -10
  1746. data/foozah/public/plugin_assets/spree/dispatch.fcgi +0 -24
  1747. data/foozah/public/plugin_assets/spree/dispatch.rb +0 -10
  1748. data/foozah/public/plugin_assets/spree/favicon.ico +0 -0
  1749. data/foozah/public/plugin_assets/spree/images/amex_cid.gif +0 -0
  1750. data/foozah/public/plugin_assets/spree/images/creditcard.gif +0 -0
  1751. data/foozah/public/plugin_assets/spree/images/discover_cid.gif +0 -0
  1752. data/foozah/public/plugin_assets/spree/images/master_cid.jpg +0 -0
  1753. data/foozah/public/plugin_assets/spree/images/products/ror_bag.jpg +0 -0
  1754. data/foozah/public/plugin_assets/spree/images/products/ror_baseball_jersey.jpg +0 -0
  1755. data/foozah/public/plugin_assets/spree/images/products/ror_jr_spaghetti.jpg +0 -0
  1756. data/foozah/public/plugin_assets/spree/images/products/ror_mug.jpg +0 -0
  1757. data/foozah/public/plugin_assets/spree/images/products/ror_ringer_tshirt.jpg +0 -0
  1758. data/foozah/public/plugin_assets/spree/images/products/ror_stein.jpg +0 -0
  1759. data/foozah/public/plugin_assets/spree/images/products/ror_tote.jpg +0 -0
  1760. data/foozah/public/plugin_assets/spree/images/rails.png +0 -0
  1761. data/foozah/public/plugin_assets/spree/images/spinner.gif +0 -0
  1762. data/foozah/public/plugin_assets/spree/images/spree/progress.gif +0 -0
  1763. data/foozah/public/plugin_assets/spree/images/spree/spinner.gif +0 -0
  1764. data/foozah/public/plugin_assets/spree/images/spree/spree.jpg +0 -0
  1765. data/foozah/public/plugin_assets/spree/images/spree/spree_logo142x65.gif +0 -0
  1766. data/foozah/public/plugin_assets/spree/images/spree/spree_logo245x112.gif +0 -0
  1767. data/foozah/public/plugin_assets/spree/images/visa_cid.gif +0 -0
  1768. data/foozah/public/plugin_assets/spree/javascripts/application.js +0 -2
  1769. data/foozah/public/plugin_assets/spree/javascripts/controls.js +0 -833
  1770. data/foozah/public/plugin_assets/spree/javascripts/dragdrop.js +0 -942
  1771. data/foozah/public/plugin_assets/spree/javascripts/effects.js +0 -1088
  1772. data/foozah/public/plugin_assets/spree/javascripts/lowpro.js +0 -307
  1773. data/foozah/public/plugin_assets/spree/javascripts/prototype.js +0 -2515
  1774. data/foozah/public/plugin_assets/spree/robots.txt +0 -1
  1775. data/foozah/public/plugin_assets/spree/stylesheets/cart/_controller.css +0 -71
  1776. data/foozah/public/plugin_assets/spree/stylesheets/checkout/_controller.css +0 -31
  1777. data/foozah/public/plugin_assets/spree/stylesheets/fullscreen.css +0 -63
  1778. data/foozah/public/plugin_assets/spree/stylesheets/orders/_controller.css +0 -3
  1779. data/foozah/public/plugin_assets/spree/stylesheets/products/_controller.css +0 -38
  1780. data/foozah/public/plugin_assets/spree/stylesheets/spree-admin.css +0 -355
  1781. data/foozah/public/plugin_assets/spree/stylesheets/spree.css +0 -66
  1782. data/foozah/public/plugin_assets/spree/stylesheets/store/_controller.css +0 -23
  1783. data/foozah/public/robots.txt +0 -1
  1784. data/foozah/public/stylesheets/application.css +0 -4
  1785. data/foozah/public/stylesheets/calendar_date_select/blue.css +0 -130
  1786. data/foozah/public/stylesheets/calendar_date_select/default.css +0 -135
  1787. data/foozah/public/stylesheets/calendar_date_select/plain.css +0 -128
  1788. data/foozah/public/stylesheets/calendar_date_select/red.css +0 -135
  1789. data/foozah/public/stylesheets/calendar_date_select/silver.css +0 -133
  1790. data/foozah/public/stylesheets/cart/_controller.css +0 -71
  1791. data/foozah/public/stylesheets/checkout/_controller-override.css +0 -13
  1792. data/foozah/public/stylesheets/checkout/_controller.css +0 -31
  1793. data/foozah/public/stylesheets/fullscreen.css +0 -63
  1794. data/foozah/public/stylesheets/orders/_controller.css +0 -3
  1795. data/foozah/public/stylesheets/products/_controller.css +0 -38
  1796. data/foozah/public/stylesheets/spree-admin.css +0 -355
  1797. data/foozah/public/stylesheets/spree.css +0 -296
  1798. data/foozah/public/stylesheets/store/_controller.css +0 -23
  1799. data/foozah/script/about +0 -3
  1800. data/foozah/script/breakpointer +0 -3
  1801. data/foozah/script/generate +0 -16
  1802. data/foozah/script/performance/benchmarker +0 -3
  1803. data/foozah/script/performance/profiler +0 -3
  1804. data/foozah/script/process/inspector +0 -3
  1805. data/foozah/script/process/reaper +0 -3
  1806. data/foozah/script/process/spawner +0 -3
  1807. data/foozah/script/runner +0 -3
  1808. data/foozah/script/spec_server +0 -102
  1809. data/lib/easy_role_permissions.yml +0 -76
  1810. data/lib/generators/instance/templates/instance_boot.rb +0 -148
  1811. data/lib/generators/instance/templates/instance_environment.rb +0 -106
  1812. data/lib/spree/extension_migrator.rb +0 -47
  1813. data/login.patch +0 -55
  1814. data/public/plugin_assets/README +0 -5
  1815. data/public/plugin_assets/calendar_date_select/images/calendar_date_select/calendar.gif +0 -0
  1816. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js +0 -439
  1817. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_american.js +0 -34
  1818. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js +0 -7
  1819. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_finnish.js +0 -24
  1820. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js +0 -36
  1821. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/format_italian.js +0 -24
  1822. data/public/plugin_assets/calendar_date_select/javascripts/calendar_date_select/locale/fi.js +0 -10
  1823. data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/blue.css +0 -130
  1824. data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/default.css +0 -135
  1825. data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/plain.css +0 -128
  1826. data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/red.css +0 -135
  1827. data/public/plugin_assets/calendar_date_select/stylesheets/calendar_date_select/silver.css +0 -133
  1828. data/public/plugin_assets/spree/404.html +0 -30
  1829. data/public/plugin_assets/spree/500.html +0 -30
  1830. data/public/plugin_assets/spree/dispatch.cgi +0 -10
  1831. data/public/plugin_assets/spree/dispatch.fcgi +0 -24
  1832. data/public/plugin_assets/spree/dispatch.rb +0 -10
  1833. data/public/plugin_assets/spree/favicon.ico +0 -0
  1834. data/public/plugin_assets/spree/images/amex_cid.gif +0 -0
  1835. data/public/plugin_assets/spree/images/creditcard.gif +0 -0
  1836. data/public/plugin_assets/spree/images/discover_cid.gif +0 -0
  1837. data/public/plugin_assets/spree/images/master_cid.jpg +0 -0
  1838. data/public/plugin_assets/spree/images/products/ror_bag.jpg +0 -0
  1839. data/public/plugin_assets/spree/images/products/ror_baseball_jersey.jpg +0 -0
  1840. data/public/plugin_assets/spree/images/products/ror_jr_spaghetti.jpg +0 -0
  1841. data/public/plugin_assets/spree/images/products/ror_mug.jpg +0 -0
  1842. data/public/plugin_assets/spree/images/products/ror_ringer_tshirt.jpg +0 -0
  1843. data/public/plugin_assets/spree/images/products/ror_stein.jpg +0 -0
  1844. data/public/plugin_assets/spree/images/products/ror_tote.jpg +0 -0
  1845. data/public/plugin_assets/spree/images/rails.png +0 -0
  1846. data/public/plugin_assets/spree/images/spinner.gif +0 -0
  1847. data/public/plugin_assets/spree/images/spree/progress.gif +0 -0
  1848. data/public/plugin_assets/spree/images/spree/spinner.gif +0 -0
  1849. data/public/plugin_assets/spree/images/spree/spree.jpg +0 -0
  1850. data/public/plugin_assets/spree/images/spree/spree_logo142x65.gif +0 -0
  1851. data/public/plugin_assets/spree/images/spree/spree_logo245x112.gif +0 -0
  1852. data/public/plugin_assets/spree/images/visa_cid.gif +0 -0
  1853. data/public/plugin_assets/spree/javascripts/application.js +0 -2
  1854. data/public/plugin_assets/spree/javascripts/controls.js +0 -833
  1855. data/public/plugin_assets/spree/javascripts/dragdrop.js +0 -942
  1856. data/public/plugin_assets/spree/javascripts/effects.js +0 -1088
  1857. data/public/plugin_assets/spree/javascripts/lowpro.js +0 -307
  1858. data/public/plugin_assets/spree/javascripts/prototype.js +0 -2515
  1859. data/public/plugin_assets/spree/robots.txt +0 -1
  1860. data/public/plugin_assets/spree/stylesheets/cart/_controller.css +0 -71
  1861. data/public/plugin_assets/spree/stylesheets/checkout/_controller.css +0 -31
  1862. data/public/plugin_assets/spree/stylesheets/fullscreen.css +0 -63
  1863. data/public/plugin_assets/spree/stylesheets/orders/_controller.css +0 -3
  1864. data/public/plugin_assets/spree/stylesheets/products/_controller.css +0 -38
  1865. data/public/plugin_assets/spree/stylesheets/spree-admin.css +0 -355
  1866. data/public/plugin_assets/spree/stylesheets/spree.css +0 -66
  1867. data/public/plugin_assets/spree/stylesheets/store/_controller.css +0 -23
  1868. data/public/stylesheets/cart/_controller.css +0 -71
  1869. data/public/stylesheets/checkout/_controller-override.css +0 -13
  1870. data/public/stylesheets/checkout/_controller.css +0 -31
  1871. data/public/stylesheets/products/_controller.css +0 -38
  1872. data/public/stylesheets/store/_controller.css +0 -23
  1873. data/spec/models/cart_item_spec.rb +0 -50
  1874. data/spec/models/cart_spec.rb +0 -51
  1875. data/spree.tmproj +0 -800
  1876. data/vendor/extensions/payment_gateway/spec/controllers/payment_gateway_spec.rb +0 -19
  1877. data/vendor/extensions/tax_calculator/app/views/admin/tax_rates/show.html.erb +0 -4
  1878. data/vendor/extensions/tax_calculator/db/migrate/001_create_tax_rates.rb +0 -13
  1879. data/vendor/extensions/tax_calculator/spec/fixtures/tax_rates.yml +0 -3
  1880. data/vendor/plugins/active_merchant/CHANGELOG +0 -345
  1881. data/vendor/plugins/active_merchant/CONTRIBUTERS +0 -69
  1882. data/vendor/plugins/active_merchant/MIT-LICENSE +0 -20
  1883. data/vendor/plugins/active_merchant/README +0 -127
  1884. data/vendor/plugins/active_merchant/Rakefile +0 -160
  1885. data/vendor/plugins/active_merchant/gem-public_cert.pem +0 -20
  1886. data/vendor/plugins/active_merchant/generators/gateway/USAGE +0 -5
  1887. data/vendor/plugins/active_merchant/generators/gateway/gateway_generator.rb +0 -61
  1888. data/vendor/plugins/active_merchant/generators/gateway/templates/gateway.rb +0 -77
  1889. data/vendor/plugins/active_merchant/generators/gateway/templates/gateway_test.rb +0 -49
  1890. data/vendor/plugins/active_merchant/generators/gateway/templates/remote_gateway_test.rb +0 -57
  1891. data/vendor/plugins/active_merchant/generators/integration/USAGE +0 -5
  1892. data/vendor/plugins/active_merchant/generators/integration/integration_generator.rb +0 -68
  1893. data/vendor/plugins/active_merchant/generators/integration/templates/helper.rb +0 -34
  1894. data/vendor/plugins/active_merchant/generators/integration/templates/helper_test.rb +0 -54
  1895. data/vendor/plugins/active_merchant/generators/integration/templates/integration.rb +0 -18
  1896. data/vendor/plugins/active_merchant/generators/integration/templates/module_test.rb +0 -9
  1897. data/vendor/plugins/active_merchant/generators/integration/templates/notification.rb +0 -100
  1898. data/vendor/plugins/active_merchant/generators/integration/templates/notification_test.rb +0 -41
  1899. data/vendor/plugins/active_merchant/init.rb +0 -3
  1900. data/vendor/plugins/active_merchant/lib/active_merchant.rb +0 -70
  1901. data/vendor/plugins/active_merchant/lib/active_merchant/billing/avs_result.rb +0 -95
  1902. data/vendor/plugins/active_merchant/lib/active_merchant/billing/base.rb +0 -57
  1903. data/vendor/plugins/active_merchant/lib/active_merchant/billing/check.rb +0 -61
  1904. data/vendor/plugins/active_merchant/lib/active_merchant/billing/credit_card.rb +0 -157
  1905. data/vendor/plugins/active_merchant/lib/active_merchant/billing/credit_card_formatting.rb +0 -21
  1906. data/vendor/plugins/active_merchant/lib/active_merchant/billing/credit_card_methods.rb +0 -125
  1907. data/vendor/plugins/active_merchant/lib/active_merchant/billing/cvv_result.rb +0 -38
  1908. data/vendor/plugins/active_merchant/lib/active_merchant/billing/expiry_date.rb +0 -28
  1909. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateway.rb +0 -162
  1910. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways.rb +0 -3
  1911. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/authorize_net.rb +0 -633
  1912. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/authorize_net_cim.rb +0 -697
  1913. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/bogus.rb +0 -86
  1914. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/braintree.rb +0 -205
  1915. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/card_stream.rb +0 -235
  1916. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/cyber_source.rb +0 -406
  1917. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/data_cash.rb +0 -595
  1918. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/efsnet.rb +0 -229
  1919. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/eway.rb +0 -272
  1920. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/exact.rb +0 -222
  1921. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/linkpoint.rb +0 -396
  1922. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/moneris.rb +0 -205
  1923. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/net_registry.rb +0 -189
  1924. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/netbilling.rb +0 -168
  1925. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/pay_junction.rb +0 -386
  1926. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/pay_secure.rb +0 -120
  1927. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow.rb +0 -236
  1928. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +0 -213
  1929. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +0 -39
  1930. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +0 -13
  1931. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_express.rb +0 -138
  1932. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_express_nv.rb +0 -181
  1933. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_express_uk.rb +0 -15
  1934. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv.rb +0 -234
  1935. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv/payflow_express_nv_response.rb +0 -39
  1936. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv/payflow_nv_common_api.rb +0 -227
  1937. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_nv/payflow_nv_response.rb +0 -28
  1938. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payflow_uk.rb +0 -21
  1939. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/payment_express.rb +0 -242
  1940. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal.rb +0 -108
  1941. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +0 -314
  1942. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +0 -38
  1943. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal_express.rb +0 -130
  1944. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/paypal_express_common.rb +0 -20
  1945. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/plugnpay.rb +0 -292
  1946. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/protx.rb +0 -284
  1947. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/psigate.rb +0 -214
  1948. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/psl_card.rb +0 -302
  1949. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/quickpay.rb +0 -183
  1950. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/realex.rb +0 -200
  1951. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/secure_pay.rb +0 -31
  1952. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/secure_pay_au.rb +0 -155
  1953. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/secure_pay_tech.rb +0 -113
  1954. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/skip_jack.rb +0 -437
  1955. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/trans_first.rb +0 -127
  1956. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/trust_commerce.rb +0 -414
  1957. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/usa_epay.rb +0 -194
  1958. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/verifi.rb +0 -228
  1959. data/vendor/plugins/active_merchant/lib/active_merchant/billing/gateways/viaklix.rb +0 -165
  1960. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations.rb +0 -15
  1961. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/action_view_helper.rb +0 -65
  1962. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus.rb +0 -22
  1963. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus/helper.rb +0 -17
  1964. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus/notification.rb +0 -11
  1965. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/bogus/return.rb +0 -10
  1966. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay.rb +0 -22
  1967. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay/helper.rb +0 -81
  1968. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay/notification.rb +0 -156
  1969. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/chronopay/return.rb +0 -10
  1970. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay.rb +0 -26
  1971. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/common.rb +0 -42
  1972. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/helper.rb +0 -70
  1973. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/notification.rb +0 -83
  1974. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/gestpay/return.rb +0 -10
  1975. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/helper.rb +0 -93
  1976. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust.rb +0 -26
  1977. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust/helper.rb +0 -58
  1978. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust/notification.rb +0 -57
  1979. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/hi_trust/return.rb +0 -67
  1980. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex.rb +0 -87
  1981. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex/helper.rb +0 -68
  1982. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex/notification.rb +0 -94
  1983. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/nochex/return.rb +0 -10
  1984. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/notification.rb +0 -53
  1985. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal.rb +0 -40
  1986. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal/helper.rb +0 -118
  1987. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal/notification.rb +0 -154
  1988. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/paypal/return.rb +0 -10
  1989. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/return.rb +0 -35
  1990. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout.rb +0 -23
  1991. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout/helper.rb +0 -59
  1992. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout/notification.rb +0 -114
  1993. data/vendor/plugins/active_merchant/lib/active_merchant/billing/integrations/two_checkout/return.rb +0 -17
  1994. data/vendor/plugins/active_merchant/lib/active_merchant/billing/response.rb +0 -32
  1995. data/vendor/plugins/active_merchant/lib/active_merchant/lib/country.rb +0 -298
  1996. data/vendor/plugins/active_merchant/lib/active_merchant/lib/error.rb +0 -4
  1997. data/vendor/plugins/active_merchant/lib/active_merchant/lib/post_data.rb +0 -22
  1998. data/vendor/plugins/active_merchant/lib/active_merchant/lib/posts_data.rb +0 -80
  1999. data/vendor/plugins/active_merchant/lib/active_merchant/lib/requires_parameters.rb +0 -16
  2000. data/vendor/plugins/active_merchant/lib/active_merchant/lib/utils.rb +0 -18
  2001. data/vendor/plugins/active_merchant/lib/active_merchant/lib/validateable.rb +0 -76
  2002. data/vendor/plugins/active_merchant/lib/certs/cacert.pem +0 -7815
  2003. data/vendor/plugins/active_merchant/lib/support/gateway_support.rb +0 -58
  2004. data/vendor/plugins/active_merchant/lib/tasks/cia.rb +0 -90
  2005. data/vendor/plugins/active_merchant/script/destroy +0 -14
  2006. data/vendor/plugins/active_merchant/script/generate +0 -14
  2007. data/vendor/plugins/active_merchant/test/extra/binding_of_caller.rb +0 -80
  2008. data/vendor/plugins/active_merchant/test/extra/breakpoint.rb +0 -547
  2009. data/vendor/plugins/active_merchant/test/fixtures.yml +0 -277
  2010. data/vendor/plugins/active_merchant/test/remote/gateways/remote_authorize_net_cim_test.rb +0 -458
  2011. data/vendor/plugins/active_merchant/test/remote/gateways/remote_authorize_net_test.rb +0 -145
  2012. data/vendor/plugins/active_merchant/test/remote/gateways/remote_braintree_test.rb +0 -125
  2013. data/vendor/plugins/active_merchant/test/remote/gateways/remote_card_stream_test.rb +0 -148
  2014. data/vendor/plugins/active_merchant/test/remote/gateways/remote_cyber_source_test.rb +0 -144
  2015. data/vendor/plugins/active_merchant/test/remote/gateways/remote_data_cash_test.rb +0 -357
  2016. data/vendor/plugins/active_merchant/test/remote/gateways/remote_efsnet_test.rb +0 -81
  2017. data/vendor/plugins/active_merchant/test/remote/gateways/remote_eway_test.rb +0 -74
  2018. data/vendor/plugins/active_merchant/test/remote/gateways/remote_exact_test.rb +0 -60
  2019. data/vendor/plugins/active_merchant/test/remote/gateways/remote_linkpoint_test.rb +0 -112
  2020. data/vendor/plugins/active_merchant/test/remote/gateways/remote_moneris_test.rb +0 -82
  2021. data/vendor/plugins/active_merchant/test/remote/gateways/remote_net_registry_test.rb +0 -85
  2022. data/vendor/plugins/active_merchant/test/remote/gateways/remote_netbilling_test.rb +0 -70
  2023. data/vendor/plugins/active_merchant/test/remote/gateways/remote_pay_junction_test.rb +0 -143
  2024. data/vendor/plugins/active_merchant/test/remote/gateways/remote_pay_secure_test.rb +0 -39
  2025. data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_express_nv_test.rb +0 -51
  2026. data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_express_test.rb +0 -50
  2027. data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_nv_test.rb +0 -237
  2028. data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_test.rb +0 -237
  2029. data/vendor/plugins/active_merchant/test/remote/gateways/remote_payflow_uk_test.rb +0 -173
  2030. data/vendor/plugins/active_merchant/test/remote/gateways/remote_payment_express_test.rb +0 -126
  2031. data/vendor/plugins/active_merchant/test/remote/gateways/remote_paypal_express_test.rb +0 -49
  2032. data/vendor/plugins/active_merchant/test/remote/gateways/remote_paypal_test.rb +0 -167
  2033. data/vendor/plugins/active_merchant/test/remote/gateways/remote_plugnpay_test.rb +0 -72
  2034. data/vendor/plugins/active_merchant/test/remote/gateways/remote_protx_test.rb +0 -184
  2035. data/vendor/plugins/active_merchant/test/remote/gateways/remote_psigate_test.rb +0 -50
  2036. data/vendor/plugins/active_merchant/test/remote/gateways/remote_psl_card_test.rb +0 -106
  2037. data/vendor/plugins/active_merchant/test/remote/gateways/remote_quickpay_test.rb +0 -182
  2038. data/vendor/plugins/active_merchant/test/remote/gateways/remote_realex_test.rb +0 -224
  2039. data/vendor/plugins/active_merchant/test/remote/gateways/remote_secure_pay_au_test.rb +0 -40
  2040. data/vendor/plugins/active_merchant/test/remote/gateways/remote_secure_pay_tech_test.rb +0 -37
  2041. data/vendor/plugins/active_merchant/test/remote/gateways/remote_secure_pay_test.rb +0 -28
  2042. data/vendor/plugins/active_merchant/test/remote/gateways/remote_skipjack_test.rb +0 -105
  2043. data/vendor/plugins/active_merchant/test/remote/gateways/remote_trans_first_test.rb +0 -34
  2044. data/vendor/plugins/active_merchant/test/remote/gateways/remote_trust_commerce_test.rb +0 -152
  2045. data/vendor/plugins/active_merchant/test/remote/gateways/remote_usa_epay_test.rb +0 -46
  2046. data/vendor/plugins/active_merchant/test/remote/gateways/remote_verifi_test.rb +0 -107
  2047. data/vendor/plugins/active_merchant/test/remote/gateways/remote_viaklix_test.rb +0 -43
  2048. data/vendor/plugins/active_merchant/test/remote/integrations/remote_gestpay_integration_test.rb +0 -37
  2049. data/vendor/plugins/active_merchant/test/remote/integrations/remote_paypal_integration_test.rb +0 -14
  2050. data/vendor/plugins/active_merchant/test/test_helper.rb +0 -173
  2051. data/vendor/plugins/active_merchant/test/unit/avs_result_test.rb +0 -59
  2052. data/vendor/plugins/active_merchant/test/unit/base_test.rb +0 -55
  2053. data/vendor/plugins/active_merchant/test/unit/check_test.rb +0 -76
  2054. data/vendor/plugins/active_merchant/test/unit/country_code_test.rb +0 -33
  2055. data/vendor/plugins/active_merchant/test/unit/country_test.rb +0 -64
  2056. data/vendor/plugins/active_merchant/test/unit/credit_card_formatting_test.rb +0 -19
  2057. data/vendor/plugins/active_merchant/test/unit/credit_card_methods_test.rb +0 -170
  2058. data/vendor/plugins/active_merchant/test/unit/credit_card_test.rb +0 -311
  2059. data/vendor/plugins/active_merchant/test/unit/cvv_result_test.rb +0 -33
  2060. data/vendor/plugins/active_merchant/test/unit/expiry_date_test.rb +0 -21
  2061. data/vendor/plugins/active_merchant/test/unit/gateways/authorize_net_cim_test.rb +0 -640
  2062. data/vendor/plugins/active_merchant/test/unit/gateways/authorize_net_test.rb +0 -280
  2063. data/vendor/plugins/active_merchant/test/unit/gateways/bogus_test.rb +0 -42
  2064. data/vendor/plugins/active_merchant/test/unit/gateways/braintree_test.rb +0 -119
  2065. data/vendor/plugins/active_merchant/test/unit/gateways/card_stream_test.rb +0 -90
  2066. data/vendor/plugins/active_merchant/test/unit/gateways/cyber_source_test.rb +0 -188
  2067. data/vendor/plugins/active_merchant/test/unit/gateways/data_cash_test.rb +0 -132
  2068. data/vendor/plugins/active_merchant/test/unit/gateways/efsnet_test.rb +0 -123
  2069. data/vendor/plugins/active_merchant/test/unit/gateways/eway_test.rb +0 -118
  2070. data/vendor/plugins/active_merchant/test/unit/gateways/exact_test.rb +0 -156
  2071. data/vendor/plugins/active_merchant/test/unit/gateways/gateway_test.rb +0 -41
  2072. data/vendor/plugins/active_merchant/test/unit/gateways/linkpoint_test.rb +0 -167
  2073. data/vendor/plugins/active_merchant/test/unit/gateways/moneris_test.rb +0 -158
  2074. data/vendor/plugins/active_merchant/test/unit/gateways/net_registry_test.rb +0 -416
  2075. data/vendor/plugins/active_merchant/test/unit/gateways/netbilling_test.rb +0 -54
  2076. data/vendor/plugins/active_merchant/test/unit/gateways/pay_junction_test.rb +0 -123
  2077. data/vendor/plugins/active_merchant/test/unit/gateways/pay_secure_test.rb +0 -71
  2078. data/vendor/plugins/active_merchant/test/unit/gateways/payflow_express_nv_test.rb +0 -156
  2079. data/vendor/plugins/active_merchant/test/unit/gateways/payflow_express_test.rb +0 -173
  2080. data/vendor/plugins/active_merchant/test/unit/gateways/payflow_express_uk_test.rb +0 -14
  2081. data/vendor/plugins/active_merchant/test/unit/gateways/payflow_nv_test.rb +0 -237
  2082. data/vendor/plugins/active_merchant/test/unit/gateways/payflow_test.rb +0 -301
  2083. data/vendor/plugins/active_merchant/test/unit/gateways/payflow_uk_test.rb +0 -30
  2084. data/vendor/plugins/active_merchant/test/unit/gateways/payment_express_test.rb +0 -195
  2085. data/vendor/plugins/active_merchant/test/unit/gateways/paypal_express_test.rb +0 -333
  2086. data/vendor/plugins/active_merchant/test/unit/gateways/paypal_test.rb +0 -380
  2087. data/vendor/plugins/active_merchant/test/unit/gateways/plugnpay_test.rb +0 -86
  2088. data/vendor/plugins/active_merchant/test/unit/gateways/protx_test.rb +0 -122
  2089. data/vendor/plugins/active_merchant/test/unit/gateways/psigate_test.rb +0 -169
  2090. data/vendor/plugins/active_merchant/test/unit/gateways/psl_card_test.rb +0 -64
  2091. data/vendor/plugins/active_merchant/test/unit/gateways/quickpay_test.rb +0 -112
  2092. data/vendor/plugins/active_merchant/test/unit/gateways/realex_test.rb +0 -151
  2093. data/vendor/plugins/active_merchant/test/unit/gateways/secure_pay_au_test.rb +0 -150
  2094. data/vendor/plugins/active_merchant/test/unit/gateways/secure_pay_tech_test.rb +0 -44
  2095. data/vendor/plugins/active_merchant/test/unit/gateways/secure_pay_test.rb +0 -87
  2096. data/vendor/plugins/active_merchant/test/unit/gateways/skip_jack_test.rb +0 -125
  2097. data/vendor/plugins/active_merchant/test/unit/gateways/trans_first_test.rb +0 -112
  2098. data/vendor/plugins/active_merchant/test/unit/gateways/trust_commerce_test.rb +0 -78
  2099. data/vendor/plugins/active_merchant/test/unit/gateways/usa_epay_test.rb +0 -128
  2100. data/vendor/plugins/active_merchant/test/unit/gateways/verifi_test.rb +0 -96
  2101. data/vendor/plugins/active_merchant/test/unit/gateways/viaklix_test.rb +0 -78
  2102. data/vendor/plugins/active_merchant/test/unit/generators/test_gateway_generator.rb +0 -46
  2103. data/vendor/plugins/active_merchant/test/unit/generators/test_generator_helper.rb +0 -20
  2104. data/vendor/plugins/active_merchant/test/unit/generators/test_integration_generator.rb +0 -53
  2105. data/vendor/plugins/active_merchant/test/unit/integrations/action_view_helper_test.rb +0 -47
  2106. data/vendor/plugins/active_merchant/test/unit/integrations/bogus_module_test.rb +0 -20
  2107. data/vendor/plugins/active_merchant/test/unit/integrations/chronopay_module_test.rb +0 -13
  2108. data/vendor/plugins/active_merchant/test/unit/integrations/gestpay_module_test.rb +0 -14
  2109. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/bogus_helper_test.rb +0 -28
  2110. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/chronopay_helper_test.rb +0 -67
  2111. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/gestpay_helper_test.rb +0 -100
  2112. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/hi_trust_helper_test.rb +0 -16
  2113. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/nochex_helper_test.rb +0 -53
  2114. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/paypal_helper_test.rb +0 -162
  2115. data/vendor/plugins/active_merchant/test/unit/integrations/helpers/two_checkout_helper_test.rb +0 -92
  2116. data/vendor/plugins/active_merchant/test/unit/integrations/hi_trust_module_test.rb +0 -13
  2117. data/vendor/plugins/active_merchant/test/unit/integrations/nochex_module_test.rb +0 -13
  2118. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/chronopay_notification_test.rb +0 -66
  2119. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/gestpay_notification_test.rb +0 -60
  2120. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/hi_trust_notification_test.rb +0 -38
  2121. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/nochex_notification_test.rb +0 -51
  2122. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/notification_test.rb +0 -41
  2123. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/paypal_notification_test.rb +0 -85
  2124. data/vendor/plugins/active_merchant/test/unit/integrations/notifications/two_checkout_notification_test.rb +0 -55
  2125. data/vendor/plugins/active_merchant/test/unit/integrations/paypal_module_test.rb +0 -28
  2126. data/vendor/plugins/active_merchant/test/unit/integrations/returns/chronopay_return_test.rb +0 -11
  2127. data/vendor/plugins/active_merchant/test/unit/integrations/returns/gestpay_return_test.rb +0 -10
  2128. data/vendor/plugins/active_merchant/test/unit/integrations/returns/hi_trust_return_test.rb +0 -24
  2129. data/vendor/plugins/active_merchant/test/unit/integrations/returns/nochex_return_test.rb +0 -10
  2130. data/vendor/plugins/active_merchant/test/unit/integrations/returns/paypal_return_test.rb +0 -10
  2131. data/vendor/plugins/active_merchant/test/unit/integrations/returns/return_test.rb +0 -11
  2132. data/vendor/plugins/active_merchant/test/unit/integrations/returns/two_checkout_return_test.rb +0 -24
  2133. data/vendor/plugins/active_merchant/test/unit/integrations/two_checkout_module_test.rb +0 -13
  2134. data/vendor/plugins/active_merchant/test/unit/post_data_test.rb +0 -55
  2135. data/vendor/plugins/active_merchant/test/unit/posts_data_test.rb +0 -86
  2136. data/vendor/plugins/active_merchant/test/unit/response_test.rb +0 -28
  2137. data/vendor/plugins/active_merchant/test/unit/utils_test.rb +0 -7
  2138. data/vendor/plugins/active_merchant/test/unit/validateable_test.rb +0 -60
  2139. data/vendor/plugins/attachment_fu/test/amazon_s3.yml +0 -6
  2140. data/vendor/plugins/resource_controller/README +0 -276
  2141. data/vendor/plugins/resource_controller/release.rb +0 -24
  2142. data/vendor/plugins/rspec/UPGRADE +0 -31
  2143. data/vendor/plugins/rspec/autotest/discover.rb +0 -6
  2144. data/vendor/plugins/rspec/autotest/rspec.rb +0 -1
  2145. data/vendor/plugins/rspec/pre_commit/lib/pre_commit.rb +0 -4
  2146. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/core.rb +0 -50
  2147. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/pre_commit.rb +0 -54
  2148. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec.rb +0 -111
  2149. data/vendor/plugins/rspec/pre_commit/lib/pre_commit/rspec_on_rails.rb +0 -313
  2150. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/pre_commit_spec.rb +0 -15
  2151. data/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +0 -36
  2152. data/vendor/plugins/rspec/pre_commit/spec/spec_helper.rb +0 -3
  2153. data/vendor/plugins/rspec/pre_commit/spec/spec_suite.rb +0 -11
  2154. data/vendor/plugins/rspec/report.html +0 -4358
  2155. data/vendor/plugins/rspec_on_rails/Rakefile +0 -9
  2156. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec +0 -4
  2157. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/script/spec_server +0 -102
  2158. data/vendor/plugins/rspec_on_rails/generators/rspec/templates/spec_helper.rb +0 -39
  2159. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb +0 -25
  2160. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/helper_spec.rb +0 -11
  2161. data/vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/view_spec.rb +0 -12
  2162. data/vendor/plugins/rspec_on_rails/generators/rspec_model/templates/model_spec.rb +0 -11
  2163. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/rspec_scaffold_generator.rb +0 -167
  2164. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/controller_spec.rb +0 -313
  2165. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/edit_erb_spec.rb +0 -25
  2166. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/helper_spec.rb +0 -11
  2167. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/index_erb_spec.rb +0 -22
  2168. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/new_erb_spec.rb +0 -26
  2169. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/routing_spec.rb +0 -61
  2170. data/vendor/plugins/rspec_on_rails/generators/rspec_scaffold/templates/show_erb_spec.rb +0 -22
  2171. data/vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb +0 -81
  2172. data/vendor/plugins/rspec_on_rails/lib/spec/rails.rb +0 -51
  2173. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example.rb +0 -47
  2174. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/assigns_hash_proxy.rb +0 -42
  2175. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/controller_example_group.rb +0 -255
  2176. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/functional_example_group.rb +0 -66
  2177. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/helper_example_group.rb +0 -82
  2178. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/ivar_proxy.rb +0 -62
  2179. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/rails_example_group.rb +0 -68
  2180. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/render_observer.rb +0 -90
  2181. data/vendor/plugins/rspec_on_rails/lib/spec/rails/example/view_example_group.rb +0 -171
  2182. data/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb +0 -66
  2183. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers.rb +0 -29
  2184. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/have_text.rb +0 -55
  2185. data/vendor/plugins/rspec_on_rails/lib/spec/rails/matchers/redirect_to.rb +0 -113
  2186. data/vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb +0 -23
  2187. data/vendor/plugins/rspec_on_rails/spec/rails/example/assigns_hash_proxy_spec.rb +0 -55
  2188. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_isolation_spec.rb +0 -43
  2189. data/vendor/plugins/rspec_on_rails/spec/rails/example/controller_spec_spec.rb +0 -187
  2190. data/vendor/plugins/rspec_on_rails/spec/rails/example/helper_spec_spec.rb +0 -118
  2191. data/vendor/plugins/rspec_on_rails/spec/rails/example/ivar_proxy_spec.rb +0 -64
  2192. data/vendor/plugins/rspec_on_rails/spec/rails/example/view_spec_spec.rb +0 -263
  2193. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/assert_select_spec.rb +0 -783
  2194. data/vendor/plugins/rspec_on_rails/spec/rails/matchers/redirect_to_spec.rb +0 -203
  2195. data/vendor/plugins/rspec_on_rails/spec/rails/mocks/mock_model_spec.rb +0 -65
  2196. data/vendor/plugins/rspec_on_rails/spec/rails/sample_spec.rb +0 -7
  2197. data/vendor/plugins/rspec_on_rails/spec/rails/spec_server_spec.rb +0 -89
  2198. data/vendor/plugins/rspec_on_rails/spec_resources/controllers/controller_spec_controller.rb +0 -56
  2199. data/vendor/plugins/rspec_on_rails/spec_resources/helpers/explicit_helper.rb +0 -10
  2200. data/vendor/plugins/rspec_on_rails/spec_resources/views/view_spec/accessor.rhtml +0 -3
  2201. data/vendor/plugins/rspec_on_rails/tasks/rspec.rake +0 -137
  2202. data/vendor/rails/TAG_rel_2-0-2 +0 -0
  2203. data/vendor/rails/actionmailer/CHANGELOG +0 -325
  2204. data/vendor/rails/actionmailer/MIT-LICENSE +0 -21
  2205. data/vendor/rails/actionmailer/README +0 -145
  2206. data/vendor/rails/actionmailer/Rakefile +0 -96
  2207. data/vendor/rails/actionmailer/install.rb +0 -30
  2208. data/vendor/rails/actionmailer/lib/action_mailer.rb +0 -52
  2209. data/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb +0 -30
  2210. data/vendor/rails/actionmailer/lib/action_mailer/base.rb +0 -603
  2211. data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +0 -111
  2212. data/vendor/rails/actionmailer/lib/action_mailer/mail_helper.rb +0 -19
  2213. data/vendor/rails/actionmailer/lib/action_mailer/part.rb +0 -110
  2214. data/vendor/rails/actionmailer/lib/action_mailer/part_container.rb +0 -51
  2215. data/vendor/rails/actionmailer/lib/action_mailer/quoting.rb +0 -59
  2216. data/vendor/rails/actionmailer/lib/action_mailer/test_case.rb +0 -59
  2217. data/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb +0 -67
  2218. data/vendor/rails/actionmailer/lib/action_mailer/utils.rb +0 -8
  2219. data/vendor/rails/actionmailer/lib/action_mailer/vendor.rb +0 -14
  2220. data/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +0 -1466
  2221. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail.rb +0 -4
  2222. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/Makefile +0 -19
  2223. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb +0 -245
  2224. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/attachments.rb +0 -47
  2225. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/base64.rb +0 -52
  2226. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/compat.rb +0 -39
  2227. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/config.rb +0 -71
  2228. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb +0 -67
  2229. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb +0 -481
  2230. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/facade.rb +0 -552
  2231. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb +0 -931
  2232. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/info.rb +0 -35
  2233. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb +0 -540
  2234. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/loader.rb +0 -1
  2235. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mail.rb +0 -462
  2236. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb +0 -435
  2237. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mbox.rb +0 -1
  2238. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb +0 -282
  2239. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb +0 -137
  2240. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb +0 -1475
  2241. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.y +0 -381
  2242. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/port.rb +0 -379
  2243. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/quoting.rb +0 -142
  2244. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner.rb +0 -43
  2245. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb +0 -263
  2246. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb +0 -279
  2247. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/tmail.rb +0 -1
  2248. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/utils.rb +0 -281
  2249. data/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/version.rb +0 -38
  2250. data/vendor/rails/actionmailer/lib/action_mailer/version.rb +0 -9
  2251. data/vendor/rails/actionmailer/lib/actionmailer.rb +0 -1
  2252. data/vendor/rails/actionmailer/test/abstract_unit.rb +0 -49
  2253. data/vendor/rails/actionmailer/test/delivery_method_test.rb +0 -51
  2254. data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.erb +0 -1
  2255. data/vendor/rails/actionmailer/test/fixtures/first_mailer/share.rhtml +0 -0
  2256. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +0 -1
  2257. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml +0 -0
  2258. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.erb +0 -1
  2259. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper.rhtml +0 -0
  2260. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +0 -1
  2261. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml +0 -0
  2262. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +0 -5
  2263. data/vendor/rails/actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml +0 -0
  2264. data/vendor/rails/actionmailer/test/fixtures/helpers/example_helper.rb +0 -5
  2265. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +0 -1
  2266. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml +0 -0
  2267. data/vendor/rails/actionmailer/test/fixtures/path.with.dots/multipart_with_template_path_with_dots.rhtml +0 -0
  2268. data/vendor/rails/actionmailer/test/fixtures/raw_base64_decoded_string +0 -0
  2269. data/vendor/rails/actionmailer/test/fixtures/raw_base64_encoded_string +0 -1
  2270. data/vendor/rails/actionmailer/test/fixtures/raw_email +0 -14
  2271. data/vendor/rails/actionmailer/test/fixtures/raw_email10 +0 -20
  2272. data/vendor/rails/actionmailer/test/fixtures/raw_email12 +0 -32
  2273. data/vendor/rails/actionmailer/test/fixtures/raw_email13 +0 -29
  2274. data/vendor/rails/actionmailer/test/fixtures/raw_email2 +0 -114
  2275. data/vendor/rails/actionmailer/test/fixtures/raw_email3 +0 -70
  2276. data/vendor/rails/actionmailer/test/fixtures/raw_email4 +0 -59
  2277. data/vendor/rails/actionmailer/test/fixtures/raw_email5 +0 -19
  2278. data/vendor/rails/actionmailer/test/fixtures/raw_email6 +0 -20
  2279. data/vendor/rails/actionmailer/test/fixtures/raw_email7 +0 -66
  2280. data/vendor/rails/actionmailer/test/fixtures/raw_email8 +0 -47
  2281. data/vendor/rails/actionmailer/test/fixtures/raw_email9 +0 -28
  2282. data/vendor/rails/actionmailer/test/fixtures/raw_email_quoted_with_0d0a +0 -14
  2283. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_invalid_characters_in_content_type +0 -104
  2284. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_nested_attachment +0 -100
  2285. data/vendor/rails/actionmailer/test/fixtures/raw_email_with_partially_quoted_subject +0 -14
  2286. data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.erb +0 -1
  2287. data/vendor/rails/actionmailer/test/fixtures/second_mailer/share.rhtml +0 -0
  2288. data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.erb +0 -3
  2289. data/vendor/rails/actionmailer/test/fixtures/templates/signed_up.rhtml +0 -0
  2290. data/vendor/rails/actionmailer/test/fixtures/test_mailer/_subtemplate.text.plain.erb +0 -1
  2291. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +0 -6
  2292. data/vendor/rails/actionmailer/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +0 -6
  2293. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +0 -1
  2294. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml +0 -0
  2295. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +0 -10
  2296. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml +0 -0
  2297. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +0 -2
  2298. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml +0 -0
  2299. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +0 -1
  2300. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml +0 -0
  2301. data/vendor/rails/actionmailer/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +0 -1
  2302. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.builder +0 -2
  2303. data/vendor/rails/actionmailer/test/fixtures/test_mailer/rxml_template.rxml +0 -2
  2304. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.erb +0 -3
  2305. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up.rhtml +0 -0
  2306. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb +0 -5
  2307. data/vendor/rails/actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml +0 -0
  2308. data/vendor/rails/actionmailer/test/mail_helper_test.rb +0 -95
  2309. data/vendor/rails/actionmailer/test/mail_render_test.rb +0 -122
  2310. data/vendor/rails/actionmailer/test/mail_service_test.rb +0 -939
  2311. data/vendor/rails/actionmailer/test/quoting_test.rb +0 -111
  2312. data/vendor/rails/actionmailer/test/test_helper_test.rb +0 -117
  2313. data/vendor/rails/actionmailer/test/tmail_test.rb +0 -22
  2314. data/vendor/rails/actionmailer/test/url_test.rb +0 -76
  2315. data/vendor/rails/actionpack/CHANGELOG +0 -4606
  2316. data/vendor/rails/actionpack/MIT-LICENSE +0 -21
  2317. data/vendor/rails/actionpack/README +0 -469
  2318. data/vendor/rails/actionpack/RUNNING_UNIT_TESTS +0 -24
  2319. data/vendor/rails/actionpack/Rakefile +0 -153
  2320. data/vendor/rails/actionpack/install.rb +0 -30
  2321. data/vendor/rails/actionpack/lib/action_controller.rb +0 -79
  2322. data/vendor/rails/actionpack/lib/action_controller/assertions.rb +0 -69
  2323. data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +0 -39
  2324. data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +0 -19
  2325. data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +0 -166
  2326. data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +0 -143
  2327. data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +0 -640
  2328. data/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb +0 -130
  2329. data/vendor/rails/actionpack/lib/action_controller/base.rb +0 -1295
  2330. data/vendor/rails/actionpack/lib/action_controller/benchmarking.rb +0 -94
  2331. data/vendor/rails/actionpack/lib/action_controller/caching.rb +0 -683
  2332. data/vendor/rails/actionpack/lib/action_controller/cgi_ext.rb +0 -16
  2333. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie.rb +0 -106
  2334. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/query_extension.rb +0 -22
  2335. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb +0 -73
  2336. data/vendor/rails/actionpack/lib/action_controller/cgi_ext/stdinput.rb +0 -23
  2337. data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +0 -221
  2338. data/vendor/rails/actionpack/lib/action_controller/components.rb +0 -165
  2339. data/vendor/rails/actionpack/lib/action_controller/cookies.rb +0 -84
  2340. data/vendor/rails/actionpack/lib/action_controller/dispatcher.rb +0 -195
  2341. data/vendor/rails/actionpack/lib/action_controller/filters.rb +0 -767
  2342. data/vendor/rails/actionpack/lib/action_controller/flash.rb +0 -177
  2343. data/vendor/rails/actionpack/lib/action_controller/helpers.rb +0 -204
  2344. data/vendor/rails/actionpack/lib/action_controller/http_authentication.rb +0 -126
  2345. data/vendor/rails/actionpack/lib/action_controller/integration.rb +0 -581
  2346. data/vendor/rails/actionpack/lib/action_controller/layout.rb +0 -326
  2347. data/vendor/rails/actionpack/lib/action_controller/mime_responds.rb +0 -170
  2348. data/vendor/rails/actionpack/lib/action_controller/mime_type.rb +0 -163
  2349. data/vendor/rails/actionpack/lib/action_controller/mime_types.rb +0 -20
  2350. data/vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb +0 -88
  2351. data/vendor/rails/actionpack/lib/action_controller/record_identifier.rb +0 -91
  2352. data/vendor/rails/actionpack/lib/action_controller/request.rb +0 -730
  2353. data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +0 -132
  2354. data/vendor/rails/actionpack/lib/action_controller/request_profiler.rb +0 -138
  2355. data/vendor/rails/actionpack/lib/action_controller/rescue.rb +0 -258
  2356. data/vendor/rails/actionpack/lib/action_controller/resources.rb +0 -529
  2357. data/vendor/rails/actionpack/lib/action_controller/response.rb +0 -76
  2358. data/vendor/rails/actionpack/lib/action_controller/routing.rb +0 -1499
  2359. data/vendor/rails/actionpack/lib/action_controller/routing_optimisation.rb +0 -119
  2360. data/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb +0 -336
  2361. data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +0 -164
  2362. data/vendor/rails/actionpack/lib/action_controller/session/drb_server.rb +0 -32
  2363. data/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb +0 -35
  2364. data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +0 -98
  2365. data/vendor/rails/actionpack/lib/action_controller/session_management.rb +0 -151
  2366. data/vendor/rails/actionpack/lib/action_controller/status_codes.rb +0 -88
  2367. data/vendor/rails/actionpack/lib/action_controller/streaming.rb +0 -141
  2368. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_request_and_response.erb +0 -24
  2369. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/_trace.erb +0 -26
  2370. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/diagnostics.erb +0 -11
  2371. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb +0 -29
  2372. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/missing_template.erb +0 -2
  2373. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/routing_error.erb +0 -10
  2374. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/template_error.erb +0 -21
  2375. data/vendor/rails/actionpack/lib/action_controller/templates/rescues/unknown_action.erb +0 -2
  2376. data/vendor/rails/actionpack/lib/action_controller/test_case.rb +0 -53
  2377. data/vendor/rails/actionpack/lib/action_controller/test_process.rb +0 -520
  2378. data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +0 -135
  2379. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +0 -68
  2380. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +0 -530
  2381. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +0 -173
  2382. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb +0 -828
  2383. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/tokenizer.rb +0 -105
  2384. data/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb +0 -11
  2385. data/vendor/rails/actionpack/lib/action_controller/verification.rb +0 -114
  2386. data/vendor/rails/actionpack/lib/action_pack.rb +0 -24
  2387. data/vendor/rails/actionpack/lib/action_pack/version.rb +0 -9
  2388. data/vendor/rails/actionpack/lib/action_view.rb +0 -37
  2389. data/vendor/rails/actionpack/lib/action_view/base.rb +0 -642
  2390. data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +0 -69
  2391. data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +0 -255
  2392. data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +0 -548
  2393. data/vendor/rails/actionpack/lib/action_view/helpers/atom_feed_helper.rb +0 -111
  2394. data/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb +0 -31
  2395. data/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb +0 -39
  2396. data/vendor/rails/actionpack/lib/action_view/helpers/capture_helper.rb +0 -162
  2397. data/vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb +0 -689
  2398. data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +0 -31
  2399. data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +0 -689
  2400. data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +0 -425
  2401. data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +0 -432
  2402. data/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb +0 -217
  2403. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js +0 -963
  2404. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/dragdrop.js +0 -972
  2405. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/effects.js +0 -1120
  2406. data/vendor/rails/actionpack/lib/action_view/helpers/javascripts/prototype.js +0 -4225
  2407. data/vendor/rails/actionpack/lib/action_view/helpers/number_helper.rb +0 -179
  2408. data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +0 -1268
  2409. data/vendor/rails/actionpack/lib/action_view/helpers/record_identification_helper.rb +0 -20
  2410. data/vendor/rails/actionpack/lib/action_view/helpers/record_tag_helper.rb +0 -59
  2411. data/vendor/rails/actionpack/lib/action_view/helpers/sanitize_helper.rb +0 -223
  2412. data/vendor/rails/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +0 -199
  2413. data/vendor/rails/actionpack/lib/action_view/helpers/tag_helper.rb +0 -133
  2414. data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +0 -479
  2415. data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +0 -524
  2416. data/vendor/rails/actionpack/lib/action_view/partials.rb +0 -200
  2417. data/vendor/rails/actionpack/lib/action_view/template_error.rb +0 -102
  2418. data/vendor/rails/actionpack/lib/action_view/template_handler.rb +0 -17
  2419. data/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb +0 -19
  2420. data/vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb +0 -21
  2421. data/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb +0 -14
  2422. data/vendor/rails/actionpack/lib/actionpack.rb +0 -1
  2423. data/vendor/rails/actionpack/test/abstract_unit.rb +0 -36
  2424. data/vendor/rails/actionpack/test/action_view_test.rb +0 -44
  2425. data/vendor/rails/actionpack/test/active_record_unit.rb +0 -108
  2426. data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +0 -142
  2427. data/vendor/rails/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +0 -74
  2428. data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +0 -492
  2429. data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +0 -43
  2430. data/vendor/rails/actionpack/test/controller/assert_select_test.rb +0 -682
  2431. data/vendor/rails/actionpack/test/controller/base_test.rb +0 -134
  2432. data/vendor/rails/actionpack/test/controller/benchmark_test.rb +0 -33
  2433. data/vendor/rails/actionpack/test/controller/caching_test.rb +0 -349
  2434. data/vendor/rails/actionpack/test/controller/capture_test.rb +0 -89
  2435. data/vendor/rails/actionpack/test/controller/cgi_test.rb +0 -115
  2436. data/vendor/rails/actionpack/test/controller/components_test.rb +0 -140
  2437. data/vendor/rails/actionpack/test/controller/content_type_test.rb +0 -139
  2438. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/admin/user_controller.rb +0 -0
  2439. data/vendor/rails/actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb +0 -0
  2440. data/vendor/rails/actionpack/test/controller/controller_fixtures/vendor/plugins/bad_plugin/lib/plugin_controller.rb +0 -0
  2441. data/vendor/rails/actionpack/test/controller/cookie_test.rb +0 -135
  2442. data/vendor/rails/actionpack/test/controller/custom_handler_test.rb +0 -41
  2443. data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +0 -37
  2444. data/vendor/rails/actionpack/test/controller/dispatcher_test.rb +0 -123
  2445. data/vendor/rails/actionpack/test/controller/fake_controllers.rb +0 -16
  2446. data/vendor/rails/actionpack/test/controller/fake_models.rb +0 -5
  2447. data/vendor/rails/actionpack/test/controller/filter_params_test.rb +0 -43
  2448. data/vendor/rails/actionpack/test/controller/filters_test.rb +0 -856
  2449. data/vendor/rails/actionpack/test/controller/flash_test.rb +0 -146
  2450. data/vendor/rails/actionpack/test/controller/fragment_store_setting_test.rb +0 -47
  2451. data/vendor/rails/actionpack/test/controller/helper_test.rb +0 -206
  2452. data/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb +0 -124
  2453. data/vendor/rails/actionpack/test/controller/html-scanner/node_test.rb +0 -69
  2454. data/vendor/rails/actionpack/test/controller/html-scanner/sanitizer_test.rb +0 -250
  2455. data/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb +0 -239
  2456. data/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb +0 -51
  2457. data/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb +0 -125
  2458. data/vendor/rails/actionpack/test/controller/http_authentication_test.rb +0 -54
  2459. data/vendor/rails/actionpack/test/controller/integration_test.rb +0 -255
  2460. data/vendor/rails/actionpack/test/controller/layout_test.rb +0 -239
  2461. data/vendor/rails/actionpack/test/controller/mime_responds_test.rb +0 -506
  2462. data/vendor/rails/actionpack/test/controller/mime_type_test.rb +0 -55
  2463. data/vendor/rails/actionpack/test/controller/new_render_test.rb +0 -832
  2464. data/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb +0 -98
  2465. data/vendor/rails/actionpack/test/controller/record_identifier_test.rb +0 -103
  2466. data/vendor/rails/actionpack/test/controller/redirect_test.rb +0 -258
  2467. data/vendor/rails/actionpack/test/controller/render_test.rb +0 -464
  2468. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +0 -217
  2469. data/vendor/rails/actionpack/test/controller/request_test.rb +0 -836
  2470. data/vendor/rails/actionpack/test/controller/rescue_test.rb +0 -501
  2471. data/vendor/rails/actionpack/test/controller/resources_test.rb +0 -787
  2472. data/vendor/rails/actionpack/test/controller/routing_test.rb +0 -2203
  2473. data/vendor/rails/actionpack/test/controller/selector_test.rb +0 -628
  2474. data/vendor/rails/actionpack/test/controller/send_file_test.rb +0 -127
  2475. data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +0 -246
  2476. data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +0 -182
  2477. data/vendor/rails/actionpack/test/controller/session_fixation_test.rb +0 -89
  2478. data/vendor/rails/actionpack/test/controller/session_management_test.rb +0 -156
  2479. data/vendor/rails/actionpack/test/controller/test_test.rb +0 -623
  2480. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +0 -246
  2481. data/vendor/rails/actionpack/test/controller/verification_test.rb +0 -253
  2482. data/vendor/rails/actionpack/test/controller/view_paths_test.rb +0 -137
  2483. data/vendor/rails/actionpack/test/controller/webservice_test.rb +0 -184
  2484. data/vendor/rails/actionpack/test/fixtures/addresses/list.erb +0 -1
  2485. data/vendor/rails/actionpack/test/fixtures/companies.yml +0 -24
  2486. data/vendor/rails/actionpack/test/fixtures/company.rb +0 -9
  2487. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml +0 -1
  2488. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rhtml.rhtml +0 -1
  2489. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rjs.rjs +0 -1
  2490. data/vendor/rails/actionpack/test/fixtures/content_type/render_default_for_rxml.rxml +0 -1
  2491. data/vendor/rails/actionpack/test/fixtures/db_definitions/sqlite.sql +0 -43
  2492. data/vendor/rails/actionpack/test/fixtures/developer.rb +0 -9
  2493. data/vendor/rails/actionpack/test/fixtures/developers.yml +0 -21
  2494. data/vendor/rails/actionpack/test/fixtures/developers_projects.yml +0 -13
  2495. data/vendor/rails/actionpack/test/fixtures/fun/games/hello_world.erb +0 -1
  2496. data/vendor/rails/actionpack/test/fixtures/helpers/abc_helper.rb +0 -5
  2497. data/vendor/rails/actionpack/test/fixtures/helpers/fun/games_helper.rb +0 -3
  2498. data/vendor/rails/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +0 -3
  2499. data/vendor/rails/actionpack/test/fixtures/layout_tests/alt/hello.rhtml +0 -1
  2500. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/controller_name_space/nested.rhtml +0 -1
  2501. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/item.rhtml +0 -1
  2502. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml +0 -1
  2503. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +0 -1
  2504. data/vendor/rails/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab +0 -1
  2505. data/vendor/rails/actionpack/test/fixtures/layout_tests/views/hello.rhtml +0 -1
  2506. data/vendor/rails/actionpack/test/fixtures/layouts/builder.builder +0 -3
  2507. data/vendor/rails/actionpack/test/fixtures/layouts/standard.erb +0 -1
  2508. data/vendor/rails/actionpack/test/fixtures/layouts/talk_from_action.erb +0 -2
  2509. data/vendor/rails/actionpack/test/fixtures/layouts/yield.erb +0 -2
  2510. data/vendor/rails/actionpack/test/fixtures/multipart/binary_file +0 -0
  2511. data/vendor/rails/actionpack/test/fixtures/multipart/bracketed_param +0 -5
  2512. data/vendor/rails/actionpack/test/fixtures/multipart/large_text_file +0 -10
  2513. data/vendor/rails/actionpack/test/fixtures/multipart/mixed_files +0 -0
  2514. data/vendor/rails/actionpack/test/fixtures/multipart/mona_lisa.jpg +0 -0
  2515. data/vendor/rails/actionpack/test/fixtures/multipart/single_parameter +0 -5
  2516. data/vendor/rails/actionpack/test/fixtures/multipart/text_file +0 -10
  2517. data/vendor/rails/actionpack/test/fixtures/override/test/hello_world.erb +0 -1
  2518. data/vendor/rails/actionpack/test/fixtures/override2/layouts/test/sub.erb +0 -1
  2519. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/post.html.erb +0 -1
  2520. data/vendor/rails/actionpack/test/fixtures/post_test/layouts/super_post.iphone.erb +0 -1
  2521. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.html.erb +0 -1
  2522. data/vendor/rails/actionpack/test/fixtures/post_test/post/index.iphone.erb +0 -1
  2523. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.html.erb +0 -1
  2524. data/vendor/rails/actionpack/test/fixtures/post_test/super_post/index.iphone.erb +0 -1
  2525. data/vendor/rails/actionpack/test/fixtures/project.rb +0 -3
  2526. data/vendor/rails/actionpack/test/fixtures/projects.yml +0 -7
  2527. data/vendor/rails/actionpack/test/fixtures/public/404.html +0 -1
  2528. data/vendor/rails/actionpack/test/fixtures/public/500.html +0 -1
  2529. data/vendor/rails/actionpack/test/fixtures/public/images/rails.png +0 -0
  2530. data/vendor/rails/actionpack/test/fixtures/public/javascripts/application.js +0 -0
  2531. data/vendor/rails/actionpack/test/fixtures/public/javascripts/bank.js +0 -1
  2532. data/vendor/rails/actionpack/test/fixtures/public/javascripts/robber.js +0 -1
  2533. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/bank.css +0 -1
  2534. data/vendor/rails/actionpack/test/fixtures/public/stylesheets/robber.css +0 -1
  2535. data/vendor/rails/actionpack/test/fixtures/replies.yml +0 -15
  2536. data/vendor/rails/actionpack/test/fixtures/reply.rb +0 -6
  2537. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.html.erb +0 -1
  2538. data/vendor/rails/actionpack/test/fixtures/respond_to/all_types_with_layout.js.rjs +0 -1
  2539. data/vendor/rails/actionpack/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +0 -1
  2540. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +0 -1
  2541. data/vendor/rails/actionpack/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +0 -1
  2542. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/missing.html.erb +0 -1
  2543. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.html.erb +0 -1
  2544. data/vendor/rails/actionpack/test/fixtures/respond_to/layouts/standard.iphone.erb +0 -1
  2545. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.html.erb +0 -1
  2546. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.js.rjs +0 -1
  2547. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults.xml.builder +0 -1
  2548. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.html.erb +0 -1
  2549. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.js.rjs +0 -1
  2550. data/vendor/rails/actionpack/test/fixtures/respond_to/using_defaults_with_type_list.xml.builder +0 -1
  2551. data/vendor/rails/actionpack/test/fixtures/scope/test/modgreet.erb +0 -1
  2552. data/vendor/rails/actionpack/test/fixtures/test/_customer.erb +0 -1
  2553. data/vendor/rails/actionpack/test/fixtures/test/_customer_greeting.erb +0 -1
  2554. data/vendor/rails/actionpack/test/fixtures/test/_hash_greeting.erb +0 -1
  2555. data/vendor/rails/actionpack/test/fixtures/test/_hash_object.erb +0 -2
  2556. data/vendor/rails/actionpack/test/fixtures/test/_hello.builder +0 -1
  2557. data/vendor/rails/actionpack/test/fixtures/test/_layout_for_partial.html.erb +0 -3
  2558. data/vendor/rails/actionpack/test/fixtures/test/_partial.erb +0 -1
  2559. data/vendor/rails/actionpack/test/fixtures/test/_partial.html.erb +0 -1
  2560. data/vendor/rails/actionpack/test/fixtures/test/_partial.js.erb +0 -1
  2561. data/vendor/rails/actionpack/test/fixtures/test/_partial_for_use_in_layout.html.erb +0 -1
  2562. data/vendor/rails/actionpack/test/fixtures/test/_partial_only.erb +0 -1
  2563. data/vendor/rails/actionpack/test/fixtures/test/_person.erb +0 -2
  2564. data/vendor/rails/actionpack/test/fixtures/test/action_talk_to_layout.erb +0 -2
  2565. data/vendor/rails/actionpack/test/fixtures/test/block_content_for.erb +0 -2
  2566. data/vendor/rails/actionpack/test/fixtures/test/calling_partial_with_layout.html.erb +0 -1
  2567. data/vendor/rails/actionpack/test/fixtures/test/capturing.erb +0 -4
  2568. data/vendor/rails/actionpack/test/fixtures/test/content_for.erb +0 -2
  2569. data/vendor/rails/actionpack/test/fixtures/test/content_for_concatenated.erb +0 -3
  2570. data/vendor/rails/actionpack/test/fixtures/test/content_for_with_parameter.erb +0 -2
  2571. data/vendor/rails/actionpack/test/fixtures/test/delete_with_js.rjs +0 -2
  2572. data/vendor/rails/actionpack/test/fixtures/test/dot.directory/render_file_with_ivar.erb +0 -1
  2573. data/vendor/rails/actionpack/test/fixtures/test/enum_rjs_test.rjs +0 -6
  2574. data/vendor/rails/actionpack/test/fixtures/test/erb_content_for.erb +0 -2
  2575. data/vendor/rails/actionpack/test/fixtures/test/formatted_html_erb.html.erb +0 -1
  2576. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.builder +0 -1
  2577. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.html.erb +0 -1
  2578. data/vendor/rails/actionpack/test/fixtures/test/formatted_xml_erb.xml.erb +0 -1
  2579. data/vendor/rails/actionpack/test/fixtures/test/greeting.erb +0 -1
  2580. data/vendor/rails/actionpack/test/fixtures/test/hello.builder +0 -4
  2581. data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb +0 -1
  2582. data/vendor/rails/actionpack/test/fixtures/test/hello_world_container.builder +0 -3
  2583. data/vendor/rails/actionpack/test/fixtures/test/hello_world_from_rxml.builder +0 -4
  2584. data/vendor/rails/actionpack/test/fixtures/test/hello_world_with_layout_false.erb +0 -1
  2585. data/vendor/rails/actionpack/test/fixtures/test/hello_xml_world.builder +0 -11
  2586. data/vendor/rails/actionpack/test/fixtures/test/list.erb +0 -1
  2587. data/vendor/rails/actionpack/test/fixtures/test/non_erb_block_content_for.builder +0 -4
  2588. data/vendor/rails/actionpack/test/fixtures/test/potential_conflicts.erb +0 -4
  2589. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_ivar.erb +0 -1
  2590. data/vendor/rails/actionpack/test/fixtures/test/render_file_with_locals.erb +0 -1
  2591. data/vendor/rails/actionpack/test/fixtures/test/render_to_string_test.erb +0 -1
  2592. data/vendor/rails/actionpack/test/fixtures/test/update_element_with_capture.erb +0 -9
  2593. data/vendor/rails/actionpack/test/fixtures/test/using_layout_around_block.html.erb +0 -1
  2594. data/vendor/rails/actionpack/test/fixtures/topic.rb +0 -3
  2595. data/vendor/rails/actionpack/test/fixtures/topics.yml +0 -22
  2596. data/vendor/rails/actionpack/test/template/active_record_helper_test.rb +0 -251
  2597. data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +0 -438
  2598. data/vendor/rails/actionpack/test/template/atom_feed_helper_test.rb +0 -101
  2599. data/vendor/rails/actionpack/test/template/benchmark_helper_test.rb +0 -72
  2600. data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +0 -193
  2601. data/vendor/rails/actionpack/test/template/date_helper_test.rb +0 -1438
  2602. data/vendor/rails/actionpack/test/template/erb_util_test.rb +0 -56
  2603. data/vendor/rails/actionpack/test/template/form_helper_test.rb +0 -792
  2604. data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +0 -1296
  2605. data/vendor/rails/actionpack/test/template/form_tag_helper_test.rb +0 -238
  2606. data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +0 -115
  2607. data/vendor/rails/actionpack/test/template/number_helper_test.rb +0 -93
  2608. data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +0 -627
  2609. data/vendor/rails/actionpack/test/template/sanitize_helper_test.rb +0 -49
  2610. data/vendor/rails/actionpack/test/template/scriptaculous_helper_test.rb +0 -96
  2611. data/vendor/rails/actionpack/test/template/tag_helper_test.rb +0 -80
  2612. data/vendor/rails/actionpack/test/template/text_helper_test.rb +0 -335
  2613. data/vendor/rails/actionpack/test/template/url_helper_test.rb +0 -536
  2614. data/vendor/rails/actionpack/test/testing_sandbox.rb +0 -11
  2615. data/vendor/rails/activerecord/CHANGELOG +0 -5527
  2616. data/vendor/rails/activerecord/MIT-LICENSE +0 -20
  2617. data/vendor/rails/activerecord/README +0 -346
  2618. data/vendor/rails/activerecord/RUNNING_UNIT_TESTS +0 -33
  2619. data/vendor/rails/activerecord/Rakefile +0 -248
  2620. data/vendor/rails/activerecord/examples/associations.png +0 -0
  2621. data/vendor/rails/activerecord/install.rb +0 -30
  2622. data/vendor/rails/activerecord/lib/active_record.rb +0 -76
  2623. data/vendor/rails/activerecord/lib/active_record/aggregations.rb +0 -180
  2624. data/vendor/rails/activerecord/lib/active_record/associations.rb +0 -1769
  2625. data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +0 -240
  2626. data/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb +0 -160
  2627. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb +0 -56
  2628. data/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +0 -50
  2629. data/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +0 -164
  2630. data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +0 -174
  2631. data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +0 -284
  2632. data/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb +0 -96
  2633. data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +0 -328
  2634. data/vendor/rails/activerecord/lib/active_record/base.rb +0 -2471
  2635. data/vendor/rails/activerecord/lib/active_record/calculations.rb +0 -267
  2636. data/vendor/rails/activerecord/lib/active_record/callbacks.rb +0 -341
  2637. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +0 -308
  2638. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +0 -171
  2639. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +0 -87
  2640. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +0 -69
  2641. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +0 -472
  2642. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +0 -306
  2643. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +0 -172
  2644. data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +0 -496
  2645. data/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +0 -847
  2646. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +0 -34
  2647. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +0 -391
  2648. data/vendor/rails/activerecord/lib/active_record/fixtures.rb +0 -1034
  2649. data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +0 -144
  2650. data/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb +0 -77
  2651. data/vendor/rails/activerecord/lib/active_record/migration.rb +0 -417
  2652. data/vendor/rails/activerecord/lib/active_record/observer.rb +0 -181
  2653. data/vendor/rails/activerecord/lib/active_record/query_cache.rb +0 -21
  2654. data/vendor/rails/activerecord/lib/active_record/reflection.rb +0 -219
  2655. data/vendor/rails/activerecord/lib/active_record/schema.rb +0 -58
  2656. data/vendor/rails/activerecord/lib/active_record/schema_dumper.rb +0 -171
  2657. data/vendor/rails/activerecord/lib/active_record/serialization.rb +0 -98
  2658. data/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb +0 -71
  2659. data/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb +0 -315
  2660. data/vendor/rails/activerecord/lib/active_record/timestamp.rb +0 -41
  2661. data/vendor/rails/activerecord/lib/active_record/transactions.rb +0 -132
  2662. data/vendor/rails/activerecord/lib/active_record/validations.rb +0 -1025
  2663. data/vendor/rails/activerecord/lib/active_record/vendor/db2.rb +0 -362
  2664. data/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb +0 -1214
  2665. data/vendor/rails/activerecord/lib/active_record/version.rb +0 -9
  2666. data/vendor/rails/activerecord/lib/activerecord.rb +0 -1
  2667. data/vendor/rails/activerecord/test/aaa_create_tables_test.rb +0 -72
  2668. data/vendor/rails/activerecord/test/abstract_unit.rb +0 -84
  2669. data/vendor/rails/activerecord/test/active_schema_test_mysql.rb +0 -43
  2670. data/vendor/rails/activerecord/test/adapter_test.rb +0 -105
  2671. data/vendor/rails/activerecord/test/adapter_test_sqlserver.rb +0 -95
  2672. data/vendor/rails/activerecord/test/aggregations_test.rb +0 -128
  2673. data/vendor/rails/activerecord/test/all.sh +0 -8
  2674. data/vendor/rails/activerecord/test/ar_schema_test.rb +0 -33
  2675. data/vendor/rails/activerecord/test/association_inheritance_reload.rb +0 -14
  2676. data/vendor/rails/activerecord/test/associations/callbacks_test.rb +0 -147
  2677. data/vendor/rails/activerecord/test/associations/cascaded_eager_loading_test.rb +0 -110
  2678. data/vendor/rails/activerecord/test/associations/eager_singularization_test.rb +0 -145
  2679. data/vendor/rails/activerecord/test/associations/eager_test.rb +0 -442
  2680. data/vendor/rails/activerecord/test/associations/extension_test.rb +0 -47
  2681. data/vendor/rails/activerecord/test/associations/inner_join_association_test.rb +0 -88
  2682. data/vendor/rails/activerecord/test/associations/join_model_test.rb +0 -559
  2683. data/vendor/rails/activerecord/test/associations_test.rb +0 -2147
  2684. data/vendor/rails/activerecord/test/attribute_methods_test.rb +0 -146
  2685. data/vendor/rails/activerecord/test/base_test.rb +0 -1745
  2686. data/vendor/rails/activerecord/test/binary_test.rb +0 -32
  2687. data/vendor/rails/activerecord/test/calculations_test.rb +0 -251
  2688. data/vendor/rails/activerecord/test/callbacks_test.rb +0 -400
  2689. data/vendor/rails/activerecord/test/class_inheritable_attributes_test.rb +0 -32
  2690. data/vendor/rails/activerecord/test/column_alias_test.rb +0 -17
  2691. data/vendor/rails/activerecord/test/connection_test_firebird.rb +0 -8
  2692. data/vendor/rails/activerecord/test/connection_test_mysql.rb +0 -30
  2693. data/vendor/rails/activerecord/test/connections/native_db2/connection.rb +0 -25
  2694. data/vendor/rails/activerecord/test/connections/native_firebird/connection.rb +0 -26
  2695. data/vendor/rails/activerecord/test/connections/native_frontbase/connection.rb +0 -27
  2696. data/vendor/rails/activerecord/test/connections/native_mysql/connection.rb +0 -27
  2697. data/vendor/rails/activerecord/test/connections/native_openbase/connection.rb +0 -21
  2698. data/vendor/rails/activerecord/test/connections/native_oracle/connection.rb +0 -27
  2699. data/vendor/rails/activerecord/test/connections/native_postgresql/connection.rb +0 -23
  2700. data/vendor/rails/activerecord/test/connections/native_sqlite/connection.rb +0 -25
  2701. data/vendor/rails/activerecord/test/connections/native_sqlite3/connection.rb +0 -25
  2702. data/vendor/rails/activerecord/test/connections/native_sqlite3/in_memory_connection.rb +0 -18
  2703. data/vendor/rails/activerecord/test/connections/native_sybase/connection.rb +0 -23
  2704. data/vendor/rails/activerecord/test/copy_table_test_sqlite.rb +0 -69
  2705. data/vendor/rails/activerecord/test/datatype_test_postgresql.rb +0 -203
  2706. data/vendor/rails/activerecord/test/date_time_test.rb +0 -37
  2707. data/vendor/rails/activerecord/test/default_test_firebird.rb +0 -16
  2708. data/vendor/rails/activerecord/test/defaults_test.rb +0 -67
  2709. data/vendor/rails/activerecord/test/deprecated_finder_test.rb +0 -30
  2710. data/vendor/rails/activerecord/test/finder_test.rb +0 -650
  2711. data/vendor/rails/activerecord/test/fixtures/accounts.yml +0 -28
  2712. data/vendor/rails/activerecord/test/fixtures/all/developers.yml +0 -0
  2713. data/vendor/rails/activerecord/test/fixtures/all/people.csv +0 -0
  2714. data/vendor/rails/activerecord/test/fixtures/all/tasks.yml +0 -0
  2715. data/vendor/rails/activerecord/test/fixtures/author.rb +0 -109
  2716. data/vendor/rails/activerecord/test/fixtures/author_favorites.yml +0 -4
  2717. data/vendor/rails/activerecord/test/fixtures/authors.yml +0 -7
  2718. data/vendor/rails/activerecord/test/fixtures/auto_id.rb +0 -4
  2719. data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_numeric_first_char +0 -1
  2720. data/vendor/rails/activerecord/test/fixtures/bad_fixtures/attr_with_spaces +0 -1
  2721. data/vendor/rails/activerecord/test/fixtures/bad_fixtures/blank_line +0 -3
  2722. data/vendor/rails/activerecord/test/fixtures/bad_fixtures/duplicate_attributes +0 -3
  2723. data/vendor/rails/activerecord/test/fixtures/bad_fixtures/missing_value +0 -1
  2724. data/vendor/rails/activerecord/test/fixtures/binaries.yml +0 -132
  2725. data/vendor/rails/activerecord/test/fixtures/binary.rb +0 -2
  2726. data/vendor/rails/activerecord/test/fixtures/book.rb +0 -4
  2727. data/vendor/rails/activerecord/test/fixtures/books.yml +0 -7
  2728. data/vendor/rails/activerecord/test/fixtures/categories.yml +0 -14
  2729. data/vendor/rails/activerecord/test/fixtures/categories/special_categories.yml +0 -9
  2730. data/vendor/rails/activerecord/test/fixtures/categories/subsubdir/arbitrary_filename.yml +0 -4
  2731. data/vendor/rails/activerecord/test/fixtures/categories_ordered.yml +0 -7
  2732. data/vendor/rails/activerecord/test/fixtures/categories_posts.yml +0 -23
  2733. data/vendor/rails/activerecord/test/fixtures/categorization.rb +0 -5
  2734. data/vendor/rails/activerecord/test/fixtures/categorizations.yml +0 -17
  2735. data/vendor/rails/activerecord/test/fixtures/category.rb +0 -26
  2736. data/vendor/rails/activerecord/test/fixtures/citation.rb +0 -6
  2737. data/vendor/rails/activerecord/test/fixtures/column_name.rb +0 -3
  2738. data/vendor/rails/activerecord/test/fixtures/comment.rb +0 -23
  2739. data/vendor/rails/activerecord/test/fixtures/comments.yml +0 -59
  2740. data/vendor/rails/activerecord/test/fixtures/companies.yml +0 -55
  2741. data/vendor/rails/activerecord/test/fixtures/company.rb +0 -114
  2742. data/vendor/rails/activerecord/test/fixtures/company_in_module.rb +0 -59
  2743. data/vendor/rails/activerecord/test/fixtures/computer.rb +0 -4
  2744. data/vendor/rails/activerecord/test/fixtures/computers.yml +0 -4
  2745. data/vendor/rails/activerecord/test/fixtures/contact.rb +0 -16
  2746. data/vendor/rails/activerecord/test/fixtures/course.rb +0 -3
  2747. data/vendor/rails/activerecord/test/fixtures/courses.yml +0 -7
  2748. data/vendor/rails/activerecord/test/fixtures/customer.rb +0 -55
  2749. data/vendor/rails/activerecord/test/fixtures/customers.yml +0 -17
  2750. data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.drop.sql +0 -33
  2751. data/vendor/rails/activerecord/test/fixtures/db_definitions/db2.sql +0 -235
  2752. data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.drop.sql +0 -2
  2753. data/vendor/rails/activerecord/test/fixtures/db_definitions/db22.sql +0 -5
  2754. data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.drop.sql +0 -65
  2755. data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird.sql +0 -310
  2756. data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.drop.sql +0 -2
  2757. data/vendor/rails/activerecord/test/fixtures/db_definitions/firebird2.sql +0 -6
  2758. data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.drop.sql +0 -33
  2759. data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase.sql +0 -273
  2760. data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.drop.sql +0 -1
  2761. data/vendor/rails/activerecord/test/fixtures/db_definitions/frontbase2.sql +0 -4
  2762. data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.drop.sql +0 -2
  2763. data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase.sql +0 -318
  2764. data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.drop.sql +0 -2
  2765. data/vendor/rails/activerecord/test/fixtures/db_definitions/openbase2.sql +0 -7
  2766. data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.drop.sql +0 -67
  2767. data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle.sql +0 -330
  2768. data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.drop.sql +0 -2
  2769. data/vendor/rails/activerecord/test/fixtures/db_definitions/oracle2.sql +0 -6
  2770. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.drop.sql +0 -44
  2771. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql.sql +0 -292
  2772. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.drop.sql +0 -2
  2773. data/vendor/rails/activerecord/test/fixtures/db_definitions/postgresql2.sql +0 -4
  2774. data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +0 -354
  2775. data/vendor/rails/activerecord/test/fixtures/db_definitions/schema2.rb +0 -11
  2776. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.drop.sql +0 -33
  2777. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite.sql +0 -219
  2778. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.drop.sql +0 -2
  2779. data/vendor/rails/activerecord/test/fixtures/db_definitions/sqlite2.sql +0 -5
  2780. data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.drop.sql +0 -35
  2781. data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase.sql +0 -222
  2782. data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.drop.sql +0 -4
  2783. data/vendor/rails/activerecord/test/fixtures/db_definitions/sybase2.sql +0 -5
  2784. data/vendor/rails/activerecord/test/fixtures/default.rb +0 -2
  2785. data/vendor/rails/activerecord/test/fixtures/developer.rb +0 -72
  2786. data/vendor/rails/activerecord/test/fixtures/developers.yml +0 -21
  2787. data/vendor/rails/activerecord/test/fixtures/developers_projects.yml +0 -17
  2788. data/vendor/rails/activerecord/test/fixtures/developers_projects/david_action_controller +0 -3
  2789. data/vendor/rails/activerecord/test/fixtures/developers_projects/david_active_record +0 -3
  2790. data/vendor/rails/activerecord/test/fixtures/developers_projects/jamis_active_record +0 -2
  2791. data/vendor/rails/activerecord/test/fixtures/edge.rb +0 -5
  2792. data/vendor/rails/activerecord/test/fixtures/edges.yml +0 -6
  2793. data/vendor/rails/activerecord/test/fixtures/entrant.rb +0 -3
  2794. data/vendor/rails/activerecord/test/fixtures/entrants.yml +0 -14
  2795. data/vendor/rails/activerecord/test/fixtures/example.log +0 -1
  2796. data/vendor/rails/activerecord/test/fixtures/fk_test_has_fk.yml +0 -3
  2797. data/vendor/rails/activerecord/test/fixtures/fk_test_has_pk.yml +0 -2
  2798. data/vendor/rails/activerecord/test/fixtures/flowers.jpg +0 -0
  2799. data/vendor/rails/activerecord/test/fixtures/funny_jokes.yml +0 -10
  2800. data/vendor/rails/activerecord/test/fixtures/item.rb +0 -7
  2801. data/vendor/rails/activerecord/test/fixtures/items.yml +0 -4
  2802. data/vendor/rails/activerecord/test/fixtures/joke.rb +0 -3
  2803. data/vendor/rails/activerecord/test/fixtures/keyboard.rb +0 -3
  2804. data/vendor/rails/activerecord/test/fixtures/legacy_thing.rb +0 -3
  2805. data/vendor/rails/activerecord/test/fixtures/legacy_things.yml +0 -3
  2806. data/vendor/rails/activerecord/test/fixtures/matey.rb +0 -4
  2807. data/vendor/rails/activerecord/test/fixtures/mateys.yml +0 -4
  2808. data/vendor/rails/activerecord/test/fixtures/migrations/1_people_have_last_names.rb +0 -9
  2809. data/vendor/rails/activerecord/test/fixtures/migrations/2_we_need_reminders.rb +0 -12
  2810. data/vendor/rails/activerecord/test/fixtures/migrations/3_innocent_jointable.rb +0 -12
  2811. data/vendor/rails/activerecord/test/fixtures/migrations_with_decimal/1_give_me_big_numbers.rb +0 -15
  2812. data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/1_people_have_last_names.rb +0 -9
  2813. data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/2_we_need_reminders.rb +0 -12
  2814. data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_foo.rb +0 -7
  2815. data/vendor/rails/activerecord/test/fixtures/migrations_with_duplicate/3_innocent_jointable.rb +0 -12
  2816. data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1000_people_have_middle_names.rb +0 -9
  2817. data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb +0 -9
  2818. data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb +0 -12
  2819. data/vendor/rails/activerecord/test/fixtures/migrations_with_missing_versions/4_innocent_jointable.rb +0 -12
  2820. data/vendor/rails/activerecord/test/fixtures/minimalistic.rb +0 -2
  2821. data/vendor/rails/activerecord/test/fixtures/minimalistics.yml +0 -2
  2822. data/vendor/rails/activerecord/test/fixtures/mixed_case_monkey.rb +0 -3
  2823. data/vendor/rails/activerecord/test/fixtures/mixed_case_monkeys.yml +0 -6
  2824. data/vendor/rails/activerecord/test/fixtures/mixins.yml +0 -29
  2825. data/vendor/rails/activerecord/test/fixtures/movie.rb +0 -5
  2826. data/vendor/rails/activerecord/test/fixtures/movies.yml +0 -7
  2827. data/vendor/rails/activerecord/test/fixtures/naked/csv/accounts.csv +0 -1
  2828. data/vendor/rails/activerecord/test/fixtures/naked/yml/accounts.yml +0 -1
  2829. data/vendor/rails/activerecord/test/fixtures/naked/yml/companies.yml +0 -1
  2830. data/vendor/rails/activerecord/test/fixtures/naked/yml/courses.yml +0 -1
  2831. data/vendor/rails/activerecord/test/fixtures/order.rb +0 -4
  2832. data/vendor/rails/activerecord/test/fixtures/parrot.rb +0 -13
  2833. data/vendor/rails/activerecord/test/fixtures/parrots.yml +0 -27
  2834. data/vendor/rails/activerecord/test/fixtures/parrots_pirates.yml +0 -7
  2835. data/vendor/rails/activerecord/test/fixtures/people.yml +0 -3
  2836. data/vendor/rails/activerecord/test/fixtures/person.rb +0 -4
  2837. data/vendor/rails/activerecord/test/fixtures/pirate.rb +0 -5
  2838. data/vendor/rails/activerecord/test/fixtures/pirates.yml +0 -9
  2839. data/vendor/rails/activerecord/test/fixtures/post.rb +0 -59
  2840. data/vendor/rails/activerecord/test/fixtures/posts.yml +0 -48
  2841. data/vendor/rails/activerecord/test/fixtures/project.rb +0 -28
  2842. data/vendor/rails/activerecord/test/fixtures/projects.yml +0 -7
  2843. data/vendor/rails/activerecord/test/fixtures/reader.rb +0 -4
  2844. data/vendor/rails/activerecord/test/fixtures/readers.yml +0 -4
  2845. data/vendor/rails/activerecord/test/fixtures/reply.rb +0 -37
  2846. data/vendor/rails/activerecord/test/fixtures/reserved_words/distinct.yml +0 -5
  2847. data/vendor/rails/activerecord/test/fixtures/reserved_words/distincts_selects.yml +0 -11
  2848. data/vendor/rails/activerecord/test/fixtures/reserved_words/group.yml +0 -14
  2849. data/vendor/rails/activerecord/test/fixtures/reserved_words/select.yml +0 -8
  2850. data/vendor/rails/activerecord/test/fixtures/reserved_words/values.yml +0 -7
  2851. data/vendor/rails/activerecord/test/fixtures/ship.rb +0 -3
  2852. data/vendor/rails/activerecord/test/fixtures/ships.yml +0 -5
  2853. data/vendor/rails/activerecord/test/fixtures/subject.rb +0 -4
  2854. data/vendor/rails/activerecord/test/fixtures/subscriber.rb +0 -6
  2855. data/vendor/rails/activerecord/test/fixtures/subscribers/first +0 -2
  2856. data/vendor/rails/activerecord/test/fixtures/subscribers/second +0 -2
  2857. data/vendor/rails/activerecord/test/fixtures/tag.rb +0 -7
  2858. data/vendor/rails/activerecord/test/fixtures/tagging.rb +0 -10
  2859. data/vendor/rails/activerecord/test/fixtures/taggings.yml +0 -25
  2860. data/vendor/rails/activerecord/test/fixtures/tags.yml +0 -7
  2861. data/vendor/rails/activerecord/test/fixtures/task.rb +0 -3
  2862. data/vendor/rails/activerecord/test/fixtures/tasks.yml +0 -7
  2863. data/vendor/rails/activerecord/test/fixtures/topic.rb +0 -37
  2864. data/vendor/rails/activerecord/test/fixtures/topics.yml +0 -22
  2865. data/vendor/rails/activerecord/test/fixtures/treasure.rb +0 -4
  2866. data/vendor/rails/activerecord/test/fixtures/treasures.yml +0 -10
  2867. data/vendor/rails/activerecord/test/fixtures/vertex.rb +0 -9
  2868. data/vendor/rails/activerecord/test/fixtures/vertices.yml +0 -4
  2869. data/vendor/rails/activerecord/test/fixtures_test.rb +0 -602
  2870. data/vendor/rails/activerecord/test/inheritance_test.rb +0 -211
  2871. data/vendor/rails/activerecord/test/json_serialization_test.rb +0 -180
  2872. data/vendor/rails/activerecord/test/lifecycle_test.rb +0 -137
  2873. data/vendor/rails/activerecord/test/locking_test.rb +0 -282
  2874. data/vendor/rails/activerecord/test/method_scoping_test.rb +0 -416
  2875. data/vendor/rails/activerecord/test/migration_test.rb +0 -933
  2876. data/vendor/rails/activerecord/test/migration_test_firebird.rb +0 -124
  2877. data/vendor/rails/activerecord/test/mixin_test.rb +0 -95
  2878. data/vendor/rails/activerecord/test/modules_test.rb +0 -34
  2879. data/vendor/rails/activerecord/test/multiple_db_test.rb +0 -60
  2880. data/vendor/rails/activerecord/test/pk_test.rb +0 -101
  2881. data/vendor/rails/activerecord/test/query_cache_test.rb +0 -104
  2882. data/vendor/rails/activerecord/test/readonly_test.rb +0 -107
  2883. data/vendor/rails/activerecord/test/reflection_test.rb +0 -175
  2884. data/vendor/rails/activerecord/test/reserved_word_test_mysql.rb +0 -177
  2885. data/vendor/rails/activerecord/test/schema_authorization_test_postgresql.rb +0 -75
  2886. data/vendor/rails/activerecord/test/schema_dumper_test.rb +0 -131
  2887. data/vendor/rails/activerecord/test/schema_test_postgresql.rb +0 -64
  2888. data/vendor/rails/activerecord/test/serialization_test.rb +0 -47
  2889. data/vendor/rails/activerecord/test/synonym_test_oracle.rb +0 -17
  2890. data/vendor/rails/activerecord/test/table_name_test_sqlserver.rb +0 -23
  2891. data/vendor/rails/activerecord/test/threaded_connections_test.rb +0 -48
  2892. data/vendor/rails/activerecord/test/transactions_test.rb +0 -281
  2893. data/vendor/rails/activerecord/test/unconnected_test.rb +0 -32
  2894. data/vendor/rails/activerecord/test/validations_test.rb +0 -1395
  2895. data/vendor/rails/activerecord/test/xml_serialization_test.rb +0 -202
  2896. data/vendor/rails/activeresource/CHANGELOG +0 -223
  2897. data/vendor/rails/activeresource/MIT-LICENSE +0 -20
  2898. data/vendor/rails/activeresource/README +0 -165
  2899. data/vendor/rails/activeresource/Rakefile +0 -134
  2900. data/vendor/rails/activeresource/lib/active_resource.rb +0 -47
  2901. data/vendor/rails/activeresource/lib/active_resource/base.rb +0 -872
  2902. data/vendor/rails/activeresource/lib/active_resource/connection.rb +0 -172
  2903. data/vendor/rails/activeresource/lib/active_resource/custom_methods.rb +0 -105
  2904. data/vendor/rails/activeresource/lib/active_resource/formats.rb +0 -14
  2905. data/vendor/rails/activeresource/lib/active_resource/formats/json_format.rb +0 -23
  2906. data/vendor/rails/activeresource/lib/active_resource/formats/xml_format.rb +0 -34
  2907. data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +0 -147
  2908. data/vendor/rails/activeresource/lib/active_resource/validations.rb +0 -288
  2909. data/vendor/rails/activeresource/lib/active_resource/version.rb +0 -9
  2910. data/vendor/rails/activeresource/lib/activeresource.rb +0 -1
  2911. data/vendor/rails/activeresource/test/abstract_unit.rb +0 -10
  2912. data/vendor/rails/activeresource/test/authorization_test.rb +0 -82
  2913. data/vendor/rails/activeresource/test/base/custom_methods_test.rb +0 -96
  2914. data/vendor/rails/activeresource/test/base/equality_test.rb +0 -43
  2915. data/vendor/rails/activeresource/test/base/load_test.rb +0 -111
  2916. data/vendor/rails/activeresource/test/base_errors_test.rb +0 -48
  2917. data/vendor/rails/activeresource/test/base_test.rb +0 -454
  2918. data/vendor/rails/activeresource/test/connection_test.rb +0 -170
  2919. data/vendor/rails/activeresource/test/fixtures/beast.rb +0 -14
  2920. data/vendor/rails/activeresource/test/fixtures/person.rb +0 -3
  2921. data/vendor/rails/activeresource/test/fixtures/street_address.rb +0 -4
  2922. data/vendor/rails/activeresource/test/format_test.rb +0 -42
  2923. data/vendor/rails/activeresource/test/setter_trap.rb +0 -27
  2924. data/vendor/rails/activesupport/CHANGELOG +0 -986
  2925. data/vendor/rails/activesupport/MIT-LICENSE +0 -20
  2926. data/vendor/rails/activesupport/README +0 -43
  2927. data/vendor/rails/activesupport/Rakefile +0 -84
  2928. data/vendor/rails/activesupport/install.rb +0 -30
  2929. data/vendor/rails/activesupport/lib/active_support.rb +0 -49
  2930. data/vendor/rails/activesupport/lib/active_support/basic_object.rb +0 -5
  2931. data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +0 -107
  2932. data/vendor/rails/activesupport/lib/active_support/clean_logger.rb +0 -127
  2933. data/vendor/rails/activesupport/lib/active_support/core_ext.rb +0 -4
  2934. data/vendor/rails/activesupport/lib/active_support/core_ext/array.rb +0 -13
  2935. data/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb +0 -28
  2936. data/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb +0 -94
  2937. data/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb +0 -19
  2938. data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +0 -68
  2939. data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +0 -12
  2940. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal.rb +0 -2
  2941. data/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb +0 -6
  2942. data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +0 -50
  2943. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi.rb +0 -5
  2944. data/vendor/rails/activesupport/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +0 -14
  2945. data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +0 -4
  2946. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +0 -48
  2947. data/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +0 -40
  2948. data/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +0 -140
  2949. data/vendor/rails/activesupport/lib/active_support/core_ext/class/removal.rb +0 -24
  2950. data/vendor/rails/activesupport/lib/active_support/core_ext/date.rb +0 -10
  2951. data/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb +0 -13
  2952. data/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb +0 -188
  2953. data/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb +0 -98
  2954. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time.rb +0 -10
  2955. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb +0 -77
  2956. data/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb +0 -74
  2957. data/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb +0 -37
  2958. data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +0 -63
  2959. data/vendor/rails/activesupport/lib/active_support/core_ext/exception.rb +0 -33
  2960. data/vendor/rails/activesupport/lib/active_support/core_ext/file.rb +0 -21
  2961. data/vendor/rails/activesupport/lib/active_support/core_ext/float.rb +0 -5
  2962. data/vendor/rails/activesupport/lib/active_support/core_ext/float/rounding.rb +0 -24
  2963. data/vendor/rails/activesupport/lib/active_support/core_ext/hash.rb +0 -13
  2964. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +0 -242
  2965. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb +0 -19
  2966. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb +0 -24
  2967. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +0 -102
  2968. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb +0 -54
  2969. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +0 -25
  2970. data/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb +0 -28
  2971. data/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb +0 -7
  2972. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb +0 -24
  2973. data/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb +0 -21
  2974. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel.rb +0 -5
  2975. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
  2976. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb +0 -15
  2977. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/debugger.rb +0 -13
  2978. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb +0 -51
  2979. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/requires.rb +0 -24
  2980. data/vendor/rails/activesupport/lib/active_support/core_ext/load_error.rb +0 -38
  2981. data/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb +0 -16
  2982. data/vendor/rails/activesupport/lib/active_support/core_ext/module.rb +0 -8
  2983. data/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb +0 -70
  2984. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_accessor_with_default.rb +0 -31
  2985. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attr_internal.rb +0 -31
  2986. data/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +0 -48
  2987. data/vendor/rails/activesupport/lib/active_support/core_ext/module/delegation.rb +0 -62
  2988. data/vendor/rails/activesupport/lib/active_support/core_ext/module/inclusion.rb +0 -11
  2989. data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +0 -35
  2990. data/vendor/rails/activesupport/lib/active_support/core_ext/module/loading.rb +0 -13
  2991. data/vendor/rails/activesupport/lib/active_support/core_ext/name_error.rb +0 -17
  2992. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric.rb +0 -7
  2993. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb +0 -44
  2994. data/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb +0 -91
  2995. data/vendor/rails/activesupport/lib/active_support/core_ext/object.rb +0 -4
  2996. data/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb +0 -14
  2997. data/vendor/rails/activesupport/lib/active_support/core_ext/object/extending.rb +0 -58
  2998. data/vendor/rails/activesupport/lib/active_support/core_ext/object/instance_variables.rb +0 -22
  2999. data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +0 -59
  3000. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname.rb +0 -7
  3001. data/vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb +0 -14
  3002. data/vendor/rails/activesupport/lib/active_support/core_ext/proc.rb +0 -12
  3003. data/vendor/rails/activesupport/lib/active_support/core_ext/range.rb +0 -11
  3004. data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +0 -22
  3005. data/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb +0 -23
  3006. data/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb +0 -22
  3007. data/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb +0 -12
  3008. data/vendor/rails/activesupport/lib/active_support/core_ext/string.rb +0 -23
  3009. data/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb +0 -58
  3010. data/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb +0 -28
  3011. data/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb +0 -153
  3012. data/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb +0 -17
  3013. data/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb +0 -27
  3014. data/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb +0 -42
  3015. data/vendor/rails/activesupport/lib/active_support/core_ext/string/xchar.rb +0 -11
  3016. data/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb +0 -14
  3017. data/vendor/rails/activesupport/lib/active_support/core_ext/test.rb +0 -1
  3018. data/vendor/rails/activesupport/lib/active_support/core_ext/test/unit/assertions.rb +0 -62
  3019. data/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +0 -19
  3020. data/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb +0 -13
  3021. data/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb +0 -224
  3022. data/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb +0 -94
  3023. data/vendor/rails/activesupport/lib/active_support/dependencies.rb +0 -540
  3024. data/vendor/rails/activesupport/lib/active_support/deprecation.rb +0 -204
  3025. data/vendor/rails/activesupport/lib/active_support/duration.rb +0 -96
  3026. data/vendor/rails/activesupport/lib/active_support/inflections.rb +0 -53
  3027. data/vendor/rails/activesupport/lib/active_support/inflector.rb +0 -282
  3028. data/vendor/rails/activesupport/lib/active_support/json.rb +0 -31
  3029. data/vendor/rails/activesupport/lib/active_support/json/decoding.rb +0 -60
  3030. data/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb +0 -5
  3031. data/vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb +0 -5
  3032. data/vendor/rails/activesupport/lib/active_support/json/encoders/enumerable.rb +0 -12
  3033. data/vendor/rails/activesupport/lib/active_support/json/encoders/false_class.rb +0 -5
  3034. data/vendor/rails/activesupport/lib/active_support/json/encoders/hash.rb +0 -50
  3035. data/vendor/rails/activesupport/lib/active_support/json/encoders/nil_class.rb +0 -5
  3036. data/vendor/rails/activesupport/lib/active_support/json/encoders/numeric.rb +0 -5
  3037. data/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb +0 -6
  3038. data/vendor/rails/activesupport/lib/active_support/json/encoders/regexp.rb +0 -5
  3039. data/vendor/rails/activesupport/lib/active_support/json/encoders/string.rb +0 -30
  3040. data/vendor/rails/activesupport/lib/active_support/json/encoders/symbol.rb +0 -5
  3041. data/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb +0 -5
  3042. data/vendor/rails/activesupport/lib/active_support/json/encoders/true_class.rb +0 -5
  3043. data/vendor/rails/activesupport/lib/active_support/json/encoding.rb +0 -38
  3044. data/vendor/rails/activesupport/lib/active_support/json/variable.rb +0 -10
  3045. data/vendor/rails/activesupport/lib/active_support/multibyte.rb +0 -9
  3046. data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +0 -141
  3047. data/vendor/rails/activesupport/lib/active_support/multibyte/generators/generate_tables.rb +0 -149
  3048. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/passthru_handler.rb +0 -9
  3049. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb +0 -564
  3050. data/vendor/rails/activesupport/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +0 -43
  3051. data/vendor/rails/activesupport/lib/active_support/option_merger.rb +0 -25
  3052. data/vendor/rails/activesupport/lib/active_support/ordered_options.rb +0 -49
  3053. data/vendor/rails/activesupport/lib/active_support/test_case.rb +0 -5
  3054. data/vendor/rails/activesupport/lib/active_support/testing.rb +0 -1
  3055. data/vendor/rails/activesupport/lib/active_support/testing/default.rb +0 -12
  3056. data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +0 -181
  3057. data/vendor/rails/activesupport/lib/active_support/values/unicode_tables.dat +0 -0
  3058. data/vendor/rails/activesupport/lib/active_support/vendor.rb +0 -14
  3059. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb +0 -113
  3060. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder.rb +0 -13
  3061. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +0 -20
  3062. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb +0 -250
  3063. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +0 -115
  3064. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +0 -139
  3065. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +0 -63
  3066. data/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +0 -328
  3067. data/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +0 -1021
  3068. data/vendor/rails/activesupport/lib/active_support/version.rb +0 -9
  3069. data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -38
  3070. data/vendor/rails/activesupport/lib/activesupport.rb +0 -1
  3071. data/vendor/rails/activesupport/test/abstract_unit.rb +0 -20
  3072. data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +0 -2
  3073. data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +0 -2
  3074. data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +0 -2
  3075. data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +0 -1
  3076. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +0 -3
  3077. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +0 -3
  3078. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +0 -2
  3079. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +0 -7
  3080. data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +0 -1
  3081. data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +0 -5
  3082. data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +0 -2
  3083. data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +0 -2
  3084. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +0 -2
  3085. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +0 -4
  3086. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +0 -2
  3087. data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +0 -1
  3088. data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +0 -2
  3089. data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +0 -3
  3090. data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +0 -3
  3091. data/vendor/rails/activesupport/test/buffered_logger_test.rb +0 -107
  3092. data/vendor/rails/activesupport/test/clean_logger_test.rb +0 -57
  3093. data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +0 -250
  3094. data/vendor/rails/activesupport/test/core_ext/blank_test.rb +0 -19
  3095. data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +0 -14
  3096. data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +0 -31
  3097. data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +0 -224
  3098. data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +0 -105
  3099. data/vendor/rails/activesupport/test/core_ext/class_test.rb +0 -46
  3100. data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +0 -196
  3101. data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +0 -230
  3102. data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +0 -22
  3103. data/vendor/rails/activesupport/test/core_ext/duration_test.rb +0 -21
  3104. data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +0 -61
  3105. data/vendor/rails/activesupport/test/core_ext/exception_test.rb +0 -64
  3106. data/vendor/rails/activesupport/test/core_ext/file_test.rb +0 -29
  3107. data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +0 -25
  3108. data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +0 -743
  3109. data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +0 -37
  3110. data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +0 -43
  3111. data/vendor/rails/activesupport/test/core_ext/load_error_tests.rb +0 -16
  3112. data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +0 -30
  3113. data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +0 -52
  3114. data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +0 -33
  3115. data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +0 -58
  3116. data/vendor/rails/activesupport/test/core_ext/module_test.rb +0 -293
  3117. data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +0 -24
  3118. data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +0 -147
  3119. data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +0 -242
  3120. data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +0 -9
  3121. data/vendor/rails/activesupport/test/core_ext/proc_test.rb +0 -11
  3122. data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +0 -63
  3123. data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +0 -180
  3124. data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +0 -9
  3125. data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +0 -420
  3126. data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +0 -2
  3127. data/vendor/rails/activesupport/test/dependencies/conflict.rb +0 -1
  3128. data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +0 -3
  3129. data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +0 -4
  3130. data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +0 -4
  3131. data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +0 -3
  3132. data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +0 -1
  3133. data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +0 -1
  3134. data/vendor/rails/activesupport/test/dependencies/service_one.rb +0 -5
  3135. data/vendor/rails/activesupport/test/dependencies/service_two.rb +0 -2
  3136. data/vendor/rails/activesupport/test/dependencies_test.rb +0 -751
  3137. data/vendor/rails/activesupport/test/deprecation_test.rb +0 -151
  3138. data/vendor/rails/activesupport/test/inflector_test.rb +0 -248
  3139. data/vendor/rails/activesupport/test/inflector_test_cases.rb +0 -208
  3140. data/vendor/rails/activesupport/test/json/decoding_test.rb +0 -41
  3141. data/vendor/rails/activesupport/test/json/encoding_test.rb +0 -111
  3142. data/vendor/rails/activesupport/test/multibyte_chars_test.rb +0 -173
  3143. data/vendor/rails/activesupport/test/multibyte_conformance.rb +0 -141
  3144. data/vendor/rails/activesupport/test/multibyte_handler_test.rb +0 -367
  3145. data/vendor/rails/activesupport/test/option_merger_test.rb +0 -50
  3146. data/vendor/rails/activesupport/test/ordered_options_test.rb +0 -84
  3147. data/vendor/rails/activesupport/test/test_test.rb +0 -73
  3148. data/vendor/rails/activesupport/test/time_zone_test.rb +0 -98
  3149. data/vendor/rails/activesupport/test/whiny_nil_test.rb +0 -38
  3150. data/vendor/rails/railties/CHANGELOG +0 -1899
  3151. data/vendor/rails/railties/MIT-LICENSE +0 -20
  3152. data/vendor/rails/railties/README +0 -203
  3153. data/vendor/rails/railties/Rakefile +0 -358
  3154. data/vendor/rails/railties/bin/about +0 -3
  3155. data/vendor/rails/railties/bin/performance/benchmarker +0 -3
  3156. data/vendor/rails/railties/bin/performance/profiler +0 -3
  3157. data/vendor/rails/railties/bin/plugin +0 -3
  3158. data/vendor/rails/railties/bin/process/inspector +0 -3
  3159. data/vendor/rails/railties/bin/process/reaper +0 -3
  3160. data/vendor/rails/railties/bin/process/spawner +0 -3
  3161. data/vendor/rails/railties/bin/rails +0 -19
  3162. data/vendor/rails/railties/bin/runner +0 -3
  3163. data/vendor/rails/railties/builtin/rails_info/rails/info.rb +0 -123
  3164. data/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb +0 -9
  3165. data/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb +0 -2
  3166. data/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb +0 -2
  3167. data/vendor/rails/railties/configs/apache.conf +0 -40
  3168. data/vendor/rails/railties/configs/databases/frontbase.yml +0 -28
  3169. data/vendor/rails/railties/configs/databases/mysql.yml +0 -54
  3170. data/vendor/rails/railties/configs/databases/oracle.yml +0 -39
  3171. data/vendor/rails/railties/configs/databases/postgresql.yml +0 -48
  3172. data/vendor/rails/railties/configs/databases/sqlite2.yml +0 -16
  3173. data/vendor/rails/railties/configs/databases/sqlite3.yml +0 -19
  3174. data/vendor/rails/railties/configs/empty.log +0 -0
  3175. data/vendor/rails/railties/configs/initializers/inflections.rb +0 -10
  3176. data/vendor/rails/railties/configs/initializers/mime_types.rb +0 -5
  3177. data/vendor/rails/railties/configs/lighttpd.conf +0 -54
  3178. data/vendor/rails/railties/dispatches/dispatch.fcgi +0 -24
  3179. data/vendor/rails/railties/dispatches/dispatch.rb +0 -10
  3180. data/vendor/rails/railties/dispatches/gateway.cgi +0 -97
  3181. data/vendor/rails/railties/doc/README_FOR_APP +0 -2
  3182. data/vendor/rails/railties/environments/boot.rb +0 -109
  3183. data/vendor/rails/railties/environments/development.rb +0 -18
  3184. data/vendor/rails/railties/environments/environment.rb +0 -59
  3185. data/vendor/rails/railties/environments/production.rb +0 -19
  3186. data/vendor/rails/railties/helpers/application.rb +0 -10
  3187. data/vendor/rails/railties/html/404.html +0 -30
  3188. data/vendor/rails/railties/html/422.html +0 -30
  3189. data/vendor/rails/railties/html/500.html +0 -30
  3190. data/vendor/rails/railties/html/favicon.ico +0 -0
  3191. data/vendor/rails/railties/html/images/rails.png +0 -0
  3192. data/vendor/rails/railties/html/index.html +0 -277
  3193. data/vendor/rails/railties/html/javascripts/application.js +0 -2
  3194. data/vendor/rails/railties/html/javascripts/controls.js +0 -963
  3195. data/vendor/rails/railties/html/javascripts/dragdrop.js +0 -972
  3196. data/vendor/rails/railties/html/javascripts/effects.js +0 -1120
  3197. data/vendor/rails/railties/html/javascripts/prototype.js +0 -4225
  3198. data/vendor/rails/railties/html/robots.txt +0 -5
  3199. data/vendor/rails/railties/lib/code_statistics.rb +0 -107
  3200. data/vendor/rails/railties/lib/commands.rb +0 -17
  3201. data/vendor/rails/railties/lib/commands/about.rb +0 -2
  3202. data/vendor/rails/railties/lib/commands/console.rb +0 -32
  3203. data/vendor/rails/railties/lib/commands/destroy.rb +0 -6
  3204. data/vendor/rails/railties/lib/commands/generate.rb +0 -6
  3205. data/vendor/rails/railties/lib/commands/ncgi/listener +0 -86
  3206. data/vendor/rails/railties/lib/commands/ncgi/tracker +0 -69
  3207. data/vendor/rails/railties/lib/commands/performance/benchmarker.rb +0 -24
  3208. data/vendor/rails/railties/lib/commands/performance/profiler.rb +0 -50
  3209. data/vendor/rails/railties/lib/commands/performance/request.rb +0 -6
  3210. data/vendor/rails/railties/lib/commands/plugin.rb +0 -923
  3211. data/vendor/rails/railties/lib/commands/process/inspector.rb +0 -68
  3212. data/vendor/rails/railties/lib/commands/process/reaper.rb +0 -149
  3213. data/vendor/rails/railties/lib/commands/process/spawner.rb +0 -219
  3214. data/vendor/rails/railties/lib/commands/process/spinner.rb +0 -57
  3215. data/vendor/rails/railties/lib/commands/runner.rb +0 -48
  3216. data/vendor/rails/railties/lib/commands/server.rb +0 -39
  3217. data/vendor/rails/railties/lib/commands/servers/base.rb +0 -31
  3218. data/vendor/rails/railties/lib/commands/servers/lighttpd.rb +0 -94
  3219. data/vendor/rails/railties/lib/commands/servers/mongrel.rb +0 -69
  3220. data/vendor/rails/railties/lib/commands/servers/webrick.rb +0 -66
  3221. data/vendor/rails/railties/lib/commands/update.rb +0 -4
  3222. data/vendor/rails/railties/lib/console_app.rb +0 -30
  3223. data/vendor/rails/railties/lib/console_sandbox.rb +0 -6
  3224. data/vendor/rails/railties/lib/console_with_helpers.rb +0 -26
  3225. data/vendor/rails/railties/lib/dispatcher.rb +0 -24
  3226. data/vendor/rails/railties/lib/fcgi_handler.rb +0 -223
  3227. data/vendor/rails/railties/lib/initializer.rb +0 -682
  3228. data/vendor/rails/railties/lib/rails/plugin.rb +0 -84
  3229. data/vendor/rails/railties/lib/rails/plugin/loader.rb +0 -150
  3230. data/vendor/rails/railties/lib/rails/plugin/locator.rb +0 -78
  3231. data/vendor/rails/railties/lib/rails/version.rb +0 -9
  3232. data/vendor/rails/railties/lib/rails_generator.rb +0 -43
  3233. data/vendor/rails/railties/lib/rails_generator/base.rb +0 -263
  3234. data/vendor/rails/railties/lib/rails_generator/commands.rb +0 -591
  3235. data/vendor/rails/railties/lib/rails_generator/generated_attribute.rb +0 -42
  3236. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/USAGE +0 -9
  3237. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb +0 -179
  3238. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/USAGE +0 -29
  3239. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb +0 -37
  3240. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb +0 -10
  3241. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb +0 -8
  3242. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/helper.rb +0 -2
  3243. data/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/view.html.erb +0 -2
  3244. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/USAGE +0 -8
  3245. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +0 -16
  3246. data/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +0 -10
  3247. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/USAGE +0 -16
  3248. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb +0 -34
  3249. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.erb +0 -3
  3250. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -0
  3251. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb +0 -13
  3252. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +0 -21
  3253. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.erb +0 -3
  3254. data/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -0
  3255. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/USAGE +0 -29
  3256. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +0 -20
  3257. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb +0 -11
  3258. data/vendor/rails/railties/lib/rails_generator/generators/components/model/USAGE +0 -27
  3259. data/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb +0 -45
  3260. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/fixtures.yml +0 -19
  3261. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb +0 -16
  3262. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb +0 -2
  3263. data/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb +0 -8
  3264. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/USAGE +0 -13
  3265. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb +0 -16
  3266. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb +0 -2
  3267. data/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb +0 -8
  3268. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/USAGE +0 -25
  3269. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb +0 -39
  3270. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +0 -20
  3271. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/README +0 -13
  3272. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/Rakefile +0 -22
  3273. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/USAGE +0 -8
  3274. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb +0 -8
  3275. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb +0 -1
  3276. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb +0 -1
  3277. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/tasks.rake +0 -4
  3278. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +0 -8
  3279. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/USAGE +0 -23
  3280. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb +0 -74
  3281. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb +0 -2
  3282. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb +0 -8
  3283. data/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb +0 -2
  3284. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/USAGE +0 -25
  3285. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +0 -92
  3286. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +0 -85
  3287. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +0 -45
  3288. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb +0 -2
  3289. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +0 -17
  3290. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/style.css +0 -74
  3291. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +0 -19
  3292. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +0 -24
  3293. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +0 -18
  3294. data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +0 -10
  3295. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/USAGE +0 -10
  3296. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +0 -18
  3297. data/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb +0 -16
  3298. data/vendor/rails/railties/lib/rails_generator/lookup.rb +0 -244
  3299. data/vendor/rails/railties/lib/rails_generator/manifest.rb +0 -53
  3300. data/vendor/rails/railties/lib/rails_generator/options.rb +0 -143
  3301. data/vendor/rails/railties/lib/rails_generator/scripts.rb +0 -86
  3302. data/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb +0 -30
  3303. data/vendor/rails/railties/lib/rails_generator/scripts/generate.rb +0 -7
  3304. data/vendor/rails/railties/lib/rails_generator/scripts/update.rb +0 -12
  3305. data/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb +0 -160
  3306. data/vendor/rails/railties/lib/rails_generator/simple_logger.rb +0 -46
  3307. data/vendor/rails/railties/lib/rails_generator/spec.rb +0 -44
  3308. data/vendor/rails/railties/lib/railties_path.rb +0 -1
  3309. data/vendor/rails/railties/lib/ruby_version_check.rb +0 -17
  3310. data/vendor/rails/railties/lib/rubyprof_ext.rb +0 -35
  3311. data/vendor/rails/railties/lib/source_annotation_extractor.rb +0 -62
  3312. data/vendor/rails/railties/lib/tasks/annotations.rake +0 -23
  3313. data/vendor/rails/railties/lib/tasks/databases.rake +0 -363
  3314. data/vendor/rails/railties/lib/tasks/documentation.rake +0 -80
  3315. data/vendor/rails/railties/lib/tasks/framework.rake +0 -118
  3316. data/vendor/rails/railties/lib/tasks/log.rake +0 -9
  3317. data/vendor/rails/railties/lib/tasks/misc.rake +0 -10
  3318. data/vendor/rails/railties/lib/tasks/rails.rb +0 -8
  3319. data/vendor/rails/railties/lib/tasks/routes.rake +0 -17
  3320. data/vendor/rails/railties/lib/tasks/statistics.rake +0 -18
  3321. data/vendor/rails/railties/lib/tasks/testing.rake +0 -118
  3322. data/vendor/rails/railties/lib/tasks/tmp.rake +0 -37
  3323. data/vendor/rails/railties/lib/test_help.rb +0 -20
  3324. data/vendor/rails/railties/lib/webrick_server.rb +0 -165
  3325. data/vendor/rails/railties/test/abstract_unit.rb +0 -24
  3326. data/vendor/rails/railties/test/boot_test.rb +0 -179
  3327. data/vendor/rails/railties/test/console_app_test.rb +0 -29
  3328. data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +0 -265
  3329. data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +0 -1
  3330. data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
  3331. data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +0 -2
  3332. data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
  3333. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +0 -7
  3334. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +0 -2
  3335. data/vendor/rails/railties/test/generators/generator_test_helper.rb +0 -195
  3336. data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +0 -109
  3337. data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +0 -106
  3338. data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +0 -185
  3339. data/vendor/rails/railties/test/initializer_test.rb +0 -218
  3340. data/vendor/rails/railties/test/mocks/routes.rb +0 -6
  3341. data/vendor/rails/railties/test/plugin_loader_test.rb +0 -140
  3342. data/vendor/rails/railties/test/plugin_locator_test.rb +0 -69
  3343. data/vendor/rails/railties/test/plugin_test.rb +0 -141
  3344. data/vendor/rails/railties/test/plugin_test_helper.rb +0 -29
  3345. data/vendor/rails/railties/test/rails_generator_test.rb +0 -137
  3346. data/vendor/rails/railties/test/rails_info_controller_test.rb +0 -48
  3347. data/vendor/rails/railties/test/rails_info_test.rb +0 -105
  3348. data/vendor/rails/railties/test/secret_key_generation_test.rb +0 -35
@@ -1,96 +0,0 @@
1
- module ActiveRecord
2
- module Associations
3
- class HasOneAssociation < BelongsToAssociation #:nodoc:
4
- def initialize(owner, reflection)
5
- super
6
- construct_sql
7
- end
8
-
9
- def create(attrs = {}, replace_existing = true)
10
- new_record(replace_existing) { |klass| klass.create(attrs) }
11
- end
12
-
13
- def create!(attrs = {}, replace_existing = true)
14
- new_record(replace_existing) { |klass| klass.create!(attrs) }
15
- end
16
-
17
- def build(attrs = {}, replace_existing = true)
18
- new_record(replace_existing) { |klass| klass.new(attrs) }
19
- end
20
-
21
- def replace(obj, dont_save = false)
22
- load_target
23
-
24
- unless @target.nil?
25
- if dependent? && !dont_save && @target != obj
26
- @target.destroy unless @target.new_record?
27
- @owner.clear_association_cache
28
- else
29
- @target[@reflection.primary_key_name] = nil
30
- @target.save unless @owner.new_record? || @target.new_record?
31
- end
32
- end
33
-
34
- if obj.nil?
35
- @target = nil
36
- else
37
- raise_on_type_mismatch(obj)
38
- set_belongs_to_association_for(obj)
39
- @target = (AssociationProxy === obj ? obj.target : obj)
40
- end
41
-
42
- @loaded = true
43
-
44
- unless @owner.new_record? or obj.nil? or dont_save
45
- return (obj.save ? self : false)
46
- else
47
- return (obj.nil? ? nil : self)
48
- end
49
- end
50
-
51
- private
52
- def find_target
53
- @reflection.klass.find(:first,
54
- :conditions => @finder_sql,
55
- :order => @reflection.options[:order],
56
- :include => @reflection.options[:include]
57
- )
58
- end
59
-
60
- def construct_sql
61
- case
62
- when @reflection.options[:as]
63
- @finder_sql =
64
- "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " +
65
- "#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote_value(@owner.class.base_class.name.to_s)}"
66
- else
67
- @finder_sql = "#{@reflection.table_name}.#{@reflection.primary_key_name} = #{@owner.quoted_id}"
68
- end
69
- @finder_sql << " AND (#{conditions})" if conditions
70
- end
71
-
72
- def construct_scope
73
- create_scoping = {}
74
- set_belongs_to_association_for(create_scoping)
75
- { :create => create_scoping }
76
- end
77
-
78
- def new_record(replace_existing)
79
- # Make sure we load the target first, if we plan on replacing the existing
80
- # instance. Otherwise, if the target has not previously been loaded
81
- # elsewhere, the instance we create will get orphaned.
82
- load_target if replace_existing
83
- record = @reflection.klass.send(:with_scope, :create => construct_scope[:create]) { yield @reflection.klass }
84
-
85
- if replace_existing
86
- replace(record, true)
87
- else
88
- record[@reflection.primary_key_name] = @owner.id unless @owner.new_record?
89
- self.target = record
90
- end
91
-
92
- record
93
- end
94
- end
95
- end
96
- end
@@ -1,328 +0,0 @@
1
- module ActiveRecord
2
- module AttributeMethods #:nodoc:
3
- DEFAULT_SUFFIXES = %w(= ? _before_type_cast)
4
- ATTRIBUTE_TYPES_CACHED_BY_DEFAULT = [:datetime, :timestamp, :time, :date]
5
-
6
- def self.included(base)
7
- base.extend ClassMethods
8
- base.attribute_method_suffix *DEFAULT_SUFFIXES
9
- base.cattr_accessor :attribute_types_cached_by_default, :instance_writer => false
10
- base.attribute_types_cached_by_default = ATTRIBUTE_TYPES_CACHED_BY_DEFAULT
11
- end
12
-
13
- # Declare and check for suffixed attribute methods.
14
- module ClassMethods
15
- # Declare a method available for all attributes with the given suffix.
16
- # Uses method_missing and respond_to? to rewrite the method
17
- # #{attr}#{suffix}(*args, &block)
18
- # to
19
- # attribute#{suffix}(#{attr}, *args, &block)
20
- #
21
- # An attribute#{suffix} instance method must exist and accept at least
22
- # the attr argument.
23
- #
24
- # For example:
25
- # class Person < ActiveRecord::Base
26
- # attribute_method_suffix '_changed?'
27
- #
28
- # private
29
- # def attribute_changed?(attr)
30
- # ...
31
- # end
32
- # end
33
- #
34
- # person = Person.find(1)
35
- # person.name_changed? # => false
36
- # person.name = 'Hubert'
37
- # person.name_changed? # => true
38
- def attribute_method_suffix(*suffixes)
39
- attribute_method_suffixes.concat suffixes
40
- rebuild_attribute_method_regexp
41
- end
42
-
43
- # Returns MatchData if method_name is an attribute method.
44
- def match_attribute_method?(method_name)
45
- rebuild_attribute_method_regexp unless defined?(@@attribute_method_regexp) && @@attribute_method_regexp
46
- @@attribute_method_regexp.match(method_name)
47
- end
48
-
49
-
50
- # Contains the names of the generated attribute methods.
51
- def generated_methods #:nodoc:
52
- @generated_methods ||= Set.new
53
- end
54
-
55
- def generated_methods?
56
- !generated_methods.empty?
57
- end
58
-
59
- # generates all the attribute related methods for columns in the database
60
- # accessors, mutators and query methods
61
- def define_attribute_methods
62
- return if generated_methods?
63
- columns_hash.each do |name, column|
64
- unless instance_method_already_implemented?(name)
65
- if self.serialized_attributes[name]
66
- define_read_method_for_serialized_attribute(name)
67
- else
68
- define_read_method(name.to_sym, name, column)
69
- end
70
- end
71
-
72
- unless instance_method_already_implemented?("#{name}=")
73
- define_write_method(name.to_sym)
74
- end
75
-
76
- unless instance_method_already_implemented?("#{name}?")
77
- define_question_method(name)
78
- end
79
- end
80
- end
81
-
82
- # Check to see if the method is defined in the model or any of its subclasses that also derive from ActiveRecord.
83
- # Raise DangerousAttributeError if the method is defined by ActiveRecord though.
84
- def instance_method_already_implemented?(method_name)
85
- return true if method_name =~ /^id(=$|\?$|$)/
86
- @_defined_class_methods ||= Set.new(ancestors.first(ancestors.index(ActiveRecord::Base)).collect! { |m| m.public_instance_methods(false) | m.private_instance_methods(false) | m.protected_instance_methods(false) }.flatten)
87
- @@_defined_activerecord_methods ||= Set.new(ActiveRecord::Base.public_instance_methods(false) | ActiveRecord::Base.private_instance_methods(false) | ActiveRecord::Base.protected_instance_methods(false))
88
- raise DangerousAttributeError, "#{method_name} is defined by ActiveRecord" if @@_defined_activerecord_methods.include?(method_name)
89
- @_defined_class_methods.include?(method_name)
90
- end
91
-
92
- alias :define_read_methods :define_attribute_methods
93
-
94
- # +cache_attributes+ allows you to declare which converted attribute values should
95
- # be cached. Usually caching only pays off for attributes with expensive conversion
96
- # methods, like date columns (e.g. created_at, updated_at).
97
- def cache_attributes(*attribute_names)
98
- attribute_names.each {|attr| cached_attributes << attr.to_s}
99
- end
100
-
101
- # returns the attributes where
102
- def cached_attributes
103
- @cached_attributes ||=
104
- columns.select{|c| attribute_types_cached_by_default.include?(c.type)}.map(&:name).to_set
105
- end
106
-
107
- def cache_attribute?(attr_name)
108
- cached_attributes.include?(attr_name)
109
- end
110
-
111
- private
112
- # Suffixes a, ?, c become regexp /(a|\?|c)$/
113
- def rebuild_attribute_method_regexp
114
- suffixes = attribute_method_suffixes.map { |s| Regexp.escape(s) }
115
- @@attribute_method_regexp = /(#{suffixes.join('|')})$/.freeze
116
- end
117
-
118
- # Default to =, ?, _before_type_cast
119
- def attribute_method_suffixes
120
- @@attribute_method_suffixes ||= []
121
- end
122
-
123
- # Define an attribute reader method. Cope with nil column.
124
- def define_read_method(symbol, attr_name, column)
125
- cast_code = column.type_cast_code('v') if column
126
- access_code = cast_code ? "(v=@attributes['#{attr_name}']) && #{cast_code}" : "@attributes['#{attr_name}']"
127
-
128
- unless attr_name.to_s == self.primary_key.to_s
129
- access_code = access_code.insert(0, "missing_attribute('#{attr_name}', caller) unless @attributes.has_key?('#{attr_name}'); ")
130
- end
131
-
132
- if cache_attribute?(attr_name)
133
- access_code = "@attributes_cache['#{attr_name}'] ||= (#{access_code})"
134
- end
135
- evaluate_attribute_method attr_name, "def #{symbol}; #{access_code}; end"
136
- end
137
-
138
- # Define read method for serialized attribute.
139
- def define_read_method_for_serialized_attribute(attr_name)
140
- evaluate_attribute_method attr_name, "def #{attr_name}; unserialize_attribute('#{attr_name}'); end"
141
- end
142
-
143
- # Define an attribute ? method.
144
- def define_question_method(attr_name)
145
- evaluate_attribute_method attr_name, "def #{attr_name}?; query_attribute('#{attr_name}'); end", "#{attr_name}?"
146
- end
147
-
148
- def define_write_method(attr_name)
149
- evaluate_attribute_method attr_name, "def #{attr_name}=(new_value);write_attribute('#{attr_name}', new_value);end", "#{attr_name}="
150
- end
151
-
152
- # Evaluate the definition for an attribute related method
153
- def evaluate_attribute_method(attr_name, method_definition, method_name=attr_name)
154
-
155
- unless method_name.to_s == primary_key.to_s
156
- generated_methods << method_name
157
- end
158
-
159
- begin
160
- class_eval(method_definition, __FILE__, __LINE__)
161
- rescue SyntaxError => err
162
- generated_methods.delete(attr_name)
163
- if logger
164
- logger.warn "Exception occurred during reader method compilation."
165
- logger.warn "Maybe #{attr_name} is not a valid Ruby identifier?"
166
- logger.warn "#{err.message}"
167
- end
168
- end
169
- end
170
- end # ClassMethods
171
-
172
-
173
- # Allows access to the object attributes, which are held in the @attributes hash, as though they
174
- # were first-class methods. So a Person class with a name attribute can use Person#name and
175
- # Person#name= and never directly use the attributes hash -- except for multiple assigns with
176
- # ActiveRecord#attributes=. A Milestone class can also ask Milestone#completed? to test that
177
- # the completed attribute is not nil or 0.
178
- #
179
- # It's also possible to instantiate related objects, so a Client class belonging to the clients
180
- # table with a master_id foreign key can instantiate master through Client#master.
181
- def method_missing(method_id, *args, &block)
182
- method_name = method_id.to_s
183
-
184
- # If we haven't generated any methods yet, generate them, then
185
- # see if we've created the method we're looking for.
186
- if !self.class.generated_methods?
187
- self.class.define_attribute_methods
188
- if self.class.generated_methods.include?(method_name)
189
- return self.send(method_id, *args, &block)
190
- end
191
- end
192
-
193
- if self.class.primary_key.to_s == method_name
194
- id
195
- elsif md = self.class.match_attribute_method?(method_name)
196
- attribute_name, method_type = md.pre_match, md.to_s
197
- if @attributes.include?(attribute_name)
198
- __send__("attribute#{method_type}", attribute_name, *args, &block)
199
- else
200
- super
201
- end
202
- elsif @attributes.include?(method_name)
203
- read_attribute(method_name)
204
- else
205
- super
206
- end
207
- end
208
-
209
- # Returns the value of the attribute identified by <tt>attr_name</tt> after it has been typecast (for example,
210
- # "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
211
- def read_attribute(attr_name)
212
- attr_name = attr_name.to_s
213
- if !(value = @attributes[attr_name]).nil?
214
- if column = column_for_attribute(attr_name)
215
- if unserializable_attribute?(attr_name, column)
216
- unserialize_attribute(attr_name)
217
- else
218
- column.type_cast(value)
219
- end
220
- else
221
- value
222
- end
223
- else
224
- nil
225
- end
226
- end
227
-
228
- def read_attribute_before_type_cast(attr_name)
229
- @attributes[attr_name]
230
- end
231
-
232
- # Returns true if the attribute is of a text column and marked for serialization.
233
- def unserializable_attribute?(attr_name, column)
234
- column.text? && self.class.serialized_attributes[attr_name]
235
- end
236
-
237
- # Returns the unserialized object of the attribute.
238
- def unserialize_attribute(attr_name)
239
- unserialized_object = object_from_yaml(@attributes[attr_name])
240
-
241
- if unserialized_object.is_a?(self.class.serialized_attributes[attr_name]) || unserialized_object.nil?
242
- @attributes.frozen? ? unserialized_object : @attributes[attr_name] = unserialized_object
243
- else
244
- raise SerializationTypeMismatch,
245
- "#{attr_name} was supposed to be a #{self.class.serialized_attributes[attr_name]}, but was a #{unserialized_object.class.to_s}"
246
- end
247
- end
248
-
249
-
250
- # Updates the attribute identified by <tt>attr_name</tt> with the specified +value+. Empty strings for fixnum and float
251
- # columns are turned into nil.
252
- def write_attribute(attr_name, value)
253
- attr_name = attr_name.to_s
254
- @attributes_cache.delete(attr_name)
255
- if (column = column_for_attribute(attr_name)) && column.number?
256
- @attributes[attr_name] = convert_number_column_value(value)
257
- else
258
- @attributes[attr_name] = value
259
- end
260
- end
261
-
262
-
263
- def query_attribute(attr_name)
264
- unless value = read_attribute(attr_name)
265
- false
266
- else
267
- column = self.class.columns_hash[attr_name]
268
- if column.nil?
269
- if Numeric === value || value !~ /[^0-9]/
270
- !value.to_i.zero?
271
- else
272
- !value.blank?
273
- end
274
- elsif column.number?
275
- !value.zero?
276
- else
277
- !value.blank?
278
- end
279
- end
280
- end
281
-
282
- # A Person object with a name attribute can ask person.respond_to?("name"), person.respond_to?("name="), and
283
- # person.respond_to?("name?") which will all return true.
284
- alias :respond_to_without_attributes? :respond_to?
285
- def respond_to?(method, include_priv = false)
286
- method_name = method.to_s
287
- if super
288
- return true
289
- elsif !self.class.generated_methods?
290
- self.class.define_attribute_methods
291
- if self.class.generated_methods.include?(method_name)
292
- return true
293
- end
294
- end
295
-
296
- if @attributes.nil?
297
- return super
298
- elsif @attributes.include?(method_name)
299
- return true
300
- elsif md = self.class.match_attribute_method?(method_name)
301
- return true if @attributes.include?(md.pre_match)
302
- end
303
- super
304
- end
305
-
306
-
307
- private
308
-
309
- def missing_attribute(attr_name, stack)
310
- raise ActiveRecord::MissingAttributeError, "missing attribute: #{attr_name}", stack
311
- end
312
-
313
- # Handle *? for method_missing.
314
- def attribute?(attribute_name)
315
- query_attribute(attribute_name)
316
- end
317
-
318
- # Handle *= for method_missing.
319
- def attribute=(attribute_name, value)
320
- write_attribute(attribute_name, value)
321
- end
322
-
323
- # Handle *_before_type_cast for method_missing.
324
- def attribute_before_type_cast(attribute_name)
325
- read_attribute_before_type_cast(attribute_name)
326
- end
327
- end
328
- end
@@ -1,2471 +0,0 @@
1
- require 'base64'
2
- require 'yaml'
3
- require 'set'
4
-
5
- module ActiveRecord #:nodoc:
6
- # Generic ActiveRecord exception class.
7
- class ActiveRecordError < StandardError
8
- end
9
-
10
- # Raised when the single-table inheritance mechanism failes to locate the subclass
11
- # (for example due to improper usage of column that +inheritance_column+ points to).
12
- class SubclassNotFound < ActiveRecordError #:nodoc:
13
- end
14
-
15
- # Raised when object assigned to association is of incorrect type.
16
- #
17
- # Example:
18
- #
19
- # class Ticket < ActiveRecord::Base
20
- # has_many :patches
21
- # end
22
- #
23
- # class Patch < ActiveRecord::Base
24
- # belongs_to :ticket
25
- # end
26
- #
27
- # and somewhere in the code:
28
- #
29
- # @ticket.patches << Comment.new(:content => "Please attach tests to your patch.")
30
- # @ticket.save
31
- class AssociationTypeMismatch < ActiveRecordError
32
- end
33
-
34
- # Raised when unserialized object's type mismatches one specified for serializable field.
35
- class SerializationTypeMismatch < ActiveRecordError
36
- end
37
-
38
- # Raised when adapter not specified on connection (or configuration file config/database.yml misses adapter field).
39
- class AdapterNotSpecified < ActiveRecordError
40
- end
41
-
42
- # Raised when ActiveRecord cannot find database adapter specified in config/database.yml or programmatically.
43
- class AdapterNotFound < ActiveRecordError
44
- end
45
-
46
- # Raised when connection to the database could not been established (for example when connection= is given a nil object).
47
- class ConnectionNotEstablished < ActiveRecordError
48
- end
49
-
50
- # Raised when ActiveRecord cannot find record by given id or set of ids.
51
- class RecordNotFound < ActiveRecordError
52
- end
53
-
54
- # Raised by ActiveRecord::Base.save! and ActiveRecord::Base.create! methods when record cannot be
55
- # saved because record is invalid.
56
- class RecordNotSaved < ActiveRecordError
57
- end
58
-
59
- # Raised when SQL statement cannot be executed by the database (for example, it's often the case for MySQL when Ruby driver used is too old).
60
- class StatementInvalid < ActiveRecordError
61
- end
62
-
63
- # Raised when number of bind variables in statement given to :condition key (for example, when using +find+ method)
64
- # does not match number of expected variables.
65
- #
66
- # Example:
67
- #
68
- # Location.find :all, :conditions => ["lat = ? AND lng = ?", 53.7362]
69
- #
70
- # in example above two placeholders are given but only one variable to fill them.
71
- class PreparedStatementInvalid < ActiveRecordError
72
- end
73
-
74
- # Raised on attempt to save stale record. Record is stale when it's being saved in another query after
75
- # instantiation, for example, when two users edit the same wiki page and one starts editing and saves
76
- # the page before the other.
77
- #
78
- # Read more about optimistic locking in +ActiveRecord::Locking+ module RDoc.
79
- class StaleObjectError < ActiveRecordError
80
- end
81
-
82
- # Raised when association is being configured improperly or
83
- # user tries to use offset and limit together with has_many or has_and_belongs_to_many associations.
84
- class ConfigurationError < ActiveRecordError
85
- end
86
-
87
- # Raised on attempt to update record that is instantiated as read only.
88
- class ReadOnlyRecord < ActiveRecordError
89
- end
90
-
91
- # Used by ActiveRecord transaction mechanism to distinguish rollback from other exceptional situations.
92
- # You can use it to roll your transaction back explicitly in the block passed to +transaction+ method.
93
- class Rollback < ActiveRecordError
94
- end
95
-
96
- # Raised when attribute has a name reserved by ActiveRecord (when attribute has name of one of ActiveRecord instance methods).
97
- class DangerousAttributeError < ActiveRecordError
98
- end
99
-
100
- # Raised when you've tried to access a column which wasn't
101
- # loaded by your finder. Typically this is because :select
102
- # has been specified
103
- class MissingAttributeError < NoMethodError
104
- end
105
-
106
- class AttributeAssignmentError < ActiveRecordError #:nodoc:
107
- attr_reader :exception, :attribute
108
- def initialize(message, exception, attribute)
109
- @exception = exception
110
- @attribute = attribute
111
- @message = message
112
- end
113
- end
114
-
115
- class MultiparameterAssignmentErrors < ActiveRecordError #:nodoc:
116
- attr_reader :errors
117
- def initialize(errors)
118
- @errors = errors
119
- end
120
- end
121
-
122
- # Active Record objects don't specify their attributes directly, but rather infer them from the table definition with
123
- # which they're linked. Adding, removing, and changing attributes and their type is done directly in the database. Any change
124
- # is instantly reflected in the Active Record objects. The mapping that binds a given Active Record class to a certain
125
- # database table will happen automatically in most common cases, but can be overwritten for the uncommon ones.
126
- #
127
- # See the mapping rules in table_name and the full example in link:files/README.html for more insight.
128
- #
129
- # == Creation
130
- #
131
- # Active Records accept constructor parameters either in a hash or as a block. The hash method is especially useful when
132
- # you're receiving the data from somewhere else, like an HTTP request. It works like this:
133
- #
134
- # user = User.new(:name => "David", :occupation => "Code Artist")
135
- # user.name # => "David"
136
- #
137
- # You can also use block initialization:
138
- #
139
- # user = User.new do |u|
140
- # u.name = "David"
141
- # u.occupation = "Code Artist"
142
- # end
143
- #
144
- # And of course you can just create a bare object and specify the attributes after the fact:
145
- #
146
- # user = User.new
147
- # user.name = "David"
148
- # user.occupation = "Code Artist"
149
- #
150
- # == Conditions
151
- #
152
- # Conditions can either be specified as a string, array, or hash representing the WHERE-part of an SQL statement.
153
- # The array form is to be used when the condition input is tainted and requires sanitization. The string form can
154
- # be used for statements that don't involve tainted data. The hash form works much like the array form, except
155
- # only equality and range is possible. Examples:
156
- #
157
- # class User < ActiveRecord::Base
158
- # def self.authenticate_unsafely(user_name, password)
159
- # find(:first, :conditions => "user_name = '#{user_name}' AND password = '#{password}'")
160
- # end
161
- #
162
- # def self.authenticate_safely(user_name, password)
163
- # find(:first, :conditions => [ "user_name = ? AND password = ?", user_name, password ])
164
- # end
165
- #
166
- # def self.authenticate_safely_simply(user_name, password)
167
- # find(:first, :conditions => { :user_name => user_name, :password => password })
168
- # end
169
- # end
170
- #
171
- # The <tt>authenticate_unsafely</tt> method inserts the parameters directly into the query and is thus susceptible to SQL-injection
172
- # attacks if the <tt>user_name</tt> and +password+ parameters come directly from an HTTP request. The <tt>authenticate_safely</tt> and
173
- # <tt>authenticate_safely_simply</tt> both will sanitize the <tt>user_name</tt> and +password+ before inserting them in the query,
174
- # which will ensure that an attacker can't escape the query and fake the login (or worse).
175
- #
176
- # When using multiple parameters in the conditions, it can easily become hard to read exactly what the fourth or fifth
177
- # question mark is supposed to represent. In those cases, you can resort to named bind variables instead. That's done by replacing
178
- # the question marks with symbols and supplying a hash with values for the matching symbol keys:
179
- #
180
- # Company.find(:first, :conditions => [
181
- # "id = :id AND name = :name AND division = :division AND created_at > :accounting_date",
182
- # { :id => 3, :name => "37signals", :division => "First", :accounting_date => '2005-01-01' }
183
- # ])
184
- #
185
- # Similarly, a simple hash without a statement will generate conditions based on equality with the SQL AND
186
- # operator. For instance:
187
- #
188
- # Student.find(:all, :conditions => { :first_name => "Harvey", :status => 1 })
189
- # Student.find(:all, :conditions => params[:student])
190
- #
191
- # A range may be used in the hash to use the SQL BETWEEN operator:
192
- #
193
- # Student.find(:all, :conditions => { :grade => 9..12 })
194
- #
195
- # == Overwriting default accessors
196
- #
197
- # All column values are automatically available through basic accessors on the Active Record object, but sometimes you
198
- # want to specialize this behavior. This can be done by overwriting the default accessors (using the same
199
- # name as the attribute) and calling read_attribute(attr_name) and write_attribute(attr_name, value) to actually change things.
200
- # Example:
201
- #
202
- # class Song < ActiveRecord::Base
203
- # # Uses an integer of seconds to hold the length of the song
204
- #
205
- # def length=(minutes)
206
- # write_attribute(:length, minutes * 60)
207
- # end
208
- #
209
- # def length
210
- # read_attribute(:length) / 60
211
- # end
212
- # end
213
- #
214
- # You can alternatively use self[:attribute]=(value) and self[:attribute] instead of write_attribute(:attribute, value) and
215
- # read_attribute(:attribute) as a shorter form.
216
- #
217
- # == Attribute query methods
218
- #
219
- # In addition to the basic accessors, query methods are also automatically available on the Active Record object.
220
- # Query methods allow you to test whether an attribute value is present.
221
- #
222
- # For example, an Active Record User with the <tt>name</tt> attribute has a <tt>name?</tt> method that you can call
223
- # to determine whether the user has a name:
224
- #
225
- # user = User.new(:name => "David")
226
- # user.name? # => true
227
- #
228
- # anonymous = User.new(:name => "")
229
- # anonymous.name? # => false
230
- #
231
- # == Accessing attributes before they have been typecasted
232
- #
233
- # Sometimes you want to be able to read the raw attribute data without having the column-determined typecast run its course first.
234
- # That can be done by using the <attribute>_before_type_cast accessors that all attributes have. For example, if your Account model
235
- # has a balance attribute, you can call account.balance_before_type_cast or account.id_before_type_cast.
236
- #
237
- # This is especially useful in validation situations where the user might supply a string for an integer field and you want to display
238
- # the original string back in an error message. Accessing the attribute normally would typecast the string to 0, which isn't what you
239
- # want.
240
- #
241
- # == Dynamic attribute-based finders
242
- #
243
- # Dynamic attribute-based finders are a cleaner way of getting (and/or creating) objects by simple queries without turning to SQL. They work by
244
- # appending the name of an attribute to <tt>find_by_</tt> or <tt>find_all_by_</tt>, so you get finders like Person.find_by_user_name,
245
- # Person.find_all_by_last_name, Payment.find_by_transaction_id. So instead of writing
246
- # <tt>Person.find(:first, :conditions => ["user_name = ?", user_name])</tt>, you just do <tt>Person.find_by_user_name(user_name)</tt>.
247
- # And instead of writing <tt>Person.find(:all, :conditions => ["last_name = ?", last_name])</tt>, you just do <tt>Person.find_all_by_last_name(last_name)</tt>.
248
- #
249
- # It's also possible to use multiple attributes in the same find by separating them with "_and_", so you get finders like
250
- # <tt>Person.find_by_user_name_and_password</tt> or even <tt>Payment.find_by_purchaser_and_state_and_country</tt>. So instead of writing
251
- # <tt>Person.find(:first, :conditions => ["user_name = ? AND password = ?", user_name, password])</tt>, you just do
252
- # <tt>Person.find_by_user_name_and_password(user_name, password)</tt>.
253
- #
254
- # It's even possible to use all the additional parameters to find. For example, the full interface for Payment.find_all_by_amount
255
- # is actually Payment.find_all_by_amount(amount, options). And the full interface to Person.find_by_user_name is
256
- # actually Person.find_by_user_name(user_name, options). So you could call <tt>Payment.find_all_by_amount(50, :order => "created_on")</tt>.
257
- #
258
- # The same dynamic finder style can be used to create the object if it doesn't already exist. This dynamic finder is called with
259
- # <tt>find_or_create_by_</tt> and will return the object if it already exists and otherwise creates it, then returns it. Example:
260
- #
261
- # # No 'Summer' tag exists
262
- # Tag.find_or_create_by_name("Summer") # equal to Tag.create(:name => "Summer")
263
- #
264
- # # Now the 'Summer' tag does exist
265
- # Tag.find_or_create_by_name("Summer") # equal to Tag.find_by_name("Summer")
266
- #
267
- # Use the <tt>find_or_initialize_by_</tt> finder if you want to return a new record without saving it first. Example:
268
- #
269
- # # No 'Winter' tag exists
270
- # winter = Tag.find_or_initialize_by_name("Winter")
271
- # winter.new_record? # true
272
- #
273
- # To find by a subset of the attributes to be used for instantiating a new object, pass a hash instead of
274
- # a list of parameters. For example:
275
- #
276
- # Tag.find_or_create_by_name(:name => "rails", :creator => current_user)
277
- #
278
- # That will either find an existing tag named "rails", or create a new one while setting the user that created it.
279
- #
280
- # == Saving arrays, hashes, and other non-mappable objects in text columns
281
- #
282
- # Active Record can serialize any object in text columns using YAML. To do so, you must specify this with a call to the class method +serialize+.
283
- # This makes it possible to store arrays, hashes, and other non-mappable objects without doing any additional work. Example:
284
- #
285
- # class User < ActiveRecord::Base
286
- # serialize :preferences
287
- # end
288
- #
289
- # user = User.create(:preferences => { "background" => "black", "display" => large })
290
- # User.find(user.id).preferences # => { "background" => "black", "display" => large }
291
- #
292
- # You can also specify a class option as the second parameter that'll raise an exception if a serialized object is retrieved as a
293
- # descendent of a class not in the hierarchy. Example:
294
- #
295
- # class User < ActiveRecord::Base
296
- # serialize :preferences, Hash
297
- # end
298
- #
299
- # user = User.create(:preferences => %w( one two three ))
300
- # User.find(user.id).preferences # raises SerializationTypeMismatch
301
- #
302
- # == Single table inheritance
303
- #
304
- # Active Record allows inheritance by storing the name of the class in a column that by default is named "type" (can be changed
305
- # by overwriting <tt>Base.inheritance_column</tt>). This means that an inheritance looking like this:
306
- #
307
- # class Company < ActiveRecord::Base; end
308
- # class Firm < Company; end
309
- # class Client < Company; end
310
- # class PriorityClient < Client; end
311
- #
312
- # When you do Firm.create(:name => "37signals"), this record will be saved in the companies table with type = "Firm". You can then
313
- # fetch this row again using Company.find(:first, "name = '37signals'") and it will return a Firm object.
314
- #
315
- # If you don't have a type column defined in your table, single-table inheritance won't be triggered. In that case, it'll work just
316
- # like normal subclasses with no special magic for differentiating between them or reloading the right type with find.
317
- #
318
- # Note, all the attributes for all the cases are kept in the same table. Read more:
319
- # http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html
320
- #
321
- # == Connection to multiple databases in different models
322
- #
323
- # Connections are usually created through ActiveRecord::Base.establish_connection and retrieved by ActiveRecord::Base.connection.
324
- # All classes inheriting from ActiveRecord::Base will use this connection. But you can also set a class-specific connection.
325
- # For example, if Course is an ActiveRecord::Base, but resides in a different database, you can just say Course.establish_connection
326
- # and Course *and all its subclasses* will use this connection instead.
327
- #
328
- # This feature is implemented by keeping a connection pool in ActiveRecord::Base that is a Hash indexed by the class. If a connection is
329
- # requested, the retrieve_connection method will go up the class-hierarchy until a connection is found in the connection pool.
330
- #
331
- # == Exceptions
332
- #
333
- # * +ActiveRecordError+ -- generic error class and superclass of all other errors raised by Active Record
334
- # * +AdapterNotSpecified+ -- the configuration hash used in <tt>establish_connection</tt> didn't include an
335
- # <tt>:adapter</tt> key.
336
- # * +AdapterNotFound+ -- the <tt>:adapter</tt> key used in <tt>establish_connection</tt> specified a non-existent adapter
337
- # (or a bad spelling of an existing one).
338
- # * +AssociationTypeMismatch+ -- the object assigned to the association wasn't of the type specified in the association definition.
339
- # * +SerializationTypeMismatch+ -- the serialized object wasn't of the class specified as the second parameter.
340
- # * +ConnectionNotEstablished+ -- no connection has been established. Use <tt>establish_connection</tt> before querying.
341
- # * +RecordNotFound+ -- no record responded to the find* method.
342
- # Either the row with the given ID doesn't exist or the row didn't meet the additional restrictions.
343
- # * +StatementInvalid+ -- the database server rejected the SQL statement. The precise error is added in the message.
344
- # Either the record with the given ID doesn't exist or the record didn't meet the additional restrictions.
345
- # * +MultiparameterAssignmentErrors+ -- collection of errors that occurred during a mass assignment using the
346
- # +attributes=+ method. The +errors+ property of this exception contains an array of +AttributeAssignmentError+
347
- # objects that should be inspected to determine which attributes triggered the errors.
348
- # * +AttributeAssignmentError+ -- an error occurred while doing a mass assignment through the +attributes=+ method.
349
- # You can inspect the +attribute+ property of the exception object to determine which attribute triggered the error.
350
- #
351
- # *Note*: The attributes listed are class-level attributes (accessible from both the class and instance level).
352
- # So it's possible to assign a logger to the class through Base.logger= which will then be used by all
353
- # instances in the current object space.
354
- class Base
355
- # Accepts a logger conforming to the interface of Log4r or the default Ruby 1.8+ Logger class, which is then passed
356
- # on to any new database connections made and which can be retrieved on both a class and instance level by calling +logger+.
357
- cattr_accessor :logger, :instance_writer => false
358
-
359
- def self.inherited(child) #:nodoc:
360
- @@subclasses[self] ||= []
361
- @@subclasses[self] << child
362
- super
363
- end
364
-
365
- def self.reset_subclasses #:nodoc:
366
- nonreloadables = []
367
- subclasses.each do |klass|
368
- unless Dependencies.autoloaded? klass
369
- nonreloadables << klass
370
- next
371
- end
372
- klass.instance_variables.each { |var| klass.send(:remove_instance_variable, var) }
373
- klass.instance_methods(false).each { |m| klass.send :undef_method, m }
374
- end
375
- @@subclasses = {}
376
- nonreloadables.each { |klass| (@@subclasses[klass.superclass] ||= []) << klass }
377
- end
378
-
379
- @@subclasses = {}
380
-
381
- cattr_accessor :configurations, :instance_writer => false
382
- @@configurations = {}
383
-
384
- # Accessor for the prefix type that will be prepended to every primary key column name. The options are :table_name and
385
- # :table_name_with_underscore. If the first is specified, the Product class will look for "productid" instead of "id" as
386
- # the primary column. If the latter is specified, the Product class will look for "product_id" instead of "id". Remember
387
- # that this is a global setting for all Active Records.
388
- cattr_accessor :primary_key_prefix_type, :instance_writer => false
389
- @@primary_key_prefix_type = nil
390
-
391
- # Accessor for the name of the prefix string to prepend to every table name. So if set to "basecamp_", all
392
- # table names will be named like "basecamp_projects", "basecamp_people", etc. This is a convenient way of creating a namespace
393
- # for tables in a shared database. By default, the prefix is the empty string.
394
- cattr_accessor :table_name_prefix, :instance_writer => false
395
- @@table_name_prefix = ""
396
-
397
- # Works like +table_name_prefix+, but appends instead of prepends (set to "_basecamp" gives "projects_basecamp",
398
- # "people_basecamp"). By default, the suffix is the empty string.
399
- cattr_accessor :table_name_suffix, :instance_writer => false
400
- @@table_name_suffix = ""
401
-
402
- # Indicates whether table names should be the pluralized versions of the corresponding class names.
403
- # If true, the default table name for a +Product+ class will be +products+. If false, it would just be +product+.
404
- # See table_name for the full rules on table/class naming. This is true, by default.
405
- cattr_accessor :pluralize_table_names, :instance_writer => false
406
- @@pluralize_table_names = true
407
-
408
- # Determines whether to use ANSI codes to colorize the logging statements committed by the connection adapter. These colors
409
- # make it much easier to overview things during debugging (when used through a reader like +tail+ and on a black background), but
410
- # may complicate matters if you use software like syslog. This is true, by default.
411
- cattr_accessor :colorize_logging, :instance_writer => false
412
- @@colorize_logging = true
413
-
414
- # Determines whether to use Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database.
415
- # This is set to :local by default.
416
- cattr_accessor :default_timezone, :instance_writer => false
417
- @@default_timezone = :local
418
-
419
- # Determines whether to use a connection for each thread, or a single shared connection for all threads.
420
- # Defaults to false. Set to true if you're writing a threaded application.
421
- cattr_accessor :allow_concurrency, :instance_writer => false
422
- @@allow_concurrency = false
423
-
424
- # Specifies the format to use when dumping the database schema with Rails'
425
- # Rakefile. If :sql, the schema is dumped as (potentially database-
426
- # specific) SQL statements. If :ruby, the schema is dumped as an
427
- # ActiveRecord::Schema file which can be loaded into any database that
428
- # supports migrations. Use :ruby if you want to have different database
429
- # adapters for, e.g., your development and test environments.
430
- cattr_accessor :schema_format , :instance_writer => false
431
- @@schema_format = :ruby
432
-
433
- class << self # Class methods
434
- # Find operates with three different retrieval approaches:
435
- #
436
- # * Find by id: This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 6, 10]).
437
- # If no record can be found for all of the listed ids, then RecordNotFound will be raised.
438
- # * Find first: This will return the first record matched by the options used. These options can either be specific
439
- # conditions or merely an order. If no record can be matched, nil is returned.
440
- # * Find all: This will return all the records matched by the options used. If no records are found, an empty array is returned.
441
- #
442
- # All approaches accept an options hash as their last parameter. The options are:
443
- #
444
- # * <tt>:conditions</tt>: An SQL fragment like "administrator = 1" or [ "user_name = ?", username ]. See conditions in the intro.
445
- # * <tt>:order</tt>: An SQL fragment like "created_at DESC, name".
446
- # * <tt>:group</tt>: An attribute name by which the result should be grouped. Uses the GROUP BY SQL-clause.
447
- # * <tt>:limit</tt>: An integer determining the limit on the number of rows that should be returned.
448
- # * <tt>:offset</tt>: An integer determining the offset from where the rows should be fetched. So at 5, it would skip rows 0 through 4.
449
- # * <tt>:joins</tt>: Either an SQL fragment for additional joins like "LEFT JOIN comments ON comments.post_id = id" (rarely needed)
450
- # or named associations in the same form used for the :include option, which will perform an INNER JOIN on the associated table(s).
451
- # If the value is a string, then the records will be returned read-only since they will have attributes that do not correspond to the table's columns.
452
- # Pass :readonly => false to override.
453
- # * <tt>:include</tt>: Names associations that should be loaded alongside using LEFT OUTER JOINs. The symbols named refer
454
- # to already defined associations. See eager loading under Associations.
455
- # * <tt>:select</tt>: By default, this is * as in SELECT * FROM, but can be changed if you, for example, want to do a join but not
456
- # include the joined columns.
457
- # * <tt>:from</tt>: By default, this is the table name of the class, but can be changed to an alternate table name (or even the name
458
- # of a database view).
459
- # * <tt>:readonly</tt>: Mark the returned records read-only so they cannot be saved or updated.
460
- # * <tt>:lock</tt>: An SQL fragment like "FOR UPDATE" or "LOCK IN SHARE MODE".
461
- # :lock => true gives connection's default exclusive lock, usually "FOR UPDATE".
462
- #
463
- # Examples for find by id:
464
- # Person.find(1) # returns the object for ID = 1
465
- # Person.find(1, 2, 6) # returns an array for objects with IDs in (1, 2, 6)
466
- # Person.find([7, 17]) # returns an array for objects with IDs in (7, 17)
467
- # Person.find([1]) # returns an array for the object with ID = 1
468
- # Person.find(1, :conditions => "administrator = 1", :order => "created_on DESC")
469
- #
470
- # Note that returned records may not be in the same order as the ids you
471
- # provide since database rows are unordered. Give an explicit :order
472
- # to ensure the results are sorted.
473
- #
474
- # Examples for find first:
475
- # Person.find(:first) # returns the first object fetched by SELECT * FROM people
476
- # Person.find(:first, :conditions => [ "user_name = ?", user_name])
477
- # Person.find(:first, :order => "created_on DESC", :offset => 5)
478
- #
479
- # Examples for find all:
480
- # Person.find(:all) # returns an array of objects for all the rows fetched by SELECT * FROM people
481
- # Person.find(:all, :conditions => [ "category IN (?)", categories], :limit => 50)
482
- # Person.find(:all, :offset => 10, :limit => 10)
483
- # Person.find(:all, :include => [ :account, :friends ])
484
- # Person.find(:all, :group => "category")
485
- #
486
- # Example for find with a lock. Imagine two concurrent transactions:
487
- # each will read person.visits == 2, add 1 to it, and save, resulting
488
- # in two saves of person.visits = 3. By locking the row, the second
489
- # transaction has to wait until the first is finished; we get the
490
- # expected person.visits == 4.
491
- # Person.transaction do
492
- # person = Person.find(1, :lock => true)
493
- # person.visits += 1
494
- # person.save!
495
- # end
496
- def find(*args)
497
- options = args.extract_options!
498
- validate_find_options(options)
499
- set_readonly_option!(options)
500
-
501
- case args.first
502
- when :first then find_initial(options)
503
- when :all then find_every(options)
504
- else find_from_ids(args, options)
505
- end
506
- end
507
-
508
- #
509
- # Executes a custom sql query against your database and returns all the results. The results will
510
- # be returned as an array with columns requested encapsulated as attributes of the model you call
511
- # this method from. If you call +Product.find_by_sql+ then the results will be returned in a Product
512
- # object with the attributes you specified in the SQL query.
513
- #
514
- # If you call a complicated SQL query which spans multiple tables the columns specified by the
515
- # SELECT will be attributes of the model, whether or not they are columns of the corresponding
516
- # table.
517
- #
518
- # The +sql+ parameter is a full sql query as a string. It will be called as is, there will be
519
- # no database agnostic conversions performed. This should be a last resort because using, for example,
520
- # MySQL specific terms will lock you to using that particular database engine or require you to
521
- # change your call if you switch engines
522
- #
523
- # ==== Examples
524
- # # A simple sql query spanning multiple tables
525
- # Post.find_by_sql "SELECT p.title, c.author FROM posts p, comments c WHERE p.id = c.post_id"
526
- # > [#<Post:0x36bff9c @attributes={"title"=>"Ruby Meetup", "first_name"=>"Quentin"}>, ...]
527
- #
528
- # # You can use the same string replacement techniques as you can with ActiveRecord#find
529
- # Post.find_by_sql ["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date]
530
- # > [#<Post:0x36bff9c @attributes={"first_name"=>"The Cheap Man Buys Twice"}>, ...]
531
- def find_by_sql(sql)
532
- connection.select_all(sanitize_sql(sql), "#{name} Load").collect! { |record| instantiate(record) }
533
- end
534
-
535
- # Checks whether a record exists in the database that matches conditions given. These conditions
536
- # can either be a single integer representing a primary key id to be found, or a condition to be
537
- # matched like using ActiveRecord#find.
538
- #
539
- # The +id_or_conditions+ parameter can be an Integer or a String if you want to search the primary key
540
- # column of the table for a matching id, or if you're looking to match against a condition you can use
541
- # an Array or a Hash.
542
- #
543
- # Possible gotcha: You can't pass in a condition as a string e.g. "name = 'Jamie'", this would be
544
- # sanitized and then queried against the primary key column as "id = 'name = \'Jamie"
545
- #
546
- # ==== Examples
547
- # Person.exists?(5)
548
- # Person.exists?('5')
549
- # Person.exists?(:name => "David")
550
- # Person.exists?(['name LIKE ?', "%#{query}%"])
551
- def exists?(id_or_conditions)
552
- !find(:first, :select => "#{quoted_table_name}.#{primary_key}",
553
- :conditions => expand_id_conditions(id_or_conditions)).nil?
554
- end
555
-
556
- # Creates an object (or multiple objects) and saves it to the database, if validations pass.
557
- # The resulting object is returned whether the object was saved successfully to the database or not.
558
- #
559
- # The +attributes+ parameter can be either be a Hash or an Array of Hashes. These Hashes describe the
560
- # attributes on the objects that are to be created.
561
- #
562
- # ==== Examples
563
- # # Create a single new object
564
- # User.create(:first_name => 'Jamie')
565
- # # Create an Array of new objects
566
- # User.create([{:first_name => 'Jamie'}, {:first_name => 'Jeremy'}])
567
- def create(attributes = nil)
568
- if attributes.is_a?(Array)
569
- attributes.collect { |attr| create(attr) }
570
- else
571
- object = new(attributes)
572
- object.save
573
- object
574
- end
575
- end
576
-
577
- # Updates an object (or multiple objects) and saves it to the database, if validations pass.
578
- # The resulting object is returned whether the object was saved successfully to the database or not.
579
- #
580
- # ==== Options
581
- #
582
- # +id+ This should be the id or an array of ids to be updated
583
- # +attributes+ This should be a Hash of attributes to be set on the object, or an array of Hashes.
584
- #
585
- # ==== Examples
586
- #
587
- # # Updating one record:
588
- # Person.update(15, {:user_name => 'Samuel', :group => 'expert'})
589
- #
590
- # # Updating multiple records:
591
- # people = { 1 => { "first_name" => "David" }, 2 => { "first_name" => "Jeremy"} }
592
- # Person.update(people.keys, people.values)
593
- def update(id, attributes)
594
- if id.is_a?(Array)
595
- idx = -1
596
- id.collect { |id| idx += 1; update(id, attributes[idx]) }
597
- else
598
- object = find(id)
599
- object.update_attributes(attributes)
600
- object
601
- end
602
- end
603
-
604
- # Delete an object (or multiple objects) where the +id+ given matches the primary_key. A SQL +DELETE+ command
605
- # is executed on the database which means that no callbacks are fired off running this. This is an efficient method
606
- # of deleting records that don't need cleaning up after or other actions to be taken.
607
- #
608
- # Objects are _not_ instantiated with this method.
609
- #
610
- # ==== Options
611
- #
612
- # +id+ Can be either an Integer or an Array of Integers
613
- #
614
- # ==== Examples
615
- #
616
- # # Delete a single object
617
- # Todo.delete(1)
618
- #
619
- # # Delete multiple objects
620
- # todos = [1,2,3]
621
- # Todo.delete(todos)
622
- def delete(id)
623
- delete_all([ "#{connection.quote_column_name(primary_key)} IN (?)", id ])
624
- end
625
-
626
- # Destroy an object (or multiple objects) that has the given id, the object is instantiated first,
627
- # therefore all callbacks and filters are fired off before the object is deleted. This method is
628
- # less efficient than ActiveRecord#delete but allows cleanup methods and other actions to be run.
629
- #
630
- # This essentially finds the object (or multiple objects) with the given id, creates a new object
631
- # from the attributes, and then calls destroy on it.
632
- #
633
- # ==== Options
634
- #
635
- # +id+ Can be either an Integer or an Array of Integers
636
- #
637
- # ==== Examples
638
- #
639
- # # Destroy a single object
640
- # Todo.destroy(1)
641
- #
642
- # # Destroy multiple objects
643
- # todos = [1,2,3]
644
- # Todo.destroy(todos)
645
- def destroy(id)
646
- id.is_a?(Array) ? id.each { |id| destroy(id) } : find(id).destroy
647
- end
648
-
649
- # Updates all records with details given if they match a set of conditions supplied, limits and order can
650
- # also be supplied.
651
- #
652
- # ==== Options
653
- #
654
- # +updates+ A String of column and value pairs that will be set on any records that match conditions
655
- # +conditions+ An SQL fragment like "administrator = 1" or [ "user_name = ?", username ].
656
- # See conditions in the intro for more info.
657
- # +options+ Additional options are :limit and/or :order, see the examples for usage.
658
- #
659
- # ==== Examples
660
- #
661
- # # Update all billing objects with the 3 different attributes given
662
- # Billing.update_all( "category = 'authorized', approved = 1, author = 'David'" )
663
- #
664
- # # Update records that match our conditions
665
- # Billing.update_all( "author = 'David'", "title LIKE '%Rails%'" )
666
- #
667
- # # Update records that match our conditions but limit it to 5 ordered by date
668
- # Billing.update_all( "author = 'David'", "title LIKE '%Rails%'",
669
- # :order => 'created_at', :limit => 5 )
670
- def update_all(updates, conditions = nil, options = {})
671
- sql = "UPDATE #{table_name} SET #{sanitize_sql_for_assignment(updates)} "
672
- scope = scope(:find)
673
- add_conditions!(sql, conditions, scope)
674
- add_order!(sql, options[:order], scope)
675
- add_limit!(sql, options, scope)
676
- connection.update(sql, "#{name} Update")
677
- end
678
-
679
- # Destroys the records matching +conditions+ by instantiating each record and calling the destroy method.
680
- # This means at least 2*N database queries to destroy N records, so avoid destroy_all if you are deleting
681
- # many records. If you want to simply delete records without worrying about dependent associations or
682
- # callbacks, use the much faster +delete_all+ method instead.
683
- #
684
- # ==== Options
685
- #
686
- # +conditions+ Conditions are specified the same way as with +find+ method.
687
- #
688
- # ==== Example
689
- #
690
- # Person.destroy_all "last_login < '2004-04-04'"
691
- #
692
- # This loads and destroys each person one by one, including its dependent associations and before_ and
693
- # after_destroy callbacks.
694
- def destroy_all(conditions = nil)
695
- find(:all, :conditions => conditions).each { |object| object.destroy }
696
- end
697
-
698
- # Deletes the records matching +conditions+ without instantiating the records first, and hence not
699
- # calling the destroy method and invoking callbacks. This is a single SQL query, much more efficient
700
- # than destroy_all.
701
- #
702
- # ==== Options
703
- #
704
- # +conditions+ Conditions are specified the same way as with +find+ method.
705
- #
706
- # ==== Example
707
- #
708
- # Post.delete_all "person_id = 5 AND (category = 'Something' OR category = 'Else')"
709
- #
710
- # This deletes the affected posts all at once with a single DELETE query. If you need to destroy dependent
711
- # associations or call your before_ or after_destroy callbacks, use the +destroy_all+ method instead.
712
- def delete_all(conditions = nil)
713
- sql = "DELETE FROM #{quoted_table_name} "
714
- add_conditions!(sql, conditions, scope(:find))
715
- connection.delete(sql, "#{name} Delete all")
716
- end
717
-
718
- # Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part.
719
- # The use of this method should be restricted to complicated SQL queries that can't be executed
720
- # using the ActiveRecord::Calculations class methods. Look into those before using this.
721
- #
722
- # ==== Options
723
- #
724
- # +sql+: An SQL statement which should return a count query from the database, see the example below
725
- #
726
- # ==== Examples
727
- #
728
- # Product.count_by_sql "SELECT COUNT(*) FROM sales s, customers c WHERE s.customer_id = c.id"
729
- def count_by_sql(sql)
730
- sql = sanitize_conditions(sql)
731
- connection.select_value(sql, "#{name} Count").to_i
732
- end
733
-
734
- # A generic "counter updater" implementation, intended primarily to be
735
- # used by increment_counter and decrement_counter, but which may also
736
- # be useful on its own. It simply does a direct SQL update for the record
737
- # with the given ID, altering the given hash of counters by the amount
738
- # given by the corresponding value:
739
- #
740
- # ==== Options
741
- #
742
- # +id+ The id of the object you wish to update a counter on
743
- # +counters+ An Array of Hashes containing the names of the fields
744
- # to update as keys and the amount to update the field by as
745
- # values
746
- #
747
- # ==== Examples
748
- #
749
- # # For the Post with id of 5, decrement the comment_count by 1, and
750
- # # increment the action_count by 1
751
- # Post.update_counters 5, :comment_count => -1, :action_count => 1
752
- # # Executes the following SQL:
753
- # # UPDATE posts
754
- # # SET comment_count = comment_count - 1,
755
- # # action_count = action_count + 1
756
- # # WHERE id = 5
757
- def update_counters(id, counters)
758
- updates = counters.inject([]) { |list, (counter_name, increment)|
759
- sign = increment < 0 ? "-" : "+"
760
- list << "#{connection.quote_column_name(counter_name)} = #{connection.quote_column_name(counter_name)} #{sign} #{increment.abs}"
761
- }.join(", ")
762
- update_all(updates, "#{connection.quote_column_name(primary_key)} = #{quote_value(id)}")
763
- end
764
-
765
- # Increment a number field by one, usually representing a count.
766
- #
767
- # This is used for caching aggregate values, so that they don't need to be computed every time.
768
- # For example, a DiscussionBoard may cache post_count and comment_count otherwise every time the board is
769
- # shown it would have to run an SQL query to find how many posts and comments there are.
770
- #
771
- # ==== Options
772
- #
773
- # +counter_name+ The name of the field that should be incremented
774
- # +id+ The id of the object that should be incremented
775
- #
776
- # ==== Examples
777
- #
778
- # # Increment the post_count column for the record with an id of 5
779
- # DiscussionBoard.increment_counter(:post_count, 5)
780
- def increment_counter(counter_name, id)
781
- update_counters(id, counter_name => 1)
782
- end
783
-
784
- # Decrement a number field by one, usually representing a count.
785
- #
786
- # This works the same as increment_counter but reduces the column value by 1 instead of increasing it.
787
- #
788
- # ==== Options
789
- #
790
- # +counter_name+ The name of the field that should be decremented
791
- # +id+ The id of the object that should be decremented
792
- #
793
- # ==== Examples
794
- #
795
- # # Decrement the post_count column for the record with an id of 5
796
- # DiscussionBoard.decrement_counter(:post_count, 5)
797
- def decrement_counter(counter_name, id)
798
- update_counters(id, counter_name => -1)
799
- end
800
-
801
-
802
- # Attributes named in this macro are protected from mass-assignment, such as <tt>new(attributes)</tt> and
803
- # <tt>attributes=(attributes)</tt>. Their assignment will simply be ignored. Instead, you can use the direct writer
804
- # methods to do assignment. This is meant to protect sensitive attributes from being overwritten by URL/form hackers. Example:
805
- #
806
- # class Customer < ActiveRecord::Base
807
- # attr_protected :credit_rating
808
- # end
809
- #
810
- # customer = Customer.new("name" => David, "credit_rating" => "Excellent")
811
- # customer.credit_rating # => nil
812
- # customer.attributes = { "description" => "Jolly fellow", "credit_rating" => "Superb" }
813
- # customer.credit_rating # => nil
814
- #
815
- # customer.credit_rating = "Average"
816
- # customer.credit_rating # => "Average"
817
- #
818
- # To start from an all-closed default and enable attributes as needed, have a look at attr_accessible.
819
- def attr_protected(*attributes)
820
- write_inheritable_attribute("attr_protected", Set.new(attributes.map(&:to_s)) + (protected_attributes || []))
821
- end
822
-
823
- # Returns an array of all the attributes that have been protected from mass-assignment.
824
- def protected_attributes # :nodoc:
825
- read_inheritable_attribute("attr_protected")
826
- end
827
-
828
- # Similar to the attr_protected macro, this protects attributes of your model from mass-assignment,
829
- # such as <tt>new(attributes)</tt> and <tt>attributes=(attributes)</tt>
830
- # however, it does it in the opposite way. This locks all attributes and only allows access to the
831
- # attributes specified. Assignment to attributes not in this list will be ignored and need to be set
832
- # using the direct writer methods instead. This is meant to protect sensitive attributes from being
833
- # overwritten by URL/form hackers. If you'd rather start from an all-open default and restrict
834
- # attributes as needed, have a look at attr_protected.
835
- #
836
- # ==== Options
837
- #
838
- # <tt>*attributes</tt> A comma separated list of symbols that represent columns _not_ to be protected
839
- #
840
- # ==== Examples
841
- #
842
- # class Customer < ActiveRecord::Base
843
- # attr_accessible :name, :nickname
844
- # end
845
- #
846
- # customer = Customer.new(:name => "David", :nickname => "Dave", :credit_rating => "Excellent")
847
- # customer.credit_rating # => nil
848
- # customer.attributes = { :name => "Jolly fellow", :credit_rating => "Superb" }
849
- # customer.credit_rating # => nil
850
- #
851
- # customer.credit_rating = "Average"
852
- # customer.credit_rating # => "Average"
853
- def attr_accessible(*attributes)
854
- write_inheritable_attribute("attr_accessible", Set.new(attributes.map(&:to_s)) + (accessible_attributes || []))
855
- end
856
-
857
- # Returns an array of all the attributes that have been made accessible to mass-assignment.
858
- def accessible_attributes # :nodoc:
859
- read_inheritable_attribute("attr_accessible")
860
- end
861
-
862
- # Attributes listed as readonly can be set for a new record, but will be ignored in database updates afterwards.
863
- def attr_readonly(*attributes)
864
- write_inheritable_attribute("attr_readonly", Set.new(attributes.map(&:to_s)) + (readonly_attributes || []))
865
- end
866
-
867
- # Returns an array of all the attributes that have been specified as readonly.
868
- def readonly_attributes
869
- read_inheritable_attribute("attr_readonly")
870
- end
871
-
872
- # If you have an attribute that needs to be saved to the database as an object, and retrieved as the same object,
873
- # then specify the name of that attribute using this method and it will be handled automatically.
874
- # The serialization is done through YAML. If +class_name+ is specified, the serialized object must be of that
875
- # class on retrieval or +SerializationTypeMismatch+ will be raised.
876
- #
877
- # ==== Options
878
- #
879
- # +attr_name+ The field name that should be serialized
880
- # +class_name+ Optional, class name that the object type should be equal to
881
- #
882
- # ==== Example
883
- # # Serialize a preferences attribute
884
- # class User
885
- # serialize :preferences
886
- # end
887
- def serialize(attr_name, class_name = Object)
888
- serialized_attributes[attr_name.to_s] = class_name
889
- end
890
-
891
- # Returns a hash of all the attributes that have been specified for serialization as keys and their class restriction as values.
892
- def serialized_attributes
893
- read_inheritable_attribute("attr_serialized") or write_inheritable_attribute("attr_serialized", {})
894
- end
895
-
896
-
897
- # Guesses the table name (in forced lower-case) based on the name of the class in the inheritance hierarchy descending
898
- # directly from ActiveRecord. So if the hierarchy looks like: Reply < Message < ActiveRecord, then Message is used
899
- # to guess the table name even when called on Reply. The rules used to do the guess are handled by the Inflector class
900
- # in Active Support, which knows almost all common English inflections. You can add new inflections in config/initializers/inflections.rb.
901
- #
902
- # Nested classes are given table names prefixed by the singular form of
903
- # the parent's table name. Enclosing modules are not considered. Examples:
904
- #
905
- # class Invoice < ActiveRecord::Base; end;
906
- # file class table_name
907
- # invoice.rb Invoice invoices
908
- #
909
- # class Invoice < ActiveRecord::Base; class Lineitem < ActiveRecord::Base; end; end;
910
- # file class table_name
911
- # invoice.rb Invoice::Lineitem invoice_lineitems
912
- #
913
- # module Invoice; class Lineitem < ActiveRecord::Base; end; end;
914
- # file class table_name
915
- # invoice/lineitem.rb Invoice::Lineitem lineitems
916
- #
917
- # Additionally, the class-level table_name_prefix is prepended and the
918
- # table_name_suffix is appended. So if you have "myapp_" as a prefix,
919
- # the table name guess for an Invoice class becomes "myapp_invoices".
920
- # Invoice::Lineitem becomes "myapp_invoice_lineitems".
921
- #
922
- # You can also overwrite this class method to allow for unguessable
923
- # links, such as a Mouse class with a link to a "mice" table. Example:
924
- #
925
- # class Mouse < ActiveRecord::Base
926
- # set_table_name "mice"
927
- # end
928
- def table_name
929
- reset_table_name
930
- end
931
-
932
- def reset_table_name #:nodoc:
933
- base = base_class
934
-
935
- name =
936
- # STI subclasses always use their superclass' table.
937
- unless self == base
938
- base.table_name
939
- else
940
- # Nested classes are prefixed with singular parent table name.
941
- if parent < ActiveRecord::Base && !parent.abstract_class?
942
- contained = parent.table_name
943
- contained = contained.singularize if parent.pluralize_table_names
944
- contained << '_'
945
- end
946
- name = "#{table_name_prefix}#{contained}#{undecorated_table_name(base.name)}#{table_name_suffix}"
947
- end
948
-
949
- set_table_name(name)
950
- name
951
- end
952
-
953
- # Defines the primary key field -- can be overridden in subclasses. Overwriting will negate any effect of the
954
- # primary_key_prefix_type setting, though.
955
- def primary_key
956
- reset_primary_key
957
- end
958
-
959
- def reset_primary_key #:nodoc:
960
- key = 'id'
961
- case primary_key_prefix_type
962
- when :table_name
963
- key = Inflector.foreign_key(base_class.name, false)
964
- when :table_name_with_underscore
965
- key = Inflector.foreign_key(base_class.name)
966
- end
967
- set_primary_key(key)
968
- key
969
- end
970
-
971
- # Defines the column name for use with single table inheritance
972
- # -- can be set in subclasses like so: self.inheritance_column = "type_id"
973
- def inheritance_column
974
- @inheritance_column ||= "type".freeze
975
- end
976
-
977
- # Lazy-set the sequence name to the connection's default. This method
978
- # is only ever called once since set_sequence_name overrides it.
979
- def sequence_name #:nodoc:
980
- reset_sequence_name
981
- end
982
-
983
- def reset_sequence_name #:nodoc:
984
- default = connection.default_sequence_name(table_name, primary_key)
985
- set_sequence_name(default)
986
- default
987
- end
988
-
989
- # Sets the table name to use to the given value, or (if the value
990
- # is nil or false) to the value returned by the given block.
991
- #
992
- # Example:
993
- #
994
- # class Project < ActiveRecord::Base
995
- # set_table_name "project"
996
- # end
997
- def set_table_name(value = nil, &block)
998
- define_attr_method :table_name, value, &block
999
- end
1000
- alias :table_name= :set_table_name
1001
-
1002
- # Sets the name of the primary key column to use to the given value,
1003
- # or (if the value is nil or false) to the value returned by the given
1004
- # block.
1005
- #
1006
- # Example:
1007
- #
1008
- # class Project < ActiveRecord::Base
1009
- # set_primary_key "sysid"
1010
- # end
1011
- def set_primary_key(value = nil, &block)
1012
- define_attr_method :primary_key, value, &block
1013
- end
1014
- alias :primary_key= :set_primary_key
1015
-
1016
- # Sets the name of the inheritance column to use to the given value,
1017
- # or (if the value # is nil or false) to the value returned by the
1018
- # given block.
1019
- #
1020
- # Example:
1021
- #
1022
- # class Project < ActiveRecord::Base
1023
- # set_inheritance_column do
1024
- # original_inheritance_column + "_id"
1025
- # end
1026
- # end
1027
- def set_inheritance_column(value = nil, &block)
1028
- define_attr_method :inheritance_column, value, &block
1029
- end
1030
- alias :inheritance_column= :set_inheritance_column
1031
-
1032
- # Sets the name of the sequence to use when generating ids to the given
1033
- # value, or (if the value is nil or false) to the value returned by the
1034
- # given block. This is required for Oracle and is useful for any
1035
- # database which relies on sequences for primary key generation.
1036
- #
1037
- # If a sequence name is not explicitly set when using Oracle or Firebird,
1038
- # it will default to the commonly used pattern of: #{table_name}_seq
1039
- #
1040
- # If a sequence name is not explicitly set when using PostgreSQL, it
1041
- # will discover the sequence corresponding to your primary key for you.
1042
- #
1043
- # Example:
1044
- #
1045
- # class Project < ActiveRecord::Base
1046
- # set_sequence_name "projectseq" # default would have been "project_seq"
1047
- # end
1048
- def set_sequence_name(value = nil, &block)
1049
- define_attr_method :sequence_name, value, &block
1050
- end
1051
- alias :sequence_name= :set_sequence_name
1052
-
1053
- # Turns the +table_name+ back into a class name following the reverse rules of +table_name+.
1054
- def class_name(table_name = table_name) # :nodoc:
1055
- # remove any prefix and/or suffix from the table name
1056
- class_name = table_name[table_name_prefix.length..-(table_name_suffix.length + 1)].camelize
1057
- class_name = class_name.singularize if pluralize_table_names
1058
- class_name
1059
- end
1060
-
1061
- # Indicates whether the table associated with this class exists
1062
- def table_exists?
1063
- if connection.respond_to?(:tables)
1064
- connection.tables.include? table_name
1065
- else
1066
- # if the connection adapter hasn't implemented tables, there are two crude tests that can be
1067
- # used - see if getting column info raises an error, or if the number of columns returned is zero
1068
- begin
1069
- reset_column_information
1070
- columns.size > 0
1071
- rescue ActiveRecord::StatementInvalid
1072
- false
1073
- end
1074
- end
1075
- end
1076
-
1077
- # Returns an array of column objects for the table associated with this class.
1078
- def columns
1079
- unless @columns
1080
- @columns = connection.columns(table_name, "#{name} Columns")
1081
- @columns.each {|column| column.primary = column.name == primary_key}
1082
- end
1083
- @columns
1084
- end
1085
-
1086
- # Returns a hash of column objects for the table associated with this class.
1087
- def columns_hash
1088
- @columns_hash ||= columns.inject({}) { |hash, column| hash[column.name] = column; hash }
1089
- end
1090
-
1091
- # Returns an array of column names as strings.
1092
- def column_names
1093
- @column_names ||= columns.map { |column| column.name }
1094
- end
1095
-
1096
- # Returns an array of column objects where the primary id, all columns ending in "_id" or "_count",
1097
- # and columns used for single table inheritance have been removed.
1098
- def content_columns
1099
- @content_columns ||= columns.reject { |c| c.primary || c.name =~ /(_id|_count)$/ || c.name == inheritance_column }
1100
- end
1101
-
1102
- # Returns a hash of all the methods added to query each of the columns in the table with the name of the method as the key
1103
- # and true as the value. This makes it possible to do O(1) lookups in respond_to? to check if a given method for attribute
1104
- # is available.
1105
- def column_methods_hash #:nodoc:
1106
- @dynamic_methods_hash ||= column_names.inject(Hash.new(false)) do |methods, attr|
1107
- attr_name = attr.to_s
1108
- methods[attr.to_sym] = attr_name
1109
- methods["#{attr}=".to_sym] = attr_name
1110
- methods["#{attr}?".to_sym] = attr_name
1111
- methods["#{attr}_before_type_cast".to_sym] = attr_name
1112
- methods
1113
- end
1114
- end
1115
-
1116
- # Resets all the cached information about columns, which will cause them to be reloaded on the next request.
1117
- def reset_column_information
1118
- generated_methods.each { |name| undef_method(name) }
1119
- @column_names = @columns = @columns_hash = @content_columns = @dynamic_methods_hash = @generated_methods = @inheritance_column = nil
1120
- end
1121
-
1122
- def reset_column_information_and_inheritable_attributes_for_all_subclasses#:nodoc:
1123
- subclasses.each { |klass| klass.reset_inheritable_attributes; klass.reset_column_information }
1124
- end
1125
-
1126
- # Transforms attribute key names into a more humane format, such as "First name" instead of "first_name". Example:
1127
- # Person.human_attribute_name("first_name") # => "First name"
1128
- # Deprecated in favor of just calling "first_name".humanize
1129
- def human_attribute_name(attribute_key_name) #:nodoc:
1130
- attribute_key_name.humanize
1131
- end
1132
-
1133
- # True if this isn't a concrete subclass needing a STI type condition.
1134
- def descends_from_active_record?
1135
- if superclass.abstract_class?
1136
- superclass.descends_from_active_record?
1137
- else
1138
- superclass == Base || !columns_hash.include?(inheritance_column)
1139
- end
1140
- end
1141
-
1142
- def finder_needs_type_condition? #:nodoc:
1143
- # This is like this because benchmarking justifies the strange :false stuff
1144
- :true == (@finder_needs_type_condition ||= descends_from_active_record? ? :false : :true)
1145
- end
1146
-
1147
- # Returns a string like 'Post id:integer, title:string, body:text'
1148
- def inspect
1149
- if self == Base
1150
- super
1151
- elsif abstract_class?
1152
- "#{super}(abstract)"
1153
- elsif table_exists?
1154
- attr_list = columns.map { |c| "#{c.name}: #{c.type}" } * ', '
1155
- "#{super}(#{attr_list})"
1156
- else
1157
- "#{super}(Table doesn't exist)"
1158
- end
1159
- end
1160
-
1161
-
1162
- def quote_value(value, column = nil) #:nodoc:
1163
- connection.quote(value,column)
1164
- end
1165
-
1166
- # Used to sanitize objects before they're used in an SQL SELECT statement. Delegates to <tt>connection.quote</tt>.
1167
- def sanitize(object) #:nodoc:
1168
- connection.quote(object)
1169
- end
1170
-
1171
- # Log and benchmark multiple statements in a single block. Example:
1172
- #
1173
- # Project.benchmark("Creating project") do
1174
- # project = Project.create("name" => "stuff")
1175
- # project.create_manager("name" => "David")
1176
- # project.milestones << Milestone.find(:all)
1177
- # end
1178
- #
1179
- # The benchmark is only recorded if the current level of the logger matches the <tt>log_level</tt>, which makes it
1180
- # easy to include benchmarking statements in production software that will remain inexpensive because the benchmark
1181
- # will only be conducted if the log level is low enough.
1182
- #
1183
- # The logging of the multiple statements is turned off unless <tt>use_silence</tt> is set to false.
1184
- def benchmark(title, log_level = Logger::DEBUG, use_silence = true)
1185
- if logger && logger.level == log_level
1186
- result = nil
1187
- seconds = Benchmark.realtime { result = use_silence ? silence { yield } : yield }
1188
- logger.add(log_level, "#{title} (#{'%.5f' % seconds})")
1189
- result
1190
- else
1191
- yield
1192
- end
1193
- end
1194
-
1195
- # Silences the logger for the duration of the block.
1196
- def silence
1197
- old_logger_level, logger.level = logger.level, Logger::ERROR if logger
1198
- yield
1199
- ensure
1200
- logger.level = old_logger_level if logger
1201
- end
1202
-
1203
- # Overwrite the default class equality method to provide support for association proxies.
1204
- def ===(object)
1205
- object.is_a?(self)
1206
- end
1207
-
1208
- # Returns the base AR subclass that this class descends from. If A
1209
- # extends AR::Base, A.base_class will return A. If B descends from A
1210
- # through some arbitrarily deep hierarchy, B.base_class will return A.
1211
- def base_class
1212
- class_of_active_record_descendant(self)
1213
- end
1214
-
1215
- # Set this to true if this is an abstract class (see #abstract_class?).
1216
- attr_accessor :abstract_class
1217
-
1218
- # Returns whether this class is a base AR class. If A is a base class and
1219
- # B descends from A, then B.base_class will return B.
1220
- def abstract_class?
1221
- abstract_class == true
1222
- end
1223
-
1224
- private
1225
- def find_initial(options)
1226
- options.update(:limit => 1) unless options[:include]
1227
- find_every(options).first
1228
- end
1229
-
1230
- def find_every(options)
1231
- records = scoped?(:find, :include) || options[:include] ?
1232
- find_with_associations(options) :
1233
- find_by_sql(construct_finder_sql(options))
1234
-
1235
- records.each { |record| record.readonly! } if options[:readonly]
1236
-
1237
- records
1238
- end
1239
-
1240
- def find_from_ids(ids, options)
1241
- expects_array = ids.first.kind_of?(Array)
1242
- return ids.first if expects_array && ids.first.empty?
1243
-
1244
- ids = ids.flatten.compact.uniq
1245
-
1246
- case ids.size
1247
- when 0
1248
- raise RecordNotFound, "Couldn't find #{name} without an ID"
1249
- when 1
1250
- result = find_one(ids.first, options)
1251
- expects_array ? [ result ] : result
1252
- else
1253
- find_some(ids, options)
1254
- end
1255
- end
1256
-
1257
- def find_one(id, options)
1258
- conditions = " AND (#{sanitize_sql(options[:conditions])})" if options[:conditions]
1259
- options.update :conditions => "#{quoted_table_name}.#{connection.quote_column_name(primary_key)} = #{quote_value(id,columns_hash[primary_key])}#{conditions}"
1260
-
1261
- # Use find_every(options).first since the primary key condition
1262
- # already ensures we have a single record. Using find_initial adds
1263
- # a superfluous :limit => 1.
1264
- if result = find_every(options).first
1265
- result
1266
- else
1267
- raise RecordNotFound, "Couldn't find #{name} with ID=#{id}#{conditions}"
1268
- end
1269
- end
1270
-
1271
- def find_some(ids, options)
1272
- conditions = " AND (#{sanitize_sql(options[:conditions])})" if options[:conditions]
1273
- ids_list = ids.map { |id| quote_value(id,columns_hash[primary_key]) }.join(',')
1274
- options.update :conditions => "#{quoted_table_name}.#{connection.quote_column_name(primary_key)} IN (#{ids_list})#{conditions}"
1275
-
1276
- result = find_every(options)
1277
-
1278
- # Determine expected size from limit and offset, not just ids.size.
1279
- expected_size =
1280
- if options[:limit] && ids.size > options[:limit]
1281
- options[:limit]
1282
- else
1283
- ids.size
1284
- end
1285
-
1286
- # 11 ids with limit 3, offset 9 should give 2 results.
1287
- if options[:offset] && (ids.size - options[:offset] < expected_size)
1288
- expected_size = ids.size - options[:offset]
1289
- end
1290
-
1291
- if result.size == expected_size
1292
- result
1293
- else
1294
- raise RecordNotFound, "Couldn't find all #{name.pluralize} with IDs (#{ids_list})#{conditions} (found #{result.size} results, but was looking for #{expected_size})"
1295
- end
1296
- end
1297
-
1298
- # Finder methods must instantiate through this method to work with the
1299
- # single-table inheritance model that makes it possible to create
1300
- # objects of different types from the same table.
1301
- def instantiate(record)
1302
- object =
1303
- if subclass_name = record[inheritance_column]
1304
- # No type given.
1305
- if subclass_name.empty?
1306
- allocate
1307
-
1308
- else
1309
- # Ignore type if no column is present since it was probably
1310
- # pulled in from a sloppy join.
1311
- unless columns_hash.include?(inheritance_column)
1312
- allocate
1313
-
1314
- else
1315
- begin
1316
- compute_type(subclass_name).allocate
1317
- rescue NameError
1318
- raise SubclassNotFound,
1319
- "The single-table inheritance mechanism failed to locate the subclass: '#{record[inheritance_column]}'. " +
1320
- "This error is raised because the column '#{inheritance_column}' is reserved for storing the class in case of inheritance. " +
1321
- "Please rename this column if you didn't intend it to be used for storing the inheritance class " +
1322
- "or overwrite #{self.to_s}.inheritance_column to use another column for that information."
1323
- end
1324
- end
1325
- end
1326
- else
1327
- allocate
1328
- end
1329
-
1330
- object.instance_variable_set("@attributes", record)
1331
- object.instance_variable_set("@attributes_cache", Hash.new)
1332
-
1333
- if object.respond_to_without_attributes?(:after_find)
1334
- object.send(:callback, :after_find)
1335
- end
1336
-
1337
- if object.respond_to_without_attributes?(:after_initialize)
1338
- object.send(:callback, :after_initialize)
1339
- end
1340
-
1341
- object
1342
- end
1343
-
1344
- # Nest the type name in the same module as this class.
1345
- # Bar is "MyApp::Business::Bar" relative to MyApp::Business::Foo
1346
- def type_name_with_module(type_name)
1347
- (/^::/ =~ type_name) ? type_name : "#{parent.name}::#{type_name}"
1348
- end
1349
-
1350
- def construct_finder_sql(options)
1351
- scope = scope(:find)
1352
- sql = "SELECT #{(scope && scope[:select]) || options[:select] || (options[:joins] && quoted_table_name + '.*') || '*'} "
1353
- sql << "FROM #{(scope && scope[:from]) || options[:from] || quoted_table_name} "
1354
-
1355
- add_joins!(sql, options, scope)
1356
- add_conditions!(sql, options[:conditions], scope)
1357
-
1358
- add_group!(sql, options[:group], scope)
1359
- add_order!(sql, options[:order], scope)
1360
- add_limit!(sql, options, scope)
1361
- add_lock!(sql, options, scope)
1362
-
1363
- sql
1364
- end
1365
-
1366
- # Merges includes so that the result is a valid +include+
1367
- def merge_includes(first, second)
1368
- (safe_to_array(first) + safe_to_array(second)).uniq
1369
- end
1370
-
1371
- # Object#to_a is deprecated, though it does have the desired behavior
1372
- def safe_to_array(o)
1373
- case o
1374
- when NilClass
1375
- []
1376
- when Array
1377
- o
1378
- else
1379
- [o]
1380
- end
1381
- end
1382
-
1383
- def add_order!(sql, order, scope = :auto)
1384
- scope = scope(:find) if :auto == scope
1385
- scoped_order = scope[:order] if scope
1386
- if order
1387
- sql << " ORDER BY #{order}"
1388
- sql << ", #{scoped_order}" if scoped_order
1389
- else
1390
- sql << " ORDER BY #{scoped_order}" if scoped_order
1391
- end
1392
- end
1393
-
1394
- def add_group!(sql, group, scope = :auto)
1395
- if group
1396
- sql << " GROUP BY #{group}"
1397
- else
1398
- scope = scope(:find) if :auto == scope
1399
- if scope && (scoped_group = scope[:group])
1400
- sql << " GROUP BY #{scoped_group}"
1401
- end
1402
- end
1403
- end
1404
-
1405
- # The optional scope argument is for the current :find scope.
1406
- def add_limit!(sql, options, scope = :auto)
1407
- scope = scope(:find) if :auto == scope
1408
-
1409
- if scope
1410
- options[:limit] ||= scope[:limit]
1411
- options[:offset] ||= scope[:offset]
1412
- end
1413
-
1414
- connection.add_limit_offset!(sql, options)
1415
- end
1416
-
1417
- # The optional scope argument is for the current :find scope.
1418
- # The :lock option has precedence over a scoped :lock.
1419
- def add_lock!(sql, options, scope = :auto)
1420
- scope = scope(:find) if :auto == scope
1421
- options = options.reverse_merge(:lock => scope[:lock]) if scope
1422
- connection.add_lock!(sql, options)
1423
- end
1424
-
1425
- # The optional scope argument is for the current :find scope.
1426
- def add_joins!(sql, options, scope = :auto)
1427
- scope = scope(:find) if :auto == scope
1428
- join = (scope && scope[:joins]) || options[:joins]
1429
- case join
1430
- when Symbol, Hash, Array
1431
- join_dependency = ActiveRecord::Associations::ClassMethods::InnerJoinDependency.new(self, join, nil)
1432
- sql << " #{join_dependency.join_associations.collect{|join| join.association_join }.join} "
1433
- else
1434
- sql << " #{join} "
1435
- end
1436
- end
1437
-
1438
- # Adds a sanitized version of +conditions+ to the +sql+ string. Note that the passed-in +sql+ string is changed.
1439
- # The optional scope argument is for the current :find scope.
1440
- def add_conditions!(sql, conditions, scope = :auto)
1441
- scope = scope(:find) if :auto == scope
1442
- segments = []
1443
- segments << sanitize_sql(scope[:conditions]) if scope && !scope[:conditions].blank?
1444
- segments << sanitize_sql(conditions) unless conditions.blank?
1445
- segments << type_condition if finder_needs_type_condition?
1446
- segments.delete_if{|s| s.blank?}
1447
- sql << "WHERE (#{segments.join(") AND (")}) " unless segments.empty?
1448
- end
1449
-
1450
- def type_condition
1451
- quoted_inheritance_column = connection.quote_column_name(inheritance_column)
1452
- type_condition = subclasses.inject("#{quoted_table_name}.#{quoted_inheritance_column} = '#{name.demodulize}' ") do |condition, subclass|
1453
- condition << "OR #{quoted_table_name}.#{quoted_inheritance_column} = '#{subclass.name.demodulize}' "
1454
- end
1455
-
1456
- " (#{type_condition}) "
1457
- end
1458
-
1459
- # Guesses the table name, but does not decorate it with prefix and suffix information.
1460
- def undecorated_table_name(class_name = base_class.name)
1461
- table_name = Inflector.underscore(Inflector.demodulize(class_name))
1462
- table_name = Inflector.pluralize(table_name) if pluralize_table_names
1463
- table_name
1464
- end
1465
-
1466
- # Enables dynamic finders like find_by_user_name(user_name) and find_by_user_name_and_password(user_name, password) that are turned into
1467
- # find(:first, :conditions => ["user_name = ?", user_name]) and find(:first, :conditions => ["user_name = ? AND password = ?", user_name, password])
1468
- # respectively. Also works for find(:all) by using find_all_by_amount(50) that is turned into find(:all, :conditions => ["amount = ?", 50]).
1469
- #
1470
- # It's even possible to use all the additional parameters to find. For example, the full interface for find_all_by_amount
1471
- # is actually find_all_by_amount(amount, options).
1472
- #
1473
- # This also enables you to initialize a record if it is not found, such as find_or_initialize_by_amount(amount)
1474
- # or find_or_create_by_user_and_password(user, password).
1475
- #
1476
- # Each dynamic finder or initializer/creator is also defined in the class after it is first invoked, so that future
1477
- # attempts to use it do not run through method_missing.
1478
- def method_missing(method_id, *arguments)
1479
- if match = /^find_(all_by|by)_([_a-zA-Z]\w*)$/.match(method_id.to_s)
1480
- finder = determine_finder(match)
1481
-
1482
- attribute_names = extract_attribute_names_from_match(match)
1483
- super unless all_attributes_exists?(attribute_names)
1484
-
1485
- self.class_eval %{
1486
- def self.#{method_id}(*args)
1487
- options = args.last.is_a?(Hash) ? args.pop : {}
1488
- attributes = construct_attributes_from_arguments([:#{attribute_names.join(',:')}], args)
1489
- finder_options = { :conditions => attributes }
1490
- validate_find_options(options)
1491
- set_readonly_option!(options)
1492
-
1493
- if options[:conditions]
1494
- with_scope(:find => finder_options) do
1495
- ActiveSupport::Deprecation.silence { send(:#{finder}, options) }
1496
- end
1497
- else
1498
- ActiveSupport::Deprecation.silence { send(:#{finder}, options.merge(finder_options)) }
1499
- end
1500
- end
1501
- }, __FILE__, __LINE__
1502
- send(method_id, *arguments)
1503
- elsif match = /^find_or_(initialize|create)_by_([_a-zA-Z]\w*)$/.match(method_id.to_s)
1504
- instantiator = determine_instantiator(match)
1505
- attribute_names = extract_attribute_names_from_match(match)
1506
- super unless all_attributes_exists?(attribute_names)
1507
-
1508
- self.class_eval %{
1509
- def self.#{method_id}(*args)
1510
- if args[0].is_a?(Hash)
1511
- attributes = args[0].with_indifferent_access
1512
- find_attributes = attributes.slice(*[:#{attribute_names.join(',:')}])
1513
- else
1514
- find_attributes = attributes = construct_attributes_from_arguments([:#{attribute_names.join(',:')}], args)
1515
- end
1516
-
1517
- options = { :conditions => find_attributes }
1518
- set_readonly_option!(options)
1519
-
1520
- record = find_initial(options)
1521
- if record.nil?
1522
- record = self.new { |r| r.send(:attributes=, attributes, false) }
1523
- #{'record.save' if instantiator == :create}
1524
- record
1525
- else
1526
- record
1527
- end
1528
- end
1529
- }, __FILE__, __LINE__
1530
- send(method_id, *arguments)
1531
- else
1532
- super
1533
- end
1534
- end
1535
-
1536
- def determine_finder(match)
1537
- match.captures.first == 'all_by' ? :find_every : :find_initial
1538
- end
1539
-
1540
- def determine_instantiator(match)
1541
- match.captures.first == 'initialize' ? :new : :create
1542
- end
1543
-
1544
- def extract_attribute_names_from_match(match)
1545
- match.captures.last.split('_and_')
1546
- end
1547
-
1548
- def construct_attributes_from_arguments(attribute_names, arguments)
1549
- attributes = {}
1550
- attribute_names.each_with_index { |name, idx| attributes[name] = arguments[idx] }
1551
- attributes
1552
- end
1553
-
1554
- def all_attributes_exists?(attribute_names)
1555
- attribute_names.all? { |name| column_methods_hash.include?(name.to_sym) }
1556
- end
1557
-
1558
- def attribute_condition(argument)
1559
- case argument
1560
- when nil then "IS ?"
1561
- when Array, ActiveRecord::Associations::AssociationCollection then "IN (?)"
1562
- when Range then "BETWEEN ? AND ?"
1563
- else "= ?"
1564
- end
1565
- end
1566
-
1567
- # Interpret Array and Hash as conditions and anything else as an id.
1568
- def expand_id_conditions(id_or_conditions)
1569
- case id_or_conditions
1570
- when Array, Hash then id_or_conditions
1571
- else sanitize_sql(primary_key => id_or_conditions)
1572
- end
1573
- end
1574
-
1575
-
1576
- # Defines an "attribute" method (like #inheritance_column or
1577
- # #table_name). A new (class) method will be created with the
1578
- # given name. If a value is specified, the new method will
1579
- # return that value (as a string). Otherwise, the given block
1580
- # will be used to compute the value of the method.
1581
- #
1582
- # The original method will be aliased, with the new name being
1583
- # prefixed with "original_". This allows the new method to
1584
- # access the original value.
1585
- #
1586
- # Example:
1587
- #
1588
- # class A < ActiveRecord::Base
1589
- # define_attr_method :primary_key, "sysid"
1590
- # define_attr_method( :inheritance_column ) do
1591
- # original_inheritance_column + "_id"
1592
- # end
1593
- # end
1594
- def define_attr_method(name, value=nil, &block)
1595
- sing = class << self; self; end
1596
- sing.send :alias_method, "original_#{name}", name
1597
- if block_given?
1598
- sing.send :define_method, name, &block
1599
- else
1600
- # use eval instead of a block to work around a memory leak in dev
1601
- # mode in fcgi
1602
- sing.class_eval "def #{name}; #{value.to_s.inspect}; end"
1603
- end
1604
- end
1605
-
1606
- protected
1607
- # Scope parameters to method calls within the block. Takes a hash of method_name => parameters hash.
1608
- # method_name may be :find or :create. :find parameters may include the <tt>:conditions</tt>, <tt>:joins</tt>,
1609
- # <tt>:include</tt>, <tt>:offset</tt>, <tt>:limit</tt>, and <tt>:readonly</tt> options. :create parameters are an attributes hash.
1610
- #
1611
- # class Article < ActiveRecord::Base
1612
- # def self.create_with_scope
1613
- # with_scope(:find => { :conditions => "blog_id = 1" }, :create => { :blog_id => 1 }) do
1614
- # find(1) # => SELECT * from articles WHERE blog_id = 1 AND id = 1
1615
- # a = create(1)
1616
- # a.blog_id # => 1
1617
- # end
1618
- # end
1619
- # end
1620
- #
1621
- # In nested scopings, all previous parameters are overwritten by the innermost rule, with the exception of
1622
- # :conditions and :include options in :find, which are merged.
1623
- #
1624
- # class Article < ActiveRecord::Base
1625
- # def self.find_with_scope
1626
- # with_scope(:find => { :conditions => "blog_id = 1", :limit => 1 }, :create => { :blog_id => 1 }) do
1627
- # with_scope(:find => { :limit => 10})
1628
- # find(:all) # => SELECT * from articles WHERE blog_id = 1 LIMIT 10
1629
- # end
1630
- # with_scope(:find => { :conditions => "author_id = 3" })
1631
- # find(:all) # => SELECT * from articles WHERE blog_id = 1 AND author_id = 3 LIMIT 1
1632
- # end
1633
- # end
1634
- # end
1635
- # end
1636
- #
1637
- # You can ignore any previous scopings by using the <tt>with_exclusive_scope</tt> method.
1638
- #
1639
- # class Article < ActiveRecord::Base
1640
- # def self.find_with_exclusive_scope
1641
- # with_scope(:find => { :conditions => "blog_id = 1", :limit => 1 }) do
1642
- # with_exclusive_scope(:find => { :limit => 10 })
1643
- # find(:all) # => SELECT * from articles LIMIT 10
1644
- # end
1645
- # end
1646
- # end
1647
- # end
1648
- def with_scope(method_scoping = {}, action = :merge, &block)
1649
- method_scoping = method_scoping.method_scoping if method_scoping.respond_to?(:method_scoping)
1650
-
1651
- # Dup first and second level of hash (method and params).
1652
- method_scoping = method_scoping.inject({}) do |hash, (method, params)|
1653
- hash[method] = (params == true) ? params : params.dup
1654
- hash
1655
- end
1656
-
1657
- method_scoping.assert_valid_keys([ :find, :create ])
1658
-
1659
- if f = method_scoping[:find]
1660
- f.assert_valid_keys(VALID_FIND_OPTIONS)
1661
- set_readonly_option! f
1662
- end
1663
-
1664
- # Merge scopings
1665
- if action == :merge && current_scoped_methods
1666
- method_scoping = current_scoped_methods.inject(method_scoping) do |hash, (method, params)|
1667
- case hash[method]
1668
- when Hash
1669
- if method == :find
1670
- (hash[method].keys + params.keys).uniq.each do |key|
1671
- merge = hash[method][key] && params[key] # merge if both scopes have the same key
1672
- if key == :conditions && merge
1673
- hash[method][key] = [params[key], hash[method][key]].collect{ |sql| "( %s )" % sanitize_sql(sql) }.join(" AND ")
1674
- elsif key == :include && merge
1675
- hash[method][key] = merge_includes(hash[method][key], params[key]).uniq
1676
- else
1677
- hash[method][key] = hash[method][key] || params[key]
1678
- end
1679
- end
1680
- else
1681
- hash[method] = params.merge(hash[method])
1682
- end
1683
- else
1684
- hash[method] = params
1685
- end
1686
- hash
1687
- end
1688
- end
1689
-
1690
- self.scoped_methods << method_scoping
1691
-
1692
- begin
1693
- yield
1694
- ensure
1695
- self.scoped_methods.pop
1696
- end
1697
- end
1698
-
1699
- # Works like with_scope, but discards any nested properties.
1700
- def with_exclusive_scope(method_scoping = {}, &block)
1701
- with_scope(method_scoping, :overwrite, &block)
1702
- end
1703
-
1704
- def subclasses #:nodoc:
1705
- @@subclasses[self] ||= []
1706
- @@subclasses[self] + extra = @@subclasses[self].inject([]) {|list, subclass| list + subclass.subclasses }
1707
- end
1708
-
1709
- # Test whether the given method and optional key are scoped.
1710
- def scoped?(method, key = nil) #:nodoc:
1711
- if current_scoped_methods && (scope = current_scoped_methods[method])
1712
- !key || scope.has_key?(key)
1713
- end
1714
- end
1715
-
1716
- # Retrieve the scope for the given method and optional key.
1717
- def scope(method, key = nil) #:nodoc:
1718
- if current_scoped_methods && (scope = current_scoped_methods[method])
1719
- key ? scope[key] : scope
1720
- end
1721
- end
1722
-
1723
- def thread_safe_scoped_methods #:nodoc:
1724
- scoped_methods = (Thread.current[:scoped_methods] ||= {})
1725
- scoped_methods[self] ||= []
1726
- end
1727
-
1728
- def single_threaded_scoped_methods #:nodoc:
1729
- @scoped_methods ||= []
1730
- end
1731
-
1732
- # pick up the correct scoped_methods version from @@allow_concurrency
1733
- if @@allow_concurrency
1734
- alias_method :scoped_methods, :thread_safe_scoped_methods
1735
- else
1736
- alias_method :scoped_methods, :single_threaded_scoped_methods
1737
- end
1738
-
1739
- def current_scoped_methods #:nodoc:
1740
- scoped_methods.last
1741
- end
1742
-
1743
- # Returns the class type of the record using the current module as a prefix. So descendents of
1744
- # MyApp::Business::Account would appear as MyApp::Business::AccountSubclass.
1745
- def compute_type(type_name)
1746
- modularized_name = type_name_with_module(type_name)
1747
- begin
1748
- class_eval(modularized_name, __FILE__, __LINE__)
1749
- rescue NameError
1750
- class_eval(type_name, __FILE__, __LINE__)
1751
- end
1752
- end
1753
-
1754
- # Returns the class descending directly from ActiveRecord in the inheritance hierarchy.
1755
- def class_of_active_record_descendant(klass)
1756
- if klass.superclass == Base || klass.superclass.abstract_class?
1757
- klass
1758
- elsif klass.superclass.nil?
1759
- raise ActiveRecordError, "#{name} doesn't belong in a hierarchy descending from ActiveRecord"
1760
- else
1761
- class_of_active_record_descendant(klass.superclass)
1762
- end
1763
- end
1764
-
1765
- # Returns the name of the class descending directly from ActiveRecord in the inheritance hierarchy.
1766
- def class_name_of_active_record_descendant(klass) #:nodoc:
1767
- klass.base_class.name
1768
- end
1769
-
1770
- # Accepts an array, hash, or string of sql conditions and sanitizes
1771
- # them into a valid SQL fragment for a WHERE clause.
1772
- # ["name='%s' and group_id='%s'", "foo'bar", 4] returns "name='foo''bar' and group_id='4'"
1773
- # { :name => "foo'bar", :group_id => 4 } returns "name='foo''bar' and group_id='4'"
1774
- # "name='foo''bar' and group_id='4'" returns "name='foo''bar' and group_id='4'"
1775
- def sanitize_sql_for_conditions(condition)
1776
- case condition
1777
- when Array; sanitize_sql_array(condition)
1778
- when Hash; sanitize_sql_hash_for_conditions(condition)
1779
- else condition
1780
- end
1781
- end
1782
- alias_method :sanitize_sql, :sanitize_sql_for_conditions
1783
-
1784
- # Accepts an array, hash, or string of sql conditions and sanitizes
1785
- # them into a valid SQL fragment for a SET clause.
1786
- # { :name => nil, :group_id => 4 } returns "name = NULL , group_id='4'"
1787
- def sanitize_sql_for_assignment(assignments)
1788
- case assignments
1789
- when Array; sanitize_sql_array(assignments)
1790
- when Hash; sanitize_sql_hash_for_assignment(assignments)
1791
- else assignments
1792
- end
1793
- end
1794
-
1795
- # Sanitizes a hash of attribute/value pairs into SQL conditions for a WHERE clause.
1796
- # { :name => "foo'bar", :group_id => 4 }
1797
- # # => "name='foo''bar' and group_id= 4"
1798
- # { :status => nil, :group_id => [1,2,3] }
1799
- # # => "status IS NULL and group_id IN (1,2,3)"
1800
- # { :age => 13..18 }
1801
- # # => "age BETWEEN 13 AND 18"
1802
- # { 'other_records.id' => 7 }
1803
- # # => "`other_records`.`id` = 7"
1804
- def sanitize_sql_hash_for_conditions(attrs)
1805
- conditions = attrs.map do |attr, value|
1806
- attr = attr.to_s
1807
-
1808
- # Extract table name from qualified attribute names.
1809
- if attr.include?('.')
1810
- table_name, attr = attr.split('.', 2)
1811
- table_name = connection.quote_table_name(table_name)
1812
- else
1813
- table_name = quoted_table_name
1814
- end
1815
-
1816
- "#{table_name}.#{connection.quote_column_name(attr)} #{attribute_condition(value)}"
1817
- end.join(' AND ')
1818
-
1819
- replace_bind_variables(conditions, expand_range_bind_variables(attrs.values))
1820
- end
1821
- alias_method :sanitize_sql_hash, :sanitize_sql_hash_for_conditions
1822
-
1823
- # Sanitizes a hash of attribute/value pairs into SQL conditions for a SET clause.
1824
- # { :status => nil, :group_id => 1 }
1825
- # # => "status = NULL , group_id = 1"
1826
- def sanitize_sql_hash_for_assignment(attrs)
1827
- conditions = attrs.map do |attr, value|
1828
- "#{connection.quote_column_name(attr)} = #{quote_bound_value(value)}"
1829
- end.join(', ')
1830
- end
1831
-
1832
- # Accepts an array of conditions. The array has each value
1833
- # sanitized and interpolated into the sql statement.
1834
- # ["name='%s' and group_id='%s'", "foo'bar", 4] returns "name='foo''bar' and group_id='4'"
1835
- def sanitize_sql_array(ary)
1836
- statement, *values = ary
1837
- if values.first.is_a?(Hash) and statement =~ /:\w+/
1838
- replace_named_bind_variables(statement, values.first)
1839
- elsif statement.include?('?')
1840
- replace_bind_variables(statement, values)
1841
- else
1842
- statement % values.collect { |value| connection.quote_string(value.to_s) }
1843
- end
1844
- end
1845
-
1846
- alias_method :sanitize_conditions, :sanitize_sql
1847
-
1848
- def replace_bind_variables(statement, values) #:nodoc:
1849
- raise_if_bind_arity_mismatch(statement, statement.count('?'), values.size)
1850
- bound = values.dup
1851
- statement.gsub('?') { quote_bound_value(bound.shift) }
1852
- end
1853
-
1854
- def replace_named_bind_variables(statement, bind_vars) #:nodoc:
1855
- statement.gsub(/:(\w+)/) do
1856
- match = $1.to_sym
1857
- if bind_vars.include?(match)
1858
- quote_bound_value(bind_vars[match])
1859
- else
1860
- raise PreparedStatementInvalid, "missing value for :#{match} in #{statement}"
1861
- end
1862
- end
1863
- end
1864
-
1865
- def expand_range_bind_variables(bind_vars) #:nodoc:
1866
- bind_vars.each_with_index do |var, index|
1867
- bind_vars[index, 1] = [var.first, var.last] if var.is_a?(Range)
1868
- end
1869
- bind_vars
1870
- end
1871
-
1872
- def quote_bound_value(value) #:nodoc:
1873
- if value.respond_to?(:map) && !value.is_a?(String)
1874
- if value.respond_to?(:empty?) && value.empty?
1875
- connection.quote(nil)
1876
- else
1877
- value.map { |v| connection.quote(v) }.join(',')
1878
- end
1879
- else
1880
- connection.quote(value)
1881
- end
1882
- end
1883
-
1884
- def raise_if_bind_arity_mismatch(statement, expected, provided) #:nodoc:
1885
- unless expected == provided
1886
- raise PreparedStatementInvalid, "wrong number of bind variables (#{provided} for #{expected}) in: #{statement}"
1887
- end
1888
- end
1889
-
1890
- VALID_FIND_OPTIONS = [ :conditions, :include, :joins, :limit, :offset,
1891
- :order, :select, :readonly, :group, :from, :lock ]
1892
-
1893
- def validate_find_options(options) #:nodoc:
1894
- options.assert_valid_keys(VALID_FIND_OPTIONS)
1895
- end
1896
-
1897
- def set_readonly_option!(options) #:nodoc:
1898
- # Inherit :readonly from finder scope if set. Otherwise,
1899
- # if :joins is not blank then :readonly defaults to true.
1900
- unless options.has_key?(:readonly)
1901
- if scoped_readonly = scope(:find, :readonly)
1902
- options[:readonly] = scoped_readonly
1903
- elsif !options[:joins].blank? && !options[:select]
1904
- options[:readonly] = true
1905
- end
1906
- end
1907
- end
1908
-
1909
- def encode_quoted_value(value) #:nodoc:
1910
- quoted_value = connection.quote(value)
1911
- quoted_value = "'#{quoted_value[1..-2].gsub(/\'/, "\\\\'")}'" if quoted_value.include?("\\\'") # (for ruby mode) "
1912
- quoted_value
1913
- end
1914
- end
1915
-
1916
- public
1917
- # New objects can be instantiated as either empty (pass no construction parameter) or pre-set with
1918
- # attributes but not yet saved (pass a hash with key names matching the associated table column names).
1919
- # In both instances, valid attribute keys are determined by the column names of the associated table --
1920
- # hence you can't have attributes that aren't part of the table columns.
1921
- def initialize(attributes = nil)
1922
- @attributes = attributes_from_column_definition
1923
- @attributes_cache = {}
1924
- @new_record = true
1925
- ensure_proper_type
1926
- self.attributes = attributes unless attributes.nil?
1927
- self.class.send(:scope, :create).each { |att,value| self.send("#{att}=", value) } if self.class.send(:scoped?, :create)
1928
- result = yield self if block_given?
1929
- callback(:after_initialize) if respond_to_without_attributes?(:after_initialize)
1930
- result
1931
- end
1932
-
1933
- # A model instance's primary key is always available as model.id
1934
- # whether you name it the default 'id' or set it to something else.
1935
- def id
1936
- attr_name = self.class.primary_key
1937
- column = column_for_attribute(attr_name)
1938
-
1939
- self.class.send(:define_read_method, :id, attr_name, column)
1940
- # now that the method exists, call it
1941
- self.send attr_name.to_sym
1942
-
1943
- end
1944
-
1945
- # Enables Active Record objects to be used as URL parameters in Action Pack automatically.
1946
- def to_param
1947
- # We can't use alias_method here, because method 'id' optimizes itself on the fly.
1948
- (id = self.id) ? id.to_s : nil # Be sure to stringify the id for routes
1949
- end
1950
-
1951
- def id_before_type_cast #:nodoc:
1952
- read_attribute_before_type_cast(self.class.primary_key)
1953
- end
1954
-
1955
- def quoted_id #:nodoc:
1956
- quote_value(id, column_for_attribute(self.class.primary_key))
1957
- end
1958
-
1959
- # Sets the primary ID.
1960
- def id=(value)
1961
- write_attribute(self.class.primary_key, value)
1962
- end
1963
-
1964
- # Returns true if this object hasn't been saved yet -- that is, a record for the object doesn't exist yet.
1965
- def new_record?
1966
- @new_record
1967
- end
1968
-
1969
- # * No record exists: Creates a new record with values matching those of the object attributes.
1970
- # * A record does exist: Updates the record with values matching those of the object attributes.
1971
- def save
1972
- create_or_update
1973
- end
1974
-
1975
- # Attempts to save the record, but instead of just returning false if it couldn't happen, it raises a
1976
- # RecordNotSaved exception
1977
- def save!
1978
- create_or_update || raise(RecordNotSaved)
1979
- end
1980
-
1981
- # Deletes the record in the database and freezes this instance to reflect that no changes should
1982
- # be made (since they can't be persisted).
1983
- def destroy
1984
- unless new_record?
1985
- connection.delete <<-end_sql, "#{self.class.name} Destroy"
1986
- DELETE FROM #{self.class.quoted_table_name}
1987
- WHERE #{connection.quote_column_name(self.class.primary_key)} = #{quoted_id}
1988
- end_sql
1989
- end
1990
-
1991
- freeze
1992
- end
1993
-
1994
- # Returns a clone of the record that hasn't been assigned an id yet and
1995
- # is treated as a new record. Note that this is a "shallow" clone:
1996
- # it copies the object's attributes only, not its associations.
1997
- # The extent of a "deep" clone is application-specific and is therefore
1998
- # left to the application to implement according to its need.
1999
- def clone
2000
- attrs = self.attributes_before_type_cast
2001
- attrs.delete(self.class.primary_key)
2002
- record = self.class.new
2003
- record.send :instance_variable_set, '@attributes', attrs
2004
- record
2005
- end
2006
-
2007
- # Returns an instance of the specified klass with the attributes of the current record. This is mostly useful in relation to
2008
- # single-table inheritance structures where you want a subclass to appear as the superclass. This can be used along with record
2009
- # identification in Action Pack to allow, say, Client < Company to do something like render :partial => @client.becomes(Company)
2010
- # to render that instance using the companies/company partial instead of clients/client.
2011
- #
2012
- # Note: The new instance will share a link to the same attributes as the original class. So any change to the attributes in either
2013
- # instance will affect the other.
2014
- def becomes(klass)
2015
- returning klass.new do |became|
2016
- became.instance_variable_set("@attributes", @attributes)
2017
- became.instance_variable_set("@attributes_cache", @attributes_cache)
2018
- became.instance_variable_set("@new_record", new_record?)
2019
- end
2020
- end
2021
-
2022
- # Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records.
2023
- # Note: This method is overwritten by the Validation module that'll make sure that updates made with this method
2024
- # aren't subjected to validation checks. Hence, attributes can be updated even if the full object isn't valid.
2025
- def update_attribute(name, value)
2026
- send(name.to_s + '=', value)
2027
- save
2028
- end
2029
-
2030
- # Updates all the attributes from the passed-in Hash and saves the record. If the object is invalid, the saving will
2031
- # fail and false will be returned.
2032
- def update_attributes(attributes)
2033
- self.attributes = attributes
2034
- save
2035
- end
2036
-
2037
- # Updates an object just like Base.update_attributes but calls save! instead of save so an exception is raised if the record is invalid.
2038
- def update_attributes!(attributes)
2039
- self.attributes = attributes
2040
- save!
2041
- end
2042
-
2043
- # Initializes the +attribute+ to zero if nil and adds one. Only makes sense for number-based attributes. Returns self.
2044
- def increment(attribute)
2045
- self[attribute] ||= 0
2046
- self[attribute] += 1
2047
- self
2048
- end
2049
-
2050
- # Increments the +attribute+ and saves the record.
2051
- def increment!(attribute)
2052
- increment(attribute).update_attribute(attribute, self[attribute])
2053
- end
2054
-
2055
- # Initializes the +attribute+ to zero if nil and subtracts one. Only makes sense for number-based attributes. Returns self.
2056
- def decrement(attribute)
2057
- self[attribute] ||= 0
2058
- self[attribute] -= 1
2059
- self
2060
- end
2061
-
2062
- # Decrements the +attribute+ and saves the record.
2063
- def decrement!(attribute)
2064
- decrement(attribute).update_attribute(attribute, self[attribute])
2065
- end
2066
-
2067
- # Turns an +attribute+ that's currently true into false and vice versa. Returns self.
2068
- def toggle(attribute)
2069
- self[attribute] = !send("#{attribute}?")
2070
- self
2071
- end
2072
-
2073
- # Toggles the +attribute+ and saves the record.
2074
- def toggle!(attribute)
2075
- toggle(attribute).update_attribute(attribute, self[attribute])
2076
- end
2077
-
2078
- # Reloads the attributes of this object from the database.
2079
- # The optional options argument is passed to find when reloading so you
2080
- # may do e.g. record.reload(:lock => true) to reload the same record with
2081
- # an exclusive row lock.
2082
- def reload(options = nil)
2083
- clear_aggregation_cache
2084
- clear_association_cache
2085
- @attributes.update(self.class.find(self.id, options).instance_variable_get('@attributes'))
2086
- @attributes_cache = {}
2087
- self
2088
- end
2089
-
2090
- # Returns the value of the attribute identified by <tt>attr_name</tt> after it has been typecast (for example,
2091
- # "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
2092
- # (Alias for the protected read_attribute method).
2093
- def [](attr_name)
2094
- read_attribute(attr_name)
2095
- end
2096
-
2097
- # Updates the attribute identified by <tt>attr_name</tt> with the specified +value+.
2098
- # (Alias for the protected write_attribute method).
2099
- def []=(attr_name, value)
2100
- write_attribute(attr_name, value)
2101
- end
2102
-
2103
- # Allows you to set all the attributes at once by passing in a hash with keys
2104
- # matching the attribute names (which again matches the column names). Sensitive attributes can be protected
2105
- # from this form of mass-assignment by using the +attr_protected+ macro. Or you can alternatively
2106
- # specify which attributes *can* be accessed with the +attr_accessible+ macro. Then all the
2107
- # attributes not included in that won't be allowed to be mass-assigned.
2108
- def attributes=(new_attributes, guard_protected_attributes = true)
2109
- return if new_attributes.nil?
2110
- attributes = new_attributes.dup
2111
- attributes.stringify_keys!
2112
-
2113
- multi_parameter_attributes = []
2114
- attributes = remove_attributes_protected_from_mass_assignment(attributes) if guard_protected_attributes
2115
-
2116
- attributes.each do |k, v|
2117
- k.include?("(") ? multi_parameter_attributes << [ k, v ] : send(k + "=", v)
2118
- end
2119
-
2120
- assign_multiparameter_attributes(multi_parameter_attributes)
2121
- end
2122
-
2123
-
2124
- # Returns a hash of all the attributes with their names as keys and clones of their objects as values.
2125
- def attributes(options = nil)
2126
- attributes = clone_attributes :read_attribute
2127
-
2128
- if options.nil?
2129
- attributes
2130
- else
2131
- if except = options[:except]
2132
- except = Array(except).collect { |attribute| attribute.to_s }
2133
- except.each { |attribute_name| attributes.delete(attribute_name) }
2134
- attributes
2135
- elsif only = options[:only]
2136
- only = Array(only).collect { |attribute| attribute.to_s }
2137
- attributes.delete_if { |key, value| !only.include?(key) }
2138
- attributes
2139
- else
2140
- raise ArgumentError, "Options does not specify :except or :only (#{options.keys.inspect})"
2141
- end
2142
- end
2143
- end
2144
-
2145
- # Returns a hash of cloned attributes before typecasting and deserialization.
2146
- def attributes_before_type_cast
2147
- clone_attributes :read_attribute_before_type_cast
2148
- end
2149
-
2150
- # Format attributes nicely for inspect.
2151
- def attribute_for_inspect(attr_name)
2152
- value = read_attribute(attr_name)
2153
-
2154
- if value.is_a?(String) && value.length > 50
2155
- "#{value[0..50]}...".inspect
2156
- elsif value.is_a?(Date) || value.is_a?(Time)
2157
- %("#{value.to_s(:db)}")
2158
- else
2159
- value.inspect
2160
- end
2161
- end
2162
-
2163
- # Returns true if the specified +attribute+ has been set by the user or by a database load and is neither
2164
- # nil nor empty? (the latter only applies to objects that respond to empty?, most notably Strings).
2165
- def attribute_present?(attribute)
2166
- value = read_attribute(attribute)
2167
- !value.blank?
2168
- end
2169
-
2170
- # Returns true if the given attribute is in the attributes hash
2171
- def has_attribute?(attr_name)
2172
- @attributes.has_key?(attr_name.to_s)
2173
- end
2174
-
2175
- # Returns an array of names for the attributes available on this object sorted alphabetically.
2176
- def attribute_names
2177
- @attributes.keys.sort
2178
- end
2179
-
2180
- # Returns the column object for the named attribute.
2181
- def column_for_attribute(name)
2182
- self.class.columns_hash[name.to_s]
2183
- end
2184
-
2185
- # Returns true if the +comparison_object+ is the same object, or is of the same type and has the same id.
2186
- def ==(comparison_object)
2187
- comparison_object.equal?(self) ||
2188
- (comparison_object.instance_of?(self.class) &&
2189
- comparison_object.id == id &&
2190
- !comparison_object.new_record?)
2191
- end
2192
-
2193
- # Delegates to ==
2194
- def eql?(comparison_object)
2195
- self == (comparison_object)
2196
- end
2197
-
2198
- # Delegates to id in order to allow two records of the same type and id to work with something like:
2199
- # [ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ]
2200
- def hash
2201
- id.hash
2202
- end
2203
-
2204
- # Freeze the attributes hash such that associations are still accessible, even on destroyed records.
2205
- def freeze
2206
- @attributes.freeze; self
2207
- end
2208
-
2209
- # Returns +true+ if the attributes hash has been frozen.
2210
- def frozen?
2211
- @attributes.frozen?
2212
- end
2213
-
2214
- # Returns +true+ if the record is read only. Records loaded through joins with piggy-back
2215
- # attributes will be marked as read only since they cannot be saved.
2216
- def readonly?
2217
- @readonly == true
2218
- end
2219
-
2220
- # Marks this record as read only.
2221
- def readonly!
2222
- @readonly = true
2223
- end
2224
-
2225
- # Returns the contents of the record as a nicely formatted string.
2226
- def inspect
2227
- attributes_as_nice_string = self.class.column_names.collect { |name|
2228
- if has_attribute?(name) || new_record?
2229
- "#{name}: #{attribute_for_inspect(name)}"
2230
- end
2231
- }.compact.join(", ")
2232
- "#<#{self.class} #{attributes_as_nice_string}>"
2233
- end
2234
-
2235
- private
2236
- def create_or_update
2237
- raise ReadOnlyRecord if readonly?
2238
- result = new_record? ? create : update
2239
- result != false
2240
- end
2241
-
2242
- # Updates the associated record with values matching those of the instance attributes.
2243
- # Returns the number of affected rows.
2244
- def update
2245
- quoted_attributes = attributes_with_quotes(false, false)
2246
- return 0 if quoted_attributes.empty?
2247
- connection.update(
2248
- "UPDATE #{self.class.quoted_table_name} " +
2249
- "SET #{quoted_comma_pair_list(connection, quoted_attributes)} " +
2250
- "WHERE #{connection.quote_column_name(self.class.primary_key)} = #{quote_value(id)}",
2251
- "#{self.class.name} Update"
2252
- )
2253
- end
2254
-
2255
- # Creates a record with values matching those of the instance attributes
2256
- # and returns its id.
2257
- def create
2258
- if self.id.nil? && connection.prefetch_primary_key?(self.class.table_name)
2259
- self.id = connection.next_sequence_value(self.class.sequence_name)
2260
- end
2261
-
2262
- quoted_attributes = attributes_with_quotes
2263
-
2264
- statement = if quoted_attributes.empty?
2265
- connection.empty_insert_statement(self.class.table_name)
2266
- else
2267
- "INSERT INTO #{self.class.quoted_table_name} " +
2268
- "(#{quoted_column_names.join(', ')}) " +
2269
- "VALUES(#{quoted_attributes.values.join(', ')})"
2270
- end
2271
-
2272
- self.id = connection.insert(statement, "#{self.class.name} Create",
2273
- self.class.primary_key, self.id, self.class.sequence_name)
2274
-
2275
- @new_record = false
2276
- id
2277
- end
2278
-
2279
- # Sets the attribute used for single table inheritance to this class name if this is not the ActiveRecord descendent.
2280
- # Considering the hierarchy Reply < Message < ActiveRecord, this makes it possible to do Reply.new without having to
2281
- # set Reply[Reply.inheritance_column] = "Reply" yourself. No such attribute would be set for objects of the
2282
- # Message class in that example.
2283
- def ensure_proper_type
2284
- unless self.class.descends_from_active_record?
2285
- write_attribute(self.class.inheritance_column, Inflector.demodulize(self.class.name))
2286
- end
2287
- end
2288
-
2289
- def convert_number_column_value(value)
2290
- case value
2291
- when FalseClass; 0
2292
- when TrueClass; 1
2293
- when ''; nil
2294
- else value
2295
- end
2296
- end
2297
-
2298
- def remove_attributes_protected_from_mass_assignment(attributes)
2299
- safe_attributes =
2300
- if self.class.accessible_attributes.nil? && self.class.protected_attributes.nil?
2301
- attributes.reject { |key, value| attributes_protected_by_default.include?(key.gsub(/\(.+/, "")) }
2302
- elsif self.class.protected_attributes.nil?
2303
- attributes.reject { |key, value| !self.class.accessible_attributes.include?(key.gsub(/\(.+/, "")) || attributes_protected_by_default.include?(key.gsub(/\(.+/, "")) }
2304
- elsif self.class.accessible_attributes.nil?
2305
- attributes.reject { |key, value| self.class.protected_attributes.include?(key.gsub(/\(.+/,"")) || attributes_protected_by_default.include?(key.gsub(/\(.+/, "")) }
2306
- else
2307
- raise "Declare either attr_protected or attr_accessible for #{self.class}, but not both."
2308
- end
2309
-
2310
- removed_attributes = attributes.keys - safe_attributes.keys
2311
-
2312
- if removed_attributes.any?
2313
- logger.debug "WARNING: Can't mass-assign these protected attributes: #{removed_attributes.join(', ')}"
2314
- end
2315
-
2316
- safe_attributes
2317
- end
2318
-
2319
- # Removes attributes which have been marked as readonly.
2320
- def remove_readonly_attributes(attributes)
2321
- unless self.class.readonly_attributes.nil?
2322
- attributes.delete_if { |key, value| self.class.readonly_attributes.include?(key.gsub(/\(.+/,"")) }
2323
- else
2324
- attributes
2325
- end
2326
- end
2327
-
2328
- # The primary key and inheritance column can never be set by mass-assignment for security reasons.
2329
- def attributes_protected_by_default
2330
- default = [ self.class.primary_key, self.class.inheritance_column ]
2331
- default << 'id' unless self.class.primary_key.eql? 'id'
2332
- default
2333
- end
2334
-
2335
- # Returns a copy of the attributes hash where all the values have been safely quoted for use in
2336
- # an SQL statement.
2337
- def attributes_with_quotes(include_primary_key = true, include_readonly_attributes = true)
2338
- quoted = attributes.inject({}) do |quoted, (name, value)|
2339
- if column = column_for_attribute(name)
2340
- quoted[name] = quote_value(value, column) unless !include_primary_key && column.primary
2341
- end
2342
- quoted
2343
- end
2344
- include_readonly_attributes ? quoted : remove_readonly_attributes(quoted)
2345
- end
2346
-
2347
- # Quote strings appropriately for SQL statements.
2348
- def quote_value(value, column = nil)
2349
- self.class.connection.quote(value, column)
2350
- end
2351
-
2352
- # Interpolate custom sql string in instance context.
2353
- # Optional record argument is meant for custom insert_sql.
2354
- def interpolate_sql(sql, record = nil)
2355
- instance_eval("%@#{sql.gsub('@', '\@')}@")
2356
- end
2357
-
2358
- # Initializes the attributes array with keys matching the columns from the linked table and
2359
- # the values matching the corresponding default value of that column, so
2360
- # that a new instance, or one populated from a passed-in Hash, still has all the attributes
2361
- # that instances loaded from the database would.
2362
- def attributes_from_column_definition
2363
- self.class.columns.inject({}) do |attributes, column|
2364
- attributes[column.name] = column.default unless column.name == self.class.primary_key
2365
- attributes
2366
- end
2367
- end
2368
-
2369
- # Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done
2370
- # by calling new on the column type or aggregation type (through composed_of) object with these parameters.
2371
- # So having the pairs written_on(1) = "2004", written_on(2) = "6", written_on(3) = "24", will instantiate
2372
- # written_on (a date type) with Date.new("2004", "6", "24"). You can also specify a typecast character in the
2373
- # parentheses to have the parameters typecasted before they're used in the constructor. Use i for Fixnum, f for Float,
2374
- # s for String, and a for Array. If all the values for a given attribute are empty, the attribute will be set to nil.
2375
- def assign_multiparameter_attributes(pairs)
2376
- execute_callstack_for_multiparameter_attributes(
2377
- extract_callstack_for_multiparameter_attributes(pairs)
2378
- )
2379
- end
2380
-
2381
- # Includes an ugly hack for Time.local instead of Time.new because the latter is reserved by Time itself.
2382
- def execute_callstack_for_multiparameter_attributes(callstack)
2383
- errors = []
2384
- callstack.each do |name, values|
2385
- klass = (self.class.reflect_on_aggregation(name.to_sym) || column_for_attribute(name)).klass
2386
- if values.empty?
2387
- send(name + "=", nil)
2388
- else
2389
- begin
2390
- send(name + "=", Time == klass ? (@@default_timezone == :utc ? klass.utc(*values) : klass.local(*values)) : klass.new(*values))
2391
- rescue => ex
2392
- errors << AttributeAssignmentError.new("error on assignment #{values.inspect} to #{name}", ex, name)
2393
- end
2394
- end
2395
- end
2396
- unless errors.empty?
2397
- raise MultiparameterAssignmentErrors.new(errors), "#{errors.size} error(s) on assignment of multiparameter attributes"
2398
- end
2399
- end
2400
-
2401
- def extract_callstack_for_multiparameter_attributes(pairs)
2402
- attributes = { }
2403
-
2404
- for pair in pairs
2405
- multiparameter_name, value = pair
2406
- attribute_name = multiparameter_name.split("(").first
2407
- attributes[attribute_name] = [] unless attributes.include?(attribute_name)
2408
-
2409
- unless value.empty?
2410
- attributes[attribute_name] <<
2411
- [ find_parameter_position(multiparameter_name), type_cast_attribute_value(multiparameter_name, value) ]
2412
- end
2413
- end
2414
-
2415
- attributes.each { |name, values| attributes[name] = values.sort_by{ |v| v.first }.collect { |v| v.last } }
2416
- end
2417
-
2418
- def type_cast_attribute_value(multiparameter_name, value)
2419
- multiparameter_name =~ /\([0-9]*([a-z])\)/ ? value.send("to_" + $1) : value
2420
- end
2421
-
2422
- def find_parameter_position(multiparameter_name)
2423
- multiparameter_name.scan(/\(([0-9]*).*\)/).first.first
2424
- end
2425
-
2426
- # Returns a comma-separated pair list, like "key1 = val1, key2 = val2".
2427
- def comma_pair_list(hash)
2428
- hash.inject([]) { |list, pair| list << "#{pair.first} = #{pair.last}" }.join(", ")
2429
- end
2430
-
2431
- def quoted_column_names(attributes = attributes_with_quotes)
2432
- attributes.keys.collect do |column_name|
2433
- self.class.connection.quote_column_name(column_name)
2434
- end
2435
- end
2436
-
2437
- def self.quoted_table_name
2438
- self.connection.quote_table_name(self.table_name)
2439
- end
2440
-
2441
- def quote_columns(quoter, hash)
2442
- hash.inject({}) do |quoted, (name, value)|
2443
- quoted[quoter.quote_column_name(name)] = value
2444
- quoted
2445
- end
2446
- end
2447
-
2448
- def quoted_comma_pair_list(quoter, hash)
2449
- comma_pair_list(quote_columns(quoter, hash))
2450
- end
2451
-
2452
- def object_from_yaml(string)
2453
- return string unless string.is_a?(String)
2454
- YAML::load(string) rescue string
2455
- end
2456
-
2457
- def clone_attributes(reader_method = :read_attribute, attributes = {})
2458
- self.attribute_names.inject(attributes) do |attributes, name|
2459
- attributes[name] = clone_attribute_value(reader_method, name)
2460
- attributes
2461
- end
2462
- end
2463
-
2464
- def clone_attribute_value(reader_method, attribute_name)
2465
- value = send(reader_method, attribute_name)
2466
- value.duplicable? ? value.clone : value
2467
- rescue TypeError, NoMethodError
2468
- value
2469
- end
2470
- end
2471
- end