skroutz 0.1.2 → 0.2.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.
@@ -2,6 +2,12 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## [0.2.0] - 2016-01-04
6
+
7
+ ### Added
8
+
9
+ * Skroutz::Client#token= for setting a pre-obtained OAuth2.0 access token
10
+
5
11
  ## [0.1.2] - 2015-04-28
6
12
 
7
13
  ### Added
data/README.md CHANGED
@@ -299,7 +299,7 @@ bundle exec rubocop
299
299
  ### Console
300
300
 
301
301
  ```bash
302
- pry -Ilib -rskroutz
302
+ pry --gem
303
303
  ```
304
304
 
305
305
  ### OAuth2.0 Credentials
@@ -1,6 +1,7 @@
1
1
  class Skroutz::Client
2
2
  include Skroutz::Parsing
3
3
 
4
+ attr_writer :token
4
5
  attr_accessor :client_id, :client_secret, :config, :user_token
5
6
 
6
7
  delegate(*Faraday::Connection::METHODS, to: :conn)
@@ -1,3 +1,3 @@
1
1
  module Skroutz
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -71,6 +71,18 @@ describe Skroutz::Client do
71
71
  end
72
72
  end
73
73
 
74
+ describe '#token=' do
75
+ let(:token) { 'token' }
76
+
77
+ subject { client.token }
78
+
79
+ before { client.token = token }
80
+
81
+ it 'returns the assigned value' do
82
+ is_expected.to eq(token)
83
+ end
84
+ end
85
+
74
86
  describe '#user_token' do
75
87
  let(:user_token) { 'token' }
76
88
  subject { client.user_token }
@@ -12,7 +12,7 @@ shared_examples 'an error handled request' do
12
12
  end
13
13
  end
14
14
 
15
- describe '404 Not Found' do
15
+ describe '401 Unauthorized' do
16
16
  let(:status) { 401 }
17
17
 
18
18
  it 'raises Skroutz::UnauthorizedError' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skroutz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-28 00:00:00.000000000 Z
12
+ date: 2016-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler