Skip to content

Commit

Permalink
updated dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradpotts committed Apr 28, 2017
1 parent 6aed21f commit 46591e7
Show file tree
Hide file tree
Showing 53 changed files with 95 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
repo_token: kpgz89M6PBaeNuamOJr9YaTmxDlRhVJQG
repo_token: kpgz89M6PBaeNuamOJr9YaTmxDlRhVJQG
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec/testapp/db/*.sqlite3-journal
spec/testapp/log/*.log
spec/testapp/tmp/

.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--color
--require spec_helper
--require spec_helper
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
source 'https://rubygems.org'
gemspec
gemspec
39 changes: 19 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ PATH
jquery-rails (~> 4.3, >= 4.3.1)
jquery-ui-rails (~> 6.0, >= 6.0.1)
multi_json (~> 1.12, >= 1.12.1)
oj (~> 2.18, >= 2.18.5)
paper_trail (~> 7.0, >= 7.0.1)
oj (~> 3.0, >= 3.0.2)
paper_trail (~> 7.0, >= 7.0.2)
pg (~> 0.20.0)
phcadmin3 (~> 2.1, >= 2.1.2)
phcnotifi (~> 4.1, >= 4.1.2)
phctitleseo (~> 5.1, >= 5.1.2)
phcadmin3 (~> 2.1, >= 2.1.4)
phcnotifi (~> 4.1, >= 4.1.4)
phctitleseo (~> 5.1, >= 5.1.4)
rabl (~> 0.13.1)
rails (~> 5.0, >= 5.0.2)
responders (~> 2.3)
Expand Down Expand Up @@ -125,8 +125,8 @@ GEM
ffi (1.9.18)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
globalid (0.3.7)
activesupport (>= 4.1.0)
globalid (0.4.0)
activesupport (>= 4.2.0)
gravtastic (3.2.6)
houser (2.0.0)
rack
Expand All @@ -147,58 +147,57 @@ GEM
launchy (~> 2.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mail (2.6.5)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
money (6.8.3)
money (6.9.0)
i18n (>= 0.6.4, < 0.9)
sixarm_ruby_unaccent (>= 1.1.1, < 2)
multi_json (1.12.1)
netrc (0.11.0)
nio4r (2.0.0)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
oj (2.18.5)
paper_trail (7.0.1)
oj (3.0.2)
paper_trail (7.0.2)
activerecord (>= 4.0, < 5.2)
request_store (~> 1.1)
pg (0.20.0)
phcadmin3 (2.1.2)
phcadmin3 (2.1.4)
bootstrap-sass (~> 3.3, >= 3.3.7)
country_select (~> 3.0)
font-awesome-rails (~> 4.7, >= 4.7.0.1)
gravtastic (~> 3.2, >= 3.2.6)
jquery-rails (~> 4.3, >= 4.3.1)
jquery-ui-rails (~> 6.0, >= 6.0.1)
paper_trail (~> 7.0, >= 7.0.1)
paper_trail (~> 7.0, >= 7.0.2)
pg (~> 0.20.0)
rails (~> 5.0, >= 5.0.2)
sass-rails (~> 5.0, >= 5.0.6)
tinymce-rails (~> 4.5, >= 4.5.6)
phcnotifi (4.1.2)
phcnotifi (4.1.4)
bootstrap-sass (~> 3.3, >= 3.3.7)
country_select (~> 3.0)
font-awesome-rails (~> 4.7, >= 4.7.0.1)
gravtastic (~> 3.2, >= 3.2.6)
jquery-rails (~> 4.3, >= 4.3.1)
jquery-ui-rails (~> 6.0, >= 6.0.1)
paper_trail (~> 7.0, >= 7.0.1)
paper_trail (~> 7.0, >= 7.0.2)
pg (~> 0.20.0)
rails (~> 5.0, >= 5.0.2)
sass-rails (~> 5.0, >= 5.0.6)
phctitleseo (5.1.2)
phctitleseo (5.1.4)
bootstrap-sass (~> 3.3, >= 3.3.7)
country_select (~> 3.0)
font-awesome-rails (~> 4.7, >= 4.7.0.1)
gravtastic (~> 3.2, >= 3.2.6)
jquery-rails (~> 4.3, >= 4.3.1)
jquery-ui-rails (~> 6.0, >= 6.0.1)
paper_trail (~> 7.0, >= 7.0.1)
paper_trail (~> 7.0, >= 7.0.2)
pg (~> 0.20.0)
rails (~> 5.0, >= 5.0.2)
sass-rails (~> 5.0, >= 5.0.6)
Expand Down Expand Up @@ -235,7 +234,7 @@ GEM
request_store (1.3.2)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rest-client (2.0.1)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
Expand Down Expand Up @@ -295,7 +294,7 @@ GEM
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.3)
unf_ext (0.0.7.4)
unicode_utils (1.4.0)
warden (1.2.7)
rack (>= 1.0)
Expand Down
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
[![Dependency Status](https://gemnasium.com/badges/github.com/PHCNetworks/multi-tenancy-warden.svg)](https://gemnasium.com/github.com/PHCNetworks/multi-tenancy-warden)
[![Gem Version](https://badge.fury.io/rb/mtwarden.svg)](https://badge.fury.io/rb/mtwarden)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/PHCNetworks/multi-tenancy-warden/blob/master/MIT-LICENSE)

### Mtwarden(MultiTenancyWarden) Documentation
PHC mtwarden gem adds a separate multi-tenant layer that handles all user registrations, multi-tenancy app functions, and login through subdomains using Warden authentication gem.

#### Step 1 - Add Mtwarden to your gemfile and run command

gem 'mtwarden', '~> 3.6'
bundle exec install

#### Step 2 - Add and migrate mtwarden database tables

rake railties:install:migrations
rake db:migrate

#### Step 3 - Mount the Engine in your Routes File
Add this line at the top of the routes.rb file.

require 'mtwarden/constraints/subdomain_required'

#### Step 4 - Mount the Engine in your Routes File
Add this line at the end of the routes.rb file.

mount Mtwarden::Engine, :at => '/'

#### Step 5 - Constrain the routes you want secured in your routes.rb file.
All the routes you want to have multi-tenancy login functions goes in between the constraints block.

constraints(Mtwarden::Constraints::SubdomainRequired) do
# Routes Requiring Security & Multi-Tenancy Routes
end
end
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Rake::TestTask.new(:test) do |t|
t.verbose = false
end

task default: :test
task default: :test
2 changes: 1 addition & 1 deletion app/assets/config/mtwarden_manifest.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//= link_directory ../javascripts/mtwarden .js
//= link_directory ../stylesheets/mtwarden .scss
//= link_directory ../stylesheets/mtwarden .scss
2 changes: 1 addition & 1 deletion app/assets/javascripts/mtwarden/application.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Load PHCAdmin3 Javascript
//= require phc_admins_main_three
//= require phc_admins_main_three
2 changes: 1 addition & 1 deletion app/assets/stylesheets/mtwarden/application.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Load PHCAdmin3 Styles
@import "phc_admins_style_three";
@import "phc_admins_style_three";
2 changes: 1 addition & 1 deletion app/controllers/mtwarden/account/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ def account_params
params.require(:account).permit(:name, :plan_id)
end
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/mtwarden/account/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ module Mtwarden
class Account::DashboardController < ApplicationController
before_filter :authenticate_user!
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/mtwarden/account/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def create
end
end
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/mtwarden/account/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def user_params
params.require(:user).permit(:email, :password, :password_confirmation)
end
end
end
end
4 changes: 2 additions & 2 deletions app/controllers/mtwarden/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def create
private

def account_params
params.require(:account).permit(:name, :subdomain,
params.require(:account).permit(:name, :subdomain,
{ :owner_attributes => [
[:email, :password, :password_confirmation]
]}
)
end
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/mtwarden/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def authorize_owner
end
end

end
end
2 changes: 1 addition & 1 deletion app/controllers/mtwarden/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
module Mtwarden
class DashboardController < ApplicationController
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def owner?
end
helper_method :owner?

end
end
2 changes: 1 addition & 1 deletion app/helpers/mtwarden/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Mtwarden
module ApplicationHelper
end
end
end
2 changes: 1 addition & 1 deletion app/jobs/mtwarden/application_job.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Mtwarden
class ApplicationJob < ActiveJob::Base
end
end
end
2 changes: 1 addition & 1 deletion app/mailers/mtwarden/application_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ class ApplicationMailer < ActionMailer::Base
layout 'mailer'

end
end
end
6 changes: 3 additions & 3 deletions app/models/mtwarden/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class Account < ActiveRecord::Base
has_many :users, :through => :members

EXCLUDED_SUBDOMAINS = %w(admin)
validates_exclusion_of :subdomain, :in => EXCLUDED_SUBDOMAINS,
validates_exclusion_of :subdomain, :in => EXCLUDED_SUBDOMAINS,
:message => "is not allowed. Please choose another subdomain."

validates_format_of :subdomain, :with => /\A[\w\-]+\Z/i,
:message => "is not allowed. Please choose another subdomain."
:message => "is not allowed. Please choose another subdomain."

before_validation do
self.subdomain = subdomain.to_s.downcase
Expand All @@ -36,4 +36,4 @@ def owner?(user)
end
end

end
end
2 changes: 1 addition & 1 deletion app/models/mtwarden/application_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module Mtwarden
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
end
end
2 changes: 1 addition & 1 deletion app/models/mtwarden/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ class Member < ActiveRecord::Base
belongs_to :account, :class_name => "Mtwarden::Account"
belongs_to :user, :class_name => "Mtwarden::User"
end
end
end
2 changes: 1 addition & 1 deletion app/models/mtwarden/plan.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Mtwarden
class Plan < ActiveRecord::Base
end
end
end
2 changes: 1 addition & 1 deletion app/models/mtwarden/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ class User < ActiveRecord::Base
gravtastic
has_secure_password
end
end
end
2 changes: 1 addition & 1 deletion app/views/layouts/mtwarden/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
<%= render "mtwarden/shared/login" %>
<%= yield %>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<%= form_tag confirm_plan_account_path(:plan_id => params[:plan_id]) do %>
<%= submit_tag "Change plan" %>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
</p>
<%= customer.submit "Change plan" %>
<% end %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/mtwarden/account/accounts/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
</p>

<%= account.submit "Update Account" %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/mtwarden/account/accounts/plan.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<%= render "existing_subscription" %>
<% else %>
<%= render "new_subscription" %>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/mtwarden/account/dashboard/index.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Your account's dashboard. Coming soon.
Your account's dashboard. Coming soon.
2 changes: 1 addition & 1 deletion app/views/mtwarden/account/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</p>
<% end %>

<%= link_to "New User?", user_sign_up_url %>
<%= link_to "New User?", user_sign_up_url %>
2 changes: 1 addition & 1 deletion app/views/mtwarden/account/users/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<p>
<%= user.label :password_confirmation %><br>
<%= user.password_field :password_confirmation %>
</p>
</p>
Loading

0 comments on commit 46591e7

Please sign in to comment.