hh 0.0.5 → 0.0.6

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: 3c80329a14c252850f9075913ed2488d8078ec63
4
- data.tar.gz: 14e1a1f6cd8ddc6f1a44fea3df526fe3aba95312
3
+ metadata.gz: 262cb262e10541489ae65a395834de1887927dc7
4
+ data.tar.gz: a41cb877b2115bc1f6d18dbbbf11b9f854484dd7
5
5
  SHA512:
6
- metadata.gz: 06683c208b8a67326283c03f6df6cfc5448948a631b061c581b42a2d4e7185d8a3eb715a759a9f3ecd6036cb5ff853287a7967eea4e63cae7ab1c391c3f5cce4
7
- data.tar.gz: c773c68ea30504073737f8a693afc4f89e98bc3f8e09946640a2f57d4ff41016d5069b5f77f362c65eb07e92ac15f5808436b45f4e388a07da98c859c2995d09
6
+ metadata.gz: 8c4bcc26a0c83a3a09da4886b582af05811904a0ee063383a85a12b5bf20dbe58dd5620e0eb4fc6b1ab1c678b9e6e2dff4d0f331e1389ef3fcdeb67c8f8de67c
7
+ data.tar.gz: d6e7258b2f85bbd373e4192668afef79b2a6f412e844532c5b1b783637e376ce1f12b5c19b66fa55ac9b57c20938235bfda79c0196e1c02b7c59c48c404b0818
data/.gitignore CHANGED
@@ -1,17 +1,34 @@
1
1
  *.gem
2
2
  *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
data/Gemfile CHANGED
@@ -4,13 +4,12 @@ gem 'yard'
4
4
 
5
5
  group :development do
6
6
  gem 'pry'
7
- gem 'pry-debugger', :platforms => :mri_19
8
7
  end
9
8
 
10
9
  group :test do
11
- gem 'coveralls', :require => false
10
+ gem 'coveralls', require: false
12
11
  gem 'rspec', '>= 2.13'
13
- gem 'simplecov', :require => false
12
+ gem 'simplecov', require: false
14
13
  gem 'webmock'
15
14
  end
16
15
 
@@ -0,0 +1,79 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hh (0.0.6)
5
+ faraday (~> 0.8, < 0.10)
6
+ faraday_middleware (~> 0.9, < 0.11)
7
+ multi_json (~> 1.7)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ addressable (2.3.6)
13
+ coderay (1.1.0)
14
+ coveralls (0.7.2)
15
+ multi_json (~> 1.3)
16
+ rest-client (= 1.6.7)
17
+ simplecov (>= 0.7)
18
+ term-ansicolor (= 1.2.2)
19
+ thor (= 0.18.1)
20
+ crack (0.4.2)
21
+ safe_yaml (~> 1.0.0)
22
+ diff-lcs (1.2.5)
23
+ docile (1.1.5)
24
+ faraday (0.9.0)
25
+ multipart-post (>= 1.2, < 3)
26
+ faraday_middleware (0.9.1)
27
+ faraday (>= 0.7.4, < 0.10)
28
+ method_source (0.8.2)
29
+ mime-types (2.4.3)
30
+ multi_json (1.10.1)
31
+ multipart-post (2.0.0)
32
+ pry (0.10.1)
33
+ coderay (~> 1.1.0)
34
+ method_source (~> 0.8.1)
35
+ slop (~> 3.4)
36
+ rake (0.9.6)
37
+ rest-client (1.6.7)
38
+ mime-types (>= 1.16)
39
+ rspec (3.1.0)
40
+ rspec-core (~> 3.1.0)
41
+ rspec-expectations (~> 3.1.0)
42
+ rspec-mocks (~> 3.1.0)
43
+ rspec-core (3.1.7)
44
+ rspec-support (~> 3.1.0)
45
+ rspec-expectations (3.1.2)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.1.0)
48
+ rspec-mocks (3.1.3)
49
+ rspec-support (~> 3.1.0)
50
+ rspec-support (3.1.2)
51
+ safe_yaml (1.0.4)
52
+ simplecov (0.9.1)
53
+ docile (~> 1.1.0)
54
+ multi_json (~> 1.0)
55
+ simplecov-html (~> 0.8.0)
56
+ simplecov-html (0.8.0)
57
+ slop (3.6.0)
58
+ term-ansicolor (1.2.2)
59
+ tins (~> 0.8)
60
+ thor (0.18.1)
61
+ tins (0.13.2)
62
+ webmock (1.20.4)
63
+ addressable (>= 2.3.6)
64
+ crack (>= 0.3.2)
65
+ yard (0.8.7.6)
66
+
67
+ PLATFORMS
68
+ ruby
69
+
70
+ DEPENDENCIES
71
+ bundler (~> 1.3)
72
+ coveralls
73
+ hh!
74
+ pry
75
+ rake (~> 0)
76
+ rspec (>= 2.13)
77
+ simplecov
78
+ webmock
79
+ yard
data/Rakefile CHANGED
@@ -4,8 +4,8 @@ Bundler::GemHelper.install_tasks
4
4
  require 'rspec/core/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
 
