shopify_app_whitelist 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +36 -0
- data/Rakefile +19 -0
- data/lib/shopify_app_whitelist.rb +9 -0
- data/lib/shopify_app_whitelist/protection_concern.rb +29 -0
- data/lib/shopify_app_whitelist/railite.rb +11 -0
- data/lib/shopify_app_whitelist/shopify_app_configuration_ext.rb +5 -0
- data/lib/shopify_app_whitelist/version.rb +4 -0
- data/test/controllers/sessions_controller_test.rb +39 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/home_controller.rb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +9 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +12 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/omniauth.rb +6 -0
- data/test/dummy/config/initializers/shopify_app.rb +8 -0
- data/test/dummy/config/initializers/shopify_session_repository.rb +1 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +5 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +1746 -0
- data/test/shopify_app_whitelist_test.rb +18 -0
- data/test/test_helper.rb +11 -0
- metadata +203 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ShopifyAppWhitelistTest < ActiveSupport::TestCase
|
4
|
+
test 'is working' do
|
5
|
+
assert_equal Module, ShopifyAppWhitelist.class
|
6
|
+
end
|
7
|
+
|
8
|
+
test 'adds configuration options to shopify_app' do
|
9
|
+
vars = ShopifyApp.configuration.instance_variables
|
10
|
+
|
11
|
+
assert vars.include?(:@whitelist)
|
12
|
+
assert vars.include?(:@whitelist_redirect)
|
13
|
+
end
|
14
|
+
|
15
|
+
test 'adds concern to application controller' do
|
16
|
+
assert ApplicationController._process_action_callbacks.find { |cb| cb.filter == :whitelist_check }
|
17
|
+
end
|
18
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
|
4
|
+
# Start SimpleCov
|
5
|
+
require 'simplecov'
|
6
|
+
SimpleCov.start('rails') unless ENV['NO_COVERAGE']
|
7
|
+
|
8
|
+
require File.expand_path('../../test/dummy/config/environment.rb', __FILE__)
|
9
|
+
require 'rails/test_help'
|
10
|
+
|
11
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
metadata
ADDED
@@ -0,0 +1,203 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: shopify_app_whitelist
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tyler King
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.2.6
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.2.6
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: shopify_app
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '7.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 7.0.1
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '7.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 7.0.1
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: sqlite3
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: simplecov
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0.12'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0.12'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: yard
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0.8'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0.8'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: inch
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0.7'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0.7'
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rubocop
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0.45'
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0.45'
|
123
|
+
description: Adds a feature to whitelist certain shops to access your shopify_app
|
124
|
+
installation
|
125
|
+
email:
|
126
|
+
- tyler.n.king@gmail.com
|
127
|
+
executables: []
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files: []
|
130
|
+
files:
|
131
|
+
- LICENSE
|
132
|
+
- README.md
|
133
|
+
- Rakefile
|
134
|
+
- lib/shopify_app_whitelist.rb
|
135
|
+
- lib/shopify_app_whitelist/protection_concern.rb
|
136
|
+
- lib/shopify_app_whitelist/railite.rb
|
137
|
+
- lib/shopify_app_whitelist/shopify_app_configuration_ext.rb
|
138
|
+
- lib/shopify_app_whitelist/version.rb
|
139
|
+
- test/controllers/sessions_controller_test.rb
|
140
|
+
- test/dummy/Rakefile
|
141
|
+
- test/dummy/app/controllers/application_controller.rb
|
142
|
+
- test/dummy/app/controllers/home_controller.rb
|
143
|
+
- test/dummy/config.ru
|
144
|
+
- test/dummy/config/application.rb
|
145
|
+
- test/dummy/config/boot.rb
|
146
|
+
- test/dummy/config/database.yml
|
147
|
+
- test/dummy/config/environment.rb
|
148
|
+
- test/dummy/config/environments/test.rb
|
149
|
+
- test/dummy/config/initializers/omniauth.rb
|
150
|
+
- test/dummy/config/initializers/shopify_app.rb
|
151
|
+
- test/dummy/config/initializers/shopify_session_repository.rb
|
152
|
+
- test/dummy/config/routes.rb
|
153
|
+
- test/dummy/config/secrets.yml
|
154
|
+
- test/dummy/db/test.sqlite3
|
155
|
+
- test/dummy/log/development.log
|
156
|
+
- test/dummy/log/test.log
|
157
|
+
- test/shopify_app_whitelist_test.rb
|
158
|
+
- test/test_helper.rb
|
159
|
+
homepage: https://github.com/tyler-king/shopify_app_whitelist
|
160
|
+
licenses:
|
161
|
+
- MIT
|
162
|
+
metadata: {}
|
163
|
+
post_install_message:
|
164
|
+
rdoc_options: []
|
165
|
+
require_paths:
|
166
|
+
- lib
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
requirements: []
|
178
|
+
rubyforge_project:
|
179
|
+
rubygems_version: 2.4.8
|
180
|
+
signing_key:
|
181
|
+
specification_version: 4
|
182
|
+
summary: Adds whitelisting ability to shopify_app
|
183
|
+
test_files:
|
184
|
+
- test/controllers/sessions_controller_test.rb
|
185
|
+
- test/dummy/app/controllers/application_controller.rb
|
186
|
+
- test/dummy/app/controllers/home_controller.rb
|
187
|
+
- test/dummy/config/application.rb
|
188
|
+
- test/dummy/config/boot.rb
|
189
|
+
- test/dummy/config/database.yml
|
190
|
+
- test/dummy/config/environment.rb
|
191
|
+
- test/dummy/config/environments/test.rb
|
192
|
+
- test/dummy/config/initializers/omniauth.rb
|
193
|
+
- test/dummy/config/initializers/shopify_app.rb
|
194
|
+
- test/dummy/config/initializers/shopify_session_repository.rb
|
195
|
+
- test/dummy/config/routes.rb
|
196
|
+
- test/dummy/config/secrets.yml
|
197
|
+
- test/dummy/config.ru
|
198
|
+
- test/dummy/db/test.sqlite3
|
199
|
+
- test/dummy/log/development.log
|
200
|
+
- test/dummy/log/test.log
|
201
|
+
- test/dummy/Rakefile
|
202
|
+
- test/shopify_app_whitelist_test.rb
|
203
|
+
- test/test_helper.rb
|