omniauth-plangrade 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 971880782792ea5433e4db1bfcfcdd68d3f7170a
4
+ data.tar.gz: e789c6fb47d311e080408688983b71c52a372e4d
5
+ SHA512:
6
+ metadata.gz: 17ca6edfc3661c0e51462484576b02ea187fd4b8c22ecc0c084332abc386dca09180f5f4911e29ff4d6767462361d6a5180810feed4332b6e159d6865dc8ff51
7
+ data.tar.gz: ab04a76030ed98e42e4848b27c8402d10d921bad0529f02a265f174daea1bd4b5617c8fce79cee65a09d0d50820e73b98cd5f4f899cbe98ce724ca4c861583c6
data/.gitignore ADDED
@@ -0,0 +1,22 @@
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
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omniauth-plangrade.gemspec
4
+ gemspec
5
+
6
+ gem 'oauth2'
7
+ gem 'omniauth-oauth2'
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Christopher Reynoso
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Omniauth::Plangrade
2
+
3
+ Omniauth Strategy for plangrade. Find out more about the plangrade API at docs.plangrade.com
4
+
5
+ ## Installation
6
+
7
+ Add omniauth-oauth2 and this line to your application's Gemfile:
8
+
9
+ gem 'omniauth-plangrade', git: 'https://github.com/topherreynoso/omniauth-plangrade'
10
+
11
+ And then execute:
12
+
13
+ $ bundle install
14
+
15
+ ## Usage
16
+
17
+ You need to add the following to your `config/initializers/omniauth.rb`:
18
+
19
+ ```ruby
20
+ Rails.application.config.middleware.use OmniAuth::Builder do
21
+ provider :plangrade, "your_key", "your_secret", redirect_uri: "redirect_uri"
22
+ end
23
+ ```
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,2 @@
1
+ require "omniauth/plangrade/version"
2
+ require "omniauth/strategies/plangrade"
@@ -0,0 +1,5 @@
1
+ module Omniauth
2
+ module Plangrade
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,27 @@
1
+ require 'omniauth-oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Plangrade < OmniAuth::Strategies::OAuth2
6
+ option :name, :plangrade
7
+
8
+ option :client_options, {
9
+ :site => "https://plangrade.com",
10
+ :authorize_url => "/oauth/authorize"
11
+ }
12
+
13
+ uid { raw_info["id"] }
14
+
15
+ info do
16
+ {
17
+ :email => raw_info["email"],
18
+ :name => raw_info["name"]
19
+ }
20
+ end
21
+
22
+ def raw_info
23
+ @raw_info ||= access_token.get('/api/v1/me.json').parsed
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'omniauth/plangrade/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "omniauth-plangrade"
8
+ spec.version = Omniauth::Plangrade::VERSION
9
+ spec.authors = ["Christopher Reynoso"]
10
+ spec.email = ["topherreynoso@gmail.com"]
11
+ spec.summary = %q{Omniauth Strategy for plangrade}
12
+ spec.description = %q{Omniauth Strategy for plangrade. Find out more about the plangrade API at http://docs.plangrade.com}
13
+ spec.homepage = "https://github.com/topherreynoso/omniauth-plangrade"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-plangrade
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Christopher Reynoso
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Omniauth Strategy for plangrade. Find out more about the plangrade API
42
+ at http://docs.plangrade.com
43
+ email:
44
+ - topherreynoso@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - lib/omniauth/plangrade.rb
55
+ - lib/omniauth/plangrade/version.rb
56
+ - lib/omniauth/strategies/plangrade.rb
57
+ - omniauth-plangrade.gemspec
58
+ homepage: https://github.com/topherreynoso/omniauth-plangrade
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.2.2
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Omniauth Strategy for plangrade
82
+ test_files: []