yammer-oauth2 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/.gitignore CHANGED
@@ -11,6 +11,7 @@ spec/reports
11
11
  test/tmp
12
12
  test/version_tmp
13
13
  tmp
14
+ Gemfile.lock
14
15
 
15
16
  # YARD artifacts
16
17
  .yardoc
@@ -3,5 +3,7 @@ rvm:
3
3
  - "1.8.7"
4
4
  - "1.9.2"
5
5
  - "1.9.3"
6
- # uncomment this line if your project needs to run something other than `rake`:
7
- # # script: bundle exec rspec spec
6
+
7
+ branches:
8
+ only:
9
+ - master
@@ -1,3 +1,7 @@
1
+ 0.1.3
2
+ ------
3
+ Changed argument order. This change will break things.
4
+
1
5
  0.1.0
2
6
  -----
3
7
  * [Initial release](https://github.com/tiabas/yammer-oauth2/commit/036104d420fb34b64115e58f928a1bfbbfa8bde4)
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ group :test do
7
7
  gem 'rspec', '>= 2.11'
8
8
  gem 'simplecov', :require => false
9
9
  gem 'coveralls', :require => false
10
- gem 'webmock'
10
+ gem 'webmock', '~> 1.10.1'
11
11
  end
12
12
 
13
13
  gemspec
data/README.md CHANGED
@@ -70,7 +70,7 @@ response.body
70
70
 
71
71
  ### Implicit Grant
72
72
  ```ruby
73
- auth_url = client.implicit.authorization_path(:redirect_uri => 'http://localhost/oauth2/callback')
73
+ auth_url = yammer_client.clientside_authorization_url(:redirect_uri => 'http://localhost/oauth2/callback')
74
74
  # => "https://www.yammer.com/dialog/oauth/?client_id=PRbTcg9qjgKsp4jjpm1pw&redirect_uri=http%3A%2F%2Flocalhost%2Foauth%2Fcallback&response_type=token"
75
75
  ```
76
76
 
data/Rakefile CHANGED
File without changes
File without changes
File without changes
@@ -3,11 +3,17 @@ require 'oauth2'
3
3
  module YammerOAuth2
4
4
  class Client < OAuth2::Client
5
5
 
6
- def initialize(*args)
7
- super
6
+ DEFAULT_URL = 'https://www.yammer.com'
7
+
8
+ def initialize(client_id, client_secret, opts={})
9
+ site_url = opts.delete(:site_url) || DEFAULT_URL
10
+ super(site_url, client_id, client_secret, opts)
8
11
  @token_path = '/oauth2/token'
9
12
  @authorize_path = '/dialog/oauth/authorize'
13
+ yield self if block_given?
14
+ self
10
15
  end
16
+
11
17
  # Generates the Yammer URL that the user will be redirected to in order to
12
18
  # authorize your application
13
19
  #
@@ -1,8 +1,8 @@
1
1
  module YammerOAuth2
2
2
  class Version
3
3
  MAJOR = 0 unless defined? MAJOR
4
- MINOR = 1 unless defined? MINOR
5
- PATCH = 1 unless defined? PATCH
4
+ MINOR = 2 unless defined? MINOR
5
+ PATCH = 0 unless defined? PATCH
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].compact.join('.')
@@ -3,7 +3,7 @@ require File.expand_path('../spec_helper', __FILE__)
3
3
  describe YammerOAuth2::Client do
4
4
 
5
5
  subject do
6
- YammerOAuth2::Client.new('https://www.yammer.com', 'PRbTcg9qjgKsp4jjpm1pw', 'a2nQpcUm2Dgq1chWdAvbXGTk', {
6
+ YammerOAuth2::Client.new('PRbTcg9qjgKsp4jjpm1pw', 'a2nQpcUm2Dgq1chWdAvbXGTk', {
7
7
  :connection_options => {
8
8
  :headers => {
9
9
  'User-Agent' => "Yammer OAuth2 Gem #{YammerOAuth2::Version}",
File without changes
@@ -3,11 +3,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'yammer-oauth2/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.add_dependency 'oauth2-client', '~> 1.1.2'
7
- spec.add_development_dependency 'bundler', '~> 1.0'
8
-
9
6
  spec.authors = ["Kevin Mutyaba"]
10
- spec.date = %q{2013-03-03}
7
+ spec.date = %q{2013-04-22}
11
8
  spec.description = "A Yammer OAuth2 wrapper"
12
9
  spec.email = %q{tiabasnk@gmail.com}
13
10
  spec.files = `git ls-files`.split("\n")
@@ -20,5 +17,8 @@ Gem::Specification.new do |spec|
20
17
  spec.version = YammerOAuth2::Version
21
18
 
22
19
  spec.cert_chain = ['certs/tiabas-public.pem']
23
- spec.signing_key = File.expand_path("~/.gem/certs/private_key.pem")
20
+ spec.signing_key = File.expand_path("~/.gem/certs/private_key.pem") if $0 =~ /gem\z/
21
+
22
+ spec.add_dependency 'oauth2-client', '~> 1.1.2'
23
+ spec.add_development_dependency 'bundler', '~> 1.0'
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yammer-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -38,7 +38,7 @@ cert_chain:
38
38
  OGZyVURBOQpqNmZBVGcvNGZxcGdJTFBWcUZJR1pPTUpERmNKeS9vZWh3d3hM
39
39
  dTVYTXg4OFdGRDlqVDF2Umo3N0Q3aVBMYlhkCnJmR3MvcUNKS2dpZlhkLzFh
40
40
  bTVobEFINWpYVT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
41
- date: 2013-03-03 00:00:00.000000000 Z
41
+ date: 2013-04-22 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: oauth2-client
@@ -82,7 +82,6 @@ files:
82
82
  - .travis.yml
83
83
  - CHANGELOG.md
84
84
  - Gemfile
85
- - Gemfile.lock
86
85
  - LICENSE.md
87
86
  - README.md
88
87
  - Rakefile
@@ -119,3 +118,4 @@ signing_key:
119
118
  specification_version: 3
120
119
  summary: OAuth2 client wrapper for Yammer
121
120
  test_files: []
121
+ has_rdoc:
metadata.gz.sig CHANGED
Binary file
@@ -1,58 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- yammer-oauth2 (0.1.0)
5
- oauth2-client (~> 1.1.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- addressable (2.3.3)
11
- bcrypt-ruby (3.0.1)
12
- colorize (0.5.8)
13
- coveralls (0.6.0)
14
- colorize
15
- multi_json (~> 1.3)
16
- rest-client
17
- simplecov (>= 0.7)
18
- thor
19
- crack (0.3.2)
20
- diff-lcs (1.2.1)
21
- json (1.7.7)
22
- mime-types (1.21)
23
- multi_json (1.6.1)
24
- oauth2-client (1.1.2)
25
- addressable
26
- bcrypt-ruby (~> 3.0.0)
27
- rake (10.0.3)
28
- rest-client (1.6.7)
29
- mime-types (>= 1.16)
30
- rspec (2.13.0)
31
- rspec-core (~> 2.13.0)
32
- rspec-expectations (~> 2.13.0)
33
- rspec-mocks (~> 2.13.0)
34
- rspec-core (2.13.0)
35
- rspec-expectations (2.13.0)
36
- diff-lcs (>= 1.1.3, < 2.0)
37
- rspec-mocks (2.13.0)
38
- simplecov (0.7.1)
39
- multi_json (~> 1.0)
40
- simplecov-html (~> 0.7.1)
41
- simplecov-html (0.7.1)
42
- thor (0.17.0)
43
- webmock (1.10.1)
44
- addressable (>= 2.2.7)
45
- crack (>= 0.3.2)
46
-
47
- PLATFORMS
48
- ruby
49
-
50
- DEPENDENCIES
51
- bundler (~> 1.0)
52
- coveralls
53
- json
54
- rake
55
- rspec (>= 2.11)
56
- simplecov
57
- webmock
58
- yammer-oauth2!