ros-apartment 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/.rubocop-linter.yml +22 -0
  3. data/.pryrc +5 -3
  4. data/.rubocop.yml +17 -0
  5. data/.rubocop_todo.yml +29 -0
  6. data/.story_branch.yml +4 -0
  7. data/.travis.yml +12 -11
  8. data/Appraisals +18 -18
  9. data/Gemfile +4 -1
  10. data/README.md +33 -5
  11. data/Rakefile +2 -0
  12. data/apartment.gemspec +6 -6
  13. data/gemfiles/rails_4_2.gemfile +12 -10
  14. data/gemfiles/rails_5_0.gemfile +11 -9
  15. data/gemfiles/rails_5_1.gemfile +11 -9
  16. data/gemfiles/rails_5_2.gemfile +10 -8
  17. data/gemfiles/rails_6_0.gemfile +11 -9
  18. data/gemfiles/rails_master.gemfile +11 -9
  19. data/lib/apartment/adapters/abstract_adapter.rb +34 -34
  20. data/lib/apartment/adapters/abstract_jdbc_adapter.rb +4 -3
  21. data/lib/apartment/adapters/jdbc_mysql_adapter.rb +3 -3
  22. data/lib/apartment/adapters/jdbc_postgresql_adapter.rb +13 -11
  23. data/lib/apartment/adapters/mysql2_adapter.rb +10 -9
  24. data/lib/apartment/adapters/postgis_adapter.rb +3 -2
  25. data/lib/apartment/adapters/postgresql_adapter.rb +28 -25
  26. data/lib/apartment/adapters/sqlite3_adapter.rb +16 -8
  27. data/lib/apartment/console.rb +28 -3
  28. data/lib/apartment/custom_console.rb +26 -0
  29. data/lib/apartment/deprecation.rb +2 -1
  30. data/lib/apartment/elevators/domain.rb +4 -3
  31. data/lib/apartment/elevators/first_subdomain.rb +3 -2
  32. data/lib/apartment/elevators/generic.rb +4 -3
  33. data/lib/apartment/elevators/host.rb +6 -1
  34. data/lib/apartment/elevators/host_hash.rb +6 -2
  35. data/lib/apartment/elevators/subdomain.rb +9 -5
  36. data/lib/apartment/migrator.rb +4 -3
  37. data/lib/apartment/railtie.rb +13 -5
  38. data/lib/apartment/reloader.rb +2 -1
  39. data/lib/apartment/tasks/enhancements.rb +4 -6
  40. data/lib/apartment/tenant.rb +3 -4
  41. data/lib/apartment/version.rb +3 -1
  42. data/lib/apartment.rb +15 -9
  43. data/lib/generators/apartment/install/install_generator.rb +4 -3
  44. data/lib/generators/apartment/install/templates/apartment.rb +3 -2
  45. data/lib/tasks/apartment.rake +19 -18
  46. data/spec/adapters/jdbc_mysql_adapter_spec.rb +5 -4
  47. data/spec/adapters/jdbc_postgresql_adapter_spec.rb +10 -12
  48. data/spec/adapters/mysql2_adapter_spec.rb +15 -13
  49. data/spec/adapters/postgresql_adapter_spec.rb +22 -20
  50. data/spec/adapters/sqlite3_adapter_spec.rb +41 -23
  51. data/spec/apartment_spec.rb +4 -2
  52. data/spec/dummy/app/controllers/application_controller.rb +4 -3
  53. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  54. data/spec/dummy/app/models/application_record.rb +6 -0
  55. data/spec/dummy/app/models/company.rb +4 -2
  56. data/spec/dummy/app/models/user.rb +4 -2
  57. data/spec/dummy/config/application.rb +11 -9
  58. data/spec/dummy/config/boot.rb +4 -2
  59. data/spec/dummy/config/environment.rb +3 -1
  60. data/spec/dummy/config/environments/development.rb +2 -1
  61. data/spec/dummy/config/environments/production.rb +3 -1
  62. data/spec/dummy/config/environments/test.rb +3 -1
  63. data/spec/dummy/config/initializers/apartment.rb +4 -2
  64. data/spec/dummy/config/initializers/backtrace_silencers.rb +1 -0
  65. data/spec/dummy/config/initializers/inflections.rb +1 -0
  66. data/spec/dummy/config/initializers/mime_types.rb +1 -0
  67. data/spec/dummy/config/initializers/secret_token.rb +2 -0
  68. data/spec/dummy/config/initializers/session_store.rb +3 -1
  69. data/spec/dummy/config/routes.rb +3 -1
  70. data/spec/dummy/config.ru +3 -1
  71. data/spec/dummy/db/seeds/import.rb +3 -1
  72. data/spec/dummy/script/rails +4 -2
  73. data/spec/dummy_engine/config/initializers/apartment.rb +4 -3
  74. data/spec/dummy_engine/lib/dummy_engine/engine.rb +2 -0
  75. data/spec/dummy_engine/lib/dummy_engine/version.rb +3 -1
  76. data/spec/dummy_engine/lib/dummy_engine.rb +3 -1
  77. data/spec/dummy_engine/test/dummy/config/application.rb +4 -2
  78. data/spec/dummy_engine/test/dummy/config/boot.rb +4 -2
  79. data/spec/dummy_engine/test/dummy/config/environment.rb +3 -1
  80. data/spec/dummy_engine/test/dummy/config/environments/development.rb +2 -0
  81. data/spec/dummy_engine/test/dummy/config/environments/production.rb +2 -0
  82. data/spec/dummy_engine/test/dummy/config/environments/test.rb +2 -0
  83. data/spec/dummy_engine/test/dummy/config/initializers/assets.rb +2 -0
  84. data/spec/dummy_engine/test/dummy/config/initializers/backtrace_silencers.rb +1 -0
  85. data/spec/dummy_engine/test/dummy/config/initializers/cookies_serializer.rb +3 -1
  86. data/spec/dummy_engine/test/dummy/config/initializers/filter_parameter_logging.rb +2 -0
  87. data/spec/dummy_engine/test/dummy/config/initializers/inflections.rb +1 -0
  88. data/spec/dummy_engine/test/dummy/config/initializers/mime_types.rb +1 -0
  89. data/spec/dummy_engine/test/dummy/config/initializers/session_store.rb +2 -0
  90. data/spec/dummy_engine/test/dummy/config/initializers/wrap_parameters.rb +2 -0
  91. data/spec/dummy_engine/test/dummy/config/routes.rb +2 -0
  92. data/spec/dummy_engine/test/dummy/config.ru +3 -1
  93. data/spec/examples/connection_adapter_examples.rb +15 -13
  94. data/spec/examples/generic_adapter_custom_configuration_example.rb +21 -23
  95. data/spec/examples/generic_adapter_examples.rb +40 -39
  96. data/spec/examples/schema_adapter_examples.rb +93 -88
  97. data/spec/integration/apartment_rake_integration_spec.rb +24 -24
  98. data/spec/integration/query_caching_spec.rb +10 -8
  99. data/spec/integration/use_within_an_engine_spec.rb +5 -5
  100. data/spec/schemas/v1.rb +2 -3
  101. data/spec/schemas/v2.rb +22 -24
  102. data/spec/schemas/v3.rb +26 -28
  103. data/spec/spec_helper.rb +8 -6
  104. data/spec/support/apartment_helpers.rb +9 -5
  105. data/spec/support/capybara_sessions.rb +5 -5
  106. data/spec/support/config.rb +5 -2
  107. data/spec/support/contexts.rb +10 -8
  108. data/spec/support/requirements.rb +19 -6
  109. data/spec/support/setup.rb +5 -5
  110. data/spec/tasks/apartment_rake_spec.rb +30 -35
  111. data/spec/tenant_spec.rb +48 -44
  112. data/spec/unit/config_spec.rb +26 -27
  113. data/spec/unit/elevators/domain_spec.rb +9 -8
  114. data/spec/unit/elevators/first_subdomain_spec.rb +14 -12
  115. data/spec/unit/elevators/generic_spec.rb +16 -15
  116. data/spec/unit/elevators/host_hash_spec.rb +9 -8
  117. data/spec/unit/elevators/host_spec.rb +26 -26
  118. data/spec/unit/elevators/subdomain_spec.rb +24 -23
  119. data/spec/unit/migrator_spec.rb +18 -17
  120. data/spec/unit/reloader_spec.rb +8 -8
  121. metadata +40 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea7b5564bca9125cfb7b8a7863793c69a3462dabd8211d274891b79a948c28f5
