omniauth-comeeting 0.9.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.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ /pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omniauth-comeeting.gemspec
4
+ gemspec
5
+
6
+ group :development, :test do
7
+ gem 'guard'
8
+ gem 'guard-rspec'
9
+ gem 'guard-bundler'
10
+ gem 'rb-fsevent'
11
+ gem 'growl'
12
+ end
@@ -0,0 +1,10 @@
1
+ guard 'rspec', :version => 2 do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
6
+
7
+ guard 'bundler' do
8
+ watch('Gemfile')
9
+ watch('omniauth-comeeting.gemspec')
10
+ end
@@ -0,0 +1,20 @@
1
+ # OmniAuth co-meeting
2
+
3
+ This is the official OmniAuth strategy for authenticating to co-meeting. To
4
+ use it, you'll need to sign up for an OAuth2 Application ID and Secret.
5
+
6
+ ## Basic Usage
7
+
8
+ use OmniAuth::Builder do
9
+ provider :co_meeting, ENV['APP_ID'], ENV['APP_SECRET']
10
+ end
11
+
12
+ ## License
13
+
14
+ Copyright (c) 2013 Atsuhiko Kimura and co-meeting, Inc.
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ desc 'Run specs'
8
+ task :default => :spec
@@ -0,0 +1,2 @@
1
+ require "omniauth-comeeting/version"
2
+ require 'omniauth/strategies/comeeting'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module CoMeeting
3
+ VERSION = "0.9.0"
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ require 'omniauth-oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class CoMeeting < OmniAuth::Strategies::OAuth2
6
+ option :name, 'comeeting'
7
+
8
+ option :client_options, {
9
+ :site => 'https://www.co-meeting.com',
10
+ :authorize_url => '/oauth/authorize',
11
+ :token_url => '/oauth/token'
12
+ }
13
+
14
+ uid { raw_info["id"] }
15
+
16
+ info do
17
+ {
18
+ 'email' => raw_info['email'],
19
+ 'name' => raw_info['name'],
20
+ 'nickname' => raw_info['screen_name'],
21
+ 'image' => raw_info['icon_url']
22
+ }
23
+ end
24
+
25
+ def raw_info
26
+ @raw_info ||= access_token.get('/api/v1/users/me').parsed["result"]
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ OmniAuth.config.add_camelization 'comeeting', 'CoMeeting'
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/omniauth-comeeting/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Atsuhiko Kimura"]
6
+ gem.email = ["atskimura@gmail.com"]
7
+ gem.description = %q{OmniAuth strategy for co-meeting.}
8
+ gem.summary = %q{OmniAuth strategy for co-meeting.}
9
+ gem.homepage = "https://github.com/atskimura/omniauth-comeeting"
10
+
11
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
+ gem.files = `git ls-files`.split("\n")
13
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ gem.name = "omniauth-comeeting"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = OmniAuth::CoMeeting::VERSION
17
+
18
+ gem.add_dependency 'omniauth', '~> 1.0'
19
+ gem.add_dependency 'omniauth-oauth2', '~> 1.1'
20
+ gem.add_development_dependency 'rspec', '~> 2.7'
21
+ gem.add_development_dependency 'rack-test'
22
+ gem.add_development_dependency 'simplecov'
23
+ gem.add_development_dependency 'webmock'
24
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe OmniAuth::Strategies::CoMeeting do
4
+ context "client options" do
5
+ subject do
6
+ OmniAuth::Strategies::CoMeeting.new({})
7
+ end
8
+
9
+ it "should have the correct site" do
10
+ expect(subject.options.client_options.site).to eq('https://www.co-meeting.com')
11
+ end
12
+
13
+ it "should have the correct authorize url" do
14
+ expect(subject.options.client_options.authorize_url).to eq('/oauth/authorize')
15
+ end
16
+
17
+ it "should have the correct token url" do
18
+ expect(subject.options.client_options.token_url).to eq('/oauth/token')
19
+ end
20
+
21
+ it 'should have the correct callback path' do
22
+ subject.callback_path.should eq('/auth/comeeting/callback')
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,16 @@
1
+ $:.unshift File.expand_path('..', __FILE__)
2
+ $:.unshift File.expand_path('../../lib', __FILE__)
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+ require 'rspec'
6
+ require 'rack/test'
7
+ require 'webmock/rspec'
8
+ require 'omniauth'
9
+ require 'omniauth-comeeting'
10
+
11
+ RSpec.configure do |config|
12
+ config.include WebMock::API
13
+ config.include Rack::Test::Methods
14
+ config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
15
+ end
16
+
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-comeeting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Atsuhiko Kimura
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: omniauth
16
+ requirement: &70213874462160 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70213874462160
25
+ - !ruby/object:Gem::Dependency
26
+ name: omniauth-oauth2
27
+ requirement: &70213874461660 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '1.1'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70213874461660
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec
38
+ requirement: &70213874461200 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '2.7'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70213874461200
47
+ - !ruby/object:Gem::Dependency
48
+ name: rack-test
49
+ requirement: &70213874460820 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70213874460820
58
+ - !ruby/object:Gem::Dependency
59
+ name: simplecov
60
+ requirement: &70213874460360 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70213874460360
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: &70213874459940 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70213874459940
80
+ description: OmniAuth strategy for co-meeting.
81
+ email:
82
+ - atskimura@gmail.com
83
+ executables: []
84
+ extensions: []
85
+ extra_rdoc_files: []
86
+ files:
87
+ - .gitignore
88
+ - .rspec
89
+ - Gemfile
90
+ - Guardfile
91
+ - README.md
92
+ - Rakefile
93
+ - lib/omniauth-comeeting.rb
94
+ - lib/omniauth-comeeting/version.rb
95
+ - lib/omniauth/strategies/comeeting.rb
96
+ - omniauth-comeeting.gemspec
97
+ - spec/omniauth/strategies/comeeting_spec.rb
98
+ - spec/spec_helper.rb
99
+ homepage: https://github.com/atskimura/omniauth-comeeting
100
+ licenses: []
101
+ post_install_message:
102
+ rdoc_options: []
103
+ require_paths:
104
+ - lib
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ! '>='
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ requirements: []
118
+ rubyforge_project:
119
+ rubygems_version: 1.8.15
120
+ signing_key:
121
+ specification_version: 3
122
+ summary: OmniAuth strategy for co-meeting.
123
+ test_files:
124
+ - spec/omniauth/strategies/comeeting_spec.rb
125
+ - spec/spec_helper.rb