ruby-upwork-oauth2 2.0.1 → 2.1.0

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
  SHA256:
3
- metadata.gz: 151abdfed5a0ee4bbcf75b201f9e8f14506404703019cd3e07da53f45b8277c6
4
- data.tar.gz: 657291bb04f838c79dd3ff436c8bb340aab7c9422ad619f52bd70518f296b812
3
+ metadata.gz: 3d105d8606187a3191bb9adc2b45ef2d2ccd03fd0f6dd6d4771d290b3e645304
4
+ data.tar.gz: f236ee521251163733139f42b72817ff1cb7f543f0132561ef3bddf125f0e6af
5
5
  SHA512:
6
- metadata.gz: b662373b2c2b19d4b40350f121efc6ed4bf5b92a21f42d284552a041d97139cb59822615604a0f62f0eb70a3475ef82da63738ef5a1490c032a70f6b4e6a4862
7
- data.tar.gz: 88b2e862c8c287b484f7ebdb77d6f491f92fc15bbc13a244a65e154b263db9049aeb6763a4e40cc3a60c654c09db9552f186917aae317d07705228c45e28c389
6
+ metadata.gz: 6a6d8b780f1147622d17265a233b5d14b027948617cd465a93a112c4159788f7ec7d76263004e6d834d9b307b1eafdfb2130dd8ff427ffe7b93cf4b701bd08e1
7
+ data.tar.gz: 6a7769b3ca265144e0d5dcc6137d42514191b0188bffbc4cb6714e3d9df34bafaf49a8a3eb0576eee0314b2db658899310156f37f5d2ceb05d55c30ddde1ebbb
data/.tests ADDED
@@ -0,0 +1 @@
1
+ rake test
@@ -0,0 +1,11 @@
1
+ # Release History
2
+
3
+ ## 2.1.0
4
+ * Add Specialties API
5
+ * Add Skills V2 API
6
+
7
+ ## 2.0.1
8
+ * Set library User-Agent
9
+
10
+ ## 2.0.0
11
+ * Release ruby-upwork-oauth2
@@ -138,7 +138,7 @@ module Upwork
138
138
 
139
139
  # get url with parameters for get requests
140
140
  def get_url_with_params(path, params)
141
- "#{path}?".concat(params.collect{|k,v| "#{k}=#{OAuth::Helper::escape(v.to_s)}"}.join("&"))
141
+ "#{path}?".concat(params.collect{|k,v| "#{k}=#{URI::escape(v.to_s)}"}.join("&"))
142
142
  end
143
143
 
144
144
  # Send request
@@ -39,6 +39,18 @@ module Upwork
39
39
  @client.get '/profiles/v1/metadata/skills'
40
40
  end
41
41
 
42
+ # Get skills V2
43
+ def get_skills_v2(params)
44
+ $LOG.i "running " + __method__.to_s
45
+ @client.get '/profiles/v2/metadata/skills'
46
+ end
47
+
48
+ # Get specialties
49
+ def get_specialties
50
+ $LOG.i "running " + __method__.to_s
51
+ @client.get '/profiles/v1/metadata/specialties'
52
+ end
53
+
42
54
  # Get regions
43
55
  def get_regions
44
56
  $LOG.i "running " + __method__.to_s
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Upwork # :nodoc:
15
15
  module Api
16
- VERSION = "2.0.1"
16
+ VERSION = "2.1.0"
17
17
  end
18
18
  end
@@ -24,6 +24,16 @@ class MetadataTest < Test::Unit::TestCase
24
24
  assert api.get_skills
25
25
  end
26
26
 
27
+ def test_get_skills_v2
28
+ api = Upwork::Api::Routers::Metadata.new(get_client_mock)
29
+ assert api.get_skills_v2({})
30
+ end
31
+
32
+ def test_get_specialties
33
+ api = Upwork::Api::Routers::Metadata.new(get_client_mock)
34
+ assert api.get_specialties
35
+ end
36
+
27
37
  def test_get_categories_v2
28
38
  api = Upwork::Api::Routers::Metadata.new(get_client_mock)
29
39
  assert api.get_categories_v2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-upwork-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym Novozhylov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-13 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -90,7 +90,9 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - ".docgen"
92
92
  - ".gitignore"
93
+ - ".tests"
93
94
  - ".travis.yml"
95
+ - CHANGES.md
94
96
  - Gemfile
95
97
  - LICENSE.txt
96
98
  - README.md
@@ -188,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
190
  version: '0'
189
191
  requirements: []
190
192
  rubyforge_project:
191
- rubygems_version: 2.7.6
193
+ rubygems_version: 2.7.6.2
192
194
  signing_key:
193
195
  specification_version: 4
194
196
  summary: Ruby bindings for Upwork API (OAuth2).