upwork-api 1.2.1 → 1.2.2

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: aa61b519825544e65cb546afed455fe9d4e526fd
4
- data.tar.gz: 9ec9c9fb497d978a247504226392ead8aab3b853
3
+ metadata.gz: aecc1625eafef46e28c0847afdd0ac818930b27b
4
+ data.tar.gz: 789e5666f2b68fe09dfddaabb360d8cc0f2d0b98
5
5
  SHA512:
6
- metadata.gz: a30c6db061314b4b8036df59544ee9173a986fe1eab5e8bb29a2150719ec5db617ff90c3d924cd758d350246a6c547b7843a867e121ebbc37b98cabd63728bfb
7
- data.tar.gz: 59966f809790cb73b6b1fe06574eb46df13cff89272a2d3df88cec26b6fe557acc03831df01a47d28f42c8734e25d2cbc4deeb979caf5cc0cb453d4ab8af0cc2
6
+ metadata.gz: 493b1f34958730e964bae8d940d5abb524f10058608b93c586c437cdcbc671abda96c6cdb3c823fcf4ba852f7609d77280b3d1f62466e8c37181013681030360
7
+ data.tar.gz: 586f35e52e29055f4f36777dbc15d99fd4226716830f417255d96ade8e2d8215f5eff21131ab8b9a832c00ab0ffb74db76726361474c5999e0e1a1641a3cfd7c
data/.travis.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  script: rake
3
3
  rvm:
4
- - 1.9.3
5
4
  - 2.0.0
5
+ - 2.1.0
6
+ - 2.3.0
6
7
  - ruby-head
7
8
  install: gem install oauth test-unit mocha
8
9
  matrix:
data/example/myapp.rb CHANGED
@@ -26,6 +26,8 @@ client = Upwork::Api::Client.new(config)
26
26
  # and do not have an access token-secret pair
27
27
  if !config.access_token and !config.access_secret
28
28
  authz_url = client.get_authorization_url
29
+ # for web-based applications you need to specify the exact oauth_callback explicitly
30
+ # authz_url = client.get_authorization_url "https://my-callback-url-here.com"
29
31
 
30
32
  puts "Visit the authorization url and provide oauth_verifier for further authorization"
31
33
  puts authz_url
@@ -41,7 +41,7 @@ module Upwork
41
41
  end
42
42
 
43
43
  # Start auth process and get authorization token
44
- def get_authorization_url
44
+ def get_authorization_url(oauth_callback = "oob")
45
45
  $LOG.i "requesting autorization token"
46
46
  @consumer=OAuth::Consumer.new @config.consumer_key,
47
47
  @config.consumer_secret,
@@ -51,7 +51,7 @@ module Upwork
51
51
  :authorize_path => URI_AUTH,
52
52
  :signature_method => @config.signature_method}
53
53
 
54
- @request_token = @consumer.get_request_token
54
+ @request_token = @consumer.get_request_token({:oauth_callback => oauth_callback})
55
55
  $LOG.i "got request token pair", @request_token
56
56
 
57
57
  $LOG.i "building authorization url, which is", @request_token.authorize_url
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Upwork # :nodoc:
15
15
  module Api
16
- VERSION = "1.2.1"
16
+ VERSION = "1.2.2"
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upwork-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym Novozhylov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-15 00:00:00.000000000 Z
11
+ date: 2017-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth