firstjob_api 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/firstjob_api/publication.rb +12 -3
- data/lib/firstjob_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 854f739a684309d4ed7bd018e454d9d65c8c8639
|
4
|
+
data.tar.gz: ac0971ed53545001e73983f0b7287c05ee1a13dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3bf1a2b056e3d503a857fcfe667b581a55dde67d196b660cdc4f131729705908fdbb00e4546914f5a928a2a3280a25927a62de138abbac4492fb477546acb5e
|
7
|
+
data.tar.gz: 4a9ebfdcf46fe5bad57960bb045d7257d6b5a23d433796d52b0d1ce6295b0c6b047d41c9da0f14cc5985e784a58ef36e53a162d0c527d1c388914921e648f644
|
data/Gemfile.lock
CHANGED
@@ -51,7 +51,7 @@ module FirstjobApi
|
|
51
51
|
"#{FirstjobApi.base_uri}/jobs/#{slug}"
|
52
52
|
end
|
53
53
|
|
54
|
-
def
|
54
|
+
def get_postulants
|
55
55
|
# Get postulants
|
56
56
|
response = FirstjobApi.post("/api/get_applicants_job",
|
57
57
|
FirstjobApi.options.merge(
|
@@ -61,8 +61,17 @@ module FirstjobApi
|
|
61
61
|
response_body = HttpParser.parse_json_response(response)
|
62
62
|
|
63
63
|
# load results
|
64
|
-
|
65
|
-
|
64
|
+
if response_body && response_body["postulaciones"]
|
65
|
+
@postulantes = response_body["postulaciones"]["postulantes"]
|
66
|
+
else
|
67
|
+
# In case the API changes... fallback to response body
|
68
|
+
@postulantes = response_body
|
69
|
+
end
|
70
|
+
return response
|
71
|
+
end
|
72
|
+
|
73
|
+
def postulants
|
74
|
+
@postulantes || get_postulants && @postulantes
|
66
75
|
end
|
67
76
|
|
68
77
|
def destroy
|
data/lib/firstjob_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firstjob_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Fernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|