4
- data.tar.gz: c502a0c3dccdd4edca005b68b6e945d82a6943716d917ef2df2e6fa91d2a2204
3
+ metadata.gz: 885fc6d80e82f41a7e4a0ab4c6aea81859c39ffbc35454394430168c3d82a378
4
+ data.tar.gz: 92df175aec9c46552f8d0d68d154fcc89adc3ae40512c3e2ce9ad1c7d891371e
5
5
  SHA512:
6
- metadata.gz: c1babac9d50b907b36337157870ab606291a91cb022a80b11a1e3f008301f2a1b019137fb8ea03119e2a054b97041d4e532191142fff97eee3ad27cc30b10a0c
7
- data.tar.gz: 7cee77bbe095d7f2d8b3a64468b5730d719152d5ec904ab15261b49366bc113dbb97f7b4a1297535c4c294d8b8099090f542ae315a2744fe55d1fb19895b4615
6
+ metadata.gz: 60a71a3fa90048da38722e43eb60a8345303aa3131127300a9cab4224f9aeaf6e655022b4fce3c1bb49a9f687b98e79949e29a562bac366bed477aae905d6df7
7
+ data.tar.gz: 54836f74344304e196678b1d23c07ad9e293f7630651418d9a792cc0d066c619b792e1226426314d8f4969c2e8902321f1f8d47616d0c813f3e09e67b522f99e
@@ -0,0 +1,22 @@
1
+ name: Rubocop Lint
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ container:
11
+ image: ruby:2.6.5
12
+
13
+ steps:
14
+ - uses: actions/checkout@v1
15
+ - name: Rubocop Linter
16
+ uses: andrewmcodes/rubocop-linter-action@v2.0.0
17
+ with:
18
+ additional_gems: 'perx-rubocop:0.0.3'
19
+ fail_level: 'warning'
20
+ version: '0.77.0'
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
data/.pryrc CHANGED
@@ -1,3 +1,5 @@
1
- if defined?(Rails) && Rails.env
2
- extend Rails::ConsoleMethods
3
- end
1
+ # frozen_string_literal: true
2
+
3
+ # rubocop:disable Style/MixinUsage
4
+ extend Rails::ConsoleMethods if defined?(Rails) && Rails.env
5
+ # rubocop:enable Style/MixinUsage
data/.rubocop.yml ADDED
@@ -0,0 +1,17 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ inherit_gem:
4
+ perx-rubocop:
5
+ - default.yml
6
+
7
+ Style/WordArray:
8
+ Exclude:
9
+ - spec/schemas/**/*.rb
10
+
11
+ Style/NumericLiterals:
12
+ Exclude:
13
+ - spec/schemas/**/*.rb
14
+
15
+ Layout/EmptyLineAfterMagicComment:
16
+ Exclude:
17
+ - spec/schemas/**/*.rb
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,29 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-02-16 15:36:55 +0800 using RuboCop version 0.77.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 5
10
+ Metrics/AbcSize:
11
+ Max: 33
12
+
13
+ # Offense count: 11
14
+ # Configuration parameters: CountComments, ExcludedMethods.
15
+ # ExcludedMethods: refine
16
+ Metrics/BlockLength:
17
+ Max: 176
18
+
19
+ # Offense count: 18
20
+ # Cop supports --auto-correct.
21
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
22
+ # URISchemes: http, https
23
+ Metrics/LineLength:
24
+ Max: 237
25
+
26
+ # Offense count: 4
27
+ # Configuration parameters: CountComments, ExcludedMethods.
28
+ Metrics/MethodLength:
29
+ Max: 24
data/.story_branch.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ tracker: github
3
+ project_id:
4
+ - rails-on-services/apartment
data/.travis.yml CHANGED
@@ -4,7 +4,7 @@ language: ruby
4
4
  services:
5
5
  - docker
6
6
  rvm:
7
- - jruby-9.1.17.0
7
+ - jruby-9.2.11.0
8
8
  - 2.1.9
9
9
  - 2.2.9
10
10
  - 2.3.6
@@ -12,6 +12,12 @@ rvm:
12
12
  - 2.5.0
13
13
  - 2.6.2
14
14
  - ruby-head
15
+
16
+ branches:
17
+ only:
18
+ - master
19
+ - development
20
+
15
21
  gemfile:
16
22
  - gemfiles/rails_4_2.gemfile
17
23
  - gemfiles/rails_5_0.gemfile
@@ -34,8 +40,11 @@ jobs:
34
40
  allow_failures:
35
41
  - rvm: ruby-head
36
42
  - gemfile: gemfiles/rails_master.gemfile
37
- - rvm: jruby-9.1.17.0
38
- gemfile: gemfiles/rails_5_0.gemfile
43
+ - rvm: 2.2.9
44
+ gemfile: gemfiles/rails_5_2.gemfile
45
+ # JRuby does not provide support for anything below rails 5
46
+ - rvm: jruby-9.2.11.0
47
+ gemfile: gemfiles/rails_4_2.gemfile
39
48
  exclude:
40
49
  - rvm: 2.1.9
41
50
  gemfile: gemfiles/rails_5_0.gemfile
@@ -53,13 +62,5 @@ jobs:
53
62
  gemfile: gemfiles/rails_6_0.gemfile
54
63
  - rvm: 2.4.3
55
64
  gemfile: gemfiles/rails_6_0.gemfile
56
- - rvm: jruby-9.1.17.0
57
- gemfile: gemfiles/rails_5_1.gemfile
58
- - rvm: jruby-9.1.17.0
59
- gemfile: gemfiles/rails_5_2.gemfile
60
- - rvm: jruby-9.1.17.0
61
- gemfile: gemfiles/rails_6_0.gemfile
62
- - rvm: jruby-9.1.17.0
63
- gemfile: gemfiles/rails_master.gemfile
64
65
  fast_finish: true
65
66
  cache: bundler
data/Appraisals CHANGED
@@ -1,8 +1,10 @@
1
- appraise "rails-4-2" do
2
- gem "rails", "~> 4.2.0"
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'rails-4-2' do
4
+ gem 'rails', '~> 4.2.0'
3
5
  platforms :ruby do
4
- gem "pg", "< 1.0.0"
5
- gem "mysql2", "~> 0.4.0"
6
+ gem 'pg', '< 1.0.0'
7
+ gem 'mysql2', '~> 0.4.0'
6
8
  end
7
9
  platforms :jruby do
8
10
  gem 'activerecord-jdbc-adapter', '~> 1.3'
@@ -11,10 +13,10 @@ appraise "rails-4-2" do
11
13
  end
12
14
  end
13
15
 
14
- appraise "rails-5-0" do
15
- gem "rails", "~> 5.0.0"
16
+ appraise 'rails-5-0' do
17
+ gem 'rails', '~> 5.0.0'
16
18
  platforms :ruby do
17
- gem "pg", "< 1.0.0"
19
+ gem 'pg', '< 1.0.0'
18
20
  end
19
21
  platforms :jruby do
20
22
  gem 'activerecord-jdbc-adapter', '~> 50.0'
@@ -23,10 +25,10 @@ appraise "rails-5-0" do
23
25
  end
