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 +4 -4
- data/.travis.yml +1 -2
- data/README.md +0 -1
- data/lib/leases/model/base.rb +2 -2
- data/lib/leases/version.rb +1 -1
- data/spec/leases/model/base_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 269cce68fbbfdb7852db5617e041ed67536b5edc
|
4
|
+
data.tar.gz: a348df21a7b85ec80ece21a4f511d25aa33c2ccb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9d47f2a41686cdac8e4895138c5841a9235d6801318a7caf55175d1e3bb5883d1c1bf5354579445c01aed769e01a30126dec283c5ce36d8faad1ba4b5a161c6
|
7
|
+
data.tar.gz: d25899ac6e9d149f1d76698b19c61fadae2f0f14bbd72507cdc0bb9118c3ea7d8ff7aa4543039caa8b33c5014dbea6104cd768b0c5d24ea39c262cfbc2e1cfc9
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/lib/leases/model/base.rb
CHANGED
@@ -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.
|
87
|
+
Apartment::Tenant.switch!
|
88
88
|
end
|
89
89
|
|
90
90
|
##
|
data/lib/leases/version.rb
CHANGED
@@ -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(:
|
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.
|
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:
|
11
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|