omniauth-origo 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c7f0beee0658ab70635580aa636a0d9be02f54d2
4
+ data.tar.gz: b0218852936a8d51222c7a9497518c2ea048c1e6
5
+ SHA512:
6
+ metadata.gz: 13f8ef563e3be52c9391c26db9e30f5fa4524d8c8f4d4d3f6e63d9c9379a8e42fdaee1a4bdfac37e445d27656212afc36659667c91d33a61a62b0862c07294bc
7
+ data.tar.gz: 8a07336b8428c289375be9df6d5c948df45e2bdcfee53f9e6e299ba1923ad5f95d6405c4c6a7f02c089108409828f06d90a6bfadbcdffe3a03846c4b3d4f7a46
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ coverage
data/README.md CHANGED
@@ -1,23 +1,21 @@
1
- #OmniAuth 1.0 Origo (OAuth 2) strategy
1
+ #OmniAuth 1.2 Origo (OAuth 2) strategy
2
2
 
3
- This gem is designed to work with the in-beta OmniAuth 1.0 library against Origo.no
4
-
5
- It will not be officially released on RubyGems.org until OmniAuth 1.0 is released.
3
+ This gem is designed to work with OmniAuth 1.2 library against Origo.no
6
4
 
7
5
  ## How to include in your Gemfile
8
6
 
9
7
  ```
10
- gem 'omniauth-origo', '~> 1.0.0.rc3', :git => 'https://github.com/origo/omniauth-origo.git'
8
+ gem 'omniauth-origo'
11
9
 
12
10
  ```
13
11
 
14
12
  ##Author
15
13
 
16
- Per-Kristian Nordnes <pk@origo.no>, November 2011
14
+ Per-Kristian Nordnes <pk@bengler>, November 2015
17
15
 
18
16
  ##License
19
17
 
20
- Copyright (C) 2011 by Origogruppen AS.
18
+ Copyright (C) 2015 by Bengler AS.
21
19
 
22
20
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23
21
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Origo
3
- VERSION = "1.0.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -11,10 +11,10 @@ Gem::Specification.new do |gem|
11
11
  gem.summary = %q{Official OmniAuth OAuth 2 strategy for Origo.}
12
12
  gem.homepage = "https://github.com/origo/omniauth-origo"
13
13
 
14
- gem.add_runtime_dependency 'omniauth', '~> 1.0.0'
15
- gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.0.0'
16
- gem.add_runtime_dependency 'oauth'
14
+ gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.2'
17
15
  gem.add_dependency 'multi_json'
16
+ gem.add_development_dependency 'rspec'
17
+ gem.add_development_dependency 'rack-test'
18
18
 
19
19
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  gem.files = `git ls-files`.split("\n")
@@ -1,6 +1,15 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe OmniAuth::Strategies::Origo do
4
+
5
+ before do
6
+ OmniAuth.config.test_mode = true
7
+ end
8
+
9
+ after do
10
+ OmniAuth.config.test_mode = false
11
+ end
12
+
4
13
  subject do
5
14
  OmniAuth::Strategies::Origo.new(nil, @options || {})
6
15
  end
@@ -9,21 +18,21 @@ describe OmniAuth::Strategies::Origo do
9
18
 
10
19
  describe '#client' do
11
20
  it 'has correct site URL' do
12
- subject.client.site.should == 'https://secure.origo.no'
21
+ expect(subject.client.site).to eq('https://secure.origo.no')
13
22
  end
14
23
 
15
24
  it 'has correct authorize URL' do
16
- subject.client.authorize_url.should == 'https://secure.origo.no/-/oauth/authorize'
25
+ expect(subject.client.authorize_url).to eq('https://secure.origo.no/-/oauth/authorize')
17
26
  end
18
27
 
19
28
  it 'has correct token URL' do
20
- subject.client.token_url.should == 'https://secure.origo.no/-/oauth/token'
21
- end
29
+ expect(subject.client.token_url).to eq('https://secure.origo.no/-/oauth/token')
30
+ end
22
31
  end
23
32
 
24
33
  describe '#callback_path' do
25
34
  it "has the correct callback path" do
26
- subject.callback_path.should eq('/auth/origo/callback')
35
+ expect(subject.callback_path).to eq('/auth/origo/callback')
27
36
  end
28
37
  end
29
38
 
@@ -3,35 +3,35 @@ shared_examples 'an oauth2 strategy' do
3
3
  describe '#client' do
4
4
  it 'should be initialized with symbolized client_options' do
5
5
  @options = { :client_options => { 'authorize_url' => 'https://example.com' } }
6
- subject.client.options[:authorize_url].should == 'https://example.com'
6
+ expect(subject.client.options[:authorize_url]).to eq('https://example.com')
7
7
  end
8
8
  end
9
9
 
10
10
  describe '#authorize_params' do
11
11
  it 'should include any authorize params passed in the :authorize_params option' do
12
12
  @options = { :authorize_params => { :foo => 'bar', :baz => 'zip' } }
13
- subject.authorize_params['foo'].should eq('bar')
14
- subject.authorize_params['baz'].should eq('zip')
13
+ expect(subject.authorize_params['foo']).to eq('bar')
14
+ expect(subject.authorize_params['baz']).to eq('zip')
15
15
  end
16
16
 
