effective_roles 1.4.4 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +7 -34
- data/app/controllers/admin/roles_controller.rb +2 -3
- data/app/helpers/effective_roles_helper.rb +21 -39
- data/app/views/effective/roles/_summary.html.haml +6 -8
- data/config/routes.rb +4 -4
- data/lib/effective_roles.rb +16 -6
- data/lib/effective_roles/version.rb +1 -1
- metadata +3 -192
- data/Rakefile +0 -23
- data/app/views/effective/roles/_fields.html.haml +0 -17
- data/lib/tasks/effective_roles_tasks.rake +0 -4
- data/spec/dummy/README.rdoc +0 -10
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/post.rb +0 -3
- data/spec/dummy/app/models/user.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -58
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -36
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/routes.rb +0 -58
- data/spec/dummy/db/schema.rb +0 -46
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/effective_roles_spec.rb +0 -147
- data/spec/models/acts_as_role_restricted_spec.rb +0 -218
- data/spec/spec_helper.rb +0 -40
- data/spec/support/factories.rb +0 -1
data/spec/spec_helper.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
ENV["RAILS_ENV"] ||= 'test'
|
2
|
-
|
3
|
-
require File.expand_path("../dummy/config/environment", __FILE__)
|
4
|
-
|
5
|
-
require 'rspec/rails'
|
6
|
-
require 'factory_girl_rails'
|
7
|
-
|
8
|
-
# Requires supporting ruby files with custom matchers and macros, etc,
|
9
|
-
# in spec/support/ and its subdirectories.
|
10
|
-
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f }
|
11
|
-
|
12
|
-
ActiveRecord::Migration.maintain_test_schema!
|
13
|
-
|
14
|
-
RSpec.configure do |config|
|
15
|
-
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
16
|
-
|
17
|
-
Rails.logger.level = 4 # Output only minimal stuff to test.log
|
18
|
-
|
19
|
-
config.use_transactional_fixtures = true # Make this false to once again use DatabaseCleaner
|
20
|
-
config.infer_base_class_for_anonymous_controllers = false
|
21
|
-
config.order = 'random'
|
22
|
-
|
23
|
-
config.expect_with :rspec do |c|
|
24
|
-
c.syntax = [:should, :expect]
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
class ActiveRecord::Base
|
30
|
-
mattr_accessor :shared_connection
|
31
|
-
@@shared_connection = nil
|
32
|
-
|
33
|
-
def self.connection
|
34
|
-
@@shared_connection || retrieve_connection
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
# Forces all threads to share the same connection. This works on
|
39
|
-
# Capybara because it starts the web server in a thread.
|
40
|
-
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
|
data/spec/support/factories.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'factory_girl'
|