fitgem_oauth2 1.0.5 → 1.0.6

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: 3cb8afa6feb4de2e68e20c49fd90354694816ca4
4
- data.tar.gz: 744c1bbbb0e267d8c812548962e4863e64243475
3
+ metadata.gz: eb51e84b554b9bfd42cf907270a1e106073df925
4
+ data.tar.gz: 5b8892fc431c2246761155624c34f41c3772803b
5
5
  SHA512:
6
- metadata.gz: 968fe5b535c41cb722a1ef1e73104c9a6ee0409b89300996914b66512202cf45a3d0dbdd0d932d2a980e46f72d095fc259284a73ca56bb9edca97651ca8cb04f
7
- data.tar.gz: 7c685bff9e464ee51e171ca4436c6e7f361c1245047f9c4ab06a6546740d2d37ca802b21a0d8b1929d9b8b16602f62ae3efc22a14a80890ddf7f8ef047d32990
6
+ metadata.gz: 4a1607113fa93cc5ffdd266884101a8d857c5bee78b2c6d1c959006b83692c018b03044516f7ef320d0d17a2d89bc9e2db071dbf9b8538091ade106114aada4d
7
+ data.tar.gz: e106e723fd46fe78939a22c4904ca5126675155333f196c5ec091f50e734fb0f771176ad1f5b77d66d285ab192cd382375d18186a49cb05d5b0cf1e2e46aa632
@@ -24,6 +24,7 @@ module FitgemOauth2
24
24
  attr_reader :client_secret
25
25
  attr_reader :token
26
26
  attr_reader :user_id
27
+ attr_reader :unit_system
27
28
 
28
29
  def initialize(opts)
29
30
  missing = [:client_id, :client_secret, :token] - opts.keys
@@ -35,7 +36,7 @@ module FitgemOauth2
35
36
  @client_secret = opts[:client_secret]
36
37
  @token = opts[:token]
37
38
  @user_id = (opts[:user_id] || DEFAULT_USER_ID)
38
-
39
+ @unit_system = opts[:unit_system]
39
40
  @connection = Faraday.new('https://api.fitbit.com')
40
41
  end
41
42
 
@@ -74,6 +75,7 @@ module FitgemOauth2
74
75
  def set_headers(request)
75
76
  request.headers['Authorization'] = "Bearer #{token}"
76
77
  request.headers['Content-Type'] = 'application/x-www-form-urlencoded'
78
+ request.headers['Accept-Language'] = unit_system unless unit_system == nil
77
79
  end
78
80
 
79
81
  def parse_response(response)
@@ -1,3 +1,3 @@
1
1
  module FitgemOauth2
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fitgem_oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ankit Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-01 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -107,8 +107,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.4.6
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Fitbit API client library
114
114
  test_files: []
115
+ has_rdoc: