devise_invitable 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise_invitable might be problematic. Click here for more details.
- checksums.yaml +7 -7
- data/README.rdoc +1 -1
- data/app/controllers/devise/invitations_controller.rb +3 -3
- data/app/views/devise/mailer/invitation_instructions.html.erb +4 -5
- data/config/locales/en.yml +4 -0
- data/lib/devise_invitable/model.rb +1 -1
- data/lib/devise_invitable/version.rb +1 -1
- data/lib/generators/active_record/devise_invitable_generator.rb +1 -1
- data/lib/generators/active_record/templates/migration.rb +4 -0
- metadata +52 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA512:
|
3
|
+
metadata.gz: 47b3e5072420f492fdb25c04d955860feae08b9cc8f58b06f67d2cfc00405f46b101f7111c1d7bd40231bf3d5d8db398f9ee4f05d9498014b49be2bea9138c6b
|
4
|
+
data.tar.gz: ee0e6d336eb94aa339bf1396017c599940749826c97482f552a3b43cc83c7aad55394d739f1925b7dbd0759f3f5ac664695d87f35deb15e5ea370812b316ab24
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: c94dba7594aa55c76ed2b4790ebe224c4d63c0c5
|
7
|
+
data.tar.gz: 6938c9b1a965c2937762d70606998a6a9cb60a04
|
data/README.rdoc
CHANGED
@@ -16,7 +16,7 @@ Install DeviseInvitable gem, it will also install dependencies (such as devise a
|
|
16
16
|
Add DeviseInvitable to your Gemfile (and Devise if you weren't using them):
|
17
17
|
|
18
18
|
gem 'devise', '>= 2.0.0'
|
19
|
-
gem 'devise_invitable', '~> 1.
|
19
|
+
gem 'devise_invitable', '~> 1.3.4'
|
20
20
|
|
21
21
|
=== Automatic installation
|
22
22
|
|
@@ -55,8 +55,8 @@ class Devise::InvitationsController < DeviseController
|
|
55
55
|
|
56
56
|
protected
|
57
57
|
|
58
|
-
def invite_resource
|
59
|
-
resource_class.invite!(invite_params, current_inviter)
|
58
|
+
def invite_resource(&block)
|
59
|
+
resource_class.invite!(invite_params, current_inviter, &block)
|
60
60
|
end
|
61
61
|
|
62
62
|
def accept_resource
|
@@ -64,7 +64,7 @@ class Devise::InvitationsController < DeviseController
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def current_inviter
|
67
|
-
|
67
|
+
authenticate_inviter!
|
68
68
|
end
|
69
69
|
|
70
70
|
def has_invitations_left?
|
@@ -1,8 +1,7 @@
|
|
1
|
-
<p
|
1
|
+
<p><%= I18n.t("devise.mailer.invitation_instructions.hello", email: @resource.email) %></p>
|
2
2
|
|
3
|
-
<p
|
3
|
+
<p><%= I18n.t("devise.mailer.invitation_instructions.someone_invited_you", url: root_url) %></p>
|
4
4
|
|
5
|
-
<p><%= link_to
|
5
|
+
<p><%= link_to I18n.t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, :invitation_token => @token) %></p>
|
6
6
|
|
7
|
-
<p
|
8
|
-
Your account won't be created until you access the link above and set your password.</p>
|
7
|
+
<p><%= I18n.t("devise.mailer.invitation_instructions.ignore").html_safe %></p>
|
data/config/locales/en.yml
CHANGED
@@ -15,3 +15,7 @@ en:
|
|
15
15
|
mailer:
|
16
16
|
invitation_instructions:
|
17
17
|
subject: 'Invitation instructions'
|
18
|
+
hello: 'Hello %{email}'
|
19
|
+
someone_invited_you: 'Someone has invited you to %{url}, you can accept it through the link below.'
|
20
|
+
accept: 'Accept invitation'
|
21
|
+
ignore: "If you don't want to accept the invitation, please ignore this email.<br />Your account won't be created until you access the link above and set your password."
|
@@ -49,7 +49,7 @@ module Devise
|
|
49
49
|
|
50
50
|
attr_writer :skip_password
|
51
51
|
|
52
|
-
scope :
|
52
|
+
scope :no_active_invitation, lambda { where(:invitation_token => nil) }
|
53
53
|
if defined?(Mongoid) && defined?(Mongoid::Document) && self < Mongoid::Document
|
54
54
|
scope :invitation_not_accepted, lambda { where(:invitation_accepted_at => nil, :invitation_token.ne => nil) }
|
55
55
|
scope :invitation_accepted, lambda { where(:invitation_accepted_at.ne => nil) }
|
@@ -6,7 +6,7 @@ module ActiveRecord
|
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
7
|
|
8
8
|
def copy_devise_migration
|
9
|
-
migration_template "migration.rb", "db/migrate/devise_invitable_add_to_#{table_name}"
|
9
|
+
migration_template "migration.rb", "db/migrate/devise_invitable_add_to_#{table_name}.rb"
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -25,5 +25,9 @@ class DeviseInvitableAddTo<%= table_name.camelize %> < ActiveRecord::Migration
|
|
25
25
|
t.remove_references :invited_by, :polymorphic => true
|
26
26
|
t.remove :invitations_count, :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token, :invitation_created_at
|
27
27
|
end
|
28
|
+
change_column_null :users, :encrypted_password, false
|
29
|
+
<% if class_name.constantize.columns_hash['password_salt'] -%>
|
30
|
+
change_column_null :<%= table_name %>, :password_salt,false
|
31
|
+
<% end -%>
|
28
32
|
end
|
29
33
|
end
|
metadata
CHANGED
@@ -1,71 +1,59 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_invitable
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Sergio Cambra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2014-05-09 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.1.0
|
20
|
-
type: :development
|
21
16
|
prerelease: false
|
22
|
-
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
26
21
|
version: 1.1.0
|
27
|
-
|
22
|
+
type: :development
|
23
|
+
version_requirements: *id001
|
24
|
+
- !ruby/object:Gem::Dependency
|
28
25
|
name: actionmailer
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 3.2.6
|
34
|
-
- - <
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '5'
|
37
|
-
type: :runtime
|
38
26
|
prerelease: false
|
39
|
-
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
27
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
43
31
|
version: 3.2.6
|
44
32
|
- - <
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: devise
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 3.2.0
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "5"
|
54
35
|
type: :runtime
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: devise
|
55
39
|
prerelease: false
|
56
|
-
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
60
44
|
version: 3.2.0
|
61
|
-
|
62
|
-
|
63
|
-
email
|
45
|
+
type: :runtime
|
46
|
+
version_requirements: *id003
|
47
|
+
description: It adds support for send invitations by email (it requires to be authenticated) and accept the invitation by setting a password.
|
48
|
+
email:
|
64
49
|
- sergio@entrecables.com
|
65
50
|
executables: []
|
51
|
+
|
66
52
|
extensions: []
|
53
|
+
|
67
54
|
extra_rdoc_files: []
|
68
|
-
|
55
|
+
|
56
|
+
files:
|
69
57
|
- app/controllers/devise/invitations_controller.rb
|
70
58
|
- app/controllers/devise_invitable/registrations_controller.rb
|
71
59
|
- app/views/devise/invitations/edit.html.erb
|
@@ -145,33 +133,35 @@ files:
|
|
145
133
|
- test/routes_test.rb
|
146
134
|
- test/test_helper.rb
|
147
135
|
homepage: https://github.com/scambra/devise_invitable
|
148
|
-
licenses:
|
136
|
+
licenses:
|
149
137
|
- MIT
|
150
138
|
metadata: {}
|
139
|
+
|
151
140
|
post_install_message:
|
152
|
-
rdoc_options:
|
141
|
+
rdoc_options:
|
153
142
|
- --main
|
154
143
|
- README.rdoc
|
155
144
|
- --charset=UTF-8
|
156
|
-
require_paths:
|
145
|
+
require_paths:
|
157
146
|
- lib
|
158
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
-
requirements:
|
160
|
-
- -
|
161
|
-
- !ruby/object:Gem::Version
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
162
151
|
version: 1.8.6
|
163
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
|
-
requirements:
|
165
|
-
- -
|
166
|
-
- !ruby/object:Gem::Version
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
167
156
|
version: 1.3.6
|
168
157
|
requirements: []
|
158
|
+
|
169
159
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.0.7
|
171
161
|
signing_key:
|
172
162
|
specification_version: 4
|
173
163
|
summary: An invitation strategy for Devise
|
174
|
-
test_files:
|
164
|
+
test_files:
|
175
165
|
- test/functional/controller_helpers_test.rb
|
176
166
|
- test/functional/registrations_controller_test.rb
|
177
167
|
- test/generators/views_generator_test.rb
|
@@ -223,3 +213,4 @@ test_files:
|
|
223
213
|
- test/rails_app/script/rails
|
224
214
|
- test/routes_test.rb
|
225
215
|
- test/test_helper.rb
|
216
|
+
has_rdoc:
|