mindmatch 0.0.1.pre.beta3 → 0.0.1.pre.beta4

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
2
  SHA1:
3
- metadata.gz: 585548177329d9ebc2370b0c26e67c4f5b225d8f
4
- data.tar.gz: d361390f19085ccb95574624e3809b8bfcfc8ade
3
+ metadata.gz: a2b16403f49d6a6b35092001f32e972dab9711e0
4
+ data.tar.gz: 8fb8aa2c30dcc671df2bb6ebbe6116711c9d68cd
5
5
  SHA512:
6
- metadata.gz: b808186ba07c39dbefd13b3112d68982b555500e7ea63a26cf548d65af1463ba12e5940ebb8026d9b7d3c2bf6925f3480db92a88d74f5397d19f04e4c0682513
7
- data.tar.gz: 2ddbc519c4d67fc699ac8c3e511f64a371514cde66223c6fd4fd2afd5f6c098202a995afacff5c1e50693b8661872ef8ff014b06d89c668e20583b63a76a96cc
6
+ metadata.gz: 73627b5ed739bf28c1ae5353bcc73d60dc4159108dea95b32c1d935b4eeaef3294779a2a1e7ec422dd6fd71d7e981de1ac1cc75662204bd9c8975d649baff161
7
+ data.tar.gz: b85804f3bf44a959c3529ad09b0e79874554bd233600602587b1f9ac8c1d8c69faf0f6f61773ca6dc38879831d46ddb20099a89e869cc0c7e3c4909a2d9e65d6
data/README.md CHANGED
@@ -32,7 +32,15 @@ match_id = mindmatch.create_match(
32
32
  )
33
33
  #=> '6906ec3d-024d-43c6-a1cf-9b102eec4fb1'
34
34
  mindmatch.query_match(id: match_id)
35
- #=> {"id"=>"6906ec3d-024d-43c6-a1cf-9b102eec4fb1", "status"=>"fulfilled", "results"=>[{"score"=>0.1436655436}]}
35
+ #=> {"id"=>"53b03dc2-07dd-40a2-91fe-7bff24c86574",
36
+ "status"=>"fulfilled",
37
+ "data"=>
38
+ {"results"=>
39
+ [{"score"=>0.1436655436,
40
+ "personId"=>"7dedffb3-c41e-4046-aa3d-73979d7ec1c2",
41
+ "positionId"=>"6214ab8d26e3f79571d922ca269d5743"}],
42
+ "people"=>[{"id"=>"7dedffb3-c41e-4046-aa3d-73979d7ec1c2", "refId"=>"2"}],
43
+ "positions"=>[{"id"=>"6214ab8d26e3f79571d922ca269d5743", "refId"=>"324"}]}}
36
44
  ```
37
45
 
38
46
 
@@ -59,7 +59,10 @@ module MindMatch
59
59
  handle_error(raw_response)
60
60
  response = JSON.parse(raw_response.body)
61
61
  match = response.dig('data', 'match')
62
- match = match['data'] if match.has_key?('data') # FIX: remove data namespece in mindmatch api
62
+ if match&.has_key?('data') # FIX: remove data namespece in mindmatch api
63
+ match = match.merge(match['data'])
64
+ match.delete('data')
65
+ end
63
66
  match
64
67
  end
65
68
 
@@ -87,7 +90,12 @@ module MindMatch
87
90
  end
88
91
  handle_error(raw_response)
89
92
  response = JSON.parse(raw_response.body)
90
- response['data']['match']['id']
93
+ match = response.dig('data', 'match')
94
+ if match&.has_key?('data') # FIX: remove data namespece in mindmatch api
95
+ match = match.merge(match['data'])
96
+ match.delete('data')
97
+ end
98
+ match['id']
91
99
  end
92
100
 
93
101
  def positionql(position)
@@ -1,3 +1,3 @@
1
1
  module MindMatch
2
- VERSION = "0.0.1-beta3"
2
+ VERSION = "0.0.1-beta4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindmatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.beta3
4
+ version: 0.0.1.pre.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MindMatch
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2017-09-27 00:00:00.000000000 Z
13
+ date: 2017-09-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday