apartment 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50bc04fb2abdbb0df0af4569c5452b9afeff250f
4
- data.tar.gz: 3ba7ad62f8a6bc517e75d42e752a87786df87822
3
+ metadata.gz: 25a8f63a3b5e73c32fde8b9aa28f45dabaa44008
4
+ data.tar.gz: 789fc81fa177f663c4c78e3f46f492f0a55b60f9
5
5
  SHA512:
6
- metadata.gz: 02bd472cb4382a949ce4058359bfff9c6320b5f65d2d3d86a4bc0b34a25c81b9750d8a950a28df4d1ae32e691dd7441340b7136ae9d6bd48f8cf80f11d29a390
7
- data.tar.gz: 29a933a4e09c7e681d99bbd7bf44c0cd590a9c8b80dc9ed20b7bcafa11b61ce4dfd837896036e14ca31c5c4c8ef83b27dfb134ea9e09518855845d8c26970c6e
6
+ metadata.gz: 1af4150a26a832f33b80ab5099e4d625275861d2ed9815418a6243ec4c05e48b1d7abd85e12f750073d1f0753c5421b86c2f6fb5f4504e0d12ea934ca20ad1a8
7
+ data.tar.gz: 37cb6bc1da7d8bff326b11013e9bc789a1c0d265f255f1753094a560719ddbabc91ffd48b8afb77c5985bcc658ef1e7ce8f644c592113212ea4ef47b96865056
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.0.1
2
+ * April 28, 2015
3
+
4
+ - Fix `Apartment::Deprecation` which was rescuing all exceptions
5
+
1
6
  # 1.0.0
2
7
  * Feb 3, 2015
3
8
 
@@ -46,7 +46,7 @@ module Apartment
46
46
  # Reset current tenant to the default_tenant
47
47
  #
48
48
  def reset
49
- Apartment.connection.execute "use #{default_tenant}"
49
+ Apartment.connection.execute "use `#{default_tenant}`"
50
50
  end
51
51
 
52
52
  # Set the table_name to always use the default tenant for excluded models
@@ -62,7 +62,7 @@ module Apartment
62
62
  def connect_to_new(tenant)
63
63
  return reset if tenant.nil?
64
64
 
65
- Apartment.connection.execute "use #{environmentify(tenant)}"
65
+ Apartment.connection.execute "use `#{environmentify(tenant)}`"
66
66
 
67
67
  rescue ActiveRecord::StatementInvalid
68
68
  Apartment::Tenant.reset
@@ -1,13 +1,10 @@
1
+ require 'active_support/deprecation'
2
+
1
3
  module Apartment
2
4
  module Deprecation
3
5
 
4
6
  def self.warn(message)
5
- begin
6
- ActiveSupport::Deprecation.warn message
7
- rescue
8
- warn message
9
- end
7
+ ActiveSupport::Deprecation.warn message
10
8
  end
11
-
12
9
  end
13
- end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module Apartment
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
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: 1.0.0
4
+ version: 1.0.1
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: 2015-03-10 00:00:00.000000000 Z
12
+ date: 2015-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -339,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  version: '0'
340
340
  requirements: []
341
341
  rubyforge_project:
342
- rubygems_version: 2.4.3
342
+ rubygems_version: 2.4.6
343
343
  signing_key:
344
344
  specification_version: 4
345
345
  summary: A Ruby gem for managing database multitenancy