omniauth-payponty 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 001076a58ff3420c7cbe983ec9aa09c673740678
4
+ data.tar.gz: 04c3e0754f8bb1f0741924a32de4a9227713b17b
5
+ SHA512:
6
+ metadata.gz: f75812e24f641de927059ee1bec20fe4cdee944f5e9fc90e52f9fb53a5857dabaf0028d7cd31b1bd536119275603d5e5ff4e30a29d90035f421c123b622b46e1
7
+ data.tar.gz: 1c1b52af288cf1a3d3cbee4dee063fbdff460c1f03733b3fd1a734e055a4dc2544a6cc86d39dcc0ff570ffecfe3cdd9e10429c6470864ff653b478c9f9456682
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'omniauth-oauth2'
4
+
5
+ group :development do
6
+ gem "rspec"
7
+ gem "yard"
8
+ gem "bundler"
9
+ gem "jeweler"
10
+ end
@@ -0,0 +1,50 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.3)
5
+ faraday (0.8.0)
6
+ multipart-post (~> 1.1)
7
+ git (1.2.5)
8
+ hashie (1.2.0)
9
+ httpauth (0.1)
10
+ jeweler (1.8.3)
11
+ bundler (~> 1.0)
12
+ git (>= 1.2.5)
13
+ rake
14
+ rdoc
15
+ json (1.7.3)
16
+ multi_json (1.3.5)
17
+ multipart-post (1.1.5)
18
+ oauth2 (0.6.1)
19
+ faraday (~> 0.7)
20
+ httpauth (~> 0.1)
21
+ multi_json (~> 1.3)
22
+ omniauth (1.1.0)
23
+ hashie (~> 1.2)
24
+ rack
25
+ omniauth-oauth2 (1.0.2)
26
+ oauth2 (~> 0.6.0)
27
+ omniauth (~> 1.0)
28
+ rack (1.4.1)
29
+ rake (0.9.2.2)
30
+ rdoc (3.12)
31
+ json (~> 1.4)
32
+ rspec (2.10.0)
33
+ rspec-core (~> 2.10.0)
34
+ rspec-expectations (~> 2.10.0)
35
+ rspec-mocks (~> 2.10.0)
36
+ rspec-core (2.10.1)
37
+ rspec-expectations (2.10.0)
38
+ diff-lcs (~> 1.1.3)
39
+ rspec-mocks (2.10.1)
40
+ yard (0.8.1)
41
+
42
+ PLATFORMS
43
+ ruby
44
+
45
+ DEPENDENCIES
46
+ bundler
47
+ jeweler
48
+ omniauth-oauth2
49
+ rspec
50
+ yard
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2014
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ = omniauth-payponty
2
+
3
+ It is mini lib for work with omniauth in payponty.com
4
+
5
+
6
+
@@ -0,0 +1,39 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ require './lib/omniauth-payponty/version.rb'
16
+ Jeweler::Tasks.new do |gem|
17
+
18
+ gem.name = "omniauth-payponty"
19
+ gem.homepage = "http://payponty.github.io/omniauth-payponty/"
20
+ gem.license = "MIT"
21
+ gem.summary = %Q{PayPonty lib for Omniauth.}
22
+ gem.description = gem.summary
23
+ gem.email = "payponty.info@gmail.com"
24
+ gem.authors = ["PayPonty"]
25
+ gem.version = OmniAuth::Payponty::VERSION
26
+
27
+ end
28
+ Jeweler::RubygemsDotOrgTasks.new
29
+
30
+ require 'rspec/core'
31
+ require 'rspec/core/rake_task'
32
+ RSpec::Core::RakeTask.new(:spec) do |spec|
33
+ spec.pattern = FileList['spec/**/*_spec.rb']
34
+ end
35
+
36
+ task :default => :spec
37
+
38
+ require 'yard'
39
+ YARD::Rake::YardocTask.new
@@ -0,0 +1,2 @@
1
+ require 'omniauth-payponty/version'
2
+ require 'omniauth/strategies/payponty'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Payponty
3
+ VERSION = "0.1.3"
4
+ end
5
+ end
@@ -0,0 +1,37 @@
1
+ require 'omniauth/strategies/oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Payponty < OmniAuth::Strategies::OAuth2
6
+ # Available scopes: content themes products customers orders script_tags shipping
7
+ # read_* or write_*
8
+ DEFAULT_SCOPE = 'read_products'
9
+
10
+ option :client_options, {
11
+ :authorize_url => '/admin/oauth/authorize',
12
+ :token_url => '/admin/oauth/token'
13
+ }
14
+
15
+ option :callback_url
16
+
17
+ def authorize_params
18
+ super.tap do |params|
19
+ params[:scope] ||= DEFAULT_SCOPE
20
+ end
21
+ end
22
+
23
+ def callback_url
24
+ options.callback_url || super
25
+ end
26
+
27
+ extra do
28
+ {raw_info: raw_info}
29
+ end
30
+
31
+ def raw_info
32
+ @raw_info ||= access_token.get('/api/shop').parsed
33
+ end
34
+
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,65 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: omniauth-payponty 0.1.3 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "omniauth-payponty"
9
+ s.version = "0.1.3"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
13
+ s.authors = ["PayPonty"]
14
+ s.date = "2014-08-26"
15
+ s.description = "PayPonty lib for Omniauth."
16
+ s.email = "payponty.info@gmail.com"
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".rspec",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE.txt",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "lib/omniauth-payponty.rb",
30
+ "lib/omniauth-payponty/version.rb",
31
+ "lib/omniauth/strategies/payponty.rb",
32
+ "omniauth-payponty.gemspec",
33
+ "spec/omniauth-payponty_spec.rb",
34
+ "spec/spec_helper.rb"
35
+ ]
36
+ s.homepage = "http://payponty.github.io/omniauth-payponty/"
37
+ s.licenses = ["MIT"]
38
+ s.rubygems_version = "2.4.1"
39
+ s.summary = "PayPonty lib for Omniauth."
40
+
41
+ if s.respond_to? :specification_version then
42
+ s.specification_version = 4
43
+
44
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
+ s.add_runtime_dependency(%q<omniauth-oauth2>, [">= 0"])
46
+ s.add_development_dependency(%q<rspec>, [">= 0"])
47
+ s.add_development_dependency(%q<yard>, [">= 0"])
48
+ s.add_development_dependency(%q<bundler>, [">= 0"])
49
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
50
+ else
51
+ s.add_dependency(%q<omniauth-oauth2>, [">= 0"])
52
+ s.add_dependency(%q<rspec>, [">= 0"])
53
+ s.add_dependency(%q<yard>, [">= 0"])
54
+ s.add_dependency(%q<bundler>, [">= 0"])
55
+ s.add_dependency(%q<jeweler>, [">= 0"])
56
+ end
57
+ else
58
+ s.add_dependency(%q<omniauth-oauth2>, [">= 0"])
59
+ s.add_dependency(%q<rspec>, [">= 0"])
60
+ s.add_dependency(%q<yard>, [">= 0"])
61
+ s.add_dependency(%q<bundler>, [">= 0"])
62
+ s.add_dependency(%q<jeweler>, [">= 0"])
63
+ end
64
+ end
65
+
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "OmniauthPayponty" do
4
+ end
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'omniauth-payponty'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata ADDED
@@ -0,0 +1,129 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-payponty
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - PayPonty
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth-oauth2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
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
+ - !ruby/object:Gem::Dependency
42
+ name: yard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jeweler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: PayPonty lib for Omniauth.
84
+ email: payponty.info@gmail.com
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files:
88
+ - LICENSE.txt
89
+ - README.rdoc
90
+ files:
91
+ - ".document"
92
+ - ".rspec"
93
+ - Gemfile
94
+ - Gemfile.lock
95
+ - LICENSE.txt
96
+ - README.rdoc
97
+ - Rakefile
98
+ - lib/omniauth-payponty.rb
99
+ - lib/omniauth-payponty/version.rb
100
+ - lib/omniauth/strategies/payponty.rb
101
+ - omniauth-payponty.gemspec
102
+ - spec/omniauth-payponty_spec.rb
103
+ - spec/spec_helper.rb
104
+ homepage: http://payponty.github.io/omniauth-payponty/
105
+ licenses:
106
+ - MIT
107
+ metadata: {}
108
+ post_install_message:
109
+ rdoc_options: []
110
+ require_paths:
111
+ - lib
112
+ required_ruby_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 2.4.1
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: PayPonty lib for Omniauth.
128
+ test_files: []
129
+ has_rdoc: