yammer-oauth2 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -94,12 +94,10 @@ module YammerOAuth2
94
94
  # client_id={client_id}&code=G3Y6jU3a&grant_type=authorization_code&
95
95
  # redirect_uri=http%3A%2F%2Flocalhost%2Foauth%2Fcb&client_secret={client_secret}
96
96
 
97
- def exchange_auth_code_for_token(opts={})
98
- unless (opts[:params] && opts[:params][:code])
99
- raise ArgumentError.new("You must include an authorization code as a parameter")
100
- end
97
+ def exchange_auth_code_for_token(code, opts={})
101
98
  opts[:authenticate] ||= :body
102
- code = opts[:params].delete(:code)
99
+ opts[:params] = {}
100
+ opts[:params][:redirect_uri] = opts.delete(:redirect_uri)
103
101
  authorization_code.get_token(code, opts)
104
102
  end
105
103
  end
@@ -2,7 +2,7 @@ module YammerOAuth2
2
2
  class Version
3
3
  MAJOR = 0 unless defined? MAJOR
4
4
  MINOR = 3 unless defined? MINOR
5
- PATCH = 0 unless defined? PATCH
5
+ PATCH = 1 unless defined? PATCH
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].compact.join('.')
data/spec/client_spec.rb CHANGED
@@ -71,10 +71,8 @@ describe YammerOAuth2::Client do
71
71
  }
72
72
  )
73
73
  response = subject.exchange_auth_code_for_token(
74
- :params => {
75
- :code => 'MmOGL795LbIZuJJVnL49Cc',
76
- :redirect_uri => 'https://localhost'
77
- }
74
+ 'MmOGL795LbIZuJJVnL49Cc',
75
+ :redirect_uri => 'https://localhost'
78
76
  )
79
77
  end
80
78
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yammer-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Mutyaba
metadata.gz.sig CHANGED
@@ -1 +1,4 @@
1
- ��#��$�*w�$�B��^�i�0/Ӷ"�5($K�I��8�n�Z���L��a�Ì��~y��m�i�=�,D��YxG��\B5����QD+�͋�0�h����Ҝ��rz��� 8����� !EL��Y�Q#�\���Hk�*ն�]A�6= R3~��x�n*NS��^�\y磌��&���q3�E4��`[?��>�x��9���q�?��8�&���Z$஢g\��O�e����r���TP�n�ơ��h�x\��
1
+ `!ÍR�;s��j"��D���k��_o;[�����C_%u�ܔf��(��(.����Y���Z�-��,*6/
2
+ U�LJG�
3
+ m_b�rb�6����G�ێ�
4
+ �F����\���r�w�b�1�:�krŸҹT}