rom-sql 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile +1 -0
  4. data/lib/rom/sql/attribute.rb +1 -1
  5. data/lib/rom/sql/projection_dsl.rb +6 -0
  6. data/lib/rom/sql/version.rb +1 -1
  7. data/rom-sql.gemspec +1 -1
  8. data/spec/integration/association/many_to_many/custom_fks_spec.rb +9 -13
  9. data/spec/integration/association/many_to_many/from_view_spec.rb +9 -8
  10. data/spec/integration/association/many_to_many_spec.rb +103 -102
  11. data/spec/integration/association/many_to_one/custom_fks_spec.rb +6 -7
  12. data/spec/integration/association/many_to_one/from_view_spec.rb +8 -4
  13. data/spec/integration/association/many_to_one_spec.rb +61 -54
  14. data/spec/integration/association/one_to_many/custom_fks_spec.rb +7 -6
  15. data/spec/integration/association/one_to_many/from_view_spec.rb +7 -10
  16. data/spec/integration/association/one_to_many/self_ref_spec.rb +6 -6
  17. data/spec/integration/association/one_to_many_spec.rb +0 -3
  18. data/spec/integration/association/one_to_one_spec.rb +17 -11
  19. data/spec/integration/association/one_to_one_through_spec.rb +3 -5
  20. data/spec/integration/commands/create_spec.rb +33 -22
  21. data/spec/integration/commands/update_spec.rb +3 -3
  22. data/spec/integration/commands/upsert_spec.rb +1 -1
  23. data/spec/integration/gateway_spec.rb +12 -8
  24. data/spec/integration/migration_spec.rb +4 -3
  25. data/spec/integration/plugins/associates/many_to_many_spec.rb +2 -2
  26. data/spec/integration/plugins/associates_spec.rb +1 -1
  27. data/spec/integration/relation_schema_spec.rb +4 -5
  28. data/spec/integration/schema/call_spec.rb +1 -1
  29. data/spec/integration/schema/inferrer/mysql_spec.rb +22 -23
  30. data/spec/integration/schema/inferrer/postgres_spec.rb +83 -82
  31. data/spec/integration/schema/inferrer/sqlite_spec.rb +18 -19
  32. data/spec/integration/schema/inferrer_spec.rb +54 -33
  33. data/spec/integration/schema/prefix_spec.rb +9 -11
  34. data/spec/integration/schema/qualified_spec.rb +9 -11
  35. data/spec/integration/schema/rename_spec.rb +13 -15
  36. data/spec/integration/schema/view_spec.rb +2 -2
  37. data/spec/integration/sequel_api_spec.rb +1 -1
  38. data/spec/integration/setup_spec.rb +5 -5
  39. data/spec/integration/support/active_support_notifications_spec.rb +2 -2
  40. data/spec/integration/support/rails_log_subscriber_spec.rb +2 -2
  41. data/spec/shared/accounts.rb +44 -0
  42. data/spec/shared/database_setup.rb +42 -81
  43. data/spec/shared/notes.rb +21 -0
  44. data/spec/shared/posts.rb +32 -0
  45. data/spec/shared/puppies.rb +13 -0
  46. data/spec/shared/relations.rb +1 -1
  47. data/spec/shared/users.rb +29 -0
  48. data/spec/shared/users_and_tasks.rb +32 -18
  49. data/spec/spec_helper.rb +18 -30
  50. data/spec/support/env_helper.rb +25 -0
  51. data/spec/support/oracle/create_users.sql +7 -0
  52. data/spec/support/oracle/set_sys_passwords.sql +2 -0
  53. data/spec/unit/plugin/pagination_spec.rb +2 -2
  54. data/spec/unit/plugin/timestamp_spec.rb +1 -1
  55. data/spec/unit/projection_dsl_spec.rb +8 -0
  56. data/spec/unit/relation/group_spec.rb +5 -3
  57. data/spec/unit/relation/max_spec.rb +1 -1
  58. data/spec/unit/relation/select_spec.rb +7 -0
  59. metadata +33 -5
  60. data/spec/shared/users_and_accounts.rb +0 -10
@@ -1,10 +0,0 @@
1
- shared_context 'users and accounts' do
2
- include_context 'database setup'
3
-
4
- before do
5
- conn[:users].insert id: 1, name: 'Piotr'
6
- conn[:accounts].insert id: 1, user_id: 1, number: '42', balance: 10_000.to_d
7
- conn[:cards].insert id: 1, account_id: 1, pan: '*6789'
8
- conn[:subscriptions].insert id: 1, card_id: 1, service: 'aws'
9
- end
10
- end