mindmatch 0.0.1.pre.beta2 → 0.0.1.pre.beta3

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: 510b993b376f44566ac27c884bd6bf84ce0f90fb
4
- data.tar.gz: 005357f6ac53c683862e04f9c7c2099e0f8ce14a
3
+ metadata.gz: 585548177329d9ebc2370b0c26e67c4f5b225d8f
4
+ data.tar.gz: d361390f19085ccb95574624e3809b8bfcfc8ade
5
5
  SHA512:
6
- metadata.gz: 5134b594b3dc800fbd59f1732c2714c1e019f04cafcd4042a1d600a9fa1b9db5c91b9b8c0ca0f2a7e7c7b53bf2db6890a907846f9820efe052dc821ca73eaedc
7
- data.tar.gz: 6b080267bbe523da2aefbfae20d3230c33657404ea63c61bac626c747678788a7de77649af8c662c7061dd1020036036110d00b38a4412f1716d44b22372af34
6
+ metadata.gz: b808186ba07c39dbefd13b3112d68982b555500e7ea63a26cf548d65af1463ba12e5940ebb8026d9b7d3c2bf6925f3480db92a88d74f5397d19f04e4c0682513
7
+ data.tar.gz: 2ddbc519c4d67fc699ac8c3e511f64a371514cde66223c6fd4fd2afd5f6c098202a995afacff5c1e50693b8661872ef8ff014b06d89c668e20583b63a76a96cc
@@ -91,6 +91,7 @@ module MindMatch
91
91
  end
92
92
 
93
93
  def positionql(position)
94
+ position = stringify_keys(position)
94
95
  <<-EOS.split.join(" ")
95
96
  {
96
97
  refId: "#{position['id']}",
@@ -101,13 +102,14 @@ module MindMatch
101
102
  end
102
103
 
103
104
  def companiesql(company)
105
+ company = stringify_keys(company)
104
106
  if company.has_key?("positions")
105
107
  <<-EOS.split.join(" ")
106
108
  {
107
109
  name: "#{company['name']}",
108
110
  location: #{[company['location']].flatten},
109
111
  url: "#{company['url']}",
110
- profileUrls: #{company['profileUrls']},
112
+ profileUrls: #{company['profileUrls'] || []},
111
113
  positions: [#{company['positions'].map(&method(:positionql)).join(', ')}]
112
114
  }
113
115
  EOS
@@ -126,14 +128,15 @@ module MindMatch
126
128
  end
127
129
 
128
130
  def talentql(tal)
131
+ tal = stringify_keys(tal)
129
132
  <<-EOS.split.join(" ")
130
133
  {
131
134
  refId: "#{tal['id']}",
132
135
  name: "#{tal['name']}",
133
136
  email: "#{tal['email']}",
134
- profileUrls: #{tal['profileUrls']},
137
+ profileUrls: #{tal['profileUrls'] || []},
135
138
  resumeUrl: "#{tal['resumeUrl']}",
136
- skills: #{tal['skills']}
139
+ skills: #{tal['skills'] || []}
137
140
  }
138
141
  EOS
139
142
  end
@@ -155,5 +158,9 @@ module MindMatch
155
158
  else raise(UnexpectedError, raw_response.status, raw_response.body)
156
159
  end
157
160
  end
161
+
162
+ def stringify_keys(hash)
163
+ JSON.parse(JSON.generate(hash))
164
+ end
158
165
  end
159
166
  end
@@ -1,3 +1,3 @@
1
1
  module MindMatch
2
- VERSION = "0.0.1-beta2"
2
+ VERSION = "0.0.1-beta3"
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.beta2
4
+ version: 0.0.1.pre.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MindMatch