devise_phone 0.0.14 → 0.0.15
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0f34161c84cc826347fcdbee8e8f29142304cf8
|
4
|
+
data.tar.gz: 5480ceb69168e8b3d594c6099e871b67ee73e8c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91a59a528fab2becadd85d339622cf2de1d77bf0cc32f2f5bdc2c565c314f1721e150912fc1f9fea6470ae9e99482174cc309b1f7c83ea7647186c1c3b250c7c
|
7
|
+
data.tar.gz: e4ee82682794bb292ab5475e94b491a006550a0e1456fae6d60aa8f4de1b161e374ef01ae9a74d7f29b786e8b6b8bd3c0b7ced62029b4d4066989b1f3e76dba1
|
data/lib/devise_phone/version.rb
CHANGED
@@ -3,7 +3,7 @@ module DevisePhone
|
|
3
3
|
class DevisePhoneGenerator < Rails::Generators::NamedBase
|
4
4
|
namespace "devise_phone"
|
5
5
|
|
6
|
-
desc "Add :
|
6
|
+
desc "Add :phone directive in the given model. Also generate migration for ActiveRecord"
|
7
7
|
|
8
8
|
# def devise_generate_model
|
9
9
|
# invoke "devise", [name]
|
@@ -11,7 +11,7 @@ module DevisePhone
|
|
11
11
|
|
12
12
|
def inject_devise_phone_content
|
13
13
|
path = File.join("app", "models", "#{file_path}.rb")
|
14
|
-
inject_into_file(path, "
|
14
|
+
inject_into_file(path, "phone, :", :after => "devise :") if File.exists?(path)
|
15
15
|
end
|
16
16
|
|
17
17
|
hook_for :orm
|
@@ -15,34 +15,34 @@ module DevisePhone
|
|
15
15
|
|
16
16
|
if old_content.match(Regexp.new(/^\s# ==> Configuration for :phone\n/))
|
17
17
|
false
|
18
|
-
|
19
|
-
|
20
|
-
<<-CONTENT
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
# else
|
19
|
+
# inject_into_file(devise_initializer_path, :before => " # ==> Configuration for :confirmable\n") do
|
20
|
+
# <<-CONTENT
|
21
|
+
# # ==> Configuration for :phone
|
22
|
+
# # The period the generated sms token is valid, after
|
23
|
+
# # this period, the user won't be able to activate.
|
24
|
+
# # config.sms_confirm_within = 0.days
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
# # The keys searched for confirmation values.
|
27
|
+
# # config.sms_confirmation_keys = [:email]
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
# # Your SmsSender class. The provided one uses
|
30
|
+
# # moonshado-sms gem so install it and configure
|
31
|
+
# # if you want to use it.
|
32
|
+
# # A simple instance of the class has been copied in your lib folder
|
33
|
+
# # For further informations on using and configuring moonshado-sms gem check
|
34
|
+
# # https://github.com/moonshado/moonshado-sms
|
35
|
+
# # config.sms_sender = "Devise::SmsSender"
|
36
36
|
|
37
|
-
CONTENT
|
37
|
+
# CONTENT
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
def copy_locale
|
44
|
-
|
45
|
-
end
|
43
|
+
# def copy_locale
|
44
|
+
# copy_file "../../../config/locales/en.yml", "config/locales/devise_phone.en.yml"
|
45
|
+
# end
|
46
46
|
|
47
47
|
def copy_default_smser
|
48
48
|
copy_file "lib/sms_sender.rb", "lib/devise_sms_sender.rb"
|