24
26
  end
25
27
 
26
- appraise "rails-5-1" do
27
- gem "rails", "~> 5.1.0"
28
+ appraise 'rails-5-1' do
29
+ gem 'rails', '~> 5.1.0'
28
30
  platforms :ruby do
29
- gem "pg", "< 1.0.0"
31
+ gem 'pg', '< 1.0.0'
30
32
  end
31
33
  platforms :jruby do
32
34
  gem 'activerecord-jdbc-adapter', '~> 51.0'
@@ -35,8 +37,8 @@ appraise "rails-5-1" do
35
37
  end
36
38
  end
37
39
 
38
- appraise "rails-5-2" do
39
- gem "rails", "~> 5.2.0"
40
+ appraise 'rails-5-2' do
41
+ gem 'rails', '~> 5.2.0'
40
42
  platforms :jruby do
41
43
  gem 'activerecord-jdbc-adapter', '~> 52.0'
42
44
  gem 'activerecord-jdbcpostgresql-adapter', '~> 52.0'
@@ -44,9 +46,8 @@ appraise "rails-5-2" do
44
46
  end
45
47
  end
46
48
 
47
-
48
- appraise "rails-6-0" do
49
- gem "rails", "~> 6.0.0.rc1"
49
+ appraise 'rails-6-0' do
50
+ gem 'rails', '~> 6.0.0.rc1'
50
51
  platforms :ruby do
51
52
  gem 'sqlite3', '~> 1.4'
52
53
  end
@@ -57,9 +58,8 @@ appraise "rails-6-0" do
57
58
  end
58
59
  end
59
60
 
60
-
61
- appraise "rails-master" do
62
- gem "rails", git: 'https://github.com/rails/rails.git'
61
+ appraise 'rails-master' do
62
+ gem 'rails', git: 'https://github.com/rails/rails.git'
63
63
  platforms :ruby do
64
64
  gem 'sqlite3', '~> 1.4'
65
65
  end
data/Gemfile CHANGED
@@ -1,10 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'http://rubygems.org'
2
4
 
3
5
  gemspec
4
6
 
5
7
  gem 'rails', '>= 3.1.2'
8
+ gem 'perx-rubocop', '~> 0.0.3'
6
9
 
7
10
  group :local do
8
- gem 'pry'
9
11
  gem 'guard-rspec', '~> 4.2'
