yammer-oauth2 0.1.1 → 0.2.0
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.
- data.tar.gz.sig +0 -0
- data/.gitignore +1 -0
- data/.travis.yml +4 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +0 -0
- data/certs/tiabas-public.pem +0 -0
- data/lib/yammer-oauth2.rb +0 -0
- data/lib/yammer-oauth2/client.rb +8 -2
- data/lib/yammer-oauth2/version.rb +2 -2
- data/spec/client_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -0
- data/yammer-oauth2.gemspec +5 -5
- metadata +3 -3
- metadata.gz.sig +0 -0
- data/Gemfile.lock +0 -58
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -70,7 +70,7 @@ response.body
|
|
70
70
|
|
71
71
|
### Implicit Grant
|
72
72
|
```ruby
|
73
|
-
auth_url =
|
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
|
data/certs/tiabas-public.pem
CHANGED
File without changes
|
data/lib/yammer-oauth2.rb
CHANGED
File without changes
|
data/lib/yammer-oauth2/client.rb
CHANGED
@@ -3,11 +3,17 @@ require 'oauth2'
|
|
3
3
|
module YammerOAuth2
|
4
4
|
class Client < OAuth2::Client
|
5
5
|
|
6
|
-
|
7
|
-
|
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 =
|
5
|
-
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('.')
|
data/spec/client_spec.rb
CHANGED
@@ -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('
|
6
|
+
YammerOAuth2::Client.new('PRbTcg9qjgKsp4jjpm1pw', 'a2nQpcUm2Dgq1chWdAvbXGTk', {
|
7
7
|
:connection_options => {
|
8
8
|
:headers => {
|
9
9
|
'User-Agent' => "Yammer OAuth2 Gem #{YammerOAuth2::Version}",
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
data/yammer-oauth2.gemspec
CHANGED
@@ -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-
|
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.
|
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-
|
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
|
data/Gemfile.lock
DELETED
@@ -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!
|