acts_as_user 1.0.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a7e5bcbb549bcaee0d7e66f93759c2bc3061b5d
4
- data.tar.gz: f4f9c9205329ceb26c70427beecf1d8a72fb1215
3
+ metadata.gz: 0b9d01203b4d142d091919f8844f314ad807787d
4
+ data.tar.gz: 7fbedc1dd0d5d844e1d595f70842797a9a81babb
5
5
  SHA512:
6
- metadata.gz: 5b88ebfdb46ed4f836bb96ad0df2714f76fe286ea2d6e80b73fb4af015b7004c5e6a19134a409a716096eb9e3ff740fef64b0c28bb38404c7c0fdccb74c71c29
7
- data.tar.gz: 298b5b4a6c8b97cb073bbf38de14d4177f83524340559849b086daaff45a7935d47b8bbf6abb1216c8709d05135cee0f37aa38bf596f39228dbc650679043b03
6
+ metadata.gz: 2836d6beee84330632b341a42c8571e89df48c58a957a8ed4b6b59ef37fc1e8977a6305ad7d327cfeba83151a2fc241d786d79fae52901de984442132f9a51e4
7
+ data.tar.gz: be32e88cb4b9982ebac3df4ab07846a225300bf9cf3d1f3bccff9ebaac50f95083a5997b9f6c3241ce97e3762bce54f29341230d83a13bcf04c174b40375b86f
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  .DS_Store
19
+ *.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format=d
@@ -0,0 +1,12 @@
1
+ language: 'ruby'
2
+
3
+ script: "bundle exec rake spec"
4
+
5
+ rvm:
6
+ - 1.9.3
7
+ - 2.0.0
8
+
9
+ gemfile:
10
+ gemfiles/active_record_40.gemfile
11
+
12
+
data/README.md CHANGED
@@ -1,11 +1,15 @@
1
1
  #Acts as user
