omniauth-yammer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -33,3 +33,27 @@ Rails.application.config.middleware.use OmniAuth::Builder do
33
33
  provider :yammer, ENV['YAMMER_KEY'], ENV['YAMMER_SECRET']
34
34
  end
35
35
  ```
36
+
37
+ ### Devise
38
+
39
+ Add this line to devise config:
40
+
41
+
42
+ ```ruby
43
+ config.omniauth :yammer, "Consumer key", "Consumer secret"
44
+ ```
45
+
46
+ If you have this error:
47
+
48
+ SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
49
+
50
+ Then you can fix this by setting valid cert:
51
+
52
+ wget http://www.cacert.org/certs/root.crt
53
+ cat root.crt >> lib/ca-bundle.crt
54
+
55
+ and edit devise config:
56
+
57
+ ```ruby
58
+ config.omniauth :yammer, "Consumer key", "Consumer secret", {:client_options => {:ssl => {:ca_file => "#{Rails.root}/lib/ca-bundle.crt" }}}
59
+ ```
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Yammer
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -1,8 +1,9 @@
1
- require 'omniauth/strategies/oauth2'
1
+ require 'omniauth-oauth2'
2
2
 
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class Yammer < OmniAuth::Strategies::OAuth2
6
+
6
7
  option :name, 'yammer'
7
8
 
8
9
  option :client_options, {
@@ -30,6 +31,11 @@ module OmniAuth
30
31
  extra do
31
32
  prune!({:raw_info => raw_info})
32
33
  end
34
+
35
+ def request_phase
36
+ options[:authorize_params] = {:scope => options[:scope]} if options[:scope]
37
+ super
38
+ end
33
39
 
34
40
  def build_access_token
35
41
  access_token = super
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.version = OmniAuth::Yammer::VERSION
19
19
 
20
20
 
21
- gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.0'
21
+ gem.add_runtime_dependency 'omniauth-oauth2', '>= 1.0'
22
22
 
23
23
  gem.add_development_dependency 'rspec', '~> 2.7'
24
24
  gem.add_development_dependency 'rack-test'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-yammer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-09 00:00:00.000000000 Z
12
+ date: 2012-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2
16
- requirement: &70275882371180 !ruby/object:Gem::Requirement
16
+ requirement: &70295466396420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70275882371180
24
+ version_requirements: *70295466396420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70275882370580 !ruby/object:Gem::Requirement
27
+ requirement: &70295466395880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.7'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70275882370580
35
+ version_requirements: *70295466395880
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rack-test
38
- requirement: &70275882370120 !ruby/object:Gem::Requirement
38
+ requirement: &70295466395340 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70275882370120
46
+ version_requirements: *70295466395340
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: simplecov
49
- requirement: &70275882369560 !ruby/object:Gem::Requirement
49
+ requirement: &70295466394680 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70275882369560
57
+ version_requirements: *70295466394680
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: webmock
60
- requirement: &70275882369020 !ruby/object:Gem::Requirement
60
+ requirement: &70295466394080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70275882369020
68
+ version_requirements: *70295466394080
69
69
  description: OmniAuth strategy for Yammer
70
70
  email:
71
71
  - leopard.not.a@gmail.com
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project: omniauth-yammer
107
- rubygems_version: 1.8.10
107
+ rubygems_version: 1.8.15
108
108
  signing_key:
109
109
  specification_version: 3
110
110
  summary: OmniAuth strategy for Yammer