7
- task :test => :spec
8
- task :default => :spec
7
+ task test: :spec
8
+ task default: :spec
9
9
 
10
10
  require 'yard'
11
11
  YARD::Rake::YardocTask.new
data/hh.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'hh/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'hh'
8
8
  spec.version = HH::VERSION
9
- spec.authors = ['Igor Varavko']
9
+ spec.authors = ['Igor Varavko', 'Pavel Rodionov']
10
10
  spec.email = ['ivaravko@me.com']
11
11
  spec.description = %q{A Ruby interface to the HeadHanter.}
12
12
  spec.summary = spec.description
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
22
- spec.add_development_dependency 'rake'
22
+ spec.add_development_dependency 'rake', '~> 0'
23
23
  spec.add_development_dependency 'rspec', '~> 2.13'
24
24
  spec.add_dependency 'faraday', ['~> 0.8', '< 0.10']
25
25
  spec.add_dependency 'faraday_middleware', ['~>0.9', '< 0.11']
data/lib/hh.rb CHANGED
@@ -26,7 +26,7 @@ module HH
26
26
  end
27
27
  end #HH
28
28
 
29
- require 'hh/API/vacancy_employer'
29
+ require 'hh/API/employer_vacancies'
30
30
  require 'hh/API/specialization'
31
31
  require 'hh/API/employment'
32
32
  require 'hh/API/statistic'
@@ -35,8 +35,9 @@ require 'hh/API/currency'
35
35
  require 'hh/API/employer'
36
36
  require 'hh/API/vacancy'
37
37
  require 'hh/API/region'
38
- require 'hh/API/field'
39
38
  require 'hh/API/metro'
39
+ require 'hh/API/industries'
40
+ require 'hh/API/dictionaries'
40
41
  require 'hh/api'
41
42
  require 'hh/request'
42
43
  require 'hh/client'
@@ -0,0 +1,11 @@
1
+ #encoding: utf-8
2
+
3
+ module HH
4
+ module API
5
+ module Dictionaries
6
+ def dictionaries
7
+ get("dictionaries")
8
+ end
9
+ end
10
+ end #API
11
+ end #HH
@@ -6,6 +6,15 @@ module HH
6
6
  def employer
7
7
  get("employer")
8
8
  end
9
+
10
+ def employers(params = { per_page: 100, page: 1 })
11
+ get("employers", params)
12
+ end
13
+
14
+ # you need right user role to access to employer addresses
15
+ def employer_addresses(employer_id)
16
+ get("/employers/#{employer_id}/addresses")
17
+ end
9
18
  end
10
19
  end #API
11
20
  end #HH
@@ -0,0 +1,11 @@
1
+ #encoding: utf-8
2
+
3
+ module HH
4
+ module API
5
+ module EmployerVacancies
6
+ def employer_vacancies(employer_id)
7
+ get("/employers/#{employer_id}/vacancies")
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ #encoding: utf-8
2
+
3
+ module HH
4
+ module API
5
+ module Industries
6
+ def industries
7
+ get("industries")
8
+ end
9
+ end
10
+ end #API
11
+ end #HH
@@ -4,11 +4,11 @@ module HH
4
4
  module API
5
5
  module Region
6
6
  def regions
7
- get("region/all")
7
+ get("areas")
8
8
  end
9
9
 
10
- def region(region_id)
11
- get("region/#{region_id}")
10
+ def region(area_id)
11
+ get("areas/#{area_id}")
12
12
  end
13
13
  end
14
14
  end #API
@@ -4,7 +4,11 @@ module HH
4
4
  module API
5
5
  module Vacancy
6
6
  def vacancy(vacancy_id)
7
- get("vacancy/#{vacancy_id}")
7
+ get("vacancies/#{vacancy_id}")
8
+ end
9
+
10
+ def vacancies(params = {})
11
+ get("vacancies", params)
8
12
  end
9
13
  end
10
14
  end #API
@@ -3,9 +3,11 @@
3
3
  module HH
4
4
  module API
5
5
 
6
- API_URL = "https://api.hh.ru/1/json/"
6
+ API_URL = "https://api.hh.ru/"
7
7
 
8
- include VacancyEmployer
8
+ include EmployerVacancies
9
+ include Industries
10
+ include Dictionaries
9
11
  include Specialization
10
12
  include Employment
11
13
  include Statistic
@@ -14,7 +16,6 @@ module HH
14
16
  include Schedule
15
17
  include Vacancy
16
18
  include Region
17
- include Field
18
19
  include Metro
19
20
  end #API
20
- end #HH
21
+ end #HH
@@ -19,13 +19,13 @@ module HH
19
19
 
20
20
  # Exposes middleware builder to facilitate custom stacks
21
21
  # @param options [Hash]
22
- # @return [Faraday::Builder]
22
+ # @return [Faraday::RackBuilder]
23
23
  def stack(options={}, &block)
24
24
  @stack ||= begin
25
25
  if block_given?
26
- Faraday::Builder.new(&block)
26
+ Faraday::RackBuilder.new(&block)
27
27
  else
28
- Faraday::Builder.new(&default_middleware(options))
28
+ Faraday::RackBuilder.new(&default_middleware(options))
29
29
  end
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  #encoding: utf-8
2
2
 
3
3
  module HH
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
metadata CHANGED
@@ -1,109 +1,110 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Varavko
8
+ - Pavel Rodionov
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-04-01 00:00:00.000000000 Z
12
+ date: 2014-12-21 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ~>
18
+ - - "~>"
18
19
  - !ruby/object:Gem::Version
19
20
  version: '1.3'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - ~>
25
+ - - "~>"
25
26
  - !ruby/object:Gem::Version
26
27
  version: '1.3'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - '>='
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
34
  version: '0'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - '>='
39
+ - - "~>"
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0'
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: rspec
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - ~>
46
+ - - "~>"
46
47
  - !ruby/object:Gem::Version
47
48
  version: '2.13'
48
49
  type: :development
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - ~>
53
+ - - "~>"
53
54
  - !ruby/object:Gem::Version
54
55
  version: '2.13'
55
56
  - !ruby/object:Gem::Dependency
56
57
  name: faraday
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
- - - ~>
60
+ - - "~>"
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0.8'
62
- - - <
63
+ - - "<"
63
64
  - !ruby/object:Gem::Version
64
65
  version: '0.10'
65
66
  type: :runtime
66
67
  prerelease: false
67
68
  version_requirements: !ruby/object:Gem::Requirement
68
69
  requirements:
69
- - - ~>
70
+ - - "~>"
70
71
  - !ruby/object:Gem::Version
71
72
  version: '0.8'
72
- - - <
73
+ - - "<"
73
74
  - !ruby/object:Gem::Version
74
75
  version: '0.10'
75
76
  - !ruby/object:Gem::Dependency
76
77
  name: faraday_middleware
77
78
  requirement: !ruby/object:Gem::Requirement
78
79
  requirements:
79
- - - ~>
80
+ - - "~>"
80
81
  - !ruby/object:Gem::Version
81
82
  version: '0.9'
82
- - - <
83
+ - - "<"
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0.11'
85
86
  type: :runtime
86
87
  prerelease: false
87
88
  version_requirements: !ruby/object:Gem::Requirement
88
89
  requirements:
89
- - - ~>
90
+ - - "~>"
90
91
  - !ruby/object:Gem::Version
91
92
  version: '0.9'
92
- - - <
93
+ - - "<"
93
94
  - !ruby/object:Gem::Version
94
95
  version: '0.11'
95
96
  - !ruby/object:Gem::Dependency
96
97
  name: multi_json
97
98
  requirement: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - ~>
100
+ - - "~>"
100
101
  - !ruby/object:Gem::Version
101
102
  version: '1.7'
102
103
  type: :runtime
103
104
  prerelease: false
104
105
  version_requirements: !ruby/object:Gem::Requirement
105
106
  requirements:
106
- - - ~>
107
+ - - "~>"
107
108
  - !ruby/object:Gem::Version
108
109
  version: '1.7'
109
110
  description: A Ruby interface to the HeadHanter.
@@ -113,27 +114,26 @@ executables: []
113
114
  extensions: []
114
115
  extra_rdoc_files: []
115
116
  files:
116
- - .coveralls.yml
117
- - .gitignore
118
- - .rspec
119
- - .travis.yml
117
+ - ".gitignore"
120
118
  - Gemfile
119
+ - Gemfile.lock
121
120
  - LICENSE.txt
122
121
  - README.md
123
122
  - Rakefile
124
123
  - hh.gemspec
125
124
  - lib/hh.rb
126
125
  - lib/hh/API/currency.rb
126
+ - lib/hh/API/dictionaries.rb
127
127
  - lib/hh/API/employer.rb
128
+ - lib/hh/API/employer_vacancies.rb
128
129
  - lib/hh/API/employment.rb
129
- - lib/hh/API/field.rb
130
+ - lib/hh/API/industries.rb
130
131
  - lib/hh/API/metro.rb
131
132
  - lib/hh/API/region.rb
132
133
  - lib/hh/API/schedule.rb
133
134
  - lib/hh/API/specialization.rb
134
135
  - lib/hh/API/statistic.rb
135
136
  - lib/hh/API/vacancy.rb
136
- - lib/hh/API/vacancy_employer.rb
137
137
  - lib/hh/api.rb
138
138
  - lib/hh/client.rb
139
139
  - lib/hh/request.rb
@@ -178,17 +178,17 @@ require_paths:
178
178
  - lib
179
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - '>='
181
+ - - ">="
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - '>='
186
+ - - ">="
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
190
  rubyforge_project:
191
- rubygems_version: 2.0.3
191
+ rubygems_version: 2.4.1
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: A Ruby interface to the HeadHanter.
@@ -1 +0,0 @@
1
- repo_token: eSdV2LXHt3MGfidagYHKKHpDlckC0Vk6q
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --fail-fast
3
- --order random
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - rbx-19mode
4
- - 1.9.2
5
- - 1.9.3
6
- - 2.0.0
@@ -1,15 +0,0 @@
1
- #encoding: utf-8
2
-
3
- module HH
4
- module API
5
- module Field
6
- def fields
7
- get("field/all")
8
- end
9
-
10
- def field(field_id)
11
- get("field/#{field_id}")
12
- end
13
- end
14
- end
15
- end
@@ -1,11 +0,0 @@
1
- #encoding: utf-8
2
-
3
- module HH
4
- module API
5
- module VacancyEmployer
6
- def vavancy_employer(employer_id)
7
- get("vacancy/employer/#{employer_id}")
8
- end
9
- end
10
- end
11
- end