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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 41f8a4a5683391231f6b1d7b19ef96075cff8c5a453b8dab5ee7de7a9c766761
4
- data.tar.gz: 404377eacf6c14e4a5ae1bd0e08b2e272099a764a3d286c35604a350b2eb8939
2
+ SHA1:
3
+ metadata.gz: c49fc7a62de86249270bf8b7b1054e3e37fd4637
4
+ data.tar.gz: a9a081b28d6ebc9e01547d4c157241912b34236c
5
5
  SHA512:
6
- metadata.gz: 584f921a6d01269de7506d7abe2d927a7bc3f0d7af59eeaf58996af62277aa26120fa095da03f4577786f9cea59f437e8d7059939ec5f202cc2638e11b37bce7
7
- data.tar.gz: 99ccf004fbde15e8cc03b0c1611313fd5c55220c14939d3399cde08823c84fb17bc45cfe60f3b25f843faae924ad136caf09dfd390e8bacab4c321211fc938eb
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
- hash = {
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
- hash.delete_if { |k, v| v.nil? }
60
- hash.to_json(*data)
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
@@ -34,7 +34,7 @@ class Widget
34
34
  description: @description,
35
35
  kind: @kind
36
36
  }
37
- hash.delete_if { |k, v| v.nil? }
37
+ hash.delete_if { |k, v| v.nil?|| v.empty }
38
38
  hash.to_json(*data)
39
39
  end
40
40
 
@@ -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,
@@ -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.3
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
- rubygems_version: 3.0.3
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