omniauth-fitbit 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Fitbit
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
@@ -37,16 +37,16 @@ module OmniAuth
37
37
  end
38
38
 
39
39
  extra do
40
- {
40
+ {
41
41
  :raw_info => raw_info
42
42
  }
43
43
  end
44
44
 
45
45
  def raw_info
46
46
  if options[:use_english_measure] == 'true'
47
- @raw_info ||= MultiJson.load(access_token.request('get', 'http://api.fitbit.com/1/user/-/profile.json', { 'Accept-Language' => 'en_US' }).body)
47
+ @raw_info ||= MultiJson.load(access_token.request('get', 'https://api.fitbit.com/1/user/-/profile.json', { 'Accept-Language' => 'en_US' }).body)
48
48
  else
49
- @raw_info ||= MultiJson.load(access_token.get('http://api.fitbit.com/1/user/-/profile.json').body)
49
+ @raw_info ||= MultiJson.load(access_token.get('https://api.fitbit.com/1/user/-/profile.json').body)
50
50
  end
51
51
  end
52
52
  end
@@ -7,7 +7,7 @@ describe "OmniAuth::Strategies::Fitbit" do
7
7
 
8
8
  context 'client options' do
9
9
  it 'has correct OAuth endpoint' do
10
- subject.options.client_options.site.should eq('http://api.fitbit.com')
10
+ subject.options.client_options.site.should eq('https://api.fitbit.com')
11
11
  end
12
12
 
13
13
  it 'has correct request token url' do
@@ -37,27 +37,27 @@ describe "OmniAuth::Strategies::Fitbit" do
37
37
 
38
38
  context 'info' do
39
39
  before :each do
40
- subject.stub(:raw_info) {
41
- {
42
- "user" =>
43
- {
44
- "fullName" => "John Doe",
45
- "displayName" => "JD",
46
- "nickname" => "Johnnie",
47
- "gender" => "MALE",
40
+ subject.stub(:raw_info) {
41
+ {
42
+ "user" =>
43
+ {
44
+ "fullName" => "John Doe",
45
+ "displayName" => "JD",
46
+ "nickname" => "Johnnie",
47
+ "gender" => "MALE",
48
48
  "aboutMe" => "I live in Kansas City, MO",
49
49
  "city" => "Kansas City",
50
50
  "state" => "MO",
51
51
  "country" => "US",
52
- "dateOfBirth" => "1980-01-01",
52
+ "dateOfBirth" => "1980-01-01",
53
53
  "memberSince" => "2010-01-01",
54
54
  "locale" => "en_US",
55
55
  "timezone" => "America/Chicago"
56
- }
57
- }
56
+ }
57
+ }
58
58
  }
59
59
  end
60
-
60
+
61
61
  it 'returns the correct name from raw_info' do
62
62
  subject.info[:name].should eq("JD")
63
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-fitbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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: 2014-01-29 00:00:00.000000000 Z
12
+ date: 2014-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth