shilpa20 1.2.5 → 1.2.6
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/lib/shilpa20/authentication_service.rb +1 -1
- data/lib/shilpa20/user_service.rb +13 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ab20d08cccf9519ca1a7736b2ba40728e9e04f5c75b2fcfae0bdeaec12044f9
|
4
|
+
data.tar.gz: 9e613095388f2495911a86ad2f76c2e8d2cef3742ad2215dea57859d422e8fbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53ffa372e8ff0e4aa36f853d8ac13acbb3cd8b2c760467f6d68a9bdaec1659c80046a600b64f17ad618e7afb12333bb587a2e5250d66d70004bc60691f95ba47
|
7
|
+
data.tar.gz: 577de1ed27d32cc02a74ffe7f07dbf4117f9bc9e41ebe841863f66010f774d9e8ad566378d429a2e06f163a9388584e09c08de839da47510639f0eb1f7d15590
|
@@ -39,7 +39,7 @@ class AuthenticationService
|
|
39
39
|
auth.grant_type = "password"
|
40
40
|
# auth.client_id = "277ef29692f9a70d511415dc60592daf4cf2c6f6552d3e1b769924b2f2e2e6fe"
|
41
41
|
#auth.client_secret = "d6106f26e8ff5b749a606a1fba557f44eb3dca8f48596847770beb9b643ea352"
|
42
|
-
auth.username = "
|
42
|
+
auth.username = "sachinmurthy56@gmail.com"
|
43
43
|
auth.password = "password"
|
44
44
|
return auth
|
45
45
|
end
|
@@ -2,6 +2,7 @@ require 'rest-client'
|
|
2
2
|
require 'json'
|
3
3
|
require_relative '../domain/client_info_base.rb'
|
4
4
|
require_relative '../domain/user.rb'
|
5
|
+
require_relative '../domain/password.rb'
|
5
6
|
require_relative '../domain/application_config.rb'
|
6
7
|
require_relative 'authentication_service'
|
7
8
|
|
@@ -22,7 +23,9 @@ class UserService
|
|
22
23
|
end
|
23
24
|
|
24
25
|
def self.update_user(user, bearer_token)
|
25
|
-
|
26
|
+
user_with_client_info = get_user_with_client_info(user)
|
27
|
+
update_user_payload = User.get_payload(user_with_client_info)
|
28
|
+
puts update_user_payload
|
26
29
|
return RestClient::Request.execute(method: :put, url: @@create_update_url,
|
27
30
|
payload: update_user_payload,
|
28
31
|
headers: {'Content-Type': 'application/json', 'Authorization': bearer_token})
|
@@ -70,13 +73,13 @@ class UserService
|
|
70
73
|
# to remove once tested
|
71
74
|
def self.create_user_with_client_info
|
72
75
|
user = User.new
|
73
|
-
user.first_name = "
|
74
|
-
user.last_name = "
|
75
|
-
|
76
|
+
user.first_name = "1000"
|
77
|
+
user.last_name = "9Murthy"
|
78
|
+
#user.password = "password"
|
76
79
|
# user.current_password = "password"
|
77
80
|
# user.new_password = "password123"
|
78
|
-
|
79
|
-
|
81
|
+
user.date_of_birth = 1464083530
|
82
|
+
# user.email = "sachinmurthy56@gmail.com"
|
80
83
|
user.image_url = "https://static.thenounproject.com/png/961-200.png"
|
81
84
|
|
82
85
|
#user_with_client_info = ClientInfoBase.new
|
@@ -89,9 +92,11 @@ class UserService
|
|
89
92
|
end
|
90
93
|
|
91
94
|
# to remove once tested
|
92
|
-
|
95
|
+
ApplicationConfig.set_config("277ef29692f9a70d511415dc60592daf4cf2c6f6552d3e1b769924b2f2e2e6fe", "d6106f26e8ff5b749a606a1fba557f44eb3dca8f48596847770beb9b643ea352")
|
93
96
|
#user = User.new
|
94
97
|
#user.email = "sachinmurthy93@gmail.com"
|
95
98
|
#puts userWithClientIfno = UserService.check_email(user)
|
96
99
|
#user = UserService.create_user_with_client_info
|
97
|
-
#puts UserService.
|
100
|
+
#puts UserService.create_user(user)
|
101
|
+
|
102
|
+
puts UserService.update_user(user, "Bearer e27068fdf956a544de1d26a8e615919989b9f197171143dc12a8e7de11d6afb3")
|