company_scope 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/README.md +31 -37
- data/company_scope.gemspec +1 -0
- data/lib/company_scope/filter.rb +12 -14
- data/lib/company_scope/railtie.rb +17 -6
- data/lib/company_scope/version.rb +1 -1
- data/lib/company_scope.rb +15 -17
- data/lib/{rack → custom}/multi_company.rb +7 -10
- data/log/test.log +184 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 741c6e4381fb5089d8e46d7cc20e6d54f19a5a50
|
4
|
+
data.tar.gz: 6364437a929c37db0b99a2d15735f70c07902b3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3948930bf2c57915fa2de4d73c6708804ba48df52b0dd4ec3e9a7ac1d9c398fbbd97442586c6bf9950bb64c24f86636512cbbc8cb9ad8f440d938dfda1563da
|
7
|
+
data.tar.gz: 55d75b25036746328dfc330448af2b596b2fafba813b79993dddacaafb5c354b63c980fd87a4447789468d5e5b97a74c32b14e7756ed7ca640fea80021957f80
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/README.md
CHANGED
@@ -11,6 +11,10 @@ Thread.current is the usual way to handle this but this is not entirely compatib
|
|
11
11
|
|
12
12
|
[![Build Status](https://travis-ci.org/netflakes/company_scope.svg?branch=master)](https://travis-ci.org/netflakes/company_scope)
|
13
13
|
|
14
|
+
## Coveralls
|
15
|
+
|
16
|
+
[![Coverage Status](https://coveralls.io/repos/netflakes/company_scope/badge.svg)](https://coveralls.io/r/netflakes/company_scope)
|
17
|
+
|
14
18
|
## Installation
|
15
19
|
|
16
20
|
Add this line to your application's Gemfile:
|
@@ -33,27 +37,27 @@ Getting started
|
|
33
37
|
===============
|
34
38
|
There are three main steps in adding multi-tenancy/company to your app with company_scope:
|
35
39
|
|
36
|
-
1.
|
40
|
+
1. Determining the company/account. Such as using the sub-domain.
|
37
41
|
2. Setting the current company and controller based setup.
|
38
42
|
3. Scoping your models.
|
39
43
|
|
40
44
|
|
41
|
-
###
|
45
|
+
### Process of determining the company/account
|
42
46
|
|
43
47
|
In the current version a helper_method called "current_company" is added to the Controller,
|
44
|
-
where you add the method "company_setup".
|
45
|
-
|
46
|
-
of "Company" into "request.env".
|
48
|
+
where you add the method "company_setup". The gem includes Rack Middleware that injects the
|
49
|
+
"Company ID" into "request.env".
|
47
50
|
|
48
|
-
The included Rack Middleware
|
49
|
-
|
51
|
+
The included Rack Middleware is inserted into the Rails Application stack automatically and
|
52
|
+
you need to let it know what the model is called that is handling the scoping - see example
|
53
|
+
below: (i.e. adding the company_scope.company_model name as a sym)
|
50
54
|
|
51
55
|
```ruby
|
52
56
|
module YourRailsApp
|
53
57
|
class Application < Rails::Application
|
54
58
|
...
|
55
|
-
# - add
|
56
|
-
config.
|
59
|
+
# - add Company Scope Model name (that your app will be scoped by)
|
60
|
+
config.company_scope.company_model = :my_company
|
57
61
|
...
|
58
62
|
end
|
59
63
|
end
|
@@ -83,32 +87,24 @@ alias_method :company_name, :your_account_name_method
|
|
83
87
|
|
84
88
|
The method below is included in the Controller stack (see notes further down), and retrieves
|
85
89
|
the company object the request object. The Rack Middleware "Rack::MultiCompany" injects this
|
86
|
-
object into each request!
|
90
|
+
object into each request! It raises an CompanyAccessViolationError if the id is nil. There is
|
91
|
+
an extra filter added to handle these errors and redirects to a custom route called: wrong_company_path
|
87
92
|
|
88
93
|
```ruby
|
89
|
-
def
|
94
|
+
def current_company_id
|
90
95
|
request.env["COMPANY_ID"]
|
91
96
|
end
|
92
97
|
```
|
93
98
|
|
94
|
-
An example of
|
99
|
+
An example of adding the wrong_company_path route in a rails app:
|
95
100
|
|
96
101
|
```ruby
|
97
|
-
def call(env)
|
98
|
-
request = Rack::Request.new(env)
|
99
|
-
domain = request.host.split('.').first.upcase
|
100
|
-
env["COMPANY_ID"] = your_custom_method_to_retrieve_company_from_subdomain(domain)
|
101
|
-
response = @app.call(env)
|
102
|
-
response
|
103
|
-
end
|
104
|
-
```
|
105
102
|
|
106
|
-
|
107
|
-
method in your application controller, providing you declare this after the "company_setup" method,
|
108
|
-
which is detailed in the next step.
|
103
|
+
get 'wrong_company' => 'invalid_company#index', as: :wrong_company
|
109
104
|
|
105
|
+
```
|
110
106
|
|
111
|
-
### Setting the current company and controller based setup
|
107
|
+
### Setting the current company and controller based setup
|
112
108
|
|
113
109
|
```ruby
|
114
110
|
class ApplicationController < ActionController::Base
|
@@ -126,28 +122,28 @@ The above three methods need to be added to the Rails Controllers. For small sys
|
|
126
122
|
will typically be added to the ApplicationController. However they can be split into
|
127
123
|
child-controllers dependent on the layout of the application.
|
128
124
|
|
129
|
-
All Controllers that inherit from the Controller that implements the
|
125
|
+
All Controllers that inherit from the Controller that implements the acts_as_company_filter
|
130
126
|
will have an around filter applied that set the Company class attribute required for the scoping
|
131
127
|
process.
|
132
128
|
|
133
|
-
The
|
129
|
+
The 'company_setup' method adds some helper methods that are available to all child controllers.
|
134
130
|
|
135
131
|
* company_setup
|
136
132
|
* set_scoping_class :company
|
137
133
|
* acts_as_company_filter
|
138
134
|
|
139
|
-
The
|
135
|
+
The 'set_scoping_class :company' method tells CompanyScope that we have a model called Company, and
|
140
136
|
it will be the model that all others will be scoped with.
|
141
137
|
The method parameter defaults to :company but can be another model of your choosing such as Account.
|
142
138
|
Each model that is scoped by the Company needs to have the company_id column.
|
143
139
|
|
144
|
-
NB: The
|
140
|
+
NB: The 'CompanyScope' gem does not handle the process of adding migrations or changes to the DB.
|
145
141
|
|
146
142
|
|
147
|
-
### Scoping your models
|
143
|
+
### Scoping your models
|
148
144
|
|
149
|
-
* The
|
150
|
-
needs to have a string column that is called by the
|
145
|
+
* The 'acts_as_guardian' method injects the behaviour required for the scoping model. The model
|
146
|
+
needs to have a string column that is called by the 'model'_name i.e. 'company_name'. The gem
|
151
147
|
adds a uniqueness validator. NB to ensure this will not cause race conditions at the DB level
|
152
148
|
you really need to add an index for this column.
|
153
149
|
|
@@ -157,7 +153,6 @@ class Company < ActiveRecord::Base
|
|
157
153
|
acts_as_guardian
|
158
154
|
|
159
155
|
# NB - the gem adds a uniqueness validator for the company_name field
|
160
|
-
...
|
161
156
|
|
162
157
|
end
|
163
158
|
```
|
@@ -165,8 +160,8 @@ end
|
|
165
160
|
The gem also injects
|
166
161
|
|
167
162
|
|
168
|
-
* Each class to be scoped needs to have the
|
169
|
-
defaults to :company if left blank. This can be any class/name of your choosing
|
163
|
+
* Each class to be scoped needs to have the 'acts_as_company :account' method. The parameter ':account'
|
164
|
+
defaults to :company if left blank. This can be any class/name of your choosing. The parameter needs
|
170
165
|
to be a underscored version of the Class name as a symbol.
|
171
166
|
|
172
167
|
```ruby
|
@@ -181,10 +176,9 @@ class User < ActiveRecord::Base
|
|
181
176
|
end
|
182
177
|
```
|
183
178
|
|
184
|
-
### The Gem is currently being used in Rails 4 and Rails-API apps and is tested against Postgres
|
185
|
-
using UUID based ID/primary keys ###
|
179
|
+
### The Gem is currently being used in Rails 4 and Rails-API apps and is tested against Postgres
|
186
180
|
|
187
|
-
### It should work with other databases such as MySQL without any issues
|
181
|
+
### It should work with other databases such as MySQL without any issues
|
188
182
|
|
189
183
|
|
190
184
|
## Development
|
data/company_scope.gemspec
CHANGED
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
# - build related ones
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.8"
|
29
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
+
spec.add_development_dependency "coveralls"
|
30
31
|
#
|
31
32
|
# - gem related ones
|
32
33
|
spec.add_development_dependency 'rack'
|
data/lib/company_scope/filter.rb
CHANGED
@@ -11,20 +11,26 @@ module CompanyScope
|
|
11
11
|
|
12
12
|
module FilterMethods
|
13
13
|
|
14
|
-
def
|
15
|
-
request.env["COMPANY_ID"]
|
14
|
+
def current_company_id
|
15
|
+
@company_id = request.env["COMPANY_ID"]
|
16
|
+
raise CompanyScope::Control::CompanyAccessViolationError if @company_id.nil?
|
17
|
+
@company_id
|
16
18
|
end
|
17
19
|
|
18
20
|
def filter_by_current_company_scope
|
19
|
-
scope_class.current_id =
|
21
|
+
scope_class.current_id = current_company_id
|
20
22
|
yield
|
21
23
|
ensure
|
22
24
|
scope_class.current_id = nil
|
23
25
|
end
|
26
|
+
|
27
|
+
def company_scope_company_not_set
|
28
|
+
redirect_to(wrong_company_path) and return
|
29
|
+
end
|
24
30
|
end
|
25
31
|
|
26
32
|
module FilterClassMethods
|
27
|
-
#
|
33
|
+
# - the default is set by the Rails application configuration!
|
28
34
|
def set_scoping_class(scope_model = :company)
|
29
35
|
self.class_eval do
|
30
36
|
cattr_accessor :scope_class
|
@@ -34,6 +40,7 @@ module CompanyScope
|
|
34
40
|
#
|
35
41
|
def company_setup
|
36
42
|
helper_method :current_company
|
43
|
+
set_scoping_class Rails.application.config.company_scope[:company_model]
|
37
44
|
end
|
38
45
|
#
|
39
46
|
def acts_as_company_filter
|
@@ -45,16 +52,7 @@ module CompanyScope
|
|
45
52
|
#
|
46
53
|
def rescue_from_company_access_violations
|
47
54
|
# - rescue from errors relating to the wrong company to avoid cross company data leakage
|
48
|
-
rescue_from
|
49
|
-
end
|
50
|
-
|
51
|
-
def company_scope_company_not_set
|
52
|
-
flash[:error] = t('application.warnings.company_not_set')
|
53
|
-
if wrong_company_path.nil?
|
54
|
-
redirect_to(root_path) and return
|
55
|
-
else
|
56
|
-
redirect_to(wrong_company_path) and return
|
57
|
-
end
|
55
|
+
rescue_from CompanyScope::Control::CompanyAccessViolationError, with: :company_scope_company_not_set
|
58
56
|
end
|
59
57
|
end
|
60
58
|
end
|
@@ -1,16 +1,30 @@
|
|
1
|
-
require 'company_scope'
|
2
|
-
require 'rails'
|
3
1
|
#
|
4
2
|
module CompanyScope
|
5
3
|
class Railtie < Rails::Railtie
|
4
|
+
# enable namespaced configuration in Rails environments
|
5
|
+
config.company_scope = ActiveSupport::OrderedOptions.new
|
6
6
|
#
|
7
|
-
initializer :after_initialize do
|
7
|
+
initializer :after_initialize do |app|
|
8
|
+
#
|
9
|
+
puts "\nLoading Railtie after_initialize..\n"
|
10
|
+
#
|
11
|
+
CompanyScope.configure do |config|
|
12
|
+
config.company_model = app.config.company_scope[:company_model]
|
13
|
+
end
|
14
|
+
|
15
|
+
# - retrieve the company_scope - model name - usually set in application.rb
|
16
|
+
company_config = app.config.company_scope[:company_model] || :company
|
17
|
+
|
18
|
+
# - add MultiCompany Rack middleware to detect the company_name from the subdomain
|
19
|
+
app.config.middleware.insert_after Rack::Sendfile, Custom::MultiCompany, company_config
|
20
|
+
|
8
21
|
# - the base module injects the default scope into company dependant models
|
9
22
|
ActiveRecord::Base.send(:include, CompanyScope::Base)
|
10
23
|
|
11
24
|
# - the company_entity module injects class methods for acting as the company!
|
12
25
|
ActiveRecord::Base.send(:include, CompanyScope::Guardian)
|
13
26
|
|
27
|
+
|
14
28
|
if defined?(ActionController::Base)
|
15
29
|
# - the control module has some error handling for the application controller
|
16
30
|
ActionController::Base.send(:include, CompanyScope::Control)
|
@@ -26,9 +40,6 @@ module CompanyScope
|
|
26
40
|
# - actions in the controller are wrapped
|
27
41
|
ActionController::API.send(:include, CompanyScope::Filter)
|
28
42
|
end
|
29
|
-
|
30
|
-
#ActionController::Base.send(:include, CompanyScope::Control)
|
31
|
-
#ActionController::Base.send(:include, CompanyScope::Filter)
|
32
43
|
end
|
33
44
|
#
|
34
45
|
end
|
data/lib/company_scope.rb
CHANGED
@@ -1,26 +1,24 @@
|
|
1
1
|
require "request_store"
|
2
2
|
#
|
3
|
-
require File.dirname(__FILE__) + '/
|
3
|
+
require File.dirname(__FILE__) + '/custom/multi_company'
|
4
4
|
require File.dirname(__FILE__) + '/company_scope/base'
|
5
5
|
require File.dirname(__FILE__) + '/company_scope/guardian'
|
6
6
|
require File.dirname(__FILE__) + '/company_scope/control'
|
7
7
|
require File.dirname(__FILE__) + '/company_scope/filter'
|
8
|
-
require File.dirname(__FILE__) + '/company_scope/railtie'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
require File.dirname(__FILE__) + '/company_scope/railtie' if defined? ::Rails::Railtie
|
9
|
+
#
|
10
|
+
# The config class allows the Rails Application to store configuration about the gem
|
11
|
+
#
|
12
|
+
module CompanyScope
|
13
|
+
class Config
|
14
|
+
attr_accessor :company_model
|
15
|
+
end
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
# - if this is being used in an API..
|
20
|
-
if defined?(ActionController::API)
|
21
|
-
ActionController::API.send(:include, CompanyScope::Control)
|
22
|
-
ActionController::API.send(:include, CompanyScope::Filter)
|
23
|
-
end
|
17
|
+
def self.config
|
18
|
+
@@config ||= Config.new
|
19
|
+
end
|
24
20
|
|
25
|
-
|
21
|
+
def self.configure
|
22
|
+
yield self.config
|
23
|
+
end
|
26
24
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
module
|
2
|
+
module Custom
|
3
3
|
#
|
4
4
|
class MultiCompany
|
5
5
|
#
|
@@ -17,9 +17,9 @@ module Rack
|
|
17
17
|
# disallow any non alphabetic chars!
|
18
18
|
domain = first_sub_domain.upcase if first_sub_domain.match(/\A[a-zA-Z0-9]*\z/)
|
19
19
|
# insert the company into ENV - for the controller helper_method 'current_company'
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
retrieve_company_from_subdomain(domain)
|
21
|
+
env['COMPANY_ID'] = @company.id unless @company.nil?
|
22
|
+
@app.call(env)
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
@@ -31,14 +31,11 @@ module Rack
|
|
31
31
|
def retrieve_company_from_subdomain(domain)
|
32
32
|
# - During test runs we load a company called 'DEFAULT' - it does not need to exist during initialisation
|
33
33
|
@company = Module.const_get(@company_class_name).find_by_company_name('DEFAULT') if Rails.env == 'test'
|
34
|
-
|
35
34
|
# - only ever load the company when the subdomain changes - also works when company is nil from an unsuccessful attempt..
|
36
|
-
|
37
|
-
|
35
|
+
# - store the company_name to ensure we don't call the DB for each company request!
|
36
|
+
@company.nil? ? @company_name = '' : @company_name = @company.company_name
|
37
|
+
@company = Module.const_get(@company_class_name).find_by_company_name(domain) unless ( domain == @company_name )
|
38
38
|
@company
|
39
|
-
rescue ActiveRecord::RecordNotFound => e
|
40
|
-
puts "\n\n Rack Error - Company not found: #{e.to_s}\n\n"
|
41
|
-
nil
|
42
39
|
end
|
43
40
|
end
|
44
41
|
end
|
data/log/test.log
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
Processing by DummyApplicationController#index as HTML
|
2
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
3
|
+
Processing by DummyApplicationController#index as HTML
|
4
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
5
|
+
Processing by DummyApplicationController#index as HTML
|
6
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
7
|
+
Processing by DummyApplicationController#index as HTML
|
8
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
9
|
+
Processing by DummyApplicationController#index as HTML
|
10
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
11
|
+
Processing by DummyApplicationController#index as HTML
|
12
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
13
|
+
Processing by DummyApplicationController#index as HTML
|
14
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
15
|
+
Processing by DummyApplicationController#index as HTML
|
16
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
17
|
+
Processing by DummyApplicationController#index as HTML
|
18
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
19
|
+
Processing by DummyApplicationController#index as HTML
|
20
|
+
Completed 200 OK in 0ms (Views: 0.3ms)
|
21
|
+
Processing by DummyApplicationController#index as HTML
|
22
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
23
|
+
Processing by DummyApplicationController#index as HTML
|
24
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
25
|
+
Processing by DummyApplicationController#index as HTML
|
26
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
27
|
+
Processing by DummyApplicationController#index as HTML
|
28
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
29
|
+
Processing by DummyApplicationController#index as HTML
|
30
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
31
|
+
Processing by DummyApplicationController#index as HTML
|
32
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
33
|
+
Processing by DummyApplicationController#index as HTML
|
34
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
35
|
+
Processing by DummyApplicationController#index as HTML
|
36
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
37
|
+
Processing by DummyApplicationController#index as HTML
|
38
|
+
Completed 200 OK in 1ms (Views: 0.5ms)
|
39
|
+
Processing by DummyApplicationController#index as HTML
|
40
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
41
|
+
Processing by DummyApplicationController#index as HTML
|
42
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
43
|
+
Processing by DummyApplicationController#index as HTML
|
44
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
45
|
+
Processing by DummyApplicationController#index as HTML
|
46
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
47
|
+
Processing by DummyApplicationController#index as HTML
|
48
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
49
|
+
Processing by DummyApplicationController#index as HTML
|
50
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
51
|
+
Processing by DummyApplicationController#index as HTML
|
52
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
53
|
+
Processing by DummyApplicationController#index as HTML
|
54
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
55
|
+
Processing by DummyApplicationController#index as HTML
|
56
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
57
|
+
Processing by DummyApplicationController#index as HTML
|
58
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
59
|
+
Processing by DummyApplicationController#index as HTML
|
60
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
61
|
+
Processing by DummyApplicationController#index as HTML
|
62
|
+
Completed 200 OK in 0ms (Views: 0.3ms)
|
63
|
+
Processing by DummyApplicationController#index as HTML
|
64
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
65
|
+
Processing by DummyApplicationController#index as HTML
|
66
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
67
|
+
Processing by DummyApplicationController#index as HTML
|
68
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
69
|
+
Processing by DummyApplicationController#index as HTML
|
70
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
71
|
+
Processing by DummyApplicationController#index as HTML
|
72
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
73
|
+
Processing by DummyApplicationController#index as HTML
|
74
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
75
|
+
Processing by DummyApplicationController#index as HTML
|
76
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
77
|
+
Processing by DummyApplicationController#index as HTML
|
78
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
79
|
+
Processing by DummyApplicationController#index as HTML
|
80
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
81
|
+
Processing by DummyApplicationController#index as HTML
|
82
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
83
|
+
Processing by DummyApplicationController#index as HTML
|
84
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
85
|
+
Processing by DummyApplicationController#index as HTML
|
86
|
+
Completed 200 OK in 1ms (Views: 0.4ms)
|
87
|
+
Processing by DummyApplicationController#index as HTML
|
88
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
89
|
+
Processing by DummyApplicationController#index as HTML
|
90
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
91
|
+
Processing by DummyApplicationController#index as HTML
|
92
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
93
|
+
Processing by DummyApplicationController#index as HTML
|
94
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
95
|
+
Processing by DummyApplicationController#index as HTML
|
96
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
97
|
+
Processing by DummyApplicationController#index as HTML
|
98
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
99
|
+
Processing by DummyApplicationController#index as HTML
|
100
|
+
Completed 200 OK in 0ms (Views: 0.3ms)
|
101
|
+
Processing by DummyApplicationController#index as HTML
|
102
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
103
|
+
Processing by DummyApplicationController#index as HTML
|
104
|
+
Completed 200 OK in 1ms (Views: 0.3ms)
|
105
|
+
Processing by DummyApplicationController#index as HTML
|
106
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
107
|
+
Processing by DummyApplicationController#index as HTML
|
108
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
109
|
+
Processing by DummyApplicationController#index as HTML
|
110
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
111
|
+
Processing by DummyApplicationController#index as HTML
|
112
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
113
|
+
Processing by DummyApplicationController#index as HTML
|
114
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
115
|
+
Processing by DummyApplicationController#index as HTML
|
116
|
+
Completed 200 OK in 1ms (Views: 0.3ms)
|
117
|
+
Processing by DummyApplicationController#index as HTML
|
118
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
119
|
+
Processing by DummyApplicationController#index as HTML
|
120
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
121
|
+
Processing by DummyApplicationController#index as HTML
|
122
|
+
Completed 200 OK in 0ms (Views: 0.3ms)
|
123
|
+
Processing by DummyApplicationController#index as HTML
|
124
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
125
|
+
Processing by DummyApplicationController#index as HTML
|
126
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
127
|
+
Processing by DummyApplicationController#index as HTML
|
128
|
+
Completed 200 OK in 0ms (Views: 0.3ms)
|
129
|
+
Processing by DummyApplicationController#index as HTML
|
130
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
131
|
+
Processing by DummyApplicationController#index as HTML
|
132
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
133
|
+
Processing by DummyApplicationController#index as HTML
|
134
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
135
|
+
Processing by DummyApplicationController#index as HTML
|
136
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
137
|
+
Processing by DummyApplicationController#index as HTML
|
138
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
139
|
+
Processing by DummyApplicationController#index as HTML
|
140
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
141
|
+
Processing by DummyApplicationController#index as HTML
|
142
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
143
|
+
Processing by DummyApplicationController#index as HTML
|
144
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
145
|
+
Processing by DummyApplicationController#index as HTML
|
146
|
+
Completed 200 OK in 0ms (Views: 0.3ms)
|
147
|
+
Processing by DummyApplicationController#index as HTML
|
148
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
149
|
+
Processing by DummyApplicationController#index as HTML
|
150
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
151
|
+
Processing by DummyApplicationController#index as HTML
|
152
|
+
Completed 200 OK in 1ms (Views: 0.3ms)
|
153
|
+
Processing by DummyApplicationController#index as HTML
|
154
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
155
|
+
Processing by DummyApplicationController#index as HTML
|
156
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
157
|
+
Processing by DummyApplicationController#index as HTML
|
158
|
+
Completed 200 OK in 1ms (Views: 0.4ms)
|
159
|
+
Processing by DummyApplicationController#index as HTML
|
160
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
161
|
+
Processing by DummyApplicationController#index as HTML
|
162
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
163
|
+
Processing by DummyApplicationController#index as HTML
|
164
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
165
|
+
Processing by DummyApplicationController#index as HTML
|
166
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
167
|
+
Processing by DummyApplicationController#index as HTML
|
168
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
169
|
+
Processing by DummyApplicationController#index as HTML
|
170
|
+
Completed 200 OK in 1ms (Views: 0.3ms)
|
171
|
+
Processing by DummyApplicationController#index as HTML
|
172
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
173
|
+
Processing by DummyApplicationController#index as HTML
|
174
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
175
|
+
Processing by DummyApplicationController#index as HTML
|
176
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
177
|
+
Processing by DummyApplicationController#index as HTML
|
178
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
179
|
+
Processing by DummyApplicationController#index as HTML
|
180
|
+
Completed 200 OK in 0ms (Views: 0.2ms)
|
181
|
+
Processing by DummyApplicationController#index as HTML
|
182
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
183
|
+
Processing by DummyApplicationController#index as HTML
|
184
|
+
Completed 200 OK in 0ms (Views: 0.1ms)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: company_scope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Forkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: coveralls
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rack
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,6 +186,7 @@ executables: []
|
|
172
186
|
extensions: []
|
173
187
|
extra_rdoc_files: []
|
174
188
|
files:
|
189
|
+
- ".coveralls.yml"
|
175
190
|
- ".gitignore"
|
176
191
|
- ".rspec"
|
177
192
|
- ".ruby-gemset"
|
@@ -190,7 +205,8 @@ files:
|
|
190
205
|
- lib/company_scope/guardian.rb
|
191
206
|
- lib/company_scope/railtie.rb
|
192
207
|
- lib/company_scope/version.rb
|
193
|
-
- lib/
|
208
|
+
- lib/custom/multi_company.rb
|
209
|
+
- log/test.log
|
194
210
|
homepage: http://github.com/netflakes/company_scope
|
195
211
|
licenses: []
|
196
212
|
metadata: {}
|