omniauth-yammer 0.0.7 → 0.0.8
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 +4 -4
- data/.travis.yml +1 -0
- data/LICENSE.txt +22 -0
- data/lib/omniauth-yammer/version.rb +1 -1
- data/omniauth-yammer.gemspec +2 -3
- data/spec/omniauth/strategies/yammer_spec.rb +16 -16
- data/spec/spec_helper.rb +8 -2
- metadata +25 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5b3270b0577ba13be3a195680180eaa3e8f1f68
|
4
|
+
data.tar.gz: 734b13c33c8777127414d5c5e7d04e155c12bd20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35d83adf4213095292799c374138143538f2e6f0d1e54ca4c678594fbea0bf197f117cce00c96d963b8732d35f5af798091e3b7aa387c45b8b82230a763d25a6
|
7
|
+
data.tar.gz: 26d8a677db3833207a4603ca8886e563ff2db4c635274c822f32928b980da8ff97a057060fe4c7812719c8aa8a2d9d3efbb18cfdd1de968909b897f2edbf14d4
|
data/.travis.yml
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Alexey Vasyliev
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/omniauth-yammer.gemspec
CHANGED
@@ -7,8 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.description = %q{OmniAuth strategy for Yammer}
|
8
8
|
gem.summary = %q{OmniAuth strategy for Yammer}
|
9
9
|
gem.homepage = "https://github.com/le0pard/omniauth-yammer"
|
10
|
-
|
11
|
-
gem.rubyforge_project = "omniauth-yammer"
|
10
|
+
gem.license = "MIT"
|
12
11
|
|
13
12
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
14
13
|
gem.files = `git ls-files`.split("\n")
|
@@ -19,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
19
18
|
|
20
19
|
gem.add_runtime_dependency 'omniauth-oauth2', '>= 1.1'
|
21
20
|
|
22
|
-
gem.add_development_dependency 'rspec', '>= 2.
|
21
|
+
gem.add_development_dependency 'rspec', '>= 2.14'
|
23
22
|
gem.add_development_dependency 'rake'
|
24
23
|
gem.add_development_dependency 'rack-test'
|
25
24
|
gem.add_development_dependency 'simplecov'
|
@@ -4,43 +4,43 @@ describe OmniAuth::Strategies::Yammer do
|
|
4
4
|
subject { OmniAuth::Strategies::Yammer.new(nil) }
|
5
5
|
|
6
6
|
it 'should add a camelization for itself' do
|
7
|
-
OmniAuth::Utils.camelize('yammer').
|
7
|
+
expect(OmniAuth::Utils.camelize('yammer')).to eq('Yammer')
|
8
8
|
end
|
9
9
|
|
10
10
|
describe '#client' do
|
11
11
|
it 'has correct GaggleAMP site' do
|
12
|
-
subject.client.site.
|
12
|
+
expect(subject.client.site).to eq('https://www.yammer.com')
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'has correct authorize url' do
|
16
|
-
subject.client.options[:authorize_url].
|
16
|
+
expect(subject.client.options[:authorize_url]).to eq('/dialog/oauth')
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'has correct token url' do
|
20
|
-
subject.client.options[:token_url].
|
20
|
+
expect(subject.client.options[:token_url]).to eq('/oauth2/access_token.json')
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
describe '#callback_path' do
|
25
25
|
it 'has the correct callback path' do
|
26
|
-
subject.callback_path.
|
26
|
+
expect(subject.callback_path).to eq('/auth/yammer/callback')
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
describe '#uid' do
|
31
31
|
before :each do
|
32
|
-
subject.
|
32
|
+
allow(subject).to receive(:raw_info) { { 'id' => 'uid' } }
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'returns the id from raw_info' do
|
36
|
-
subject.uid.
|
36
|
+
expect(subject.uid).to eq('uid')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
describe '#info' do
|
41
41
|
context 'and therefore has all the necessary fields' do
|
42
42
|
before :each do
|
43
|
-
subject.
|
43
|
+
allow(subject).to receive(:raw_info) { {
|
44
44
|
'full_name' => 'John Doe',
|
45
45
|
'contact' => {
|
46
46
|
'email_addresses' => [
|
@@ -51,14 +51,14 @@ describe OmniAuth::Strategies::Yammer do
|
|
51
51
|
} }
|
52
52
|
end
|
53
53
|
|
54
|
-
it { subject.info.
|
55
|
-
it { subject.info.
|
56
|
-
it { subject.info.
|
54
|
+
it { expect(subject.info).to have_key :name }
|
55
|
+
it { expect(subject.info).to have_key :email }
|
56
|
+
it { expect(subject.info).to have_key :nickname }
|
57
57
|
end
|
58
58
|
|
59
59
|
context 'and does not fail with empty response' do
|
60
60
|
before :each do
|
61
|
-
subject.
|
61
|
+
allow(subject).to receive(:raw_info) { {} }
|
62
62
|
end
|
63
63
|
|
64
64
|
it { expect { subject.info }.not_to raise_error }
|
@@ -67,20 +67,20 @@ describe OmniAuth::Strategies::Yammer do
|
|
67
67
|
|
68
68
|
describe '#extra' do
|
69
69
|
before :each do
|
70
|
-
subject.
|
70
|
+
allow(subject).to receive(:raw_info) { { 'foo' => 'bar' } }
|
71
71
|
end
|
72
72
|
|
73
|
-
it { subject.extra[:raw_info].
|
73
|
+
it { expect(subject.extra[:raw_info]).to eq({ 'foo' => 'bar' }) }
|
74
74
|
end
|
75
75
|
|
76
76
|
describe '#raw_info' do
|
77
77
|
before :each do
|
78
78
|
response = double('response', :parsed => { 'foo' => 'bar' })
|
79
|
-
subject.
|
79
|
+
allow(subject).to receive(:access_token) { double('access token', :get => response) }
|
80
80
|
end
|
81
81
|
|
82
82
|
it 'returns parsed response from access token' do
|
83
|
-
subject.raw_info.
|
83
|
+
expect(subject.raw_info).to eq({ 'foo' => 'bar' })
|
84
84
|
end
|
85
85
|
end
|
86
86
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -9,7 +9,13 @@ require 'omniauth'
|
|
9
9
|
require 'omniauth-yammer'
|
10
10
|
|
11
11
|
RSpec.configure do |config|
|
12
|
+
|
13
|
+
config.expect_with :rspec do |c|
|
14
|
+
c.syntax = :expect
|
15
|
+
end
|
16
|
+
|
12
17
|
config.include WebMock::API
|
13
18
|
config.include Rack::Test::Methods
|
14
|
-
config.extend OmniAuth::Test::StrategyMacros, :
|
15
|
-
|
19
|
+
config.extend OmniAuth::Test::StrategyMacros, type: :strategy
|
20
|
+
|
21
|
+
end
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-yammer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Vasiliev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.14'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.14'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rack-test
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: webmock
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: OmniAuth strategy for Yammer
|
@@ -101,9 +101,10 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- .gitignore
|
105
|
-
- .travis.yml
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
106
106
|
- Gemfile
|
107
|
+
- LICENSE.txt
|
107
108
|
- README.md
|
108
109
|
- Rakefile
|
109
110
|
- lib/omniauth-yammer.rb
|
@@ -113,7 +114,8 @@ files:
|
|
113
114
|
- spec/omniauth/strategies/yammer_spec.rb
|
114
115
|
- spec/spec_helper.rb
|
115
116
|
homepage: https://github.com/le0pard/omniauth-yammer
|
116
|
-
licenses:
|
117
|
+
licenses:
|
118
|
+
- MIT
|
117
119
|
metadata: {}
|
118
120
|
post_install_message:
|
119
121
|
rdoc_options: []
|
@@ -121,17 +123,17 @@ require_paths:
|
|
121
123
|
- lib
|
122
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
123
125
|
requirements:
|
124
|
-
- -
|
126
|
+
- - ">="
|
125
127
|
- !ruby/object:Gem::Version
|
126
128
|
version: '0'
|
127
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
130
|
requirements:
|
129
|
-
- -
|
131
|
+
- - ">="
|
130
132
|
- !ruby/object:Gem::Version
|
131
133
|
version: '0'
|
132
134
|
requirements: []
|
133
|
-
rubyforge_project:
|
134
|
-
rubygems_version: 2.
|
135
|
+
rubyforge_project:
|
136
|
+
rubygems_version: 2.2.1
|
135
137
|
signing_key:
|
136
138
|
specification_version: 4
|
137
139
|
summary: OmniAuth strategy for Yammer
|