multitenant 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/lib/multitenant.rb +1 -1
- data/lib/multitenant/version.rb +1 -1
- data/multitenant.gemspec +3 -2
- data/spec/multitenant_spec.rb +0 -1
- metadata +25 -10
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use ree-1.8.7-2011.03@multitenant --create
|
data/lib/multitenant.rb
CHANGED
@@ -25,7 +25,7 @@ module Multitenant
|
|
25
25
|
m.send "#{association}=".to_sym, Multitenant.current_tenant
|
26
26
|
}, :on => :create
|
27
27
|
default_scope lambda {
|
28
|
-
where({reflection.
|
28
|
+
where({reflection.foreign_key => Multitenant.current_tenant.id}) if Multitenant.current_tenant
|
29
29
|
}
|
30
30
|
end
|
31
31
|
end
|
data/lib/multitenant/version.rb
CHANGED
data/multitenant.gemspec
CHANGED
@@ -14,9 +14,10 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "multitenant"
|
16
16
|
|
17
|
-
s.add_dependency(%q<activerecord>, ['
|
17
|
+
s.add_dependency(%q<activerecord>, ['>= 3.1'])
|
18
18
|
s.add_development_dependency(%q<sqlite3>, ["~> 1.3.3"])
|
19
|
-
s.add_development_dependency(%q<rspec>, ['~>2.6.0'])
|
19
|
+
s.add_development_dependency(%q<rspec>, ['~> 2.6.0'])
|
20
|
+
s.add_development_dependency(%q<rspec-core>, ['~> 2.6.4'])
|
20
21
|
|
21
22
|
s.files = `git ls-files`.split("\n")
|
22
23
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/spec/multitenant_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multitenant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 4
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-31 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activerecord
|
@@ -23,15 +23,13 @@ dependencies:
|
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 5
|
29
29
|
segments:
|
30
30
|
- 3
|
31
31
|
- 1
|
32
|
-
|
33
|
-
- 1
|
34
|
-
version: 3.1.rc1
|
32
|
+
version: "3.1"
|
35
33
|
type: :runtime
|
36
34
|
version_requirements: *id001
|
37
35
|
- !ruby/object:Gem::Dependency
|
@@ -66,6 +64,22 @@ dependencies:
|
|
66
64
|
version: 2.6.0
|
67
65
|
type: :development
|
68
66
|
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec-core
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 31
|
76
|
+
segments:
|
77
|
+
- 2
|
78
|
+
- 6
|
79
|
+
- 4
|
80
|
+
version: 2.6.4
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id004
|
69
83
|
description: never let an unscoped Model.all accidentally leak data to an unintended audience.
|
70
84
|
email:
|
71
85
|
- ryan@codecrate.com
|
@@ -79,6 +93,7 @@ files:
|
|
79
93
|
- .document
|
80
94
|
- .gitignore
|
81
95
|
- .rspec
|
96
|
+
- .rvmrc
|
82
97
|
- Gemfile
|
83
98
|
- LICENSE.txt
|
84
99
|
- README.rdoc
|
@@ -118,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
133
|
requirements: []
|
119
134
|
|
120
135
|
rubyforge_project: multitenant
|
121
|
-
rubygems_version: 1.8.
|
136
|
+
rubygems_version: 1.8.5
|
122
137
|
signing_key:
|
123
138
|
specification_version: 3
|
124
139
|
summary: scope database queries to current tenant
|