apartment 0.23.1 → 0.23.2

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
  SHA1:
3
- metadata.gz: 7a231a3932b1b2bd5718861c0f70201d7502d4dd
4
- data.tar.gz: 45ebf27d557562aaf6944b471fb5ea679f4b0d84
3
+ metadata.gz: b5d4ac99414fa53017af053bc0c2ad582a92a194
4
+ data.tar.gz: 822538642d3344ed4dd46839f0a003a5f67e2900
5
5
  SHA512:
6
- metadata.gz: d2b3e6efe7075333081133c60f96150ccb0227422545f669de98a8bf5db82bd971fa48a474448b3152238282c1201ec502bad5f16419fdbd4da985fa4aa30081
7
- data.tar.gz: b6d1f23c13731c723c566af5f9e77ef4116d75b031b689f8333ee2773cf56c36806b8a7d023e2302372d9eba01c3e04bd23383edd662e0ae18e9b7958cd875f1
6
+ metadata.gz: a2e83c0bfe6cb7e381d2232aea4bd77020df2fac80deda6ee3754fad54de3acc4d03cf30a38ec5092e0b99bbb25ac0888ac6c8d7a8884dfefb24f12342e243d8
7
+ data.tar.gz: b6f54b75336cdd0e6f565d0831240f6526aabd18882e770d924a1e4b0f5a7e222a8d65c76e9878c445ac9154c6241ea5ddddf9fcd497906e46e6949af3eb6458
data/HISTORY.md CHANGED
@@ -1,7 +1,13 @@
1
+ # 0 23.2
2
+ * January 9, 2014
3
+
4
+ - Increased visibility of #parse_database_name warning
5
+
1
6
  # 0.23.1
2
7
  * January 8, 2014
3
8
 
4
9
  - Schema adapters now initialize with default and persistent schemas
10
+ - Deprecated Apartment::Elevators#parse_database_name
5
11
 
6
12
  # 0.23.0
7
13
  * August 21, 2013
@@ -9,7 +9,7 @@ module Apartment
9
9
 
10
10
  def initialize(app, processor = nil)
11
11
  @app = app
12
- @processor = processor || method(:parse_tenant_name)
12
+ @processor = processor || parse_method
13
13
  end
14
14
 
15
15
  def call(env)
@@ -23,13 +23,26 @@ module Apartment
23
23
  end
24
24
 
25
25
  def parse_database_name(request)
26
- warn "[DEPRECATED] - Use #parse_tenant_name"
26
+ deprecation_warning
27
27
  parse_tenant_name(request)
28
28
  end
29
29
 
30
30
  def parse_tenant_name(request)
31
31
  raise "Override"
32
32
  end
33
+
34
+ def parse_method
35
+ if self.class.instance_methods(false).include? :parse_database_name
36
+ deprecation_warning
37
+ method(:parse_database_name)
38
+ else
39
+ method(:parse_tenant_name)
40
+ end
41
+ end
42
+
43
+ def deprecation_warning
44
+ warn "[DEPRECATED::Apartment] Use #parse_tenant_name instead of #parse_database_name -> #{self.class.name}"
45
+ end
33
46
  end
34
47
  end
35
48
  end
@@ -1,3 +1,3 @@
1
1
  module Apartment
2
- VERSION = "0.23.1"
2
+ VERSION = "0.23.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apartment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Brunner
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-08 00:00:00.000000000 Z
12
+ date: 2014-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord