omniauth-shopify-oauth2 1.1.1 → 1.1.2
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/Gemfile.lock +2 -2
- data/lib/omniauth/shopify/version.rb +1 -1
- data/lib/omniauth/strategies/shopify.rb +9 -0
- data/omniauth-shopify-oauth2.gemspec +2 -1
- metadata +6 -5
data/Gemfile.lock
CHANGED
|
@@ -18,6 +18,15 @@ module OmniAuth
|
|
|
18
18
|
|
|
19
19
|
uid { URI.parse(options[:client_options][:site]).host }
|
|
20
20
|
|
|
21
|
+
def valid_site?
|
|
22
|
+
return /^https\:\/\/[a-zA-Z0-9][a-zA-Z0-9\-]*\.myshopify\.com[\/]?$/ =~ options[:client_options][:site]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def setup_phase
|
|
26
|
+
super
|
|
27
|
+
raise CallbackError.new(nil, :invalid_site) unless valid_site?
|
|
28
|
+
end
|
|
29
|
+
|
|
21
30
|
def authorize_params
|
|
22
31
|
super.tap do |params|
|
|
23
32
|
params[:scope] ||= DEFAULT_SCOPE
|
|
@@ -9,13 +9,14 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.email = ['denis.odorcic@shopify.com']
|
|
10
10
|
s.summary = 'Shopify strategy for OmniAuth'
|
|
11
11
|
s.homepage = 'https://github.com/Shopify/omniauth-shopify-oauth2'
|
|
12
|
+
s.license = 'MIT'
|
|
12
13
|
|
|
13
14
|
s.files = `git ls-files`.split("\n")
|
|
14
15
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
15
16
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
16
17
|
s.require_paths = ['lib']
|
|
17
18
|
|
|
18
|
-
s.add_runtime_dependency 'omniauth-oauth2', '~> 1.1.
|
|
19
|
+
s.add_runtime_dependency 'omniauth-oauth2', '~> 1.1.1'
|
|
19
20
|
|
|
20
21
|
s.add_development_dependency 'rspec', '~> 2.7.0'
|
|
21
22
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-shopify-oauth2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: omniauth-oauth2
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 1.1.
|
|
21
|
+
version: 1.1.1
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ~>
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 1.1.
|
|
29
|
+
version: 1.1.1
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: rspec
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -83,7 +83,8 @@ files:
|
|
|
83
83
|
- spec/spec_helper.rb
|
|
84
84
|
- spec/support/shared_examples.rb
|
|
85
85
|
homepage: https://github.com/Shopify/omniauth-shopify-oauth2
|
|
86
|
-
licenses:
|
|
86
|
+
licenses:
|
|
87
|
+
- MIT
|
|
87
88
|
post_install_message:
|
|
88
89
|
rdoc_options: []
|
|
89
90
|
require_paths:
|