omniauth-qrtracc 0.0.2 → 0.0.3

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.
data/.DS_Store ADDED
Binary file
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Qrtracc
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -0,0 +1,25 @@
1
+ require 'omniauth-oauth'
2
+ require 'multi_json'
3
+ module OmniAuth
4
+ module Strategies
5
+ class Qrtracc < OmniAuth::Strategies::OAuth
6
+ option :name, 'qrtracc'
7
+ option :client_options, {:authorize_path => '/oauth/authenticate',
8
+ :site => 'https://sso.qrtra.cc'}
9
+
10
+ uid { access_token.params[:user_id] }
11
+
12
+
13
+
14
+ extra do
15
+ {:raw_info => raw_info}
16
+ end
17
+
18
+ def raw_info
19
+ @raw_info ||= MultiJson.decode(access_token.get('api/v1/data.json').body)
20
+ rescue ::Errno::ETIMEDOUT
21
+ raise ::Timeout::Error
22
+ end
23
+ end
24
+ end
25
+ end
@@ -3,22 +3,21 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
  require "omniauth-qrtracc/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "omniauth-qrtracc"
7
- s.version = Omniauth::Qrtracc::VERSION
8
6
  s.authors = ["Pierre Kircher"]
9
7
  s.email = ["info@blackdolphin.co.uk"]
10
- s.homepage = ""
11
- s.summary = %q{Official OmniAuth strategy for QRtra.cc}
12
8
  s.description = %q{Official OmniAuth strategy for QRtra.cc}
13
-
9
+ s.summary = %q{Official OmniAuth strategy for QRtra.cc}
10
+ s.homepage = "https://github.com/BlackdolphinMedia/omniauth-qrtracc"
11
+
14
12
  s.rubyforge_project = "omniauth-qrtracc"
15
13
 
14
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
15
  s.files = `git ls-files`.split("\n")
17
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.name = "omniauth-qrtracc"
19
18
  s.require_paths = ["lib"]
19
+ s.version = Omniauth::Qrtracc::VERSION
20
+ s.add_runtime_dependency 'omniauth-oauth', '~> 1.0'
21
+
20
22
 
21
- # specify any dependencies here; for example:
22
- # s.add_development_dependency "rspec"
23
- # s.add_runtime_dependency "rest-client"
24
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-qrtracc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,18 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2011-12-06 00:00:00.000000000Z
13
- dependencies: []
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: omniauth-oauth
16
+ requirement: &70204906623280 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70204906623280
14
25
  description: Official OmniAuth strategy for QRtra.cc
15
26
  email:
16
27
  - info@blackdolphin.co.uk
@@ -18,14 +29,16 @@ executables: []
18
29
  extensions: []
19
30
  extra_rdoc_files: []
20
31
  files:
32
+ - .DS_Store
21
33
  - .gitignore
22
34
  - Gemfile
23
35
  - README.md
24
36
  - Rakefile
25
37
  - lib/omniauth-qrtracc.rb
26
38
  - lib/omniauth-qrtracc/version.rb
39
+ - lib/omniauth/strategies/qrtracc.rb
27
40
  - omniauth-qrtracc.gemspec
28
- homepage: ''
41
+ homepage: https://github.com/BlackdolphinMedia/omniauth-qrtracc
29
42
  licenses: []
30
43
  post_install_message:
31
44
  rdoc_options: []