17
17
  it 'should include top-level options that are marked as :authorize_options' do
18
18
  @options = { :authorize_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
19
- subject.authorize_params['scope'].should eq('bar')
20
- subject.authorize_params['foo'].should eq('baz')
19
+ expect(subject.authorize_params['scope']).to eq('bar')
20
+ expect(subject.authorize_params['foo']).to eq('baz')
21
21
  end
22
22
  end
23
23
 
24
24
  describe '#token_params' do
25
25
  it 'should include any token params passed in the :token_params option' do
26
26
  @options = { :token_params => { :foo => 'bar', :baz => 'zip' } }
27
- subject.token_params['foo'].should eq('bar')
28
- subject.token_params['baz'].should eq('zip')
27
+ expect(subject.token_params['foo']).to eq('bar')
28
+ expect(subject.token_params['baz']).to eq('zip')
29
29
  end
30
30
 
31
31
  it 'should include top-level options that are marked as :token_options' do
32
32
  @options = { :token_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
33
- subject.token_params['scope'].should eq('bar')
34
- subject.token_params['foo'].should eq('baz')
33
+ expect(subject.token_params['scope']).to eq('bar')
34
+ expect(subject.token_params['foo']).to eq('baz')
35
35
  end
36
36
  end
37
37
  end
metadata CHANGED
@@ -1,60 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-origo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Per-Kristian Nordnes
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-02-28 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: omniauth
16
- requirement: &70262805584360 !ruby/object:Gem::Requirement
17
- none: false
14
+ name: omniauth-oauth2
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 1.0.0
19
+ version: '1.2'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70262805584360
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
25
27
  - !ruby/object:Gem::Dependency
26
- name: omniauth-oauth2
27
- requirement: &70262805582860 !ruby/object:Gem::Requirement
28
- none: false
28
+ name: multi_json
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ~>
31
+ - - ">="
31
32
  - !ruby/object:Gem::Version
32
- version: 1.0.0
33
+ version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *70262805582860
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
- name: oauth
38
- requirement: &70262805582240 !ruby/object:Gem::Requirement
39
- none: false
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - ">="
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
- type: :runtime
48
+ type: :development
45
49
  prerelease: false
46
- version_requirements: *70262805582240
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
- name: multi_json
49
- requirement: &70262805581260 !ruby/object:Gem::Requirement
50
- none: false
56
+ name: rack-test
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - ">="
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
- type: :runtime
62
+ type: :development
56
63
  prerelease: false
57
- version_requirements: *70262805581260
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
58
69
  description: Official OmniAuth OAuth 2 strategy for Origo.
59
70
  email:
60
71
  - per.kristian.nordnes@gmail.com
@@ -62,9 +73,9 @@ executables: []
62
73
  extensions: []
63
74
  extra_rdoc_files: []
64
75
  files:
65
- - .rspec
76
+ - ".gitignore"
77
+ - ".rspec"
66
78
  - Gemfile
67
- - Gemfile.lock
68
79
  - README.md
69
80
  - Rakefile
70
81
  - lib/omniauth-origo.rb
@@ -77,27 +88,26 @@ files:
77
88
  - spec/support/shared_examples.rb
78
89
  homepage: https://github.com/origo/omniauth-origo
79
90
  licenses: []
91
+ metadata: {}
80
92
  post_install_message:
81
93
  rdoc_options: []
82
94
  require_paths:
83
95
  - lib
84
96
  required_ruby_version: !ruby/object:Gem::Requirement
85
- none: false
86
97
  requirements:
87
- - - ! '>='
98
+ - - ">="
88
99
  - !ruby/object:Gem::Version
89
100
  version: '0'
90
101
  required_rubygems_version: !ruby/object:Gem::Requirement
91
- none: false
92
102
  requirements:
93
- - - ! '>='
103
+ - - ">="
94
104
  - !ruby/object:Gem::Version
95
105
  version: '0'
96
106
  requirements: []
97
107
  rubyforge_project:
98
- rubygems_version: 1.8.10
108
+ rubygems_version: 2.4.8
99
109
  signing_key:
100
- specification_version: 3
110
+ specification_version: 4
101
111
  summary: Official OmniAuth OAuth 2 strategy for Origo.
102
112
  test_files:
103
113
  - spec/omniauth/strategies/origo_spec.rb
data/Gemfile.lock DELETED
@@ -1,33 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- omniauth-origo (1.0.0.rc3)
5
- multi_json
6
- oauth
7
- omniauth (~> 1.0.0.rc2)
8
- omniauth-oauth (~> 1.0.0.rc2)
9
-
10
- GEM
11
- remote: http://rubygems.org/
12
- specs:
13
- hashie (1.2.0)
14
- multi_json (1.0.3)
15
- oauth (0.4.5)
16
- omniauth (1.0.0)
17
- hashie (~> 1.2)
18
- rack
19
- omniauth-oauth (1.0.0)
20
- oauth
21
- omniauth (~> 1.0)
22
- rack (1.3.5)
23
- simplecov (0.5.4)
24
- multi_json (~> 1.0.3)
25
- simplecov-html (~> 0.5.3)
26
- simplecov-html (0.5.3)
27
-
28
- PLATFORMS
29
- ruby
30
-
31
- DEPENDENCIES
32
- omniauth-origo!
33
- simplecov