usman 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/usman/api/v1/docs_controller.rb +5 -5
  3. data/app/controllers/usman/api/v1/registrations_controller.rb +136 -49
  4. data/app/models/device.rb +15 -16
  5. data/app/models/registration.rb +1 -1
  6. data/app/services/usman/mobile_registration_service.rb +5 -3
  7. data/app/views/usman/api/v1/docs/accept_tac/_neg_case_1.html.erb +32 -0
  8. data/app/views/usman/api/v1/docs/accept_tac/_neg_case_2.html.erb +30 -0
  9. data/app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb +35 -0
  10. data/app/views/usman/api/v1/docs/accept_tac/_pos_case_1.html.erb +35 -0
  11. data/app/views/usman/api/v1/docs/register/_neg_case_4.html.erb +35 -0
  12. data/app/views/usman/api/v1/docs/register/_pos_case_1.html.erb +30 -28
  13. data/app/views/usman/api/v1/docs/register/_pos_case_2.html.erb +67 -0
  14. data/app/views/usman/api/v1/docs/register/_pos_case_3.html.erb +68 -0
  15. data/app/views/usman/api/v1/docs/resend_otp/_neg_case_1.html.erb +4 -4
  16. data/app/views/usman/api/v1/docs/resend_otp/_neg_case_2.html.erb +34 -0
  17. data/app/views/usman/api/v1/docs/resend_otp/_neg_case_3.html.erb +34 -0
  18. data/app/views/usman/api/v1/docs/resend_otp/_neg_case_4.html.erb +32 -0
  19. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_1.html.erb +5 -9
  20. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_2.html.erb +8 -12
  21. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_3.html.erb +9 -7
  22. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_4.html.erb +33 -0
  23. data/app/views/usman/api/v1/docs/verify_otp/_pos_case_1.html.erb +4 -6
  24. data/app/views/usman/api/v1/docs/verify_otp/_pos_case_2.html.erb +35 -0
  25. data/config/locales/usman/api.ar.yml +50 -8
  26. data/config/locales/usman/api.en.yml +50 -8
  27. data/config/routes.rb +1 -1
  28. data/lib/usman/version.rb +1 -1
  29. metadata +16 -4
@@ -3,37 +3,79 @@ en:
3
3
  general:
4
4
  heading: "Invalid API Token"
5
5
  message: "Use the API Token you have received after accepting the terms and agreement"
6
- mobile_registration:
6
+ register:
7
7
  device_blocked:
8
8
  heading: "This device is blocked"
9
9
  message: "You must have done some mal-practices"
10
- invalid_inputs:
11
- heading: "Registring new mobile number FAILED"
12
- message: "Check if all mandatory details are passed. Refer the error details for technical information"
13
10
  otp_sent:
14
11
  heading: "An OTP has been sent to you"
15
12
  message: "Check your mobile for new message from us"
13
+ otp_not_sent:
14
+ heading: "OTP was not sent"
15
+ message: "There was some technical glitch and OTP was not sent. Try after some time"
16
+ invalid_inputs:
17
+ heading: "Registring new mobile number FAILED"
18
+ message: "Check if all mandatory details are passed. Refer the error details for technical information"
19
+ resend_otp:
20
+ device_blocked:
21
+ heading: "This device is blocked"
22
+ message: "You must have done some mal-practices"
16
23
  new_otp_sent:
17
24
  heading: "An new OTP has been sent to you"
18
25
  message: "Check your mobile for new message from us"
19
26
  otp_not_sent:
20
- heading: "OTP was not sent"
21
- message: "There was some technical glitch and OTP was not sent. Try after some time"
27
+ heading: "OTP sent failed"
28
+ message: "Check if all the inputs are valid"
22
29
  otp_not_matching:
23
30
  heading: "OTP verification was failed"
24
- message: "Make sure that you enter the OTP correctly"
31
+ message: "Make sure that you enter the OTP correctly"
32
+ mobile_number_not_registered:
33
+ heading: "The mobile number is not registered"
34
+ message: "Resending OTP Failed. Check if the mobile number entered is valid"
35
+ device_not_registered:
36
+ heading: "The device is not registered"
37
+ message: "Resending OTP Failed. Check if the UUID entered is valid"
38
+ verify_otp:
39
+ device_blocked:
40
+ heading: "This device is blocked"
41
+ message: "You must have done some mal-practices"
42
+ device_verified:
43
+ heading: "OTP sent failed"
44
+ message: "This device may be already verified"
45
+ otp_not_matching:
46
+ heading: "OTP verification was failed"
47
+ message: "Make sure that you enter the OTP correctly"
48
+ mobile_number_not_registered:
49
+ heading: "The mobile number is not registered"
50
+ message: "Verifying OTP Failed. Check if the mobile number entered is valid"
51
+ device_not_registered:
52
+ heading: "The device is not registered"
53
+ message: "Verifying OTP Failed. Check if the UUID entered is valid"
25
54
  verification_failed:
26
55
  heading: "OTP verification was failed"
27
56
  message: "Check if you have properly given the OTP along with dialing prefix, mobile number & UUID"
28
57
  verification_success:
29
58
  heading: "OTP was verified succesfully"
30
- message: "Now, accept the terms and conditions to finish the registration process and get API token"
59
+ message: "You may need to accept the terms and conditions to get the API token if you have not yet finised the registration"
60
+ accept_tac:
31
61
  tac_accepted:
32
62
  heading: "You have successfully accepted the Terms & Conditions. Proceed with Registration process if any"
33
63
  message: "Store and use the API token for further communication"
34
64
  tac_not_accepted:
35
65
  heading: "You have not accepted the Terms & Conditions. Registration is complete only if you accept the T&C"
36
66
  message: "Accept the T&C to finish the Registration. Pass true"
67
+ device_blocked:
68
+ heading: "This device is blocked"
69
+ message: "You must have done some mal-practices"
70
+ device_pending:
71
+ heading: "This device is not verified"
72
+ message: "You need to verify this device before you can accept the terms and conditions"
73
+ mobile_number_not_registered:
74
+ heading: "The mobile number is not registered"
75
+ message: "Accepting T&C Failed. Check if the mobile number entered is valid"
76
+ device_not_registered:
77
+ heading: "The device is not registered"
78
+ message: "Accepting T&C Failed. Check if the UUID entered is valid"
37
79
  profile:
38
80
  user_already_exists:
39
81
  heading: "A profile already exists for the mobile number you have provided"
data/config/routes.rb CHANGED
@@ -45,7 +45,7 @@ Usman::Engine.routes.draw do
45
45
  # Registrations
46
46
  post :register, :controller => "registrations"
47
47
  post :resend_otp, :controller => "registrations"
48
- post :verify, :controller => "registrations"
48
+ post :verify_otp, :controller => "registrations"
49
49
  post :accept_tac, :controller => "registrations"
50
50
 
51
51
  # Profile
data/lib/usman/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Usman
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-06 00:00:00.000000000 Z
11
+ date: 2017-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,14 +104,14 @@ dependencies:
104
104
  requirements:
105
105
  - - "~>"
106
106
  - !ruby/object:Gem::Version
107
- version: 0.1.4
107
+ version: 0.1.5
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
- version: 0.1.4
114
+ version: 0.1.5
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: bcrypt
117
117
  requirement: !ruby/object:Gem::Requirement
@@ -388,16 +388,28 @@ files:
388
388
  - app/views/layouts/kuppayam/_navbar.html.erb
389
389
  - app/views/layouts/kuppayam/_sidebar.html.erb
390
390
  - app/views/layouts/kuppayam/profile.html.erb
391
+ - app/views/usman/api/v1/docs/accept_tac/_neg_case_1.html.erb
392
+ - app/views/usman/api/v1/docs/accept_tac/_neg_case_2.html.erb
393
+ - app/views/usman/api/v1/docs/accept_tac/_neg_case_3.html.erb
394
+ - app/views/usman/api/v1/docs/accept_tac/_pos_case_1.html.erb
391
395
  - app/views/usman/api/v1/docs/register/_neg_case_1.html.erb
392
396
  - app/views/usman/api/v1/docs/register/_neg_case_2.html.erb
393
397
  - app/views/usman/api/v1/docs/register/_neg_case_3.html.erb
398
+ - app/views/usman/api/v1/docs/register/_neg_case_4.html.erb
394
399
  - app/views/usman/api/v1/docs/register/_pos_case_1.html.erb
400
+ - app/views/usman/api/v1/docs/register/_pos_case_2.html.erb
401
+ - app/views/usman/api/v1/docs/register/_pos_case_3.html.erb
395
402
  - app/views/usman/api/v1/docs/resend_otp/_neg_case_1.html.erb
403
+ - app/views/usman/api/v1/docs/resend_otp/_neg_case_2.html.erb
404
+ - app/views/usman/api/v1/docs/resend_otp/_neg_case_3.html.erb
405
+ - app/views/usman/api/v1/docs/resend_otp/_neg_case_4.html.erb
396
406
  - app/views/usman/api/v1/docs/resend_otp/_pos_case_1.html.erb
397
407
  - app/views/usman/api/v1/docs/verify_otp/_neg_case_1.html.erb
398
408
  - app/views/usman/api/v1/docs/verify_otp/_neg_case_2.html.erb
399
409
  - app/views/usman/api/v1/docs/verify_otp/_neg_case_3.html.erb
410
+ - app/views/usman/api/v1/docs/verify_otp/_neg_case_4.html.erb
400
411
  - app/views/usman/api/v1/docs/verify_otp/_pos_case_1.html.erb
412
+ - app/views/usman/api/v1/docs/verify_otp/_pos_case_2.html.erb
401
413
  - app/views/usman/dashboard/index.html.erb
402
414
  - app/views/usman/features/_form.html.erb
403
415
  - app/views/usman/features/_index.html.erb