firstjob_api 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 854f739a684309d4ed7bd018e454d9d65c8c8639
4
- data.tar.gz: ac0971ed53545001e73983f0b7287c05ee1a13dc
3
+ metadata.gz: c782c1c42fdea012412f12fff4655c871845cee5
4
+ data.tar.gz: 1ece93490f31b6435a055b63cd571e89d788d9d3
5
5
  SHA512:
6
- metadata.gz: b3bf1a2b056e3d503a857fcfe667b581a55dde67d196b660cdc4f131729705908fdbb00e4546914f5a928a2a3280a25927a62de138abbac4492fb477546acb5e
7
- data.tar.gz: 4a9ebfdcf46fe5bad57960bb045d7257d6b5a23d433796d52b0d1ce6295b0c6b047d41c9da0f14cc5985e784a58ef36e53a162d0c527d1c388914921e648f644
6
+ metadata.gz: c6b8e0ea7d2e4b15106df8ced8033b15539a5e44d51e1c8bc8a629248e8dadb6aaa02283be30aae611de59e74011c39abe516a41ac40dd7783be411bd381e08f
7
+ data.tar.gz: f256d26ea089459287182f3555397021f87b03d57db8170fa0fc1b38ad1f4647180becb92016600b687053edd0969d9a81adb869687140b06123f0093d3e308c
data/Gemfile.lock CHANGED
@@ -1,74 +1,74 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- firstjob_api (1.0.7)
4
+ firstjob_api (1.0.8)
5
5
  httparty (>= 0.13.3)
6
6
  rails (>= 3.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.2.4)
12
- actionpack (= 4.2.4)
13
- actionview (= 4.2.4)
14
- activejob (= 4.2.4)
11
+ actionmailer (4.2.8)
12
+ actionpack (= 4.2.8)
13
+ actionview (= 4.2.8)
14
+ activejob (= 4.2.8)
15
15
  mail (~> 2.5, >= 2.5.4)
16
16
  rails-dom-testing (~> 1.0, >= 1.0.5)
17
- actionpack (4.2.4)
18
- actionview (= 4.2.4)
19
- activesupport (= 4.2.4)
17
+ actionpack (4.2.8)
18
+ actionview (= 4.2.8)
19
+ activesupport (= 4.2.8)
20
20
  rack (~> 1.6)
21
21
  rack-test (~> 0.6.2)
22
22
  rails-dom-testing (~> 1.0, >= 1.0.5)
23
23
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- actionview (4.2.4)
25
- activesupport (= 4.2.4)
24
+ actionview (4.2.8)
25
+ activesupport (= 4.2.8)
26
26
  builder (~> 3.1)
27
27
  erubis (~> 2.7.0)
28
28
  rails-dom-testing (~> 1.0, >= 1.0.5)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- activejob (4.2.4)
31
- activesupport (= 4.2.4)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
30
+ activejob (4.2.8)
31
+ activesupport (= 4.2.8)
32
32
  globalid (>= 0.3.0)
33
- activemodel (4.2.4)
34
- activesupport (= 4.2.4)
33
+ activemodel (4.2.8)
34
+ activesupport (= 4.2.8)
35
35
  builder (~> 3.1)
36
- activerecord (4.2.4)
37
- activemodel (= 4.2.4)
38
- activesupport (= 4.2.4)
36
+ activerecord (4.2.8)
37
+ activemodel (= 4.2.8)
38
+ activesupport (= 4.2.8)
39
39
  arel (~> 6.0)
40
- activesupport (4.2.4)
40
+ activesupport (4.2.8)
41
41
  i18n (~> 0.7)
42
- json (~> 1.7, >= 1.7.7)
43
42
  minitest (~> 5.1)
44
43
  thread_safe (~> 0.3, >= 0.3.4)
45
44
  tzinfo (~> 1.1)
46
- arel (6.0.3)
47
- builder (3.2.2)
45
+ arel (6.0.4)
46
+ builder (3.2.3)
48
47
  byebug (5.0.0)
49
48
  columnize (= 0.9.0)
50
49
  coderay (1.1.0)
51
50
  columnize (0.9.0)
51
+ concurrent-ruby (1.0.5)
52
52
  diff-lcs (1.2.5)
53
53
  erubis (2.7.0)
54
- globalid (0.3.6)
54
+ globalid (0.3.7)
55
55
  activesupport (>= 4.1.0)
56
- httparty (0.13.5)
57
- json (~> 1.8)
56
+ httparty (0.14.0)
58
57
  multi_xml (>= 0.5.2)
59
- i18n (0.7.0)
60
- json (1.8.3)
58
+ i18n (0.8.1)
61
59
  loofah (2.0.3)
62
60
  nokogiri (>= 1.5.9)
63
- mail (2.6.3)
64
- mime-types (>= 1.16, < 3)
61
+ mail (2.6.4)
62
+ mime-types (>= 1.16, < 4)
65
63
  method_source (0.8.2)
66
- mime-types (2.6.1)
67
- mini_portile (0.6.2)
68
- minitest (5.8.0)
69
- multi_xml (0.5.5)
70
- nokogiri (1.6.6.2)
71
- mini_portile (~> 0.6.0)
64
+ mime-types (3.1)
65
+ mime-types-data (~> 3.2015)
66
+ mime-types-data (3.2016.0521)
67
+ mini_portile2 (2.1.0)
68
+ minitest (5.10.1)
69
+ multi_xml (0.6.0)
70
+ nokogiri (1.7.0.1)
71
+ mini_portile2 (~> 2.1.0)
72
72
  pry (0.10.1)
73
73
  coderay (~> 1.1.0)
74
74
  method_source (~> 0.8.1)
@@ -76,31 +76,31 @@ GEM
76
76
  pry-byebug (3.2.0)
77
77
  byebug (~> 5.0)
78
78
  pry (~> 0.10)
79
- rack (1.6.4)
79
+ rack (1.6.5)
80
80
  rack-test (0.6.3)
81
81
  rack (>= 1.0)
82
- rails (4.2.4)
83
- actionmailer (= 4.2.4)
84
- actionpack (= 4.2.4)
85
- actionview (= 4.2.4)
86
- activejob (= 4.2.4)
87
- activemodel (= 4.2.4)
88
- activerecord (= 4.2.4)
89
- activesupport (= 4.2.4)
82
+ rails (4.2.8)
83
+ actionmailer (= 4.2.8)
84
+ actionpack (= 4.2.8)
85
+ actionview (= 4.2.8)
86
+ activejob (= 4.2.8)
87
+ activemodel (= 4.2.8)
88
+ activerecord (= 4.2.8)
89
+ activesupport (= 4.2.8)
90
90
  bundler (>= 1.3.0, < 2.0)
91
- railties (= 4.2.4)
91
+ railties (= 4.2.8)
92
92
  sprockets-rails
93
93
  rails-deprecated_sanitizer (1.0.3)
94
94
  activesupport (>= 4.2.0.alpha)
95
- rails-dom-testing (1.0.7)
95
+ rails-dom-testing (1.0.8)
96
96
  activesupport (>= 4.2.0.beta, < 5.0)
97
- nokogiri (~> 1.6.0)
97
+ nokogiri (~> 1.6)
98
98
  rails-deprecated_sanitizer (>= 1.0.1)
99
- rails-html-sanitizer (1.0.2)
99
+ rails-html-sanitizer (1.0.3)
100
100
  loofah (~> 2.0)
101
- railties (4.2.4)
102
- actionpack (= 4.2.4)
103
- activesupport (= 4.2.4)
101
+ railties (4.2.8)
102
+ actionpack (= 4.2.8)
103
+ activesupport (= 4.2.8)
104
104
  rake (>= 0.8.7)
105
105
  thor (>= 0.18.1, < 2.0)
106
106
  rake (10.4.2)
@@ -118,14 +118,15 @@ GEM
118
118
  rspec-support (~> 3.3.0)
119
119
  rspec-support (3.3.0)
120
120
  slop (3.6.0)
121
- sprockets (3.3.3)
122
- rack (~> 1.0)
123
- sprockets-rails (2.3.2)
124
- actionpack (>= 3.0)
125
- activesupport (>= 3.0)
126
- sprockets (>= 2.8, < 4.0)
127
- thor (0.19.1)
128
- thread_safe (0.3.5)
121
+ sprockets (3.7.1)
122
+ concurrent-ruby (~> 1.0)
123
+ rack (> 1, < 3)
124
+ sprockets-rails (3.2.0)
125
+ actionpack (>= 4.0)
126
+ activesupport (>= 4.0)
127
+ sprockets (>= 3.0.0)
128
+ thor (0.19.4)
129
+ thread_safe (0.3.6)
129
130
  tzinfo (1.2.2)
130
131
  thread_safe (~> 0.1)
131
132
 
@@ -139,4 +140,4 @@ DEPENDENCIES
139
140
  rspec
140
141
 
141
142
  BUNDLED WITH
142
- 1.10.5
143
+ 1.14.6
@@ -33,7 +33,7 @@ module FirstjobApi
33
33
 
34
34
  def publish
35
35
  # Post publication
36
- response = FirstjobApi.post("/api/publish_job",
36
+ response = FirstjobApi.post("/publish_job",
37
37
  FirstjobApi.options.merge(
38
38
  body: FirstjobApi.body.merge({publish_job: self.body}).to_json
39
39
  )
@@ -53,7 +53,7 @@ module FirstjobApi
53
53
 
54
54
  def get_postulants
55
55
  # Get postulants
56
- response = FirstjobApi.post("/api/get_applicants_job",
56
+ response = FirstjobApi.post("/get_applicants_job",
57
57
  FirstjobApi.options.merge(
58
58
  body: FirstjobApi.body.merge({job_id: @id, slug: @slug}).to_json
59
59
  )
@@ -75,7 +75,7 @@ module FirstjobApi
75
75
  end
76
76
 
77
77
  def destroy
78
- response = FirstjobApi.post("/api/doregister_job",
78
+ response = FirstjobApi.post("/doregister_job",
79
79
  FirstjobApi.options.merge(
80
80
  body: FirstjobApi.body.merge({job_id: id}).to_json
81
81
  )
@@ -1,3 +1,3 @@
1
1
  module FirstjobApi
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
data/lib/firstjob_api.rb CHANGED
@@ -15,7 +15,7 @@ require 'firstjob_api/http_parser'
15
15
 
16
16
  module FirstjobApi
17
17
  include HTTParty
18
- base_uri 'https://api.firstjob.com'
18
+ base_uri 'https://api.firstjob.me'
19
19
 
20
20
  # API login configuration, need initialization setup to work
21
21
  mattr_accessor :grant_type
@@ -74,69 +74,5 @@ module FirstjobApi
74
74
  return publication
75
75
  end
76
76
 
77
- def self.update_publication(publication_id, json)
78
- update_publication_path = "/v0/empresas/avisos/#{publication_id}"
79
- response = self.post(update_publication_path, @@options.merge(body: json, headers: { "Accept" => "application/json", "Content-Type" => "application/json"}))
80
-
81
- if HttpParser.parse_response(response)
82
- case response.code
83
- when 201
84
- # "Publication updated, All good!"
85
- return response # body contains id del proceso publicado
86
- when 200
87
- # "TODO: Uhm.. no idea, is this good?"
88
- return response # body contains id del proceso publicado?
89
- end
90
- end
91
- end
92
-
93
- def self.publish_publication(publication_id, pais_id, plan_publication_id)
94
- publish_publication_path = "/v0/empresas/avisos/#{publication_id}/publicacion/#{plan_publication_id}"
95
- response = self.put(publish_publication_path, @@options.merge(query: @@options[:query].merge({paisId: pais_id})))
96
-
97
- if HttpParser.parse_response(response)
98
- case response.code
99
- when 201
100
- # "Publication created, All good!"
101
- return response # body contains id del proceso publicado
102
- when 200
103
- # "TODO: Uhm.. no idea, is this good?"
104
- return response # body contains id del proceso publicado?
105
- end
106
- end
107
- end
108
-
109
- def self.get_publication_url(publication_id)
110
- "http://www.laborum.cl/empleos/#{publication_id}.html"
111
- end
112
-
113
- def self.get_publication(publication_id)
114
- get_publication_path = "/v0/empresas/avisos/#{publication_id}"
115
- response = self.get(get_publication_path, @@options)
116
-
117
- return HttpParser.parse_response_to_json(response)
118
- end
119
-
120
- def self.get_postulations_in_publication(publication_id, page=0, postulations_per_page=20)
121
- get_postulations_in_publication_path = "/v0/empresas/avisos/#{publication_id}/postulaciones"
122
- response = self.get(get_postulations_in_publication_path, @@options.merge(query: @@options[:query].merge({page: page, perPage: postulations_per_page})))
123
-
124
- return HttpParser.parse_response_to_json(response)
125
- end
126
-
127
- def self.get_postulation(postulation_id)
128
- get_postulation_path = "/v0/empresas/postulaciones/#{postulation_id}"
129
- response = self.get(get_postulation_path, @@options)
130
-
131
- return HttpParser.parse_response_to_json(response)
132
- end
133
-
134
- def self.destroy_publication(publication_id)
135
- destroy_publication_path = "/v0/empresas/avisos/#{publication_id}"
136
- response = self.delete(destroy_publication_path, @@options)
137
-
138
- return HttpParser.parse_response(response)
139
- end
140
-
141
77
  end
142
78
 
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.7
4
+ version: 1.0.8
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-26 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails