hh 0.0.6 → 0.0.7

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: 262cb262e10541489ae65a395834de1887927dc7
4
- data.tar.gz: a41cb877b2115bc1f6d18dbbbf11b9f854484dd7
3
+ metadata.gz: 32dcda51915370d6c5eedf69f7cd46987363e0d8
4
+ data.tar.gz: a980c6db3af232bcf6c6eb20bf5ccea7f571c233
5
5
  SHA512:
6
- metadata.gz: 8c4bcc26a0c83a3a09da4886b582af05811904a0ee063383a85a12b5bf20dbe58dd5620e0eb4fc6b1ab1c678b9e6e2dff4d0f331e1389ef3fcdeb67c8f8de67c
7
- data.tar.gz: d6e7258b2f85bbd373e4192668afef79b2a6f412e844532c5b1b783637e376ce1f12b5c19b66fa55ac9b57c20938235bfda79c0196e1c02b7c59c48c404b0818
6
+ metadata.gz: 288c7cf4891e79f415d3b95cdbbd939add1e0ddfa0ed6bc2e1a9404d1110eedf01e8b2b87e77204e28c4c58ff0343806af8f9fb489d16a092c157a02cef4b757
7
+ data.tar.gz: 231a6dd330a36b3652c7e11a3ca662e9df2ecce60b069012b55993ff0b9d7a02fd462a692912264213466adca08d68073227d2443340651f162aa6bfda86446c
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # The Hh Ruby Gem
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/hh.png)](http://badge.fury.io/rb/hh)
4
- [![Build Status](https://travis-ci.org/ivaravko/hh.png?branch=master)](https://travis-ci.org/ivaravko/hh)
5
- [![Dependency Status](https://gemnasium.com/ivaravko/hh.png)](https://gemnasium.com/ivaravko/hh)
6
- [![Coverage Status](https://coveralls.io/repos/ivaravko/hh/badge.png?branch=master)](https://coveralls.io/r/ivaravko/hh)
4
+ [![Build Status](https://travis-ci.org/krim/hh.png?branch=master)](https://travis-ci.org/krim/hh)
5
+ [![Dependency Status](https://gemnasium.com/krim/hh.png)](https://gemnasium.com/krim/hh)
6
+ [![Coverage Status](https://coveralls.io/repos/krim/hh/badge.png?branch=master)](https://coveralls.io/r/krim/hh)
7
7
 
8
- A Ruby interface to the HeadHanter
8
+ A Ruby interface to the HeadHunter
9
9
 
10
10
  ## Installation
11
11
 
data/hh.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['ivaravko@me.com']
11
11
  spec.description = %q{A Ruby interface to the HeadHanter.}
12
12
  spec.summary = spec.description
13
- spec.homepage = 'http://github.com/ivaravko/hh/'
13
+ spec.homepage = 'http://github.com/krim/hh/'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files += `git ls-files`.split($/)
@@ -4,7 +4,7 @@ module HH
4
4
  module API
5
5
  module EmployerVacancies
6
6
  def employer_vacancies(employer_id)
7
- get("/employers/#{employer_id}/vacancies")
7
+ get("employers/#{employer_id}/vacancies")
8
8
  end
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  #encoding: utf-8
2
2
 
3
3
  module HH
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
@@ -0,0 +1,27 @@
1
+ #encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe HH::API::EmployerVacancies do
6
+ let(:client) { HH::Client.new }
7
+ let(:employer_id) { 7135086 }
8
+ let(:request_path) { "employers/#{employer_id}/vacancies" }
9
+
10
+ describe "#employer_vacancies" do
11
+ before do
12
+ stub_get(request_path).to_return(body: fixture("vacancy_employer.json"), headers: {content_type: "application/json; charset=utf-8"})
13
+ end
14
+
15
+ it "requests the correct resource" do
16
+ client.employer_vacancies(employer_id)
17
+ expect(a_get(request_path)).to have_been_made
18
+ end
19
+
20
+ it "returns the requested metro list" do
21
+ employer_vacancies = client.employer_vacancies(employer_id)
22
+ expect(employer_vacancies).to be_an Array
23
+ expect(employer_vacancies.first).to be_an Hash
24
+ expect(employer_vacancies.first[:name]).to eq "Java разработчик (Минск)"
25
+ end
26
+ end
27
+ end
@@ -7,12 +7,12 @@ describe HH::API::Region do
7
7
 
8
8
  describe "#regions" do
9
9
  before do
10
- stub_get("region/all").to_return(body: fixture("regions_all.json"), headers: {content_type: "application/json; charset=utf-8"})
10
+ stub_get("areas").to_return(body: fixture("regions_all.json"), headers: {content_type: "application/json; charset=utf-8"})
11
11
  end
12
12
 
13
13
  it "requests the correct resource" do
14
14
  client.regions
15
- expect(a_get("region/all")).to have_been_made
15
+ expect(a_get("areas")).to have_been_made
16
16
  end
17
17
 
18
18
  it "returns the requested regions all" do
@@ -25,12 +25,12 @@ describe HH::API::Region do
25
25
 
26
26
  describe "#region" do
27
27
  before do
28
- stub_get("region/1").to_return(body: fixture("region.json"), headers: {content_type: "application/json; charset=utf-8"})
28
+ stub_get("areas/1").to_return(body: fixture("region.json"), headers: {content_type: "application/json; charset=utf-8"})
29
29
  end
30
30
 
31
31
  it "requests the correct resource" do
32
32
  client.region(1)
33
- expect(a_get("region/1")).to have_been_made
33
+ expect(a_get("areas/1")).to have_been_made
34
34
  end
35
35
 
36
36
  it "returns the requested regions all" do
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  describe HH::API::Vacancy do
6
6
  let(:client) { HH::Client.new }
7
7
  let(:vacancy_id) { 2618300 }
8
- let(:request_path) { "vacancy/#{vacancy_id}" }
8
+ let(:request_path) { "vacancies/#{vacancy_id}" }
9
9
 
10
10
  describe "#vacancy" do
11
11
  before do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Varavko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-21 00:00:00.000000000 Z
12
+ date: 2015-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -115,6 +115,7 @@ extensions: []
115
115
  extra_rdoc_files: []
116
116
  files:
117
117
  - ".gitignore"
118
+ - ".travis.yml"
118
119
  - Gemfile
119
120
  - Gemfile.lock
120
121
  - LICENSE.txt
@@ -156,19 +157,18 @@ files:
156
157
  - spec/fixtures/vacancy_employer.json
157
158
  - spec/hh/api/currency_spec.rb
158
159
  - spec/hh/api/employer_spec.rb
160
+ - spec/hh/api/employer_vacancies_spec.rb
159
161
  - spec/hh/api/employment_spec.rb
160
- - spec/hh/api/field_spec.rb
161
162
  - spec/hh/api/metro_spec.rb
162
163
  - spec/hh/api/region_spec.rb
163
164
  - spec/hh/api/schedule_spec.rb
164
165
  - spec/hh/api/specialization_spec.rb
165
166
  - spec/hh/api/statistic_spec.rb
166
167
  - spec/hh/api/vacancy_spec.rb
167
- - spec/hh/api/vavancy_employer_spec.rb
168
168
  - spec/hh/client_spec.rb
169
169
  - spec/hh_spec.rb
170
170
  - spec/spec_helper.rb
171
- homepage: http://github.com/ivaravko/hh/
171
+ homepage: http://github.com/krim/hh/
172
172
  licenses:
173
173
  - MIT
174
174
  metadata: {}
@@ -211,15 +211,14 @@ test_files:
211
211
  - spec/fixtures/vacancy_employer.json
212
212
  - spec/hh/api/currency_spec.rb
213
213
  - spec/hh/api/employer_spec.rb
214
+ - spec/hh/api/employer_vacancies_spec.rb
214
215
  - spec/hh/api/employment_spec.rb
215
- - spec/hh/api/field_spec.rb
216
216
  - spec/hh/api/metro_spec.rb
217
217
  - spec/hh/api/region_spec.rb
218
218
  - spec/hh/api/schedule_spec.rb
219
219
  - spec/hh/api/specialization_spec.rb
220
220
  - spec/hh/api/statistic_spec.rb
221
221
  - spec/hh/api/vacancy_spec.rb
222
- - spec/hh/api/vavancy_employer_spec.rb
223
222
  - spec/hh/client_spec.rb
224
223
  - spec/hh_spec.rb
225
224
  - spec/spec_helper.rb
@@ -1,42 +0,0 @@
1
- #encoding: utf-8
2
-
3
- require 'spec_helper'
4
-
5
- describe HH::API::Field do
6
- let(:client) { HH::Client.new }
7
-
8
- describe "#fields" do
9
- before do
10
- stub_get("field/all").to_return(body: fixture("field_all.json"), headers: {content_type: "application/json; charset=utf-8"})
11
- end
12
-
13
- it "requests the correct resource" do
14
- client.fields
15
- expect(a_get("field/all")).to have_been_made
16
- end
17
-
18
- it "returns the requested fields" do
19
- fields = client.fields
20
- expect(fields).to be_an Array
21
- expect(fields.first).to be_an Hash
22
- expect(fields.first[:name]).to eq "Любая"
23
- end
24
- end
25
-
26
- describe "field" do
27
- before do
28
- stub_get("field/2").to_return(body: fixture("field.json"), headers: {content_type: "application/json; charset=utf-8"})
29
- end
30
-
31
- it "requested line the correct resource" do
32
- client.field(2)
33
- expect(a_get("field/2")).to have_been_made
34
- end
35
-
36
- it "returns the requested field id" do
37
- field = client.field(2)
38
- expect(field).to be_an Hash
39
- expect(field[:name]).to eq "Бухгалтерия, управленческий учет, финансы предприятия"
40
- end
41
- end
42
- end
@@ -1,27 +0,0 @@
1
- #encoding: utf-8
2
-
3
- require 'spec_helper'
4
-
5
- describe HH::API::VacancyEmployer do
6
- let(:client) { HH::Client.new }
7
- let(:vacancy_id) { 7135086 }
8
- let(:request_path) { "vacancy/employer/#{vacancy_id}" }
9
-
10
- describe "#vavancy_employer" do
11
- before do
12
- stub_get(request_path).to_return(body: fixture("vacancy_employer.json"), headers: {content_type: "application/json; charset=utf-8"})
13
- end
14
-
15
- it "requests the correct resource" do
16
- client.vavancy_employer(vacancy_id)
17
- expect(a_get(request_path)).to have_been_made
18
- end
19
-
20
- it "returns the requested metro list" do
21
- vavancy_employer = client.vavancy_employer(vacancy_id)
22
- expect(vavancy_employer).to be_an Array
23
- expect(vavancy_employer.first).to be_an Hash
24
- expect(vavancy_employer.first[:name]).to eq "Java разработчик (Минск)"
25
- end
26
- end
27
- end