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.
Files changed (63) hide show
  1. data/README.rdoc +124 -43
  2. data/app/controllers/devise/invitations_controller.rb +36 -9
  3. data/app/views/devise/invitations/new.html.erb +1 -1
  4. data/config/locales/en.yml +5 -3
  5. data/lib/devise_invitable/controllers/helpers.rb +1 -6
  6. data/lib/devise_invitable/inviter.rb +39 -0
  7. data/lib/devise_invitable/mailer.rb +4 -3
  8. data/lib/devise_invitable/model.rb +99 -41
  9. data/lib/devise_invitable/rails.rb +5 -2
  10. data/lib/devise_invitable/routes.rb +8 -5
  11. data/lib/devise_invitable/schema.rb +29 -2
  12. data/lib/devise_invitable/version.rb +3 -0
  13. data/lib/devise_invitable.rb +48 -6
  14. data/lib/generators/active_record/templates/migration.rb +15 -7
  15. data/lib/generators/devise_invitable/devise_invitable_generator.rb +4 -0
  16. data/lib/generators/devise_invitable/install_generator.rb +21 -2
  17. data/lib/generators/devise_invitable/views_generator.rb +11 -2
  18. data/lib/generators/mongoid/devise_invitable_generator.rb +8 -0
  19. metadata +63 -143
  20. data/.document +0 -5
  21. data/.gitignore +0 -22
  22. data/Gemfile +0 -3
  23. data/Gemfile.lock +0 -108
  24. data/Rakefile +0 -55
  25. data/VERSION +0 -1
  26. data/devise_invitable.gemspec +0 -146
  27. data/test/generators_test.rb +0 -45
  28. data/test/integration/invitable_test.rb +0 -109
  29. data/test/integration_tests_helper.rb +0 -58
  30. data/test/mailers/invitation_test.rb +0 -62
  31. data/test/model_tests_helper.rb +0 -41
  32. data/test/models/invitable_test.rb +0 -188
  33. data/test/models_test.rb +0 -31
  34. data/test/rails_app/app/controllers/admins_controller.rb +0 -6
  35. data/test/rails_app/app/controllers/application_controller.rb +0 -3
  36. data/test/rails_app/app/controllers/home_controller.rb +0 -4
  37. data/test/rails_app/app/controllers/users_controller.rb +0 -12
  38. data/test/rails_app/app/helpers/application_helper.rb +0 -2
  39. data/test/rails_app/app/models/octopussy.rb +0 -11
  40. data/test/rails_app/app/models/user.rb +0 -4
  41. data/test/rails_app/app/views/home/index.html.erb +0 -0
  42. data/test/rails_app/app/views/layouts/application.html.erb +0 -15
  43. data/test/rails_app/app/views/users/invitations/new.html.erb +0 -15
  44. data/test/rails_app/config/application.rb +0 -46
  45. data/test/rails_app/config/boot.rb +0 -13
  46. data/test/rails_app/config/database.yml +0 -22
  47. data/test/rails_app/config/environment.rb +0 -5
  48. data/test/rails_app/config/environments/development.rb +0 -26
  49. data/test/rails_app/config/environments/production.rb +0 -49
  50. data/test/rails_app/config/environments/test.rb +0 -35
  51. data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  52. data/test/rails_app/config/initializers/devise.rb +0 -144
  53. data/test/rails_app/config/initializers/inflections.rb +0 -10
  54. data/test/rails_app/config/initializers/mime_types.rb +0 -5
  55. data/test/rails_app/config/initializers/secret_token.rb +0 -7
  56. data/test/rails_app/config/initializers/session_store.rb +0 -8
  57. data/test/rails_app/config/locales/en.yml +0 -5
  58. data/test/rails_app/config/routes.rb +0 -4
  59. data/test/rails_app/config.ru +0 -4
  60. data/test/rails_app/script/rails +0 -6
  61. data/test/routes_test.rb +0 -20
  62. data/test/test_helper.rb +0 -30
  63. /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,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -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
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,4 +0,0 @@
1
- RailsApp::Application.routes.draw do
2
- devise_for :users
3
- root :to => 'home#index'
4
- end
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run TestApp::Application
@@ -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