arproxy 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a7ff06158ab3a572d3a6e15820bbf444e81d34129a602610c78ef83a26c56e9
4
- data.tar.gz: b7587a01156a5cec84a16b4f071da38e6d5c552904931692e48b474eaf2412a1
3
+ metadata.gz: 60641c3f1965a76a0c1db42a2421c452a1bb24e86b7294d1ebf97f8121e90e1b
4
+ data.tar.gz: 2db239c2a83a87b7a6c82f6ca393627b8321ef046c1c812a73345d010de979cd
5
5
  SHA512:
6
- metadata.gz: 339a1e01af4262c8c88de50828f72318eb55c961e7f541a7893c3f5cadb511b13296647883a8780eb0ad6e0ab7947660fb5feb5a36e27e1cb9a89de9e3253112
7
- data.tar.gz: 2555f86f77d2121586f003713bbe735da92972ab8e59b9fdd7095feef34480d7549cf23e29a5dc4077b95d51926be94ae8d2110117ae44bfb9e1217f53fc7355
6
+ metadata.gz: 1a14ee492493067731519de3aa0afa254382e0f2dac5b2a270463b79e58bcc9111638d8f0610e60b153caaa54113f3b4ed1c11e7c79fa122d800c441ef43e97e
7
+ data.tar.gz: 5ff692aacaa53010fbe17ac1f9f435c2ec9bec275554438b48de1c4feba41e9b4c70f7be857512757d648c3c93a2f4ef1d9875c887cde375398585a59b10a254
@@ -27,10 +27,6 @@ module Arproxy
27
27
  raise Arproxy::Error, "config.adapter must be set" unless @adapter
28
28
  case @adapter
29
29
  when String, Symbol
30
- camelized_adapter_name = @adapter.to_s.split("_").map(&:capitalize).join
31
- if camelized_adapter_name == "Sqlite3"
32
- camelized_adapter_name = "SQLite3"
33
- end
34
30
  eval "::ActiveRecord::ConnectionAdapters::#{camelized_adapter_name}Adapter"
35
31
  when Class
36
32
  @adapter
@@ -38,5 +34,20 @@ module Arproxy
38
34
  raise Arproxy::Error, "unexpected config.adapter: #{@adapter}"
39
35
  end
40
36
  end
37
+
38
+ private
39
+
40
+ def camelized_adapter_name
41
+ adapter_name = @adapter.to_s.split("_").map(&:capitalize).join
42
+
43
+ case adapter_name
44
+ when 'Sqlite3'
45
+ 'SQLite3'
46
+ when 'Sqlserver'
47
+ 'SQLServer'
48
+ else
49
+ adapter_name
50
+ end
51
+ end
41
52
  end
42
53
  end
@@ -1,3 +1,3 @@
1
1
  module Arproxy
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arproxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Issei Naruta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-14 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: 12.3.3
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: 12.3.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement