devise_invitable 0.3.4 → 0.6.0
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/README.rdoc +124 -43
- data/app/controllers/devise/invitations_controller.rb +36 -9
- data/app/views/devise/invitations/new.html.erb +1 -1
- data/config/locales/en.yml +5 -3
- data/lib/devise_invitable/controllers/helpers.rb +1 -6
- data/lib/devise_invitable/inviter.rb +39 -0
- data/lib/devise_invitable/mailer.rb +4 -3
- data/lib/devise_invitable/model.rb +99 -41
- data/lib/devise_invitable/rails.rb +5 -2
- data/lib/devise_invitable/routes.rb +8 -5
- data/lib/devise_invitable/schema.rb +29 -2
- data/lib/devise_invitable/version.rb +3 -0
- data/lib/devise_invitable.rb +48 -6
- data/lib/generators/active_record/templates/migration.rb +15 -7
- data/lib/generators/devise_invitable/devise_invitable_generator.rb +4 -0
- data/lib/generators/devise_invitable/install_generator.rb +21 -2
- data/lib/generators/devise_invitable/views_generator.rb +11 -2
- data/lib/generators/mongoid/devise_invitable_generator.rb +8 -0
- metadata +63 -143
- data/.document +0 -5
- data/.gitignore +0 -22
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -108
- data/Rakefile +0 -55
- data/VERSION +0 -1
- data/devise_invitable.gemspec +0 -146
- data/test/generators_test.rb +0 -45
- data/test/integration/invitable_test.rb +0 -109
- data/test/integration_tests_helper.rb +0 -58
- data/test/mailers/invitation_test.rb +0 -62
- data/test/model_tests_helper.rb +0 -41
- data/test/models/invitable_test.rb +0 -188
- data/test/models_test.rb +0 -31
- data/test/rails_app/app/controllers/admins_controller.rb +0 -6
- data/test/rails_app/app/controllers/application_controller.rb +0 -3
- data/test/rails_app/app/controllers/home_controller.rb +0 -4
- data/test/rails_app/app/controllers/users_controller.rb +0 -12
- data/test/rails_app/app/helpers/application_helper.rb +0 -2
- data/test/rails_app/app/models/octopussy.rb +0 -11
- data/test/rails_app/app/models/user.rb +0 -4
- data/test/rails_app/app/views/home/index.html.erb +0 -0
- data/test/rails_app/app/views/layouts/application.html.erb +0 -15
- data/test/rails_app/app/views/users/invitations/new.html.erb +0 -15
- data/test/rails_app/config/application.rb +0 -46
- data/test/rails_app/config/boot.rb +0 -13
- data/test/rails_app/config/database.yml +0 -22
- data/test/rails_app/config/environment.rb +0 -5
- data/test/rails_app/config/environments/development.rb +0 -26
- data/test/rails_app/config/environments/production.rb +0 -49
- data/test/rails_app/config/environments/test.rb +0 -35
- data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails_app/config/initializers/devise.rb +0 -144
- data/test/rails_app/config/initializers/inflections.rb +0 -10
- data/test/rails_app/config/initializers/mime_types.rb +0 -5
- data/test/rails_app/config/initializers/secret_token.rb +0 -7
- data/test/rails_app/config/initializers/session_store.rb +0 -8
- data/test/rails_app/config/locales/en.yml +0 -5
- data/test/rails_app/config/routes.rb +0 -4
- data/test/rails_app/config.ru +0 -4
- data/test/rails_app/script/rails +0 -6
- data/test/routes_test.rb +0 -20
- data/test/test_helper.rb +0 -30
- /data/app/views/devise/mailer/{invitation.html.erb → invitation_instructions.html.erb} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
|
2
|
-
|
|
3
|
-
# Add new inflection rules using the following format
|
|
4
|
-
# (all these examples are active by default):
|
|
5
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
|
8
|
-
# inflect.irregular 'person', 'people'
|
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
|
10
|
-
# end
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
|
2
|
-
|
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
|
7
|
-
RailsApp::Application.config.secret_token = 'e997edf9d7eba5cf89a76a046fa53f5d66261d22cfcf29e3f538c75ad2d175b106bd5d099f44f6ce34ad3b3162d71cfaa37d2d4f4b38645288331427b4c2a607'
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
|
2
|
-
|
|
3
|
-
RailsApp::Application.config.session_store :cookie_store, :key => '_test_app_session'
|
|
4
|
-
|
|
5
|
-
# Use the database for sessions instead of the cookie-based default,
|
|
6
|
-
# which shouldn't be used to store highly confidential information
|
|
7
|
-
# (create the session table with "rake db:sessions:create")
|
|
8
|
-
# RailsApp::Application.config.session_store :active_record_store
|
data/test/rails_app/config.ru
DELETED
data/test/rails_app/script/rails
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
|
3
|
-
|
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
|
6
|
-
require 'rails/commands'
|
data/test/routes_test.rb
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require 'test/test_helper'
|
|
2
|
-
|
|
3
|
-
class MapRoutingTest < ActionController::TestCase
|
|
4
|
-
|
|
5
|
-
test 'map new user invitation' do
|
|
6
|
-
assert_recognizes({:controller => 'devise/invitations', :action => 'new'}, {:path => 'users/invitation/new', :method => :get})
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
test 'map create user invitation' do
|
|
10
|
-
assert_recognizes({:controller => 'devise/invitations', :action => 'create'}, {:path => 'users/invitation', :method => :post})
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
test 'map accept user invitation' do
|
|
14
|
-
assert_recognizes({:controller => 'devise/invitations', :action => 'edit'}, 'users/invitation/accept')
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
test 'map update user invitation' do
|
|
18
|
-
assert_recognizes({:controller => 'devise/invitations', :action => 'update'}, {:path => 'users/invitation', :method => :put})
|
|
19
|
-
end
|
|
20
|
-
end
|
data/test/test_helper.rb
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
ENV["RAILS_ENV"] = "test"
|
|
2
|
-
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
|
3
|
-
require 'rails_app/config/environment'
|
|
4
|
-
|
|
5
|
-
require 'rails/test_help'
|
|
6
|
-
require 'bundler'
|
|
7
|
-
Bundler.setup(:default, :development)
|
|
8
|
-
require 'capybara/rails'
|
|
9
|
-
|
|
10
|
-
ActionMailer::Base.delivery_method = :test
|
|
11
|
-
ActionMailer::Base.perform_deliveries = true
|
|
12
|
-
ActionMailer::Base.default_url_options[:host] = 'test.com'
|
|
13
|
-
|
|
14
|
-
ActiveRecord::Migration.verbose = false
|
|
15
|
-
ActiveRecord::Base.logger = Logger.new(nil)
|
|
16
|
-
|
|
17
|
-
ActiveRecord::Schema.define(:version => 1) do
|
|
18
|
-
create_table :users do |t|
|
|
19
|
-
t.database_authenticatable :null => true
|
|
20
|
-
t.string :username
|
|
21
|
-
t.confirmable
|
|
22
|
-
t.invitable
|
|
23
|
-
|
|
24
|
-
t.timestamps
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
class ActionDispatch::IntegrationTest
|
|
29
|
-
include Capybara
|
|
30
|
-
end
|
|
File without changes
|