omniauth-unsplash 0.1.0 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6da33af8d9464582a92cf5fc394fc9cb16b105b
4
- data.tar.gz: 292436960de378ceeec860425b359f7b4da4c099
3
+ metadata.gz: 6a296a8289d4494bf71cac506b8a7bfaef56191c
4
+ data.tar.gz: 5a46c45922a23fd5785b6743aeef341643d515f9
5
5
  SHA512:
6
- metadata.gz: a5a628efbd91e4a7bb2ce838eaa2e8457e6e2c5eb6e5902702b8e07c837ce348b42a0b9c31790e2ad076715a7aa02cbdc4808df469bbcd573c0b8c79b0e730fc
7
- data.tar.gz: 1c05a985fee4a7187bd85794551653895cb61cb41c3aeee0d6a6172478caa14c5255c1e5c3ec4e9ebc49417b7197cc734ea3547f94825897c4dc0dbde4936ada
6
+ metadata.gz: 7efc9c18f77f43c83940a45cf830a3d6ca73ef02e84b074fa7081334d98cc3025e7f12235b509d020872102069a01f2c9730beed904c86970acd46ac077f27af
7
+ data.tar.gz: 05e325e2e1c826b87834b0484eae5b52196404fcb6abf5eb35791f4c1815d150a1b4c760914ccd7a27017b31e978795b3c64c75c5957fa7992081824dad24d9b
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -1,8 +1,12 @@
1
- # Omniauth::Unsplash
1
+ # Omniauth - Unsplash
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/omniauth-unsplash.svg)](https://badge.fury.io/rb/omniauth-unsplash)
2
4
 
3
5
  This is an UNofficial OmniAuth strategy for authenticating to Unsplash. To
4
- use it, you'll need to sign up for an OAuth2 Application ID and Secret
5
- on the [Unsplash Applications Page](https://unsplash.com/oauth/applications).
6
+ use it, you'll need to sign up for an OAuth2 Application ID and Application Secret
7
+ on the [Unsplash Applications Page](https://unsplash.com/oauth/applications).
8
+ Please note that it is in alpha stage yet. It is used by the author but not covered
9
+ by automatic tests.
6
10
 
7
11
  ## Installation
8
12
 
@@ -49,7 +49,14 @@ module OmniAuth
49
49
  end
50
50
 
51
51
  def raw_info
52
- JSON.parse(access_token.get('/me').body)
52
+ if options[:extra_data]
53
+ JSON.parse(access_token.get('/me').body)
54
+ else
55
+ {}
56
+ end
57
+ # TODO: catch correct RateLimiting exception
58
+ # rescue JSON::ParseError
59
+ # {}
53
60
  end
54
61
  end
55
62
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Unsplash
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-unsplash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Hozak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-23 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2