ros-apartment 2.3.0.alpha1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/.pryrc +5 -3
  3. data/.rubocop.yml +36 -0
  4. data/.rubocop_todo.yml +439 -0
  5. data/.ruby-version +1 -0
  6. data/Appraisals +31 -52
  7. data/CHANGELOG.md +965 -0
  8. data/Gemfile +2 -7
  9. data/Guardfile +3 -16
  10. data/README.md +121 -44
  11. data/Rakefile +42 -31
  12. data/lib/apartment/active_record/connection_handling.rb +31 -0
  13. data/lib/apartment/active_record/internal_metadata.rb +9 -0
  14. data/lib/apartment/active_record/postgresql_adapter.rb +43 -0
  15. data/lib/apartment/active_record/schema_migration.rb +11 -0
  16. data/lib/apartment/adapters/abstract_adapter.rb +52 -46
  17. data/lib/apartment/adapters/abstract_jdbc_adapter.rb +5 -3
  18. data/lib/apartment/adapters/jdbc_mysql_adapter.rb +3 -3
  19. data/lib/apartment/adapters/jdbc_postgresql_adapter.rb +19 -13
  20. data/lib/apartment/adapters/mysql2_adapter.rb +15 -9
  21. data/lib/apartment/adapters/postgis_adapter.rb +3 -2
  22. data/lib/apartment/adapters/postgresql_adapter.rb +79 -31
  23. data/lib/apartment/adapters/sqlite3_adapter.rb +18 -8
  24. data/lib/apartment/adapters/trilogy_adapter.rb +29 -0
  25. data/lib/apartment/console.rb +23 -11
  26. data/lib/apartment/custom_console.rb +42 -0
  27. data/lib/apartment/deprecation.rb +2 -1
  28. data/lib/apartment/elevators/domain.rb +4 -3
  29. data/lib/apartment/elevators/first_subdomain.rb +3 -2
  30. data/lib/apartment/elevators/generic.rb +4 -3
  31. data/lib/apartment/elevators/host.rb +6 -1
  32. data/lib/apartment/elevators/host_hash.rb +6 -2
  33. data/lib/apartment/elevators/subdomain.rb +9 -5
  34. data/lib/apartment/log_subscriber.rb +45 -0
  35. data/lib/apartment/migrator.rb +7 -24
  36. data/lib/apartment/model.rb +29 -0
  37. data/lib/apartment/railtie.rb +21 -20
  38. data/lib/apartment/tasks/enhancements.rb +4 -6
  39. data/lib/apartment/tasks/task_helper.rb +52 -0
  40. data/lib/apartment/tenant.rb +7 -10
  41. data/lib/apartment/version.rb +3 -1
  42. data/lib/apartment.rb +46 -15
  43. data/lib/generators/apartment/install/install_generator.rb +4 -3
  44. data/lib/generators/apartment/install/templates/apartment.rb +10 -3
  45. data/lib/tasks/apartment.rake +48 -87
  46. data/ros-apartment.gemspec +65 -0
  47. metadata +181 -264
  48. data/.github/ISSUE_TEMPLATE.md +0 -21
  49. data/.travis.yml +0 -65
  50. data/HISTORY.md +0 -398
  51. data/TODO.md +0 -51
  52. data/apartment.gemspec +0 -46
  53. data/docker-compose.yml +0 -33
  54. data/gemfiles/rails_4_2.gemfile +0 -23
  55. data/gemfiles/rails_5_0.gemfile +0 -22
  56. data/gemfiles/rails_5_1.gemfile +0 -22
  57. data/gemfiles/rails_5_2.gemfile +0 -18
  58. data/gemfiles/rails_6_0.gemfile +0 -22
  59. data/gemfiles/rails_master.gemfile +0 -22
  60. data/lib/apartment/reloader.rb +0 -21
  61. data/spec/adapters/jdbc_mysql_adapter_spec.rb +0 -19
  62. data/spec/adapters/jdbc_postgresql_adapter_spec.rb +0 -41
  63. data/spec/adapters/mysql2_adapter_spec.rb +0 -59
  64. data/spec/adapters/postgresql_adapter_spec.rb +0 -61
  65. data/spec/adapters/sqlite3_adapter_spec.rb +0 -83
  66. data/spec/apartment_spec.rb +0 -11
  67. data/spec/config/database.yml.sample +0 -49
  68. data/spec/dummy/Rakefile +0 -7
  69. data/spec/dummy/app/controllers/application_controller.rb +0 -6
  70. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  71. data/spec/dummy/app/models/company.rb +0 -3
  72. data/spec/dummy/app/models/user.rb +0 -3
  73. data/spec/dummy/app/views/application/index.html.erb +0 -1
  74. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  75. data/spec/dummy/config/application.rb +0 -49
  76. data/spec/dummy/config/boot.rb +0 -11
  77. data/spec/dummy/config/database.yml.sample +0 -44
  78. data/spec/dummy/config/environment.rb +0 -5
  79. data/spec/dummy/config/environments/development.rb +0 -28
  80. data/spec/dummy/config/environments/production.rb +0 -51
  81. data/spec/dummy/config/environments/test.rb +0 -34
  82. data/spec/dummy/config/initializers/apartment.rb +0 -4
  83. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  84. data/spec/dummy/config/initializers/inflections.rb +0 -10
  85. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  86. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  87. data/spec/dummy/config/initializers/session_store.rb +0 -8
  88. data/spec/dummy/config/locales/en.yml +0 -5
  89. data/spec/dummy/config/routes.rb +0 -3
  90. data/spec/dummy/config.ru +0 -4
  91. data/spec/dummy/db/migrate/20110613152810_create_dummy_models.rb +0 -39
  92. data/spec/dummy/db/migrate/20111202022214_create_table_books.rb +0 -14
  93. data/spec/dummy/db/migrate/20180415260934_create_public_tokens.rb +0 -13
  94. data/spec/dummy/db/schema.rb +0 -55
  95. data/spec/dummy/db/seeds/import.rb +0 -5
  96. data/spec/dummy/db/seeds.rb +0 -5
  97. data/spec/dummy/db/test.sqlite3 +0 -0
  98. data/spec/dummy/public/404.html +0 -26
  99. data/spec/dummy/public/422.html +0 -26
  100. data/spec/dummy/public/500.html +0 -26
  101. data/spec/dummy/public/favicon.ico +0 -0
  102. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  103. data/spec/dummy/script/rails +0 -6
  104. data/spec/dummy_engine/.gitignore +0 -8
  105. data/spec/dummy_engine/Gemfile +0 -15
  106. data/spec/dummy_engine/Rakefile +0 -34
  107. data/spec/dummy_engine/bin/rails +0 -12
  108. data/spec/dummy_engine/config/initializers/apartment.rb +0 -51
  109. data/spec/dummy_engine/dummy_engine.gemspec +0 -24
  110. data/spec/dummy_engine/lib/dummy_engine/engine.rb +0 -4
  111. data/spec/dummy_engine/lib/dummy_engine/version.rb +0 -3
  112. data/spec/dummy_engine/lib/dummy_engine.rb +0 -4
  113. data/spec/dummy_engine/test/dummy/Rakefile +0 -6
  114. data/spec/dummy_engine/test/dummy/config/application.rb +0 -22
  115. data/spec/dummy_engine/test/dummy/config/boot.rb +0 -5
  116. data/spec/dummy_engine/test/dummy/config/database.yml +0 -25
  117. data/spec/dummy_engine/test/dummy/config/environment.rb +0 -5
  118. data/spec/dummy_engine/test/dummy/config/environments/development.rb +0 -37
  119. data/spec/dummy_engine/test/dummy/config/environments/production.rb +0 -78
  120. data/spec/dummy_engine/test/dummy/config/environments/test.rb +0 -39
  121. data/spec/dummy_engine/test/dummy/config/initializers/assets.rb +0 -8
  122. data/spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  123. data/spec/dummy_engine/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  124. data/spec/dummy_engine/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  125. data/spec/dummy_engine/test/dummy/config/initializers/inflections.rb +0 -16
  126. data/spec/dummy_engine/test/dummy/config/initializers/mime_types.rb +0 -4
  127. data/spec/dummy_engine/test/dummy/config/initializers/session_store.rb +0 -3
  128. data/spec/dummy_engine/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  129. data/spec/dummy_engine/test/dummy/config/locales/en.yml +0 -23
  130. data/spec/dummy_engine/test/dummy/config/routes.rb +0 -56
  131. data/spec/dummy_engine/test/dummy/config/secrets.yml +0 -22
  132. data/spec/dummy_engine/test/dummy/config.ru +0 -4
  133. data/spec/examples/connection_adapter_examples.rb +0 -42
  134. data/spec/examples/generic_adapter_custom_configuration_example.rb +0 -95
  135. data/spec/examples/generic_adapter_examples.rb +0 -163
  136. data/spec/examples/schema_adapter_examples.rb +0 -234
  137. data/spec/integration/apartment_rake_integration_spec.rb +0 -107
  138. data/spec/integration/query_caching_spec.rb +0 -81
  139. data/spec/integration/use_within_an_engine_spec.rb +0 -28
  140. data/spec/schemas/v1.rb +0 -16
  141. data/spec/schemas/v2.rb +0 -43
  142. data/spec/schemas/v3.rb +0 -49
  143. data/spec/spec_helper.rb +0 -61
  144. data/spec/support/apartment_helpers.rb +0 -43
  145. data/spec/support/capybara_sessions.rb +0 -15
  146. data/spec/support/config.rb +0 -10
  147. data/spec/support/contexts.rb +0 -52
  148. data/spec/support/requirements.rb +0 -35
  149. data/spec/support/setup.rb +0 -46
  150. data/spec/tasks/apartment_rake_spec.rb +0 -129
  151. data/spec/tenant_spec.rb +0 -190
  152. data/spec/unit/config_spec.rb +0 -112
  153. data/spec/unit/elevators/domain_spec.rb +0 -32
  154. data/spec/unit/elevators/first_subdomain_spec.rb +0 -24
  155. data/spec/unit/elevators/generic_spec.rb +0 -54
  156. data/spec/unit/elevators/host_hash_spec.rb +0 -32
  157. data/spec/unit/elevators/host_spec.rb +0 -89
  158. data/spec/unit/elevators/subdomain_spec.rb +0 -76
  159. data/spec/unit/migrator_spec.rb +0 -77
  160. data/spec/unit/reloader_spec.rb +0 -24
data/CHANGELOG.md ADDED
@@ -0,0 +1,965 @@
1
+ # Changelog [DEPRECATED]
2
+
3
+ Changes are now being tracked in the [releases](https://github.com/rails-on-services/apartment/releases) section of the repository.
4
+
5
+ ## [v2.8.1](https://github.com/rails-on-services/apartment/tree/v2.8.1) (2020-12-17)
6
+
7
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.8.0...v2.8.1)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ **Fixed bugs:**
12
+
13
+ - New version raises an error with ActiveSupport::LogSubscriber [#128](https://github.com/rails-on-services/apartment/issues/128)
14
+ - Weird logs when tenant fails to create [#127](<https://github.com/rails-on-services/apartment/issues/127>)
15
+
16
+ **Closed issues:**
17
+
18
+ ## [v2.8.0](https://github.com/rails-on-services/apartment/tree/v2.8.0) (2020-12-16)
19
+
20
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.7.2...v2.8.0)
21
+
22
+ **Implemented enhancements:**
23
+
24
+ - Uses a transaction to create a tenant [#66](https://github.com/rails-on-services/apartment/issues/66)
25
+
26
+ **Fixed bugs:**
27
+
28
+ - Fix seeding errors [#86](https://github.com/rails-on-services/apartment/issues/86)
29
+ - When tests run in a transaction, new tenants in tests fail to create [#123](https://github.com/rails-on-services/apartment/issues/123)
30
+ - Reverted unsafe initializer - introduces the possibility of disabling the initial connection to the database via
31
+ environment variable. Relates to the following tickets/PRs:
32
+ - [#113](https://github.com/rails-on-services/apartment/issues/113)
33
+ - [#39](https://github.com/rails-on-services/apartment/pull/39)
34
+ - [#53](https://github.com/rails-on-services/apartment/pull/53)
35
+ - [#118](https://github.com/rails-on-services/apartment/pull/118)
36
+
37
+ **Closed issues:**
38
+
39
+ - Improve changelog automatic generation [#98](https://github.com/rails-on-services/apartment/issues/98)
40
+ - Relaxes dependencies to allow rails 6.1 [#121](https://github.com/rails-on-services/apartment/issues/121)
41
+
42
+
43
+ ## [v2.7.2](https://github.com/rails-on-services/apartment/tree/v2.7.2) (2020-07-17)
44
+
45
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.7.1...v2.7.2)
46
+
47
+ **Implemented enhancements:**
48
+
49
+ - Deprecate History.md [\#80](https://github.com/rails-on-services/apartment/issues/80)
50
+
51
+ **Fixed bugs:**
52
+
53
+ - Tenant.switch! raises exception on first call / Postgresql [\#92](https://github.com/rails-on-services/apartment/issues/92)
54
+ - NameError: instance variable @sequence\_name not defined [\#81](https://github.com/rails-on-services/apartment/issues/81)
55
+
56
+ **Closed issues:**
57
+
58
+ - Error creating tenant with uuid column [\#85](https://github.com/rails-on-services/apartment/issues/85)
59
+ - enhanced db:create task breaks plugins compatibility [\#82](https://github.com/rails-on-services/apartment/issues/82)
60
+ - Support disabling of full\_migration\_on\_create [\#30](https://github.com/rails-on-services/apartment/issues/30)
61
+
62
+ **Merged pull requests:**
63
+
64
+ - \[Chore\] Fix Changelog github action [\#97](https://github.com/rails-on-services/apartment/pull/97) ([rpbaltazar](https://github.com/rpbaltazar))
65
+ - Prepare release - 2.7.2 [\#96](https://github.com/rails-on-services/apartment/pull/96) ([rpbaltazar](https://github.com/rpbaltazar))
66
+ - \[Resolves \#92\] tenant switch raises exception on first call [\#95](https://github.com/rails-on-services/apartment/pull/95) ([rpbaltazar](https://github.com/rpbaltazar))
67
+ - Dont use custom rubocop [\#94](https://github.com/rails-on-services/apartment/pull/94) ([rpbaltazar](https://github.com/rpbaltazar))
68
+ - \[Resolves \#80\] added changelog action [\#90](https://github.com/rails-on-services/apartment/pull/90) ([rpbaltazar](https://github.com/rpbaltazar))
69
+ - \[Resolves \#81\] check for var existence before [\#89](https://github.com/rails-on-services/apartment/pull/89) ([rpbaltazar](https://github.com/rpbaltazar))
70
+
71
+ ## [v2.7.1](https://github.com/rails-on-services/apartment/tree/v2.7.1) (2020-06-27)
72
+
73
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.7.0...v2.7.1)
74
+
75
+ **Merged pull requests:**
76
+
77
+ - Prepare Release 2.7.1 [\#84](https://github.com/rails-on-services/apartment/pull/84) ([rpbaltazar](https://github.com/rpbaltazar))
78
+ - \[Resolves \#82\] Enhanced db create task breaks plugins compatibility [\#83](https://github.com/rails-on-services/apartment/pull/83) ([rpbaltazar](https://github.com/rpbaltazar))
79
+ - \[ci\] update rake [\#79](https://github.com/rails-on-services/apartment/pull/79) ([ahorek](https://github.com/ahorek))
80
+
81
+ ## [v2.7.0](https://github.com/rails-on-services/apartment/tree/v2.7.0) (2020-06-26)
82
+
83
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.6.1...v2.7.0)
84
+
85
+ **Implemented enhancements:**
86
+
87
+ - Rake tasks define methods on main [\#70](https://github.com/rails-on-services/apartment/issues/70)
88
+
89
+ **Fixed bugs:**
90
+
91
+ - Undefined method devise with 2.6.1 [\#65](https://github.com/rails-on-services/apartment/issues/65)
92
+ - db:create is failed [\#61](https://github.com/rails-on-services/apartment/issues/61)
93
+
94
+ **Closed issues:**
95
+
96
+ - configure story branch [\#68](https://github.com/rails-on-services/apartment/issues/68)
97
+ - HISTORY.md has not been updated for latest releases [\#62](https://github.com/rails-on-services/apartment/issues/62)
98
+ - \[Postgresql users\] Help testing development branch in your environment [\#34](https://github.com/rails-on-services/apartment/issues/34)
99
+
100
+ **Merged pull requests:**
101
+
102
+ - Prepare Release - 2.7.0 [\#77](https://github.com/rails-on-services/apartment/pull/77) ([rpbaltazar](https://github.com/rpbaltazar))
103
+ - \[Fixes \#61\] db create is failed [\#76](https://github.com/rails-on-services/apartment/pull/76) ([rpbaltazar](https://github.com/rpbaltazar))
104
+ - \[Resolves \#70\] rake tasks define methods on main [\#75](https://github.com/rails-on-services/apartment/pull/75) ([rpbaltazar](https://github.com/rpbaltazar))
105
+ - \[Chore\] Update travis config to run rubocop [\#74](https://github.com/rails-on-services/apartment/pull/74) ([rpbaltazar](https://github.com/rpbaltazar))
106
+ - Remove and warn depracated config `tld\_length` [\#72](https://github.com/rails-on-services/apartment/pull/72) ([choznerol](https://github.com/choznerol))
107
+ - \[Resolves \#62\] added Missing notes in history.md [\#63](https://github.com/rails-on-services/apartment/pull/63) ([rpbaltazar](https://github.com/rpbaltazar))
108
+ - Add database and schema to active record log [\#55](https://github.com/rails-on-services/apartment/pull/55) ([woohoou](https://github.com/woohoou))
109
+
110
+ ## [v2.6.1](https://github.com/rails-on-services/apartment/tree/v2.6.1) (2020-06-02)
111
+
112
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.6.0...v2.6.1)
113
+
114
+ **Closed issues:**
115
+
116
+ - db:rollback uses second latest migration for tenants [\#56](https://github.com/rails-on-services/apartment/issues/56)
117
+ - rake db:setup tries to seed non existing tenant [\#52](https://github.com/rails-on-services/apartment/issues/52)
118
+ - Custom Console deprecation warning [\#37](https://github.com/rails-on-services/apartment/issues/37)
119
+
120
+ **Merged pull requests:**
121
+
122
+ - Version bump - 2.6.1 [\#60](https://github.com/rails-on-services/apartment/pull/60) ([rpbaltazar](https://github.com/rpbaltazar))
123
+ - Prepare Release - 2.6.1 [\#59](https://github.com/rails-on-services/apartment/pull/59) ([rpbaltazar](https://github.com/rpbaltazar))
124
+ - \[\#56\] Db rollback uses second latest migration [\#57](https://github.com/rails-on-services/apartment/pull/57) ([rpbaltazar](https://github.com/rpbaltazar))
125
+ - \[\#52\] enhance after db create [\#54](https://github.com/rails-on-services/apartment/pull/54) ([rpbaltazar](https://github.com/rpbaltazar))
126
+ - fix init after reload on development [\#53](https://github.com/rails-on-services/apartment/pull/53) ([fsateler](https://github.com/fsateler))
127
+ - fix: reset sequence\_name after tenant switch [\#51](https://github.com/rails-on-services/apartment/pull/51) ([fsateler](https://github.com/fsateler))
128
+ - Avoid early connection [\#39](https://github.com/rails-on-services/apartment/pull/39) ([fsateler](https://github.com/fsateler))
129
+
130
+ ## [v2.6.0](https://github.com/rails-on-services/apartment/tree/v2.6.0) (2020-05-14)
131
+
132
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.5.0...v2.6.0)
133
+
134
+ **Closed issues:**
135
+
136
+ - Error Dropping Tenant [\#46](https://github.com/rails-on-services/apartment/issues/46)
137
+ - After switch callback not working with nil argument [\#42](https://github.com/rails-on-services/apartment/issues/42)
138
+ - Add tenant info to console boot? [\#41](https://github.com/rails-on-services/apartment/issues/41)
139
+ - Support configuration for skip checking of schema existence before switching [\#26](https://github.com/rails-on-services/apartment/issues/26)
140
+
141
+ **Merged pull requests:**
142
+
143
+ - \[Resolves \#37\] Custom console deprecation warning [\#49](https://github.com/rails-on-services/apartment/pull/49) ([rpbaltazar](https://github.com/rpbaltazar))
144
+ - Prepare Release 2.6.0 [\#48](https://github.com/rails-on-services/apartment/pull/48) ([rpbaltazar](https://github.com/rpbaltazar))
145
+ - Add console welcome message [\#47](https://github.com/rails-on-services/apartment/pull/47) ([JeremiahChurch](https://github.com/JeremiahChurch))
146
+ - \[Resolves \#26\] Support configuration for skip checking of schema existence before switching [\#45](https://github.com/rails-on-services/apartment/pull/45) ([rpbaltazar](https://github.com/rpbaltazar))
147
+ - \[Resolves \#42\] After switch callback not working with nil argument [\#43](https://github.com/rails-on-services/apartment/pull/43) ([rpbaltazar](https://github.com/rpbaltazar))
148
+
149
+ ## [v2.5.0](https://github.com/rails-on-services/apartment/tree/v2.5.0) (2020-05-05)
150
+
151
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/2.4.0...v2.5.0)
152
+
153
+ **Implemented enhancements:**
154
+
155
+ - Add latest ruby verisons to test matrix [\#31](https://github.com/rails-on-services/apartment/issues/31)
156
+ - Deprecate EOL ruby and rails versions [\#11](https://github.com/rails-on-services/apartment/issues/11)
157
+
158
+ **Fixed bugs:**
159
+
160
+ - When manually switching the connection it resets the search path [\#27](https://github.com/rails-on-services/apartment/issues/27)
161
+
162
+ **Closed issues:**
163
+
164
+ - Cached statement breaks in find [\#35](https://github.com/rails-on-services/apartment/issues/35)
165
+ - rails 6.1.alpha support [\#6](https://github.com/rails-on-services/apartment/issues/6)
166
+ - How to exclude all models from engine? [\#4](https://github.com/rails-on-services/apartment/issues/4)
167
+
168
+ **Merged pull requests:**
169
+
170
+ - Prepare Release 2.5.0 [\#44](https://github.com/rails-on-services/apartment/pull/44) ([rpbaltazar](https://github.com/rpbaltazar))
171
+ - \[Resolves \#27\] Added before hook to connected to to try to set the tenant [\#40](https://github.com/rails-on-services/apartment/pull/40) ([rpbaltazar](https://github.com/rpbaltazar))
172
+ - \[Resolves \#35\] update cache key to use a string or an array [\#36](https://github.com/rails-on-services/apartment/pull/36) ([rpbaltazar](https://github.com/rpbaltazar))
173
+ - \[Hotfix \#27\] Some errors were being thrown due to caching issues [\#33](https://github.com/rails-on-services/apartment/pull/33) ([rpbaltazar](https://github.com/rpbaltazar))
174
+ - \[Resolves \#31\] Add latest ruby verisons to test matrix [\#32](https://github.com/rails-on-services/apartment/pull/32) ([rpbaltazar](https://github.com/rpbaltazar))
175
+ - \[Chore\] refactored files to their names [\#29](https://github.com/rails-on-services/apartment/pull/29) ([rpbaltazar](https://github.com/rpbaltazar))
176
+ - \[Resolves \#27\] When manually switching the connection it resets the search path [\#28](https://github.com/rails-on-services/apartment/pull/28) ([rpbaltazar](https://github.com/rpbaltazar))
177
+ - \[Resolves \#11\] Remove old ruby and rails versions from the supported versions [\#20](https://github.com/rails-on-services/apartment/pull/20) ([rpbaltazar](https://github.com/rpbaltazar))
178
+ - Support rails 6.1 [\#7](https://github.com/rails-on-services/apartment/pull/7) ([jean-francois-labbe](https://github.com/jean-francois-labbe))
179
+
180
+ ## [2.4.0](https://github.com/rails-on-services/apartment/tree/2.4.0) (2020-04-01)
181
+
182
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.3.0...2.4.0)
183
+
184
+ **Implemented enhancements:**
185
+
186
+ - Add console info about tenants and fast switches [\#14](https://github.com/rails-on-services/apartment/issues/14)
187
+ - Update travis config to only run PR's instead of running all commits [\#12](https://github.com/rails-on-services/apartment/issues/12)
188
+
189
+ **Closed issues:**
190
+
191
+ - Rubocop cleanup [\#9](https://github.com/rails-on-services/apartment/issues/9)
192
+ - Apartment.configure throws NoMethodError [\#3](https://github.com/rails-on-services/apartment/issues/3)
193
+ - upcoming Rails 6 multi-database [\#2](https://github.com/rails-on-services/apartment/issues/2)
194
+
195
+ **Merged pull requests:**
196
+
197
+ - Fix gemspec open versions and updated version [\#25](https://github.com/rails-on-services/apartment/pull/25) ([rpbaltazar](https://github.com/rpbaltazar))
198
+ - Fix gemspec open versions and updated version [\#24](https://github.com/rails-on-services/apartment/pull/24) ([rpbaltazar](https://github.com/rpbaltazar))
199
+ - Cleanup travis matrix [\#23](https://github.com/rails-on-services/apartment/pull/23) ([rpbaltazar](https://github.com/rpbaltazar))
200
+ - Prepare v2.4.0 Release [\#22](https://github.com/rails-on-services/apartment/pull/22) ([rpbaltazar](https://github.com/rpbaltazar))
201
+ - Updated readme badges [\#21](https://github.com/rails-on-services/apartment/pull/21) ([rpbaltazar](https://github.com/rpbaltazar))
202
+ - Rescuing ActiveRecord::NoDatabaseError when dropping tenants [\#19](https://github.com/rails-on-services/apartment/pull/19) ([rpbaltazar](https://github.com/rpbaltazar))
203
+ - Skip init if we're running webpacker:compile [\#18](https://github.com/rails-on-services/apartment/pull/18) ([rpbaltazar](https://github.com/rpbaltazar))
204
+ - \[Resolves \#14\] Add console info about tenants and fast switches [\#17](https://github.com/rails-on-services/apartment/pull/17) ([rpbaltazar](https://github.com/rpbaltazar))
205
+ - Don't crash when no database connection is present [\#16](https://github.com/rails-on-services/apartment/pull/16) ([ArthurWD](https://github.com/ArthurWD))
206
+ - \[Resolves \#12\] Update travis config to only run PRs instead of all commits [\#13](https://github.com/rails-on-services/apartment/pull/13) ([rpbaltazar](https://github.com/rpbaltazar))
207
+ - \[Chore\] Fix rubocop usage [\#10](https://github.com/rails-on-services/apartment/pull/10) ([rpbaltazar](https://github.com/rpbaltazar))
208
+ - \[Resolves \#9\] Cleanup rubocop todo [\#8](https://github.com/rails-on-services/apartment/pull/8) ([rpbaltazar](https://github.com/rpbaltazar))
209
+ - Rakefile should use mysql port from configuration [\#5](https://github.com/rails-on-services/apartment/pull/5) ([jean-francois-labbe](https://github.com/jean-francois-labbe))
210
+
211
+ ## [v2.3.0](https://github.com/rails-on-services/apartment/tree/v2.3.0) (2020-01-03)
212
+
213
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.2.1...v2.3.0)
214
+
215
+ **Merged pull requests:**
216
+
217
+ - \[Resolves\] Basic support for Rails 6 [\#1](https://github.com/rails-on-services/apartment/pull/1) ([rpbaltazar](https://github.com/rpbaltazar))
218
+
219
+ ## [v2.2.1](https://github.com/rails-on-services/apartment/tree/v2.2.1) (2019-06-19)
220
+
221
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.2.0...v2.2.1)
222
+
223
+ ## [v2.2.0](https://github.com/rails-on-services/apartment/tree/v2.2.0) (2018-04-13)
224
+
225
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.1.0...v2.2.0)
226
+
227
+ ## [v2.1.0](https://github.com/rails-on-services/apartment/tree/v2.1.0) (2017-12-15)
228
+
229
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v2.0.0...v2.1.0)
230
+
231
+ ## [v2.0.0](https://github.com/rails-on-services/apartment/tree/v2.0.0) (2017-07-26)
232
+
233
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v1.2.0...v2.0.0)
234
+
235
+ ## [v1.2.0](https://github.com/rails-on-services/apartment/tree/v1.2.0) (2016-07-28)
236
+
237
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v1.1.0...v1.2.0)
238
+
239
+ ## [v1.1.0](https://github.com/rails-on-services/apartment/tree/v1.1.0) (2016-05-26)
240
+
241
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v1.0.2...v1.1.0)
242
+
243
+ ## [v1.0.2](https://github.com/rails-on-services/apartment/tree/v1.0.2) (2015-07-02)
244
+
245
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v1.0.1...v1.0.2)
246
+
247
+ ## [v1.0.1](https://github.com/rails-on-services/apartment/tree/v1.0.1) (2015-04-28)
248
+
249
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v1.0.0...v1.0.1)
250
+
251
+ ## [v1.0.0](https://github.com/rails-on-services/apartment/tree/v1.0.0) (2015-02-03)
252
+
253
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.26.1...v1.0.0)
254
+
255
+ ## [v0.26.1](https://github.com/rails-on-services/apartment/tree/v0.26.1) (2015-01-13)
256
+
257
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.26.0...v0.26.1)
258
+
259
+ ## [v0.26.0](https://github.com/rails-on-services/apartment/tree/v0.26.0) (2015-01-05)
260
+
261
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.25.2...v0.26.0)
262
+
263
+ ## [v0.25.2](https://github.com/rails-on-services/apartment/tree/v0.25.2) (2014-09-08)
264
+
265
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.25.1...v0.25.2)
266
+
267
+ ## [v0.25.1](https://github.com/rails-on-services/apartment/tree/v0.25.1) (2014-07-17)
268
+
269
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.25.0...v0.25.1)
270
+
271
+ ## [v0.25.0](https://github.com/rails-on-services/apartment/tree/v0.25.0) (2014-07-03)
272
+
273
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.24.3...v0.25.0)
274
+
275
+ ## [v0.24.3](https://github.com/rails-on-services/apartment/tree/v0.24.3) (2014-03-05)
276
+
277
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.24.2...v0.24.3)
278
+
279
+ ## [v0.24.2](https://github.com/rails-on-services/apartment/tree/v0.24.2) (2014-02-24)
280
+
281
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.24.1...v0.24.2)
282
+
283
+ ## [v0.24.1](https://github.com/rails-on-services/apartment/tree/v0.24.1) (2014-02-21)
284
+
285
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.24.0...v0.24.1)
286
+
287
+ ## [v0.24.0](https://github.com/rails-on-services/apartment/tree/v0.24.0) (2014-02-21)
288
+
289
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.23.2...v0.24.0)
290
+
291
+ ## [v0.23.2](https://github.com/rails-on-services/apartment/tree/v0.23.2) (2014-01-09)
292
+
293
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.23.1...v0.23.2)
294
+
295
+ ## [v0.23.1](https://github.com/rails-on-services/apartment/tree/v0.23.1) (2014-01-08)
296
+
297
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.23.0...v0.23.1)
298
+
299
+ ## [v0.23.0](https://github.com/rails-on-services/apartment/tree/v0.23.0) (2013-12-15)
300
+
301
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.22.1...v0.23.0)
302
+
303
+ ## [v0.22.1](https://github.com/rails-on-services/apartment/tree/v0.22.1) (2013-08-21)
304
+
305
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.22.0...v0.22.1)
306
+
307
+ ## [v0.22.0](https://github.com/rails-on-services/apartment/tree/v0.22.0) (2013-07-09)
308
+
309
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.21.1...v0.22.0)
310
+
311
+ ## [v0.21.1](https://github.com/rails-on-services/apartment/tree/v0.21.1) (2013-05-31)
312
+
313
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.21.0...v0.21.1)
314
+
315
+ ## [v0.21.0](https://github.com/rails-on-services/apartment/tree/v0.21.0) (2013-04-25)
316
+
317
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.20.0...v0.21.0)
318
+
319
+ ## [v0.20.0](https://github.com/rails-on-services/apartment/tree/v0.20.0) (2013-02-06)
320
+
321
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/rm...v0.20.0)
322
+
323
+ ## [rm](https://github.com/rails-on-services/apartment/tree/rm) (2013-01-30)
324
+
325
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.19.2...rm)
326
+
327
+ ## [v0.19.2](https://github.com/rails-on-services/apartment/tree/v0.19.2) (2013-01-30)
328
+
329
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.19.0...v0.19.2)
330
+
331
+ ## [v0.19.0](https://github.com/rails-on-services/apartment/tree/v0.19.0) (2012-12-30)
332
+
333
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.18.0...v0.19.0)
334
+
335
+ ## [v0.18.0](https://github.com/rails-on-services/apartment/tree/v0.18.0) (2012-11-28)
336
+
337
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.17.3...v0.18.0)
338
+
339
+ ## [v0.17.3](https://github.com/rails-on-services/apartment/tree/v0.17.3) (2012-11-20)
340
+
341
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.17.2...v0.17.3)
342
+
343
+ ## [v0.17.2](https://github.com/rails-on-services/apartment/tree/v0.17.2) (2012-11-15)
344
+
345
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.17.1...v0.17.2)
346
+
347
+ ## [v0.17.1](https://github.com/rails-on-services/apartment/tree/v0.17.1) (2012-10-30)
348
+
349
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.17.0...v0.17.1)
350
+
351
+ ## [v0.17.0](https://github.com/rails-on-services/apartment/tree/v0.17.0) (2012-09-26)
352
+
353
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.16.0...v0.17.0)
354
+
355
+ ## [v0.16.0](https://github.com/rails-on-services/apartment/tree/v0.16.0) (2012-06-01)
356
+
357
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.15.0...v0.16.0)
358
+
359
+ ## [v0.15.0](https://github.com/rails-on-services/apartment/tree/v0.15.0) (2012-03-18)
360
+
361
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.14.4...v0.15.0)
362
+
363
+ ## [v0.14.4](https://github.com/rails-on-services/apartment/tree/v0.14.4) (2012-03-08)
364
+
365
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.14.3...v0.14.4)
366
+
367
+ ## [v0.14.3](https://github.com/rails-on-services/apartment/tree/v0.14.3) (2012-02-21)
368
+
369
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.14.2...v0.14.3)
370
+
371
+ ## [v0.14.2](https://github.com/rails-on-services/apartment/tree/v0.14.2) (2012-02-21)
372
+
373
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.13.0.1...v0.14.2)
374
+
375
+ ## [v0.13.0.1](https://github.com/rails-on-services/apartment/tree/v0.13.0.1) (2012-02-09)
376
+
377
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.14.1...v0.13.0.1)
378
+
379
+ ## [v0.14.1](https://github.com/rails-on-services/apartment/tree/v0.14.1) (2011-12-13)
380
+
381
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.14.0...v0.14.1)
382
+
383
+ ## [v0.14.0](https://github.com/rails-on-services/apartment/tree/v0.14.0) (2011-12-13)
384
+
385
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.13.1...v0.14.0)
386
+
387
+ ## [v0.13.1](https://github.com/rails-on-services/apartment/tree/v0.13.1) (2011-11-08)
388
+
389
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.13.0...v0.13.1)
390
+
391
+ ## [v0.13.0](https://github.com/rails-on-services/apartment/tree/v0.13.0) (2011-10-25)
392
+
393
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.12.0...v0.13.0)
394
+
395
+ ## [v0.12.0](https://github.com/rails-on-services/apartment/tree/v0.12.0) (2011-10-04)
396
+
397
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.11.1...v0.12.0)
398
+
399
+ ## [v0.11.1](https://github.com/rails-on-services/apartment/tree/v0.11.1) (2011-09-22)
400
+
401
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.11.0...v0.11.1)
402
+
403
+ ## [v0.11.0](https://github.com/rails-on-services/apartment/tree/v0.11.0) (2011-09-20)
404
+
405
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.10.3...v0.11.0)
406
+
407
+ ## [v0.10.3](https://github.com/rails-on-services/apartment/tree/v0.10.3) (2011-09-20)
408
+
409
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.10.2...v0.10.3)
410
+
411
+ ## [v0.10.2](https://github.com/rails-on-services/apartment/tree/v0.10.2) (2011-09-15)
412
+
413
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.10.1...v0.10.2)
414
+
415
+ ## [v0.10.1](https://github.com/rails-on-services/apartment/tree/v0.10.1) (2011-08-11)
416
+
417
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.10.0...v0.10.1)
418
+
419
+ ## [v0.10.0](https://github.com/rails-on-services/apartment/tree/v0.10.0) (2011-07-29)
420
+
421
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.9.2...v0.10.0)
422
+
423
+ ## [v0.9.2](https://github.com/rails-on-services/apartment/tree/v0.9.2) (2011-07-04)
424
+
425
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.9.1...v0.9.2)
426
+
427
+ ## [v0.9.1](https://github.com/rails-on-services/apartment/tree/v0.9.1) (2011-06-24)
428
+
429
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.9.0...v0.9.1)
430
+
431
+ ## [v0.9.0](https://github.com/rails-on-services/apartment/tree/v0.9.0) (2011-06-23)
432
+
433
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.8.0...v0.9.0)
434
+
435
+ ## [v0.8.0](https://github.com/rails-on-services/apartment/tree/v0.8.0) (2011-06-23)
436
+
437
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.7.0...v0.8.0)
438
+
439
+ ## [v0.7.0](https://github.com/rails-on-services/apartment/tree/v0.7.0) (2011-06-22)
440
+
441
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.6.0...v0.7.0)
442
+
443
+ ## [v0.6.0](https://github.com/rails-on-services/apartment/tree/v0.6.0) (2011-06-21)
444
+
445
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/0.6.0...v0.6.0)
446
+
447
+ ## [0.6.0](https://github.com/rails-on-services/apartment/tree/0.6.0) (2011-06-21)
448
+
449
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.5.1...0.6.0)
450
+
451
+ ## [v0.5.1](https://github.com/rails-on-services/apartment/tree/v0.5.1) (2011-06-21)
452
+
453
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/0.5.0...v0.5.1)
454
+
455
+ ## [0.5.0](https://github.com/rails-on-services/apartment/tree/0.5.0) (2011-06-20)
456
+
457
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.5.0...0.5.0)
458
+
459
+ ## [v0.5.0](https://github.com/rails-on-services/apartment/tree/v0.5.0) (2011-06-20)
460
+
461
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/v0.1.3...v0.5.0)
462
+
463
+ ## [v0.1.3](https://github.com/rails-on-services/apartment/tree/v0.1.3) (2011-04-18)
464
+
465
+ [Full Changelog](https://github.com/rails-on-services/apartment/compare/7100f34a185ab7d48947f06aa8c14f0cf0a68bb7...v0.1.3)
466
+
467
+ # v2.7.1
468
+
469
+ **Implemented enhancements:**
470
+
471
+ - N/a
472
+
473
+ **Fixed bugs:**
474
+
475
+ - [Resolves #82] Enhanced db:create breaks plugin compatibility - <https://github.com/rails-on-services/apartment/pull/83>
476
+
477
+ **Closed issues:**
478
+
479
+ - Update rake version in development
480
+ - Renamed gemspec to match gem name
481
+
482
+ # v2.7.0
483
+
484
+ **Implemented enhancements:**
485
+
486
+ - [Resolves #70] Rake tasks define methods on main - <https://github.com/rails-on-services/apartment/pull/75>
487
+ - Add database and schema to active record log. Configurable, defaults to false to keep current behavior - <https://github.com/rails-on-services/apartment/pull/55>
488
+
489
+ **Fixed bugs:**
490
+
491
+ - [Fixes #61] Fix database create in mysql - <https://github.com/rails-on-services/apartment/pull/76>
492
+
493
+ **Closed issues:**
494
+
495
+ - Remove deprecated tld_length config option: tld_length was removed in influitive#309, this configuration option doesn't have any effect now. - <https://github.com/rails-on-services/apartment/pull/72>
496
+ - Using [diffend.io proxy](https://diffend.io) to safely check required gems
497
+ - Added [story branch](https://github.com/story-branch/story_branch) to the configuration
498
+ - Using travis-ci to run rubocop as well, replacing github actions: github actions do not work in fork's PRs
499
+
500
+ # v2.6.1
501
+
502
+ **Implemented enhancements:**
503
+ - N/a
504
+
505
+ **Fixed bugs:**
506
+ - [Resolves influitive#607] Avoid early connection
507
+ - <https://github.com/rails-on-services/apartment/pull/39>
508
+ - <https://github.com/rails-on-services/apartment/pull/53>
509
+ - <https://github.com/rails-on-services/apartment/pull/51>
510
+ - [Resolves #52] Rake db:setup tries to seed non existent tenant - <https://github.com/rails-on-services/apartment/pull/54>
511
+ - [Resolves #56] DB rollback uses second last migration - <https://github.com/rails-on-services/apartment/pull/57>
512
+
513
+ #**Closed issues:**
514
+ - N/a
515
+
516
+ # v2.6.0
517
+
518
+ **Implemented enhancements:**
519
+ - [Resolves #26] Support configuration for skip checking of schema existence before switching
520
+ - [Resolves #41] Add tenant info to console boot
521
+
522
+ **Fixed bugs:**
523
+ - [Resolves #37] Custom Console deprecation warning
524
+ - [Resolves #42] After switch callback not working with nil argument
525
+
526
+ #**Closed issues:**
527
+ - Updated github actions configuration to run on PRs as well
528
+
529
+ # v2.5.0
530
+
531
+ **Implemented enhancements:**
532
+ - [Resolves #6] Adds support for rails 6.1
533
+ - [Resolves #27] Adds support to not rely on set search path, but instead prepends the schema name to the table name when using postgresql with schemas.
534
+ - [Resolves #35] Cache keys are now tenant dependent
535
+
536
+ **Fixed bugs:**
537
+ - [Resolves #27] Manually switching connection between read and write forgets the schema
538
+
539
+ #**Closed issues:**
540
+ - [Resolves #31] Add latest ruby versions to test matrix
541
+
542
+ # v2.4.0
543
+
544
+ **Implemented enhancements:**
545
+ - [Resolves #14] Add console info about tenants and fast switches #17
546
+ - Skip init if we're running webpacker:compile #18
547
+
548
+ **Fixed bugs:**
549
+ - Don't crash when no database connection is present #16
550
+ - Rescuing ActiveRecord::NoDatabaseError when dropping tenants #19
551
+
552
+ #**Closed issues:**
553
+ - Rakefile should use mysql port from configuration #5
554
+ - [Resolves #9] Cleanup rubocop todo #8
555
+ - Cleanup travis matrix #23
556
+
557
+ # v2.3.0
558
+ * January 3, 2020
559
+
560
+ **Implemented enhancements:**
561
+ - Basic support for rails 6
562
+ - Released different gem name, with same API as apartment
563
+
564
+ # v2.2.1
565
+ * June 19, 2019
566
+
567
+ **Implemented enhancements:**
568
+ - #566: IGNORE_EMPTY_TENANTS environment variable to ignore empty tenants
569
+ warning. [Pysis868]
570
+
571
+ **Fixed bugs:**
572
+ - #586: Ignore `CREATE SCHEMA public` statement in pg dump [artemave]
573
+ - #549: Fix Postgres schema creation with dump SQL [ancorcruz]
574
+
575
+ # v2.2.0
576
+ * April 14, 2018
577
+
578
+ **Implemented enhancements:**
579
+ - #523: Add Rails 5.2 support [IngusSkaistkalns]
580
+ - #504: Test against Ruby 2.5.0 [ahorek]
581
+ - #528: Test against Rails 5.2 [meganemura]
582
+
583
+ **Removed:**
584
+ - #504: Remove Rails 4.0/4.1 support [ahorek]
585
+ - #545: Stop supporting for JRuby + Rails 5.0 [meganemura]
586
+
587
+ **Fixed bugs:**
588
+ - #537: Fix PostgresqlSchemaFromSqlAdapter for newer PostgreSQL [shterrett]
589
+ - #532: Issue is reported by [aldrinmartoq]
590
+ - #519: Fix exception when main database doesn't exist [mayeco]
591
+
592
+ **Closed issues:**
593
+
594
+ - #514: Fix typo [menorval]
595
+
596
+ # v2.1.0
597
+ * December 15, 2017
598
+
599
+ - Add `parallel_migration_threads` configuration option for running migrations
600
+ in parallel [ryanbrunner]
601
+ - Drop Ruby 2.0.0 support [meganemura]
602
+ - ignore_private when parsing subdomains with PublicSuffix [michiomochi]
603
+ - Ignore row_security statements in psql dumps for backward compatibility
604
+ [meganemura]
605
+ - "Host" elevator [shrmnk]
606
+ - Enhance db:drop task to act on all tenants [kuzukuzu]
607
+
608
+ # v2.0.0
609
+ * July 26, 2017
610
+
611
+ - Raise FileNotFound rather than abort when loading files [meganemura]
612
+ - Add 5.1 support with fixes for deprecations [meganemura]
613
+ - Fix tests for 5.x and a host of dev-friendly improvements [meganemura]
614
+ - Keep query cache config after switching databases [fernandomm]
615
+ - Pass constants not strings to middleware stack (Rails 5) [tzabaman]
616
+ - Remove deprecations from 1.0.0 [caironoleto]
617
+ - Replace `tld_length` configuration option with PublicSuffix gem for the
618
+ subdomain elevator [humancopy]
619
+ - Pass full config to create_database to allow :encoding/:collation/etc
620
+ [kakipo]
621
+ - Don't retain a connection during initialization [mikecmpbll]
622
+ - Fix database name escaping in drop_command [mikecmpbll]
623
+ - Skip initialization for assets:clean and assets:precompile tasks
624
+ [frank-west-iii]
625
+
626
+ # v1.2.0
627
+ * July 28, 2016
628
+
629
+ - Official Rails 5 support
630
+
631
+ # v1.1.0
632
+ * May 26, 2016
633
+
634
+ - Reset tenant after each request
635
+ - [Support callbacks](https://github.com/influitive/apartment/commit/ff9c9d092a781026502f5997c0bbedcb5748bc83) on switch [cbeer]
636
+ - Preliminary support for [separate database hosts](https://github.com/influitive/apartment/commit/abdffbf8cd9fba87243f16c86390da13e318ee1f) [apneadiving]
637
+
638
+ # v1.0.2
639
+ * July 2, 2015
640
+
641
+ - Fix pg_dump env vars - pull/208 [MitinPavel]
642
+ - Allow custom seed data file - pull/234 [typeoneerror]
643
+
644
+ # v1.0.1
645
+ * April 28, 2015
646
+
647
+ - Fix `Apartment::Deprecation` which was rescuing all exceptions
648
+
649
+ # v1.0.0
650
+ * Feb 3, 2015
651
+
652
+ - [BREAKING CHANGE] `Apartment::Tenant.process` is deprecated in favour of `Apartment::Tenant.switch`
653
+ - [BREAKING CHANGE] `Apartment::Tenant.switch` without a block is deprecated in favour of `Apartment::Tenant.switch!`
654
+ - Raise proper `TenantNotFound`, `TenantExists` exceptions
655
+ - Deprecate old `SchemaNotFound`, `DatabaseNotFound` exceptions
656
+
657
+ # v0.26.1
658
+ * Jan 13, 2015
659
+
660
+ - Fixed [schema quoting bug](https://github.com/influitive/apartment/issues/198#issuecomment-69782651) [jonsgreen]
661
+
662
+ # v0.26.0
663
+ * Jan 5, 2015
664
+
665
+ - Rails 4.2 support
666
+
667
+ # v0.25.2
668
+ * Sept 8, 2014
669
+
670
+ - Heroku fix on `assets:precompile` - pull/169 [rabbitt]
671
+
672
+ # v0.25.1
673
+ * July 17, 2014
674
+
675
+ - Fixed a few vestiges of Apartment::Database
676
+
677
+ # v0.25.0
678
+ * July 3, 2014
679
+
680
+ - [BREAKING CHANGE] - `Apartment::Database` is not deprecated in favour of
681
+ `Apartment::Tenant`
682
+ - ActiveRecord (and Rails) 4.1 now supported
683
+ - A new sql based adapter that dumps the schema using sql
684
+
685
+ # v0.24.3
686
+ * March 5, 2014
687
+
688
+ - Rake enhancements weren't removed from the generator template
689
+
690
+ # v0.24.2
691
+ * February 24, 2014
692
+
693
+ - Better warnings if `apartment:migrate` is run
694
+
695
+ # v0.24.1
696
+ * February 21, 2014
697
+
698
+ - requiring `apartment/tasks/enhancements` in an initializer doesn't work
699
+ - One can disable tenant migrations using `Apartment.db_migrate_tenants = false` in the Rakefile
700
+
701
+ # v0.24
702
+ * February 21, 2014 (In honour of the Women's Gold Medal in Hockey at Sochi)
703
+
704
+ - [BREAKING CHANGE] `apartment:migrate` task no longer depends on `db:migrate`
705
+ - Instead, you can `require 'apartment/tasks/enhancements'` in your Apartment initializer
706
+ - This will enhance `rake db:migrate` to also run `apartment:migrate`
707
+ - You can now forget about ever running `apartment:migrate` again
708
+ - Numerous deprecations for things referencing the word 'database'
709
+ - This is an ongoing effort to completely replace 'database' with 'tenant' as a better abstraction
710
+ - Note the obvious `Apartment::Database` still exists but will hopefully become `Apartment::Tenant` soon
711
+
712
+ # v0.23.2
713
+ * January 9, 2014
714
+
715
+ - Increased visibility of #parse_database_name warning
716
+
717
+ # v0.23.1
718
+ * January 8, 2014
719
+
720
+ - Schema adapters now initialize with default and persistent schemas
721
+ - Deprecated Apartment::Elevators#parse_database_name
722
+
723
+ # v0.23.0
724
+ * August 21, 2013
725
+
726
+ - Subdomain Elevator now allows for exclusions
727
+ - Delayed::Job has been completely removed
728
+
729
+ # v0.22.1
730
+ * August 21, 2013
731
+
732
+ - Fix bug where if your ruby process importing the database schema is run
733
+ from a directory other than the app root, Apartment wouldn't know what
734
+ schema_migrations to insert into the database (Rails only)
735
+
736
+ # v0.22.0
737
+ * June 9, 2013
738
+
739
+ - Numerous bug fixes:
740
+ - Mysql reset could connect to wrong database [eric88]
741
+ - Postgresql schema names weren't quoted properly [gdott9]
742
+ - Fixed error message on SchemaNotFound in `process`
743
+ - HostHash elevator allows mapping host based on hash contents [gdott9]
744
+ - Official Sidekiq support with the [apartment-sidekiq gem](https://github.com/influitive/apartment-sidekiq)
745
+
746
+
747
+ # v0.21.1
748
+ * May 31, 2013
749
+
750
+ - Clearing the AR::QueryCache after switching databases.
751
+ - Fixes issue with stale model being loaded for schema adapters
752
+
753
+ # v0.21.0
754
+ * April 24, 2013
755
+
756
+ - JDBC support!! [PetrolMan]
757
+
758
+ # v0.20.0
759
+ * Feb 6, 2013
760
+
761
+ - Mysql now has a 'schema like' option to perform like Postgresql (default)
762
+ - This should be significantly more performant than using connections
763
+ - Psych is now supported for Delayed::Job yaml parsing
764
+
765
+ # v0.19.2
766
+ * Jan 30, 2013
767
+
768
+ - Database schema file can now be set manually or skipped altogether
769
+
770
+ # v0.19.1
771
+ * Jan 30, 2013
772
+
773
+ - Allow schema.rb import file to be specified in config or skip schema.rb import altogether
774
+
775
+ # v0.19.0
776
+ * Dec 29, 2012
777
+
778
+ - Apartment is now threadsafe
779
+ - New postgis adapter [zonpantli]
780
+ - Removed ActionDispatch dependency for use with Rack apps (regression)
781
+
782
+ # v0.18.0
783
+ * Nov 27, 2012
784
+
785
+ - Added `append_environment` config option [virtualstaticvoid]
786
+ - Cleaned up the readme and generator documentation
787
+ - Added `connection_class` config option [smashtank]
788
+ - Fixed a [bug](https://github.com/influitive/apartment/issues/17#issuecomment-10758327) in pg adapter when missing schema
789
+
790
+ # v0.17.1
791
+ * Oct 30, 2012
792
+
793
+ - Fixed a bug where switching to an unknown db in mysql2 would crash the app [Frodotus]
794
+
795
+ # v0.17.0
796
+ * Sept 26, 2012
797
+
798
+ - Apartment has [a new home!](https://github.com/influitive/apartment)
799
+ - Support Sidekiq hooks to switch dbs [maedhr]
800
+ - Allow VERSION to be used on apartment:migrate [Bhavin Kamani]
801
+
802
+ # v0.16.0
803
+ * June 1, 2012
804
+
805
+ - Apartment now supports a default_schema to be set, rather than relying on ActiveRecord's default schema_search_path
806
+ - Additional schemas can always be maintained in the schema_search_path by configuring persistent_schemas [ryanbrunner]
807
+ - This means Hstore is officially supported!!
808
+ - There is now a full domain based elevator to switch dbs based on the whole domain [lcowell]
809
+ - There is now a generic elevator that takes a Proc to switch dbs based on the return value of that proc.
810
+
811
+ # v0.15.0
812
+ * March 18, 2012
813
+
814
+ - Remove Rails dependency, Apartment can now be used with any Rack based framework using ActiveRecord
815
+
816
+ # v0.14.4
817
+ * March 8, 2012
818
+
819
+ - Delayed::Job Hooks now return to the previous database, rather than resetting
820
+
821
+ # v0.14.3
822
+ * Feb 21, 2012
823
+
824
+ - Fix yaml serialization of non DJ models
825
+
826
+ # v0.14.2
827
+ * Feb 21, 2012
828
+
829
+ - Fix Delayed::Job yaml encoding with Rails > 3.0.x
830
+
831
+ # v0.14.1
832
+ * Dec 13, 2011
833
+
834
+ - Fix ActionDispatch::Callbacks deprecation warnings
835
+
836
+ # v0.14.0
837
+ * Dec 13, 2011
838
+
839
+ - Rails 3.1 Support
840
+
841
+ # v0.13.1
842
+ * Nov 8, 2011
843
+
844
+ - Reset prepared statement cache for rails 3.1.1 before switching dbs when using postgresql schemas
845
+ - Only necessary until the next release which will be more schema aware
846
+
847
+ # v0.13.0
848
+ * Oct 25, 2011
849
+
850
+ - `process` will now rescue with reset if the previous schema/db is no longer available
851
+ - `create` now takes an optional block which allows you to process within the newly created db
852
+ - Fixed Rails version >= 3.0.10 and < 3.1 because there have been significant testing problems with 3.1, next version will hopefully fix this
853
+
854
+ # v0.12.0
855
+ * Oct 4, 2011
856
+
857
+ - Added a `drop` method for removing databases/schemas
858
+ - Refactored abstract adapter to further remove duplication in concrete implementations
859
+ - Excluded models now take string references so they are properly reloaded in development
860
+ - Better silencing of `schema.rb` loading using `verbose` flag
861
+
862
+ # v0.11.1
863
+ * Sep 22, 2011
864
+
865
+ - Better use of Railties for initializing apartment
866
+ - The following changes were necessary as I haven't figured out how to properly hook into Rails reloading
867
+ - Added reloader middleware in development to init Apartment on each request
868
+ - Override `reload!` in console to also init Apartment
869
+
870
+ # v0.11.0
871
+ * Sep 20, 2011
872
+
873
+ - Excluded models no longer use a different connection when using postgresql schemas. Instead their table_name is prefixed with `public.`
874
+
875
+ # v0.10.3
876
+ * Sep 20, 2011
877
+
878
+ - Fix improper raising of exceptions on create and reset
879
+
880
+ # v0.10.2
881
+ * Sep 15, 2011
882
+
883
+ - Remove all the annoying logging for loading db schema and seeding on create
884
+
885
+ # v0.10.1
886
+ * Aug 11, 2011
887
+
888
+ - Fixed bug in DJ where new objects (that hadn't been pulled from the db) didn't have the proper database assigned
889
+
890
+ # v0.10.0
891
+ * July 29, 2011
892
+
893
+ - Added better support for Delayed Job
894
+ - New config option that enables Delayed Job wrappers
895
+ - Note that DJ support uses a work-around in order to get queues stored in the public schema, not sure why it doesn't work out of the box, will look into it, until then, see documentation on queue'ng jobs
896
+
897
+ # v0.9.2
898
+ * July 4, 2011
899
+
900
+ - Migrations now run associated rails migration fully, fixes schema.rb not being reloaded after migrations
901
+
902
+ # v0.9.1
903
+ * June 24, 2011
904
+
905
+ - Hooks now take the payload object as an argument to fetch the proper db for DJ hooks
906
+
907
+ # v0.9.0
908
+ * June 23, 2011
909
+
910
+ - Added module to provide delayed job hooks
911
+
912
+ # v0.8.0
913
+ * June 23, 2011
914
+
915
+ - Added #current_database which will return the current database (or schema) name
916
+
917
+ # v0.7.0
918
+ * June 22, 2011
919
+
920
+ - Added apartment:seed rake task for seeding all dbs
921
+
922
+ # v0.6.0
923
+ * June 21, 2011
924
+
925
+ - Added #process to connect to new db, perform operations, then ensure a reset
926
+
927
+ # v0.5.1
928
+ * June 21, 2011
929
+
930
+ - Fixed db migrate up/down/rollback
931
+ - added db:redo
932
+
933
+ # v0.5.0
934
+ * June 20, 2011
935
+
936
+ - Added the concept of an "Elevator", a rack based strategy for db switching
937
+ - Added the Subdomain Elevator middleware to enabled db switching based on subdomain
938
+
939
+ # v0.4.0
940
+ * June 14, 2011
941
+
942
+ - Added `configure` method on Apartment instead of using yml file, allows for dynamic setting of db names to migrate for rake task
943
+ - Added `seed_after_create` config option to import seed data to new db on create
944
+
945
+ # v0.3.0
946
+ * June 10, 2011
947
+
948
+ - Added full support for database migration
949
+ - Added in method to establish new connection for excluded models on startup rather than on each switch
950
+
951
+ # v0.2.0
952
+ * June 6, 2011 *
953
+
954
+ - Refactor to use more rails/active_support functionality
955
+ - Refactor config to lazily load apartment.yml if exists
956
+ - Remove OStruct and just use hashes for fetching methods
957
+ - Added schema load on create instead of migrating from scratch
958
+
959
+ # v0.1.3
960
+ * March 30, 2011 *
961
+
962
+ - Original pass from Ryan
963
+
964
+
965
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*