2
+ [![Build Status](https://travis-ci.org/IcaliaLabs/acts_as_user.png?branch=master)](https://travis-ci.org/IcaliaLabs/acts_as_user)
3
+ [![Code Climate](https://codeclimate.com/github/IcaliaLabs/acts_as_user.png)](https://codeclimate.com/github/IcaliaLabs/acts_as_user)
4
+ [![Dependency Status](https://gemnasium.com/IcaliaLabs/acts_as_user.png)](https://gemnasium.com/IcaliaLabs/acts_as_user)
5
+ [![Gem Version](https://badge.fury.io/rb/acts_as_user.png)](http://badge.fury.io/rb/acts_as_user)
2
6
 
3
7
  Acts as user handles multiple user roles on a rails app. It uses polymorphic associations to relate other models and behave like a user.
4
8
 
5
9
 
6
10
  ## Getting started
7
11
 
8
- ActsAsUser 1.0.0 works with rails 3 onwards. You can add it to your Gemfile with:
12
+ ActsAsUser 1.2.1 works with rails 3 onwards. You can add it to your Gemfile with:
9
13
 
10
14
  ```ruby
11
15
  gem 'acts_as_user'
@@ -70,6 +74,52 @@ Acts as a user plays well with Devise as it ignores and adds the corresponding a
70
74
 
71
75
  When using devise, ActsAsUser will also ignore the ```encrypted_password``` attribute from the user. No further configuration needs to be done.
72
76
 
77
+ ##Getting to know the user
78
+
79
+ ActsAsUser gem now adds some handy instance user methods that returns true or false wheter the current user is a specific type or not, for example:
80
+
81
+ A simple configuration may look something similar to:
82
+
83
+ ```ruby
84
+ class User < ActiveRecord::Base
85
+ is_user
86
+ end
87
+
88
+ class Customer < ActiveRecord::Base
89
+ acts_as_user
90
+ end
91
+
92
+ class Admin < ActiveRecord::Base
93
+ acts_as_user
94
+ end
95
+ ```
96
+
97
+ Just a little configuration is needed, you can do it on the ```acts_as_user.rb``` initializer like so:
98
+
99
+ ```ruby
100
+ ActsAsUser.setup do |config|
101
+ config.models_acting_as_users = [:admin, :customer]
102
+ end
103
+ ```
104
+
105
+ Now we will instantiate a Customer object:
106
+
107
+ ```console
108
+ customer = Customer.find(1)
109
+ current_user = customer.user
110
+ ```
111
+
112
+ You now should be able to detect in this case if the current_user is wheter an admin or a customer by simply calling:
113
+
114
+ ```console
115
+ current_user.customer?
116
+ => true
117
+ current_user.admin?
118
+ => false
119
+ ```
120
+
121
+ Enjoy!
122
+
73
123
  ## Contributing
74
124
 
75
125
  1. Fork it
@@ -81,7 +131,7 @@ When using devise, ActsAsUser will also ignore the ```encrypted_password``` attr
81
131
 
82
132
  ###Psst! Here is a live example in rails
83
133
 
84
- [Rails acts as user example](https://github.com/IcaliaLabs)
134
+ [Rails acts as user example](https://github.com/IcaliaLabs/acts_as_user_example)
85
135
 
86
136
  ### Devs
87
137
 
@@ -90,7 +140,6 @@ When using devise, ActsAsUser will also ignore the ```encrypted_password``` attr
90
140
 
91
141
  ### Future
92
142
 
93
- * Add tests
94
143
  * Support for Mongoid
95
144
  * Add wiki
96
145
 
data/Rakefile CHANGED
@@ -1 +1,21 @@
1
- require "bundler/gem_tasks"
1
+ # encoding: utf-8
2
+
3
+ require 'bundler'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ require 'rspec/core'
7
+ require 'rspec/core/rake_task'
8
+
9
+ RSpec::Core::RakeTask.new(:spec) do |spec|
10
+ spec.pattern = FileList['spec/**/*_spec.rb']
11
+ end
12
+
13
+ task :default => "spec:all"
14
+
15
+ namespace :spec do
16
+ desc "Run Tests"
17
+ task :all do
18
+ sh "BUNDLE_GEMFILE='gemfiles/active_record_40.gemfile' bundle install --quiet"
19
+ sh "BUNDLE_GEMFILE='gemfiles/active_record_40.gemfile' bundle exec rake spec"
20
+ end
21
+ end
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
8
8
  spec.version = ActsAsUser::VERSION
9
9
  spec.authors = ["Abraham Kuri", "Patricio Beltrán"]
10
10
  spec.email = ["kurenn@icalialabs.com", "pbeltran@icalialabs.com"]
11
- spec.description = %q{Handles multiple user roles on a rails app}
11
+ spec.description = %q{A ruby gem to handle multiple user roles on a Rails app, it also has Devise support}
12
12
  spec.summary = %q{Handles multiple user roles on a rails app}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/IcaliaLabs/acts_as_user"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -21,6 +21,13 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "sqlite3"
25
+ spec.add_development_dependency "activerecord"
26
+ spec.add_development_dependency "rails"
27
+ spec.add_development_dependency "shoulda-matchers"
28
+ spec.add_development_dependency "activesupport"
29
+ spec.add_development_dependency 'database_cleaner', ['~> 1.2.0']
30
+ spec.add_development_dependency 'debugger'
24
31
 
25
32
  spec.add_dependency "orm_adapter", "~> 0.1"
26
33
  spec.add_dependency "activerecord", ">= 3.0"
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '>= 4.0.0'
4
+ gem 'activerecord', '>= 4.0.0', :require => 'active_record'
5
+ gem 'rspec-rails', '>= 2.0'
6
+
7
+ platforms :ruby do
8
+ gem 'sqlite3'
9
+ end
10
+
11
+ gemspec :path => '../'
@@ -2,20 +2,55 @@ require "acts_as_user/version"
2
2
  require 'orm_adapter'
3
3
 
4
4
  module ActsAsUser
5
+ extend ActiveSupport::Autoload
6
+
7
+ #Eager loads the modules
8
+ eager_autoload do
9
+ autoload :UserDelegate
10
+ autoload :IsUser
11
+ end
12
+
13
+ # ActiveSupport::Autoload automatically defines
14
+ # an eager_load! method. In this case, we are
15
+ # extending the method to also eager load the
16
+ # ActsAsUser modules.
17
+ def self.eager_load!
18
+ super
19
+ ActsAsUser::UserDelegate.eager_load!
20
+ ActsAsUser::IsUser.eager_load!
21
+ end
22
+
23
+ #We ignore some attribues that might cause a collision between models
5
24
  @@default_ignored_attributes = ["created_at", "updated_at", "id", "userable_type", "userable_id"]
6
25
 
26
+ #Array to define the models that are inhering from the user
27
+ @@models_acting_like_users = []
28
+ mattr_reader :models_acting_like_users
29
+
30
+ #We append the extra attributes you want to ignore to the default ones
7
31
  mattr_accessor :ignored_attributes
8
32
  @@ignored_attributes = @@ignored_attributes.to_a + @@default_ignored_attributes
9
33
 
34
+ mattr_accessor :models_acting_as_users
35
+ @@models_acting_as_users = []
36
+
10
37
  def self.setup
11
38
  yield self
12
39
  end
13
40
 
41
+ #Checking if devise is present
14
42
  def self.devise?
15
43
  defined?(Devise).present?
16
44
  end
45
+
46
+ #We add some virtual attributes that dont't play well when devise is present
47
+ def self.add_devise_attributes_to_ignore
48
+ if self.devise?
49
+ devise_ignore_attrs = ['password', 'password_confirmation', 'encrypted_password']
50
+ self.ignored_attributes << devise_ignore_attrs
51
+ self.ignored_attributes.flatten!
52
+ end
53
+ end
17
54
  end
18
55
 
19
- require 'acts_as_user/user_delegate'
20
- require 'acts_as_user/is_user'
21
56
  require 'acts_as_user/railtie'
@@ -1,7 +1,21 @@
1
1
  module ActsAsUser
2
2
  module IsUser
3
+
3
4
  def self.included(base)
4
5
  base.belongs_to :userable, polymorphic: true
6
+ base.extend ClassMethods
7
+ #loads models acting as users when the hook is loaded
8
+ base.define_models_acting_as_users
9
+ end
10
+
11
+ module ClassMethods
12
+ def define_models_acting_as_users
13
+ ActsAsUser.models_acting_as_users.each do |model_class_name|
14
+ define_method("#{model_class_name.to_s.downcase}?") do
15
+ self.userable_type.downcase == model_class_name.to_s.downcase
16
+ end
17
+ end
18
+ end
5
19
  end
6
20
  end
7
21
  end
@@ -1,14 +1,19 @@
1
1
  module ActsAsUser
2
2
  class Railtie < Rails::Railtie
3
- ActiveSupport.on_load :active_record do
4
- class ActiveRecord::Base
5
- def self.acts_as_user
6
- include ActsAsUser::UserDelegate
7
- end
8
- def self.is_user
9
- include ActsAsUser::IsUser
3
+ #Adds namespace for eager loading
4
+ config.eager_load_namespaces << ActsAsUser
5
+
6
+ ActiveSupport.on_load :active_record do
7
+ ActsAsUser.add_devise_attributes_to_ignore
8
+
9
+ class ActiveRecord::Base
10
+ def self.acts_as_user
11
+ include ActsAsUser::UserDelegate
12
+ end
13
+ def self.is_user
14
+ include ActsAsUser::IsUser
15
+ end
10
16
  end
11
17
  end
12
- end
13
18
  end
14
19
  end
@@ -18,6 +18,7 @@ module ActsAsUser
18
18
  super
19
19
  end
20
20
 
21
+
21
22
  protected
22
23
 
23
24
  def user_must_be_valid
@@ -31,16 +32,12 @@ module ActsAsUser
31
32
  module ClassMethods
32
33
 
33
34
  def define_user_accessors
35
+ #We check the user columns to declare them as attributes to delegate
34
36
  all_attributes = User.columns.map(&:name)
35
37
 
36
- if ActsAsUser.devise?
37
- all_attributes << "password"
38
- all_attributes << "password_confirmation"
39
- ActsAsUser.ignored_attributes << "encrypted_password"
40
- end
41
-
42
38
  attributes_to_delegate = all_attributes - ActsAsUser.ignored_attributes
43
39
 
40
+ #User method delegation
44
41
  attributes_to_delegate.each do |attrib|
45
42
  class_eval <<-RUBY
46
43
  def #{attrib}
@@ -1,3 +1,3 @@
1
1
  module ActsAsUser
2
- VERSION = "1.0.1"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -0,0 +1,2 @@
1
+ class GemDefinedModel < ActiveRecord::Base
2
+ end
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+
3
+ describe Customer do
4
+ it { should have_one(:user).dependent(:destroy) }
5
+ it { should respond_to :user }
6
+ it { should respond_to :email }
7
+
8
+ describe 'model valid' do
9
+ before do
10
+ @customer = Customer.new
11
+ @user = User.new
12
+ @customer.user = @user
13
+ end
14
+ it 'throws errors when user has no email is not correct' do
15
+ @customer.should_not be_valid
16
+ end
17
+
18
+ it 'is valid when user has no errors' do
19
+ @customer.email = 'test@test.com'
20
+ @customer.should be_valid
21
+ end
22
+ end
23
+
24
+ describe 'user autobuild' do
25
+ before do
26
+ @customer = Customer.new
27
+ end
28
+
29
+ it 'has to have a user already' do
30
+ @customer.user.should be_present
31
+ end
32
+ end
33
+
34
+ describe 'setters' do
35
+ before do
36
+ @customer = Customer.new(email: 'test@test.com')
37
+ end
38
+ it 'saves the user with its corresponding fields' do
39
+ @customer.save
40
+ @customer.user.email.should eql @customer.email
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+
3
+ describe User do
4
+ it { should belong_to :userable }
5
+ it { should respond_to :userable_type }
6
+ it { should respond_to :userable_id }
7
+ it { should respond_to :customer? }
8
+ it { should respond_to :admin? }
9
+
10
+ describe '#customer?' do
11
+ context 'when is a customer' do
12
+ before do
13
+ @customer_user = Customer.create email: 'test@icalialabs.com'
14
+ @current_user = @customer_user.user
15
+ end
16
+ it 'returns true' do
17
+ @current_user.should be_customer
18
+ end
19
+ end
20
+ context 'when is not customer' do
21
+ before do
22
+ @fake_customer_user = Admin.create email: 'test@icalialabs.com'
23
+ @current_user = @fake_customer_user.user
24
+ end
25
+ it 'returns false' do
26
+ @current_user.should_not be_customer
27
+ end
28
+ end
29
+ context 'when is an admin' do
30
+ before do
31
+ @admin_user = Admin.create email: 'test@icalialabs.com'
32
+ @current_user = @admin_user.user
33
+ end
34
+ it 'returns true' do
35
+ @current_user.should be_admin
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe ActsAsUser do
4
+ let(:acts_as_user) { ActsAsUser }
5
+ subject { acts_as_user }
6
+ it { should respond_to :ignored_attributes }
7
+ it { should respond_to :setup }
8
+ it { should respond_to :models_acting_as_users }
9
+
10
+ describe 'ignored attributes' do
11
+ context 'when devise is present' do
12
+ it 'adds the devise fields to ignore' do
13
+ acts_as_user.should_receive(:devise?).and_return(true)
14
+ acts_as_user.add_devise_attributes_to_ignore
15
+ acts_as_user.ignored_attributes.should include 'password'
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,25 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+
4
+ require 'active_record'
5
+ require 'shoulda-matchers'
6
+
7
+ begin
8
+ require 'rails'
9
+ rescue LoadError
10
+ end
11
+
12
+ require 'bundler/setup'
13
+ Bundler.require
14
+
15
+ require 'database_cleaner'
16
+
17
+ require 'fake_gem' if defined? ActiveRecord
18
+
19
+ ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
20
+ #Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
21
+ load File.dirname(__FILE__) + '/support/acts_as_user_initializer.rb'
22
+ load File.dirname(__FILE__) + '/support/schema.rb'
23
+ load File.dirname(__FILE__) + '/support/models.rb'
24
+
25
+ I18n.enforce_available_locales = false
@@ -0,0 +1,8 @@
1
+ require 'active_record'
2
+
3
+
4
+ #ActiveRecord::Migrator.up "db/migrate"
5
+
6
+ load File.dirname(__FILE__) + '/acts_as_user_initializer.rb'
7
+ load File.dirname(__FILE__) + '/schema.rb'
8
+ load File.dirname(__FILE__) + '/models.rb'
@@ -0,0 +1,10 @@
1
+ # This hook is use to setup the configuration for creating models through
2
+ # rails generators
3
+ ActsAsUser.setup do |config|
4
+
5
+ config.models_acting_as_users = [:admin, :customer]
6
+
7
+ # ==> ORM Configuration
8
+ # Load and configure the ORM. Supports :active_record
9
+ require 'acts_as_user/orm/active_record'
10
+ end
@@ -0,0 +1,12 @@
1
+ DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
2
+ RSpec.configure do |config|
3
+ config.before :suite do
4
+ DatabaseCleaner.clean_with :truncation if defined? ActiveRecord
5
+ end
6
+ config.before :each do
7
+ DatabaseCleaner.start
8
+ end
9
+ config.after :each do
10
+ DatabaseCleaner.clean
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class User < ActiveRecord::Base
2
+ is_user
3
+ validates :email, presence: true
4
+ end
5
+
6
+ class Customer < ActiveRecord::Base
7
+ acts_as_user
8
+ end
9
+
10
+ class Admin < ActiveRecord::Base
11
+ acts_as_user
12
+ end
@@ -0,0 +1,16 @@
1
+ ActiveRecord::Schema.define(:version => 0) do
2
+ create_table :users do |t|
3
+ t.string :email
4
+ t.string :userable_type
5
+ t.integer :userable_id
6
+ end
7
+ add_index :users, [:userable_id, :userable_type]
8
+
9
+ create_table :customers do |t|
10
+ t.string :name
11
+ t.string :city
12
+ end
13
+
14
+ create_table :admins do |t|
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abraham Kuri
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-12 00:00:00.000000000 Z
12
+ date: 2014-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -53,6 +53,104 @@ dependencies:
53
53
  - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: sqlite3
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: activerecord
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rails
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: shoulda-matchers
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: activesupport
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: database_cleaner
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 1.2.0
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ~>
138
+ - !ruby/object:Gem::Version
139
+ version: 1.2.0
140
+ - !ruby/object:Gem::Dependency
141
+ name: debugger
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - '>='
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
56
154
  - !ruby/object:Gem::Dependency
57
155
  name: orm_adapter
58
156
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +179,8 @@ dependencies:
81
179
  - - '>='
82
180
  - !ruby/object:Gem::Version
83
181
  version: '3.0'
84
- description: Handles multiple user roles on a rails app
182
+ description: A ruby gem to handle multiple user roles on a Rails app, it also has
183
+ Devise support
85
184
  email:
86
185
  - kurenn@icalialabs.com
87
186
  - pbeltran@icalialabs.com
@@ -90,11 +189,14 @@ extensions: []
90
189
  extra_rdoc_files: []
91
190
  files:
92
191
  - .gitignore
192
+ - .rspec
193
+ - .travis.yml
93
194
  - Gemfile
94
195
  - LICENSE.txt
95
196
  - README.md
96
197
  - Rakefile
97
198
  - acts_as_user.gemspec
199
+ - gemfiles/active_record_40.gemfile
98
200
  - lib/acts_as_user.rb
99
201
  - lib/acts_as_user/is_user.rb
100
202
  - lib/acts_as_user/orm/active_record.rb
@@ -108,7 +210,17 @@ files:
108
210
  - lib/generators/acts_as_user/install_generator.rb
109
211
  - lib/generators/acts_as_user/orm_helpers.rb
110
212
  - lib/generators/templates/acts_as_user.rb
111
- homepage: ''
213
+ - spec/fake_gem.rb
214
+ - spec/models/active_record/customer_spec.rb
215
+ - spec/models/active_record/user_spec.rb
216
+ - spec/models/config/setup_spec.rb
217
+ - spec/spec_helper.rb
218
+ - spec/support/active_record.rb
219
+ - spec/support/acts_as_user_initializer.rb
220
+ - spec/support/database_cleaner.rb
221
+ - spec/support/models.rb
222
+ - spec/support/schema.rb
223
+ homepage: https://github.com/IcaliaLabs/acts_as_user
112
224
  licenses:
113
225
  - MIT
114
226
  metadata: {}
@@ -132,5 +244,15 @@ rubygems_version: 2.0.6
132
244
  signing_key:
133
245
  specification_version: 4
134
246
  summary: Handles multiple user roles on a rails app
135
- test_files: []
247
+ test_files:
248
+ - spec/fake_gem.rb
249
+ - spec/models/active_record/customer_spec.rb
250
+ - spec/models/active_record/user_spec.rb
251
+ - spec/models/config/setup_spec.rb
252
+ - spec/spec_helper.rb
253
+ - spec/support/active_record.rb
254
+ - spec/support/acts_as_user_initializer.rb
255
+ - spec/support/database_cleaner.rb
256
+ - spec/support/models.rb
257
+ - spec/support/schema.rb
136
258
  has_rdoc: