usman 0.3.19 → 0.3.20
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 +4 -4
- data/app/models/user.rb +4 -2
- data/app/services/usman/mobile_registration_service.rb +1 -1
- data/app/views/usman/api/v1/docs/accept_tac/_pos_case_1.html.erb +52 -1
- data/app/views/usman/api/v1/docs/register/_pos_case_1.html.erb +1 -1
- data/app/views/usman/api/v1/docs/register/_pos_case_2.html.erb +1 -1
- data/app/views/usman/api/v1/docs/register/_pos_case_3.html.erb +1 -1
- data/app/views/usman/api/v1/docs/verify_otp/_pos_case_1.html.erb +30 -2
- data/app/views/usman/api/v1/docs/verify_otp/_pos_case_2.html.erb +53 -19
- data/lib/usman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb365fb6b07ac4b3768080d93f9fd8c9d7833eae
|
4
|
+
data.tar.gz: 34b300f8d53af152f10413402641cb615a2fcb43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe80a55619b84f35ccb006efa262542da0ccaa6e1fd2eb9891a89b8314b11da8d9b6a4285e20790a79756ec3535c806520d3d907234472283f92136a77eed562
|
7
|
+
data.tar.gz: 42157dda7e12b97dccfb303516c3734a3a1b31f9fa922920056c83db4b5ee41dc466767cc505adfa0b271688477caff61ee7d4edb97a7dbf357ab9d0bd15f3c7
|
data/app/models/user.rb
CHANGED
@@ -448,10 +448,12 @@ class User < Usman::ApplicationRecord
|
|
448
448
|
self.password_confirmation = passwd
|
449
449
|
end
|
450
450
|
|
451
|
-
def generate_dummy_data(
|
451
|
+
def generate_dummy_data(registration)
|
452
452
|
generate_username_and_password
|
453
453
|
self.email = "#{self.username}@donedealapps.com"
|
454
|
-
self.name = "User #{
|
454
|
+
self.name = "User #{registration.try(:id)}"
|
455
|
+
self.country_id = registration.country_id
|
456
|
+
self.city_id = registration.city_id
|
455
457
|
self.dummy = true
|
456
458
|
end
|
457
459
|
|
@@ -112,7 +112,7 @@ module Usman
|
|
112
112
|
def create_a_dummy_user
|
113
113
|
return unless @registration.persisted?
|
114
114
|
@registration.user = User.new
|
115
|
-
@registration.user.generate_dummy_data(@registration
|
115
|
+
@registration.user.generate_dummy_data(@registration)
|
116
116
|
@registration.user.save
|
117
117
|
end
|
118
118
|
|
@@ -25,7 +25,58 @@ api_output = <<-eos
|
|
25
25
|
"message": "Store and use the API token for further communication"
|
26
26
|
},
|
27
27
|
"data": {
|
28
|
-
"api_token": "ajshdjkashdkjasdas"
|
28
|
+
"api_token": "ajshdjkashdkjasdas",
|
29
|
+
"registration": {
|
30
|
+
"id": 165,
|
31
|
+
"dialing_prefix": "+97",
|
32
|
+
"mobile_number": "1501370320",
|
33
|
+
"status": "verified",
|
34
|
+
"user_id": 19,
|
35
|
+
"country_id": 235,
|
36
|
+
"city_id": 21,
|
37
|
+
"user": {
|
38
|
+
"id": 19,
|
39
|
+
"name": "Mickey Mouse ",
|
40
|
+
"gender": "male",
|
41
|
+
"date_of_birth": "10-10-1983",
|
42
|
+
"username": "342721f3",
|
43
|
+
"email": "mickey@dondealapps.com",
|
44
|
+
"phone": "",
|
45
|
+
"dummy": false
|
46
|
+
},
|
47
|
+
"country": {
|
48
|
+
"id": 235,
|
49
|
+
"name": "United Arab Emirates",
|
50
|
+
"iso_name": "UNITED ARAB EMIRATES",
|
51
|
+
"iso_alpha_2": "AE",
|
52
|
+
"dialing_prefix": "971",
|
53
|
+
"priority": 1000,
|
54
|
+
"operational": true
|
55
|
+
},
|
56
|
+
"city": {
|
57
|
+
"id": 21,
|
58
|
+
"name": "Abu Dhabi",
|
59
|
+
"priority": 1000,
|
60
|
+
"operational": true
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"profile": {
|
64
|
+
"id": 19,
|
65
|
+
"name": "Mickey Mouse ",
|
66
|
+
"gender": "male",
|
67
|
+
"date_of_birth": "10-10-1983",
|
68
|
+
"username": "342721f3",
|
69
|
+
"email": "mickey@dondealapps.com",
|
70
|
+
"phone": "",
|
71
|
+
"dummy": false,
|
72
|
+
"profile_picture": {
|
73
|
+
"id": 60,
|
74
|
+
"created_at": "26-09-2017 01:05:15",
|
75
|
+
"profile_id": 19,
|
76
|
+
"image_large_path": "/uploads/profile_pictures/60/large_micky.jpg",
|
77
|
+
"image_small_path": "/uploads/profile_pictures/60/small_micky.jpg"
|
78
|
+
}
|
79
|
+
}
|
29
80
|
}
|
30
81
|
}
|
31
82
|
eos
|
@@ -30,14 +30,42 @@ api_output = <<-eos
|
|
30
30
|
"city_id": "",
|
31
31
|
"dialing_prefix": "+91",
|
32
32
|
"mobile_number": "192837465",
|
33
|
-
"status": "verified"
|
33
|
+
"status": "verified",
|
34
|
+
"user": {
|
35
|
+
"id": 15,
|
36
|
+
"name": "Name",
|
37
|
+
"gender": "male",
|
38
|
+
"date_of_birth": "10-10-1980",
|
39
|
+
"username": "0d5fe1c4",
|
40
|
+
"email": "sa@domain.com",
|
41
|
+
"phone": "",
|
42
|
+
"dummy": false
|
43
|
+
},
|
44
|
+
"country": {
|
45
|
+
"id": 100,
|
46
|
+
"name": "India",
|
47
|
+
"iso_name": "INDIA",
|
48
|
+
"iso_alpha_2": "IN",
|
49
|
+
"dialing_prefix": "91",
|
50
|
+
"priority": 1000,
|
51
|
+
"operational": true
|
52
|
+
},
|
53
|
+
"city": {
|
54
|
+
"id": 20199,
|
55
|
+
"name": "Cochin",
|
56
|
+
"priority": 1000,
|
57
|
+
"operational": true
|
58
|
+
}
|
34
59
|
},
|
35
60
|
"profile": {
|
36
61
|
"id": "",
|
37
62
|
"name": "",
|
38
63
|
"gender": "",
|
39
64
|
"email": "",
|
40
|
-
"
|
65
|
+
"username": "0d5fe1c4",
|
66
|
+
"date_of_birth": "",
|
67
|
+
"phone": "",
|
68
|
+
"dummy": false
|
41
69
|
}
|
42
70
|
}
|
43
71
|
}
|
@@ -21,25 +21,59 @@ api_output = <<-eos
|
|
21
21
|
"heading": "OTP was verified succesfully",
|
22
22
|
"message": "You may need to accept the terms and conditions to get the API token if you have not yet finished the registration"
|
23
23
|
},
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
"data": {
|
25
|
+
"api_token": "67d9f2430759eb304e1e64fa01a7829e",
|
26
|
+
"registration": {
|
27
|
+
"id": 165,
|
28
|
+
"dialing_prefix": "+97",
|
29
|
+
"mobile_number": "1501370320",
|
30
|
+
"status": "verified",
|
31
|
+
"user_id": 19,
|
32
|
+
"country_id": 235,
|
33
|
+
"city_id": 21,
|
34
|
+
"user": {
|
35
|
+
"id": 19,
|
36
|
+
"name": "Mickey Mouse ",
|
37
|
+
"gender": "male",
|
38
|
+
"date_of_birth": "10-10-1983",
|
39
|
+
"username": "342721f3",
|
40
|
+
"email": "mickey@dondealapps.com",
|
41
|
+
"phone": "",
|
42
|
+
"dummy": false
|
43
|
+
},
|
44
|
+
"country": {
|
45
|
+
"id": 235,
|
46
|
+
"name": "United Arab Emirates",
|
47
|
+
"iso_name": "UNITED ARAB EMIRATES",
|
48
|
+
"iso_alpha_2": "AE",
|
49
|
+
"dialing_prefix": "971",
|
50
|
+
"priority": 1000,
|
51
|
+
"operational": true
|
52
|
+
},
|
53
|
+
"city": {
|
54
|
+
"id": 21,
|
55
|
+
"name": "Abu Dhabi",
|
56
|
+
"priority": 1000,
|
57
|
+
"operational": true
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"profile": {
|
61
|
+
"id": 19,
|
62
|
+
"name": "Mickey Mouse ",
|
63
|
+
"gender": "male",
|
64
|
+
"date_of_birth": "10-10-1983",
|
65
|
+
"username": "342721f3",
|
66
|
+
"email": "mickey@dondealapps.com",
|
67
|
+
"phone": "",
|
68
|
+
"dummy": false,
|
69
|
+
"profile_picture": {
|
70
|
+
"id": 60,
|
71
|
+
"created_at": "26-09-2017 01:05:15",
|
72
|
+
"profile_id": 19,
|
73
|
+
"image_large_path": "/uploads/profile_pictures/60/large_micky.jpg",
|
74
|
+
"image_small_path": "/uploads/profile_pictures/60/small_micky.jpg"
|
75
|
+
}
|
76
|
+
}
|
43
77
|
}
|
44
78
|
}
|
45
79
|
eos
|
data/lib/usman/version.rb
CHANGED