leases 1.2.0 → 1.2.1

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: bb8fbe7ce60a87fdba0e7ea0ce8159420f150d69
4
- data.tar.gz: 975345ad77583f621310fe30cabf2d7ff3b61e06
3
+ metadata.gz: 269cce68fbbfdb7852db5617e041ed67536b5edc
4
+ data.tar.gz: a348df21a7b85ec80ece21a4f511d25aa33c2ccb
5
5
  SHA512:
6
- metadata.gz: f0ecf0a18ff3eced2ec6043bb459039df5b3334572e424ac1183fe9d0b806b4b11ed3af9df10562ce4a19cb89b1291cd9c7ca986e63218ae394cc9e5f7e225b8
7
- data.tar.gz: a6f4c00e62892417ccecc73c76f109cc165b7ebb560c148f75745b966fb58b28634b8e079ebde37cdb6aa97d26ba51e902ef4d13f8e3d86c44d730416ae99bf8
6
+ metadata.gz: f9d47f2a41686cdac8e4895138c5841a9235d6801318a7caf55175d1e3bb5883d1c1bf5354579445c01aed769e01a30126dec283c5ce36d8faad1ba4b5a161c6
7
+ data.tar.gz: d25899ac6e9d149f1d76698b19c61fadae2f0f14bbd72507cdc0bb9118c3ea7d8ff7aa4543039caa8b33c5014dbea6104cd768b0c5d24ea39c262cfbc2e1cfc9
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
5
4
  - 2.1.1
6
5
  - 2.2.1
@@ -17,4 +16,4 @@ matrix:
17
16
  allow_failures:
18
17
  - env: "RAILS_VERSION=master"
19
18
  - rvm: ruby-head
20
- fast_finish: true
19
+ fast_finish: true
data/README.md CHANGED
@@ -13,7 +13,6 @@ Database multi-tenancy for Rails.
13
13
 
14
14
  ## Supported Ruby versions
15
15
 
16
- - Ruby 1.9.3
17
16
  - Ruby 2.0.0
18
17
  - Ruby 2.1.1
19
18
  - Ruby 2.2.1
@@ -71,7 +71,7 @@ module Leases
71
71
  # account.enter
72
72
  #
73
73
  def enter
74
- Apartment::Tenant.switch(leaser_name)
74
+ Apartment::Tenant.switch!(leaser_name)
75
75
  Leases.current = self
76
76
  end
77
77
 
@@ -84,7 +84,7 @@ module Leases
84
84
  #
85
85
  def leave
86
86
  Leases.current = nil
87
- Apartment::Tenant.reset
87
+ Apartment::Tenant.switch!
88
88
  end
89
89
 
90
90
  ##
@@ -1,3 +1,3 @@
1
1
  module Leases
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -86,7 +86,7 @@ describe Leases::Model::Base do
86
86
 
87
87
  after(:each) { account.enter }
88
88
 
89
- it { Apartment::Tenant.should_receive(:switch).with(account.leaser_name) }
89
+ it { Apartment::Tenant.should_receive(:switch!).with(account.leaser_name) }
90
90
  it { Thread.current[:leaser].id.should == account.id }
91
91
 
92
92
  end
@@ -95,7 +95,7 @@ describe Leases::Model::Base do
95
95
 
96
96
  after(:each) { account.leave }
97
97
 
98
- it { Apartment::Tenant.should_receive(:reset) }
98
+ it { Apartment::Tenant.should_receive(:switch!).with() }
99
99
  it { Thread.current[:leaser].should == nil }
100
100
 
101
101
  end
data/spec/spec_helper.rb CHANGED
@@ -19,8 +19,7 @@ RSpec.configure do |config|
19
19
  Apartment.excluded_models = []
20
20
 
21
21
  # Stub Apartment database interactions
22
- Apartment::Tenant.stub(:switch)
23
- Apartment::Tenant.stub(:reset)
22
+ Apartment::Tenant.stub(:switch!)
24
23
  Apartment::Tenant.stub(:create)
25
24
  Apartment::Tenant.stub(:drop)
26
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leases
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arjen Oosterkamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-30 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler