widgets_api_client 0.1.0.3 → 0.1.0.4
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 +5 -5
- data/lib/domain/user.rb +4 -4
- data/lib/domain/widget.rb +1 -1
- data/lib/services/user_service.rb +1 -0
- data/lib/widgets_api_client.rb +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c49fc7a62de86249270bf8b7b1054e3e37fd4637
|
4
|
+
data.tar.gz: a9a081b28d6ebc9e01547d4c157241912b34236c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92dd271d64545ac92daf954d0f2ab6c8957ff1e55ed00dd0c0e490ca6c149bf62f6cc71dd4a5be446d91cdb3a284111173fdcdf33e320817ffe63bfd8376f4ab
|
7
|
+
data.tar.gz: 013a39562b14d400c1faebae1cd6698d148be90a944e8299215bd6cb23d731930b6e0db3237fd52ae2470f5998bb5e2d1b51a746101c2c172dbfb98c8e3a6500
|
data/lib/domain/user.rb
CHANGED
@@ -46,7 +46,7 @@ class User
|
|
46
46
|
# @return [Json] Json represenatation of user object
|
47
47
|
#
|
48
48
|
def to_json(*data)
|
49
|
-
|
49
|
+
{
|
50
50
|
first_name: @first_name,
|
51
51
|
last_name: @last_name,
|
52
52
|
password: @password,
|
@@ -55,9 +55,9 @@ class User
|
|
55
55
|
date_of_birth: @date_of_birth,
|
56
56
|
email: @email,
|
57
57
|
image_url: @image_url
|
58
|
-
}
|
59
|
-
|
60
|
-
|
58
|
+
}.to_json(*data)
|
59
|
+
# hash.delete_if { |k, v| v.nil? }
|
60
|
+
#hash.to_json(*data)
|
61
61
|
end
|
62
62
|
|
63
63
|
#
|
data/lib/domain/widget.rb
CHANGED
@@ -19,6 +19,7 @@ class UserService
|
|
19
19
|
def self.create_user(user)
|
20
20
|
user_with_client_info = get_user_with_client_info(user)
|
21
21
|
create_user_payload = User.get_payload(user_with_client_info)
|
22
|
+
puts create_user_payload
|
22
23
|
RestClient::Request.execute(method: :post,
|
23
24
|
url: ApplicationConfig.get_url('create_user_path'),
|
24
25
|
payload: create_user_payload,
|
data/lib/widgets_api_client.rb
CHANGED
@@ -266,3 +266,12 @@ class WidgetsApiClient
|
|
266
266
|
end
|
267
267
|
end
|
268
268
|
|
269
|
+
#WidgetsApiClient.set_config("277ef29692f9a70d511415dc60592daf4cf2c6f6552d3e1b769924b2f2e2e6fe", "d6106f26e8ff5b749a606a1fba557f44eb3dca8f48596847770beb9b643ea352", "https://showoff-rails-react-production.herokuapp.com")
|
270
|
+
#user = User.new
|
271
|
+
#user.first_name = 'fname1'
|
272
|
+
#user.last_name = 'lname1'
|
273
|
+
#user.password = 'password'
|
274
|
+
#user.email = 'fname1@gmail.com'
|
275
|
+
#user.image_url ='https://static'
|
276
|
+
#WidgetsApiClient.create_user(user)
|
277
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: widgets_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sachin Murthy
|
@@ -64,7 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 2.6.14.3
|
68
69
|
signing_key:
|
69
70
|
specification_version: 4
|
70
71
|
summary: Wigets Api Client Wrapper
|