12
+ gem 'pry'
10
13
  end
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Apartment
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/apartment.svg)](https://badge.fury.io/rb/apartment)
4
- [![Code Climate](https://codeclimate.com/github/influitive/apartment/badges/gpa.svg)](https://codeclimate.com/github/influitive/apartment)
5
- [![Build Status](https://travis-ci.org/influitive/apartment.svg?branch=development)](https://travis-ci.org/influitive/apartment)
3
+ [![Gem Version](https://badge.fury.io/rb/ros-apartment.svg)](https://badge.fury.io/rb/apartment)
4
+ [![Code Climate](https://api.codeclimate.com/v1/badges/b0dc327380bb8438f991/maintainability)](https://codeclimate.com/github/rails-on-services/apartment/maintainability)
5
+ [![Build Status](https://travis-ci.org/rails-on-services/apartment.svg?branch=development)](https://travis-ci.org/rails-on-services/apartment)
6
6
 
7
7
  *Multitenancy for Rails and ActiveRecord*
8
8
 
@@ -33,7 +33,7 @@ may find or proposing improvements to the gem itself. Feel free to reach out.
33
33
  Add the following to your Gemfile:
34
34
 
35
35
  ```ruby
36
- gem 'ros-apartment'
36
+ gem 'ros-apartment', require: 'apartment'
37
37
  ```
38
38
 
39
39
  Then generate your `Apartment` config file using
@@ -229,7 +229,7 @@ A Generic Elevator exists that allows you to pass a `Proc` (or anything that res
229
229
  module MyApplication
230
230
  class Application < Rails::Application
231
231
  # Obviously not a contrived example
232
- config.middleware.use Apartment::Elevators::Generic, Proc.new { |request| request.host.reverse }
232
+ config.middleware.use Apartment::Elevators::Generic, proc { |request| request.host.reverse }
233
233
  end
234
234
  end
235
235
  ```
@@ -289,6 +289,27 @@ Apartment::Tenant.drop('tenant_name')
289
289
 
290
290
  When method is called, the schema is dropped and all data from itself will be lost. Be careful with this method.
291
291
 
292
+ ### Custom Prompt
293
+
294
+ #### Console methods
295
+
296
+ `ros-apartment` console configures two helper methods:
297
+ 1. `tenant_list` - list available tenants while using the console
298
+ 2. `st(tenant_name:String)` - Switches the context to the tenant name passed, if
299
+ it exists.
300
+
301
+ #### Custom printed prompt
302
+
303
+ `ros-apartment` also has a custom prompt that gives a bit more information about
304
+ the context in which you're running. It shows the environment as well as the tenant
305
+ that is currently switched to. In order for you to enable this, you need to require
306
+ the custom console in your application.
307
+
308
+ In `application.rb` add `require 'apartment/custom_console'`.
309
+ Please note that we rely on `pry-rails` to edit the prompt, thus your project needs
310
+ to install it as well. In order to do so, you need to add `gem 'pry-rails'` to your
311
+ project's gemfile.
312
+
292
313
  ## Config
293
314
 
294
315
  The following config options should be set up in a Rails initializer such as:
@@ -569,6 +590,13 @@ end
569
590
 
570
591
  * If you're looking to help, check out the TODO file for some upcoming changes I'd like to implement in Apartment.
571
592
 
593
+ ### Running bundle install
594
+
595
+ mysql2 gem in some cases fails to install.
596
+ If you face problems running bundle install in OSX, try installing the gem running:
597
+
598
+ `gem install mysql2 -v '0.5.3' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include`
599
+
572
600
  ## License
573
601
 
574
602
  Apartment is released under the [MIT License](http://www.opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -85,6 +85,7 @@ namespace :mysql do
85
85
  params << "-h #{my_config['host']}" if my_config['host']
86
86
  params << "-u #{my_config['username']}" if my_config['username']
87
87
  params << "-p#{my_config['password']}" if my_config['password']
88
+ params << "--port #{my_config['port']}" if my_config['port']
88
89
  %x{ mysqladmin #{params.join(' ')} create #{my_config['database']} } rescue "test db already exists"
89
90
  ActiveRecord::Base.establish_connection my_config
90
91
  migrate
@@ -97,6 +98,7 @@ namespace :mysql do
97
98
  params << "-h #{my_config['host']}" if my_config['host']
98
99
  params << "-u #{my_config['username']}" if my_config['username']
99
100
  params << "-p#{my_config['password']}" if my_config['password']
101
+ params << "--port #{my_config['port']}" if my_config['port']
100
102
  %x{ mysqladmin #{params.join(' ')} drop #{my_config['database']} --force}
101
103
  end
102
104
 
data/apartment.gemspec CHANGED
@@ -21,11 +21,11 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # must be >= 3.1.2 due to bug in prepared_statements
23
23
  s.add_dependency 'activerecord', '>= 3.1.2', '< 6.1'
24
- s.add_dependency 'parallel', '>= 0.7.1'
25
- s.add_dependency 'public_suffix', '>= 2'
26
- s.add_dependency 'rack', '>= 1.3.6'
24
+ s.add_dependency 'parallel', '< 2.0'
25
+ s.add_dependency 'public_suffix', '>= 2.0.5', '< 5.0'
26
+ s.add_dependency 'rack', '>= 1.3.6', '< 3.0'
27
27
 
28
- s.add_development_dependency 'appraisal'
28
+ s.add_development_dependency 'appraisal', '~> 2.2'
29
29
  s.add_development_dependency 'bundler', '>= 1.3', '< 2.0'
30
30
  s.add_development_dependency 'capybara', '~> 2.0'
31
31
  s.add_development_dependency 'rake', '~> 0.9'
@@ -40,8 +40,8 @@ Gem::Specification.new do |s|
40
40
  s.add_development_dependency 'jdbc-postgres'
41
41
  s.add_development_dependency 'jruby-openssl'
42
42
  else
43
- s.add_development_dependency 'mysql2'
44
- s.add_development_dependency 'pg'
43
+ s.add_development_dependency 'mysql2', '~> 0.5'
44
+ s.add_development_dependency 'pg', '~> 1.2'
45
45
  s.add_development_dependency 'sqlite3', '~> 1.3.6'
46
46
  end
47
47
  end
@@ -1,23 +1,25 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "http://rubygems.org"
5
+ source 'http://rubygems.org'
4
6
 
5
- gem "rails", "~> 4.2.0"
7
+ gem 'rails', '~> 4.2.0'
6
8
 
7
9
  group :local do
8
- gem "pry"
9
- gem "guard-rspec", "~> 4.2"
10
+ gem 'guard-rspec', '~> 4.2'
11
+ gem 'pry'
10
12
  end
11
13
 
12
14
  platforms :ruby do
13
- gem "pg", "< 1.0.0"
14
- gem "mysql2", "~> 0.4.0"
15
+ gem 'mysql2', '~> 0.4.0'
16
+ gem 'pg', '< 1.0.0'
15
17
  end
16
18
 
17
19
  platforms :jruby do
18
- gem "activerecord-jdbc-adapter", "~> 1.3"
19
- gem "activerecord-jdbcpostgresql-adapter", "~> 1.3"
20
- gem "activerecord-jdbcmysql-adapter", "~> 1.3"
20
+ gem 'activerecord-jdbc-adapter', '~> 1.3'
21
+ gem 'activerecord-jdbcmysql-adapter', '~> 1.3'
22
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3'
21
23
  end
22
24
 
23
- gemspec path: "../"
25
+ gemspec path: '../'
@@ -1,22 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "http://rubygems.org"
5
+ source 'http://rubygems.org'
4
6
 
5
- gem "rails", "~> 5.0.0"
7
+ gem 'rails', '~> 5.0.0'
6
8
 
7
9
  group :local do
8
- gem "pry"
9
- gem "guard-rspec", "~> 4.2"
10
+ gem 'guard-rspec', '~> 4.2'
11
+ gem 'pry'
10
12
  end
11
13
 
12
14
  platforms :ruby do
13
- gem "pg", "< 1.0.0"
15
+ gem 'pg', '< 1.0.0'
14
16
  end
15
17
 
16
18
  platforms :jruby do
17
- gem "activerecord-jdbc-adapter", "~> 50.0"
18
- gem "activerecord-jdbcpostgresql-adapter", "~> 50.0"
19
- gem "activerecord-jdbcmysql-adapter", "~> 50.0"
19
+ gem 'activerecord-jdbc-adapter', '~> 50.0'
20
+ gem 'activerecord-jdbcmysql-adapter', '~> 50.0'
21
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 50.0'
20
22
  end
21
23
 
22
- gemspec path: "../"
24
+ gemspec path: '../'
@@ -1,22 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "http://rubygems.org"
5
+ source 'http://rubygems.org'
4
6
 
5
- gem "rails", "~> 5.1.0"
7
+ gem 'rails', '~> 5.1.0'
6
8
 
7
9
  group :local do
8
- gem "pry"
9
- gem "guard-rspec", "~> 4.2"
10
+ gem 'guard-rspec', '~> 4.2'
11
+ gem 'pry'
10
12
  end
11
13
 
12
14
  platforms :ruby do
13
- gem "pg", "< 1.0.0"
15
+ gem 'pg', '< 1.0.0'
14
16
  end
15
17
 
16
18
  platforms :jruby do
17
- gem "activerecord-jdbc-adapter", "~> 51.0"
18
- gem "activerecord-jdbcpostgresql-adapter", "~> 51.0"
19
- gem "activerecord-jdbcmysql-adapter", "~> 51.0"
19
+ gem 'activerecord-jdbc-adapter', '~> 51.0'
20
+ gem 'activerecord-jdbcmysql-adapter', '~> 51.0'
21
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 51.0'
20
22
  end
21
23
 
22
- gemspec path: "../"
24
+ gemspec path: '../'
@@ -1,18 +1,20 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "http://rubygems.org"
5
+ source 'http://rubygems.org'
4
6
 
5
- gem "rails", "~> 5.2.0"
7
+ gem 'rails', '~> 5.2.0'
6
8
 
7
9
  group :local do
8
- gem "pry"
9
- gem "guard-rspec", "~> 4.2"
10
+ gem 'guard-rspec', '~> 4.2'
11
+ gem 'pry'
10
12
  end
11
13
 
12
14
  platforms :jruby do
13
- gem "activerecord-jdbc-adapter", "~> 52.0"
14
- gem "activerecord-jdbcpostgresql-adapter", "~> 52.0"
15
- gem "activerecord-jdbcmysql-adapter", "~> 52.0"
15
+ gem 'activerecord-jdbc-adapter', '~> 52.0'
16
+ gem 'activerecord-jdbcmysql-adapter', '~> 52.0'
17
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 52.0'
16
18
  end
17
19
 
18
- gemspec path: "../"
20
+ gemspec path: '../'
@@ -1,22 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "http://rubygems.org"
5
+ source 'http://rubygems.org'
4
6
 
5
- gem "rails", "~> 6.0.0.rc1"
7
+ gem 'rails', '~> 6.0.0.rc1'
6
8
 
7
9
  group :local do
8
- gem "pry"
9
- gem "guard-rspec", "~> 4.2"
10
+ gem 'guard-rspec', '~> 4.2'
11
+ gem 'pry'
10
12
  end
11
13
 
12
14
  platforms :ruby do
13
- gem "sqlite3", "~> 1.4"
15
+ gem 'sqlite3', '~> 1.4'
14
16
  end
15
17
 
16
18
  platforms :jruby do
17
- gem "activerecord-jdbc-adapter", "~> 60.0.rc1"
18
- gem "activerecord-jdbcpostgresql-adapter", "~> 60.0.rc1"
19
- gem "activerecord-jdbcmysql-adapter", "~> 60.0.rc1"
19
+ gem 'activerecord-jdbc-adapter', '~> 60.0.rc1'
20
+ gem 'activerecord-jdbcmysql-adapter', '~> 60.0.rc1'
21
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 60.0.rc1'
20
22
  end
21
23
 
22
- gemspec path: "../"
24
+ gemspec path: '../'
@@ -1,22 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "http://rubygems.org"
5
+ source 'http://rubygems.org'
4
6
 
5
- gem "rails", git: "https://github.com/rails/rails.git"
7
+ gem 'rails', git: 'https://github.com/rails/rails.git'
6
8
 
7
9
  group :local do
8
- gem "pry"
9
- gem "guard-rspec", "~> 4.2"
10
+ gem 'guard-rspec', '~> 4.2'
11
+ gem 'pry'
10
12
  end
11
13
 
12
14
  platforms :ruby do
13
- gem "sqlite3", "~> 1.4"
15
+ gem 'sqlite3', '~> 1.4'
14
16
  end
15
17
 
16
18
  platforms :jruby do
17
- gem "activerecord-jdbc-adapter", "~> 52.0"
18
- gem "activerecord-jdbcpostgresql-adapter", "~> 52.0"
19
- gem "activerecord-jdbcmysql-adapter", "~> 52.0"
19
+ gem 'activerecord-jdbc-adapter', '~> 52.0'
20
+ gem 'activerecord-jdbcmysql-adapter', '~> 52.0'
21
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 52.0'
20
22
  end
21
23
 
22
- gemspec path: "../"
24
+ gemspec path: '../'