iugusdk 1.0.0.alpha.0 → 1.0.0.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/iugu/account_controller.rb +3 -3
- data/app/controllers/iugu/account_domains_controller.rb +3 -3
- data/app/models/account.rb +1 -1
- data/app/models/user_invitation.rb +2 -0
- data/app/views/iugu/account_domains/index.html.haml +1 -2
- data/app/views/iugu/account_domains/instructions.html.haml +4 -0
- data/app/views/iugu/account_users/index.html.haml +2 -5
- data/config/locales/iugu.en.yml +4 -0
- data/config/locales/iugu.pt-BR.yml +4 -0
- data/lib/iugusdk/version.rb +1 -1
- data/spec/controllers/account_controller_spec.rb +8 -1
- data/spec/controllers/account_domains_controller_spec.rb +2 -4
- data/spec/dummy/log/development.log +104 -0
- data/spec/dummy/log/test.log +13269 -0
- data/spec/fabricators/social_account_fabricator.rb +1 -1
- data/spec/fabricators/user_invitation_fabricator.rb +1 -1
- data/spec/models/user_invitation_spec.rb +3 -7
- data/spec/requests/account_domain_spec.rb +1 -1
- data/spec/requests/account_users_spec.rb +1 -1
- data/spec/requests/user_invitation_spec.rb +3 -1
- metadata +74 -70
@@ -25,7 +25,7 @@ class Iugu::AccountController < Iugu::AccountSettingsController
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
rescue
|
28
|
-
notice = "
|
28
|
+
notice = I18n.t("iugu.notices.account_not_found")
|
29
29
|
end
|
30
30
|
redirect_to(account_settings_path, :notice => notice)
|
31
31
|
end
|
@@ -35,7 +35,7 @@ class Iugu::AccountController < Iugu::AccountSettingsController
|
|
35
35
|
current_user.accounts.find(params[:id]).cancel_destruction if params[:id]
|
36
36
|
notice = I18n.t("iugu.account_destruction_undone")
|
37
37
|
rescue
|
38
|
-
notice = "
|
38
|
+
notice = I18n.t("iugu.notices.account_not_found")
|
39
39
|
end
|
40
40
|
redirect_to(account_settings_path, :notice => notice)
|
41
41
|
end
|
@@ -49,7 +49,7 @@ class Iugu::AccountController < Iugu::AccountSettingsController
|
|
49
49
|
begin
|
50
50
|
@account = Account.find(params[:id])
|
51
51
|
@account.update_attributes(params[:account])
|
52
|
-
redirect_to
|
52
|
+
redirect_to account_view_path(params[:id]), :notice => I18n.t("iugu.notices.account_updated")
|
53
53
|
rescue
|
54
54
|
raise ActionController::RoutingError.new('Not Found')
|
55
55
|
end
|
@@ -8,8 +8,8 @@ class Iugu::AccountDomainsController < Iugu::AccountSettingsController
|
|
8
8
|
|
9
9
|
def create
|
10
10
|
@account = current_user.accounts.find(params[:account_id])
|
11
|
-
if @account.account_domains << AccountDomain.create(params[:account_domain])
|
12
|
-
redirect_to
|
11
|
+
if @account.account_domains << @domain = AccountDomain.create(params[:account_domain])
|
12
|
+
redirect_to account_domains_instructions_path(:account_id => params[:account_id], :domain_id => @domain.id)#, :notice => notice = I18n.t("iugu.notices.domain_created")
|
13
13
|
else
|
14
14
|
render :index
|
15
15
|
end
|
@@ -43,7 +43,7 @@ class Iugu::AccountDomainsController < Iugu::AccountSettingsController
|
|
43
43
|
if @domain.verify
|
44
44
|
redirect_to account_domains_index_path(params[:account_id]), :notice => I18n.t("iugu.notices.domain_verified")
|
45
45
|
else
|
46
|
-
redirect_to
|
46
|
+
redirect_to account_domains_instructions_path(:account_id => params[:account_id], :domain_id => params[:domain_id]), :notice => I18n.t("iugu.notices.domain_not_verified")
|
47
47
|
end
|
48
48
|
rescue
|
49
49
|
redirect_to account_domains_index_path(params[:account_id]), :notice => I18n.t("iugu.notices.domain_not_found")
|
data/app/models/account.rb
CHANGED
@@ -7,7 +7,7 @@ class Account < ActiveRecord::Base
|
|
7
7
|
handle_asynchronously :destroy, :queue => Proc.new { |p| "account_#{p.id}_destroy" },
|
8
8
|
:run_at => Proc.new { DateTime.now + IuguSDK::delay_account_exclusion }
|
9
9
|
|
10
|
-
validates :subdomain, :uniqueness => true
|
10
|
+
validates :subdomain, :uniqueness => true, :unless => Proc.new { |a| a.subdomain.blank? }
|
11
11
|
validate :subdomain_blacklist
|
12
12
|
|
13
13
|
def self.get_from_domain(domain)
|
@@ -4,6 +4,8 @@ class UserInvitation < ActiveRecord::Base
|
|
4
4
|
before_create :set_sent_at
|
5
5
|
after_create :send_email
|
6
6
|
|
7
|
+
belongs_to :account
|
8
|
+
|
7
9
|
def self.find_by_invitation_token(invitation_token)
|
8
10
|
begin
|
9
11
|
user_invitation = UserInvitation.find(id = invitation_token.gsub(/.{27}$/, ''))
|
@@ -22,8 +22,7 @@
|
|
22
22
|
- if domain.verified
|
23
23
|
= I18n.t("iugu.verified")
|
24
24
|
- else
|
25
|
-
= I18n.t("iugu.not_verified")
|
26
|
-
= link_to I18n.t("iugu.instructions"), account_domains_instructions_path(:account_id => @account.id, :domain_id => domain.id)
|
25
|
+
= link_to I18n.t("iugu.not_verified"), account_domains_instructions_path(:account_id => @account.id, :domain_id => domain.id)
|
27
26
|
|
28
27
|
- if current_user.is?(:owner, @account)
|
29
28
|
|
|
@@ -16,8 +16,5 @@
|
|
16
16
|
= I18n.t("iugu.removing")
|
17
17
|
- else
|
18
18
|
= link_to I18n.t("iugu.undo"), account_users_cancel_destruction_path(:account_id => account_user.account_id, :user_id => account_user.user_id), :method => 'delete'
|
19
|
-
|
20
|
-
|
21
|
-
%br
|
22
|
-
%div
|
23
|
-
= link_to I18n.t("iugu.invite"), new_invite_path(:account_id => @account.id)
|
19
|
+
%div
|
20
|
+
= link_to I18n.t("iugu.invite"), new_invite_path(:account_id => @account.id)
|
data/config/locales/iugu.en.yml
CHANGED
@@ -58,8 +58,12 @@ en:
|
|
58
58
|
set_primary: "Set Primary"
|
59
59
|
verified: "Verified"
|
60
60
|
not_verified: "Not Verified"
|
61
|
+
verify_domain: "Verify Domain"
|
62
|
+
verify_later: "Verify later"
|
61
63
|
instructions: "Instructions"
|
62
64
|
notices:
|
65
|
+
account_updated: "Account was successfully updated"
|
66
|
+
account_not_found: "Account not found"
|
63
67
|
user_invited: "User invited"
|
64
68
|
sign_up: "Thank you for signing up"
|
65
69
|
user_update: "User was successfully updated."
|
@@ -58,8 +58,12 @@ pt-BR:
|
|
58
58
|
set_primary: "Setar primario"
|
59
59
|
verified: "Verificado"
|
60
60
|
not_verified: "Não Verificado"
|
61
|
+
verify_domain: "Verificar Dominio"
|
62
|
+
verify_later: "Verificar depois"
|
61
63
|
instructions: "Instruções"
|
62
64
|
notices:
|
65
|
+
account_updated: "Conta atualizada com sucesso."
|
66
|
+
account_not_found: "Conta não encontrada"
|
63
67
|
user_invited: "Usuário convidado"
|
64
68
|
sign_up: "Obrigado por se cadastrar."
|
65
69
|
user_update: "Seus dados foram atualizados."
|
data/lib/iugusdk/version.rb
CHANGED
@@ -47,13 +47,15 @@ describe Iugu::AccountController do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
context "when using
|
50
|
+
context "when using wrong id" do
|
51
51
|
before do
|
52
52
|
get :destroy, :id => 31241
|
53
53
|
end
|
54
54
|
|
55
55
|
it { response.should redirect_to account_settings_path }
|
56
56
|
|
57
|
+
it { flash.now[:notice].should == I18n.t("iugu.notices.account_not_found") }
|
58
|
+
|
57
59
|
end
|
58
60
|
|
59
61
|
context "when user is not the owner" do
|
@@ -101,6 +103,8 @@ describe Iugu::AccountController do
|
|
101
103
|
|
102
104
|
it { response.should redirect_to account_settings_path }
|
103
105
|
|
106
|
+
it { flash.now[:notice].should == I18n.t("iugu.notices.account_not_found") }
|
107
|
+
|
104
108
|
end
|
105
109
|
end
|
106
110
|
|
@@ -122,6 +126,9 @@ describe Iugu::AccountController do
|
|
122
126
|
|
123
127
|
it { response.should redirect_to account_view_path(@user.accounts.first.id) }
|
124
128
|
|
129
|
+
it { flash.now[:notice].should == I18n.t("iugu.notices.account_updated") }
|
130
|
+
|
131
|
+
|
125
132
|
it 'should update account name' do
|
126
133
|
@user.accounts.first.name.should == "fudum"
|
127
134
|
end
|
@@ -19,9 +19,7 @@ describe Iugu::AccountDomainsController do
|
|
19
19
|
post :create, :account_id => @account.id, :account_domain => { :url => "new.test.net" }
|
20
20
|
end
|
21
21
|
|
22
|
-
it { response.should redirect_to
|
23
|
-
|
24
|
-
it { flash.now[:notice].should == I18n.t("iugu.notices.domain_created") }
|
22
|
+
it { response.should redirect_to account_domains_instructions_path(@account.id, AccountDomain.last.id) }
|
25
23
|
|
26
24
|
context "without required fields" do
|
27
25
|
before(:each) do
|
@@ -120,7 +118,7 @@ describe Iugu::AccountDomainsController do
|
|
120
118
|
get :verify, :account_id => @account.id, :domain_id => @domain.id
|
121
119
|
end
|
122
120
|
|
123
|
-
it { response.should redirect_to
|
121
|
+
it { response.should redirect_to account_domains_instructions_path(@account.id, @domain.id) }
|
124
122
|
|
125
123
|
it { flash.now[:notice].should == I18n.t("iugu.notices.domain_not_verified") }
|
126
124
|
|
@@ -0,0 +1,104 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.3ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
3
|
+
[1m[35m (81.1ms)[0m DROP DATABASE IF EXISTS `iugusdk_test`
|
4
|
+
[1m[36m (0.2ms)[0m [1mCREATE DATABASE `iugusdk_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`[0m
|
5
|
+
[1m[35m (79.4ms)[0m CREATE TABLE `account_domains` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `account_id` int(11), `url` varchar(255), `verified` tinyint(1), `primary` tinyint(1)) ENGINE=InnoDB
|
6
|
+
[1m[36m (227.3ms)[0m [1mCREATE TABLE `account_roles` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `account_user_id` int(11)) ENGINE=InnoDB[0m
|
7
|
+
[1m[35m (151.2ms)[0m CREATE TABLE `account_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `account_id` int(11), `user_id` int(11)) ENGINE=InnoDB
|
8
|
+
[1m[36m (173.3ms)[0m [1mCREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `name` varchar(255), `subscription_id` int(11), `subdomain` varchar(255)) ENGINE=InnoDB[0m
|
9
|
+
[1m[35m (79.1ms)[0m CREATE TABLE `delayed_jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `priority` int(11) DEFAULT 0, `attempts` int(11) DEFAULT 0, `handler` text, `last_error` text, `run_at` datetime, `locked_at` datetime, `failed_at` datetime, `locked_by` varchar(255), `queue` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
|
10
|
+
[1m[36m (186.2ms)[0m [1mCREATE INDEX `delayed_jobs_priority` ON `delayed_jobs` (`priority`, `run_at`)[0m
|
11
|
+
[1m[35m (120.2ms)[0m CREATE TABLE `social_accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `social_id` int(11), `user_id` int(11), `provider` varchar(255), `token` varchar(255), `secret` varchar(255)) ENGINE=InnoDB
|
12
|
+
[1m[36m (164.0ms)[0m [1mCREATE TABLE `user_invitations` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `invited_by` int(11), `email` varchar(255), `sent_at` datetime, `account_id` int(11), `token` varchar(255), `roles` varchar(255)) ENGINE=InnoDB[0m
|
13
|
+
[1m[35m (125.3ms)[0m CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255) DEFAULT '' NOT NULL, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `reset_password_token` varchar(255), `reset_password_sent_at` datetime, `remember_created_at` datetime, `confirmation_token` varchar(255), `confirmed_at` datetime, `confirmation_sent_at` datetime, `unconfirmed_email` varchar(255), `created_at` datetime, `updated_at` datetime, `birthdate` date, `name` varchar(255), `locale` varchar(255)) ENGINE=InnoDB
|
14
|
+
[1m[36m (188.6ms)[0m [1mCREATE UNIQUE INDEX `index_users_on_confirmation_token` ON `users` (`confirmation_token`)[0m
|
15
|
+
[1m[35m (108.9ms)[0m CREATE INDEX `index_users_on_email` ON `users` (`email`)
|
16
|
+
[1m[36m (132.2ms)[0m [1mCREATE UNIQUE INDEX `index_users_on_reset_password_token` ON `users` (`reset_password_token`)[0m
|
17
|
+
[1m[35m (176.2ms)[0m CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
|
18
|
+
[1m[36m (169.6ms)[0m [1mCREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)[0m
|
19
|
+
[1m[35m (0.1ms)[0m SELECT version FROM `schema_migrations`
|
20
|
+
[1m[36m (1.4ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120719162426')[0m
|
21
|
+
Connecting to database specified by database.yml
|
22
|
+
[1m[36m (83.8ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
23
|
+
[1m[35m (268.8ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
24
|
+
[1m[36m (0.2ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
25
|
+
Migrating to CreateAccount (20120528164634)
|
26
|
+
[1m[35m (97.7ms)[0m CREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
|
27
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120528164634')[0m
|
28
|
+
Migrating to AddDeviseToUsers (20120529134109)
|
29
|
+
[1m[35m (152.1ms)[0m CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255) DEFAULT '' NOT NULL, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `reset_password_token` varchar(255), `reset_password_sent_at` datetime, `remember_created_at` datetime, `confirmation_token` varchar(255), `confirmed_at` datetime, `confirmation_sent_at` datetime, `unconfirmed_email` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
|
30
|
+
[1m[36m (129.8ms)[0m [1mCREATE UNIQUE INDEX `index_users_on_email` ON `users` (`email`)[0m
|
31
|
+
[1m[35m (111.3ms)[0m CREATE UNIQUE INDEX `index_users_on_reset_password_token` ON `users` (`reset_password_token`)
|
32
|
+
[1m[36m (117.0ms)[0m [1mCREATE UNIQUE INDEX `index_users_on_confirmation_token` ON `users` (`confirmation_token`)[0m
|
33
|
+
[1m[35m (1.4ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120529134109')
|
34
|
+
Migrating to AddBirthdateAndNameToUser (20120529162901)
|
35
|
+
[1m[36m (145.8ms)[0m [1mALTER TABLE `users` ADD `birthdate` date[0m
|
36
|
+
[1m[35m (151.3ms)[0m ALTER TABLE `users` ADD `name` varchar(255)
|
37
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120529162901')[0m
|
38
|
+
Migrating to AddNameAndSubscriptionIdAndUserIdToAccount (20120529174755)
|
39
|
+
[1m[35m (106.1ms)[0m ALTER TABLE `accounts` ADD `name` varchar(255)
|
40
|
+
[1m[36m (124.4ms)[0m [1mALTER TABLE `accounts` ADD `subscription_id` int(11)[0m
|
41
|
+
[1m[35m (99.8ms)[0m ALTER TABLE `accounts` ADD `user_id` int(11)
|
42
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120529174755')[0m
|
43
|
+
Migrating to CreateAccountUsers (20120529180814)
|
44
|
+
[1m[35m (124.5ms)[0m CREATE TABLE `account_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `account_id` int(11), `user_id` int(11)) ENGINE=InnoDB
|
45
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120529180814')[0m
|
46
|
+
Migrating to RemoveUserIdFromAccounts (20120530114709)
|
47
|
+
[1m[35m (119.3ms)[0m ALTER TABLE `accounts` DROP `user_id`
|
48
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120530114709')[0m
|
49
|
+
Migrating to CreateAccountRoles (20120531171438)
|
50
|
+
[1m[35m (119.0ms)[0m CREATE TABLE `account_roles` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `account_user_id` int(11)) ENGINE=InnoDB
|
51
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120531171438')[0m
|
52
|
+
Migrating to AddLocaleToUser (20120604131034)
|
53
|
+
[1m[35m (114.9ms)[0m ALTER TABLE `users` ADD `locale` varchar(255)
|
54
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120604131034')[0m
|
55
|
+
Migrating to CreateSocialAccount (20120605142527)
|
56
|
+
[1m[35m (94.3ms)[0m CREATE TABLE `social_accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `social_id` int(11), `user_id` int(11), `provider` varchar(255), `token` varchar(255), `secret` varchar(255)) ENGINE=InnoDB
|
57
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120605142527')[0m
|
58
|
+
Migrating to SetLocale (20120612141130)
|
59
|
+
[1m[35mSQL (0.3ms)[0m UPDATE `users` SET locale = 'en' WHERE `users`.`locale` IS NULL
|
60
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120612141130')[0m
|
61
|
+
Migrating to RemoveUniqueFromUserEmail (20120613173114)
|
62
|
+
[1m[35m (95.9ms)[0m DROP INDEX `index_users_on_email` ON `users`
|
63
|
+
[1m[36m (162.1ms)[0m [1mCREATE INDEX `index_users_on_email` ON `users` (`email`)[0m
|
64
|
+
[1m[35m (0.6ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20120613173114')
|
65
|
+
Migrating to CreateDelayedJobs (20120615180728)
|
66
|
+
[1m[36m (95.0ms)[0m [1mCREATE TABLE `delayed_jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `priority` int(11) DEFAULT 0, `attempts` int(11) DEFAULT 0, `handler` text, `last_error` text, `run_at` datetime, `locked_at` datetime, `failed_at` datetime, `locked_by` varchar(255), `queue` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB[0m
|
67
|
+
[1m[35m (181.6ms)[0m CREATE INDEX `delayed_jobs_priority` ON `delayed_jobs` (`priority`, `run_at`)
|
68
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120615180728')[0m
|
69
|
+
Migrating to CreateUserInvitations (20120629154429)
|
70
|
+
[1m[35m (182.3ms)[0m CREATE TABLE `user_invitations` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `invited_by` int(11), `email` varchar(255), `sent_at` datetime, `account_id` int(11)) ENGINE=InnoDB
|
71
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120629154429')[0m
|
72
|
+
Migrating to AddTokenToUserInvitations (20120629195345)
|
73
|
+
[1m[35m (155.6ms)[0m ALTER TABLE `user_invitations` ADD `token` varchar(255)
|
74
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120629195345')[0m
|
75
|
+
Migrating to AddRolesToUserInvitations (20120705202827)
|
76
|
+
[1m[35m (94.5ms)[0m ALTER TABLE `user_invitations` ADD `roles` varchar(255)
|
77
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120705202827')[0m
|
78
|
+
Migrating to CreateAccountDomain (20120716145846)
|
79
|
+
[1m[35m (127.2ms)[0m CREATE TABLE `account_domains` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `account_id` int(11), `url` varchar(255), `verified` tinyint(1), `primary` tinyint(1)) ENGINE=InnoDB
|
80
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120716145846')[0m
|
81
|
+
Migrating to AddSubdomainToAccount (20120719162426)
|
82
|
+
[1m[35m (115.4ms)[0m ALTER TABLE `accounts` ADD `subdomain` varchar(255)
|
83
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20120719162426')[0m
|
84
|
+
[1m[35m (0.2ms)[0m SELECT `schema_migrations`.`version` FROM `schema_migrations`
|
85
|
+
Connecting to database specified by database.yml
|
86
|
+
[1m[36m (0.2ms)[0m [1mSELECT `schema_migrations`.`version` FROM `schema_migrations` [0m
|
87
|
+
[1m[35m (0.4ms)[0m DROP DATABASE IF EXISTS `iugusdk_test`
|
88
|
+
[1m[36m (0.2ms)[0m [1mCREATE DATABASE `iugusdk_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`[0m
|
89
|
+
[1m[35m (54.8ms)[0m CREATE TABLE `account_domains` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `account_id` int(11), `url` varchar(255), `verified` tinyint(1), `primary` tinyint(1)) ENGINE=InnoDB
|
90
|
+
[1m[36m (257.1ms)[0m [1mCREATE TABLE `account_roles` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `account_user_id` int(11)) ENGINE=InnoDB[0m
|
91
|
+
[1m[35m (106.9ms)[0m CREATE TABLE `account_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `account_id` int(11), `user_id` int(11)) ENGINE=InnoDB
|
92
|
+
[1m[36m (117.9ms)[0m [1mCREATE TABLE `accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `name` varchar(255), `subscription_id` int(11), `subdomain` varchar(255)) ENGINE=InnoDB[0m
|
93
|
+
[1m[35m (138.2ms)[0m CREATE TABLE `delayed_jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `priority` int(11) DEFAULT 0, `attempts` int(11) DEFAULT 0, `handler` text, `last_error` text, `run_at` datetime, `locked_at` datetime, `failed_at` datetime, `locked_by` varchar(255), `queue` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
|
94
|
+
[1m[36m (117.6ms)[0m [1mCREATE INDEX `delayed_jobs_priority` ON `delayed_jobs` (`priority`, `run_at`)[0m
|
95
|
+
[1m[35m (170.1ms)[0m CREATE TABLE `social_accounts` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `social_id` int(11), `user_id` int(11), `provider` varchar(255), `token` varchar(255), `secret` varchar(255)) ENGINE=InnoDB
|
96
|
+
[1m[36m (164.0ms)[0m [1mCREATE TABLE `user_invitations` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `invited_by` int(11), `email` varchar(255), `sent_at` datetime, `account_id` int(11), `token` varchar(255), `roles` varchar(255)) ENGINE=InnoDB[0m
|
97
|
+
[1m[35m (115.6ms)[0m CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255) DEFAULT '' NOT NULL, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `reset_password_token` varchar(255), `reset_password_sent_at` datetime, `remember_created_at` datetime, `confirmation_token` varchar(255), `confirmed_at` datetime, `confirmation_sent_at` datetime, `unconfirmed_email` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `birthdate` date, `name` varchar(255), `locale` varchar(255)) ENGINE=InnoDB
|
98
|
+
[1m[36m (123.5ms)[0m [1mCREATE UNIQUE INDEX `index_users_on_confirmation_token` ON `users` (`confirmation_token`)[0m
|
99
|
+
[1m[35m (133.4ms)[0m CREATE INDEX `index_users_on_email` ON `users` (`email`)
|
100
|
+
[1m[36m (148.4ms)[0m [1mCREATE UNIQUE INDEX `index_users_on_reset_password_token` ON `users` (`reset_password_token`)[0m
|
101
|
+
[1m[35m (134.7ms)[0m CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
|
102
|
+
[1m[36m (128.7ms)[0m [1mCREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)[0m
|
103
|
+
[1m[35m (0.1ms)[0m SELECT version FROM `schema_migrations`
|
104
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120719162426')[0m
|