landlady 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +8 -1
- data/landlady.gemspec +1 -1
- data/lib/landlady/version.rb +1 -1
- data/lib/tasks/tenants.rake +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmY3NzU1YzczZmRhYTY0ZTY5ZGQ5ZDZmZjFmOTY1YWE5MTlmNGE3Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODIxYjI0YWM2MTM5MmJjZDNjMTlhMGVhZTg3MTJmNDVmY2M4NjI3OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGE2OTc5NGQzMGExNDdiYjc3MGYxOTM2Zjk2OGRjMWIwMDc2ODBlMzNiNGFk
|
10
|
+
OTNiMDc3M2ZmMGJlZDRlM2VkY2JjYzQ3ZmJjOWViZDAwZTBlNmZjNjgxNzA1
|
11
|
+
Njk0OGExZWJkZGVhOGJmMjQxMmZhNzk5YTZlODBiYmZjN2ZiZWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGRiYjQyNjFhZmU3YmEwODYxODViOWY0YWI2OGVhMWQ2ODJlYWRkMzcwMGM3
|
14
|
+
YjI2MzJhMzI1NzE2YTg3MGFkOTk4ZmQyZTM0ZTAwNWNlZDc5NDFhZjQyZjli
|
15
|
+
ODA3MmNlYTFiYTlhMWE0MWY1MGIzZDJmMWZjNjRlNDg3YzE0MmI=
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Landlady
|
2
2
|
|
3
|
-
|
3
|
+
Super Easy Postgres Multitenancy
|
4
|
+
|
5
|
+
Using a subdomain mapping design pattern, Landlady takes advantage of PostgresQL SCHEMA_SEARCH_PATH and using naming conventions will map tenants with complete data segregation to the required data namespace.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -23,6 +25,11 @@ Then Install and run the migrations:
|
|
23
25
|
|
24
26
|
|
25
27
|
## Usage
|
28
|
+
Landlady uses
|
29
|
+
|
30
|
+
### Development Environments
|
31
|
+
Once you have Tenants set up, use something like lvh.me to map back to localhost
|
32
|
+
$ i.e. http://tenant1.lvh.me
|
26
33
|
|
27
34
|
### Tenant migrations
|
28
35
|
Landlady will set up Tenants, then because she is a good land lady will update each of the tenants with the required migrations with:
|
data/landlady.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Landlady::VERSION
|
9
9
|
spec.authors = ["Kym McInerney"]
|
10
10
|
spec.email = ["kym@holodigm.com.au"]
|
11
|
-
spec.description = %q{
|
11
|
+
spec.description = %q{Using a subdomain mapping design pattern, Landlady takes advantage of PostgresQL SCHEMA_SEARCH_PATH and using naming conventions will map tenants with complete data segregation to the required data namespace.}
|
12
12
|
spec.summary = %q{Super simple postgres multitenancy}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
data/lib/landlady/version.rb
CHANGED
data/lib/tasks/tenants.rake
CHANGED
@@ -6,7 +6,7 @@ namespace :tenants do
|
|
6
6
|
ActiveRecord::Migration.verbose = verbose
|
7
7
|
|
8
8
|
Tenant.all.each do |tenant|
|
9
|
-
puts "
|
9
|
+
puts "Migrating tenant #{tenant.id} (#{tenant.subdomain})"
|
10
10
|
Landlady.set_search_path tenant.id, false
|
11
11
|
version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
|
12
12
|
ActiveRecord::Migrator.migrate("db/migrate/", version)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: landlady
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kym McInerney
|
@@ -38,7 +38,9 @@ dependencies:
|
|
38
38
|
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description: Using a subdomain mapping design pattern, Landlady takes advantage of
|
42
|
+
PostgresQL SCHEMA_SEARCH_PATH and using naming conventions will map tenants with
|
43
|
+
complete data segregation to the required data namespace.
|
42
44
|
email:
|
43
45
|
- kym@holodigm.com.au
|
44
46
|
executables: []
|