milia 0.3.16 → 0.3.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/registrations_controller.rb +18 -14
- data/milia.gemspec +1 -1
- metadata +20 -20
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.17
|
@@ -21,23 +21,27 @@ module Milia
|
|
21
21
|
|
22
22
|
# if verify_recaptcha # ?? does this need: :model => resource ??
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
Tenant.transaction do
|
25
|
+
@tenant = Tenant.create_new_tenant(params)
|
26
|
+
if @tenant.errors.empty? # tenant created
|
27
|
+
|
28
|
+
initiate_tenant( @tenant ) # first time stuff for new tenant
|
29
|
+
|
30
|
+
super # devise resource(user) creation; sets resource
|
31
|
+
|
32
|
+
if resource.errors.empty?
|
33
|
+
StartupJob.queue_startup(@tenant, resource, params[:coupon])
|
34
|
+
# w/o background task: Tenant.tenant_signup(resource, @tenant,params[:coupon])
|
35
|
+
else # user creation failed; force tenant rollback
|
36
|
+
raise ActiveRecord::Rollback # force the tenant transaction to be rolled back
|
37
|
+
end
|
29
38
|
|
30
|
-
if resource.errors.empty?
|
31
|
-
# w/o background task: Tenant.tenant_signup(resource, @tenant,params[:coupon])
|
32
|
-
StartupJob.queue_startup(@tenant, resource, params[:coupon])
|
33
39
|
else
|
34
|
-
@
|
35
|
-
|
40
|
+
@user = User.new(params[:user])
|
41
|
+
render 'home/new'
|
42
|
+
end # if .. then .. else no tenant errors
|
36
43
|
|
37
|
-
|
38
|
-
@user = User.new(params[:user])
|
39
|
-
render 'home/new'
|
40
|
-
end
|
44
|
+
end # wrap tenant/user creation in a transaction
|
41
45
|
|
42
46
|
# else
|
43
47
|
# flash[:error] = "Recaptcha code error; please re-enter the code and click submit again"
|
data/milia.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: milia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &71751250 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *71751250
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: devise
|
27
|
-
requirement: &
|
27
|
+
requirement: &71750560 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.4.8
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *71750560
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: pg
|
38
|
-
requirement: &
|
38
|
+
requirement: &71749870 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *71749870
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: shoulda
|
49
|
-
requirement: &
|
49
|
+
requirement: &71749430 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *71749430
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70804820 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70804820
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: jeweler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70803630 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.6.4
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70803630
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rcov
|
82
|
-
requirement: &
|
82
|
+
requirement: &70802920 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70802920
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rdoc
|
93
|
-
requirement: &
|
93
|
+
requirement: &70801970 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70801970
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: turn
|
104
|
-
requirement: &
|
104
|
+
requirement: &70801450 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70801450
|
113
113
|
description: Transparent Multi-tenanting for hosted Rails 3.1+/Ruby 1.9.2 applications
|
114
114
|
email: dsaronin@gmail.com
|
115
115
|
executables: []
|
@@ -237,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
segments:
|
239
239
|
- 0
|
240
|
-
hash:
|
240
|
+
hash: 463425869
|
241
241
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
242
|
none: false
|
243
243
|
requirements:
|