shopify-sinatra-app 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/CHANGELOG +4 -0
- data/Gemfile.lock +54 -51
- data/README.md +1 -1
- data/example/Gemfile +1 -1
- data/example/Gemfile.lock +50 -48
- data/example/Rakefile +1 -1
- data/example/config.ru +1 -1
- data/example/{lib → src}/app.rb +0 -0
- data/example/test/app_test.rb +1 -1
- data/lib/sinatra/shopify-sinatra-app.rb +3 -3
- data/shopify-sinatra-app.gemspec +2 -2
- metadata +6 -7
- data/example/db/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 053fdbd162a95abe2d22b6240a079f43643a88a4fcbddf7bb3e2e83a48596d88
|
4
|
+
data.tar.gz: 8737bdff0e820844c1b1e5cf07db63333e9dfc13d6368b9204046b9a901a62fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f53afc8ccf52753ed917a589df57c6a0a251c19c9f76b1b117837a21a8ed8e9bd224ef8f64d61ee1e7b77c2c092af302b37648a8f1d9293cb32b8d1760a8b68
|
7
|
+
data.tar.gz: ea6f0a145386d5c4d4d21173241e43b7c76c77786958c70e8f919fda3413310d355464ef45b19d64ff517c3aebfd8e9f4659c67bcdd3689f7a18297a5ec3c33a
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
shopify-sinatra-app (0.
|
4
|
+
shopify-sinatra-app (0.3.3)
|
5
5
|
activesupport (~> 4.1.1)
|
6
6
|
attr_encrypted (~> 1.3.2)
|
7
7
|
omniauth-shopify-oauth2 (~> 1.1.11)
|
8
8
|
rack-flash3 (~> 1.0.5)
|
9
9
|
resque (~> 1.25.2)
|
10
|
-
shopify_api (~> 4.0
|
10
|
+
shopify_api (~> 4.9.0)
|
11
11
|
sinatra (~> 1.4.6)
|
12
12
|
sinatra-activerecord (~> 2.0.9)
|
13
13
|
sinatra-redis (~> 0.3.0)
|
@@ -15,93 +15,96 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activemodel (4.1.
|
19
|
-
activesupport (= 4.1.
|
18
|
+
activemodel (4.1.16)
|
19
|
+
activesupport (= 4.1.16)
|
20
20
|
builder (~> 3.1)
|
21
|
-
activerecord (4.1.
|
22
|
-
activemodel (= 4.1.
|
23
|
-
activesupport (= 4.1.
|
21
|
+
activerecord (4.1.16)
|
22
|
+
activemodel (= 4.1.16)
|
23
|
+
activesupport (= 4.1.16)
|
24
24
|
arel (~> 5.0.0)
|
25
|
-
activeresource (4.
|
25
|
+
activeresource (4.1.0)
|
26
26
|
activemodel (~> 4.0)
|
27
27
|
activesupport (~> 4.0)
|
28
|
-
rails-observers (~> 0.1.
|
29
|
-
activesupport (4.1.
|
28
|
+
rails-observers (~> 0.1.2)
|
29
|
+
activesupport (4.1.16)
|
30
30
|
i18n (~> 0.6, >= 0.6.9)
|
31
31
|
json (~> 1.7, >= 1.7.7)
|
32
32
|
minitest (~> 5.1)
|
33
33
|
thread_safe (~> 0.1)
|
34
34
|
tzinfo (~> 1.1)
|
35
35
|
arel (5.0.1.20140414130214)
|
36
|
-
attr_encrypted (1.3.
|
37
|
-
encryptor (
|
38
|
-
builder (3.2.
|
36
|
+
attr_encrypted (1.3.5)
|
37
|
+
encryptor (~> 1.3.0)
|
38
|
+
builder (3.2.3)
|
39
|
+
concurrent-ruby (1.0.5)
|
39
40
|
encryptor (1.3.0)
|
40
41
|
fakeweb (1.3.0)
|
41
42
|
faraday (0.9.2)
|
42
43
|
multipart-post (>= 1.2, < 3)
|
43
|
-
hashie (3.
|
44
|
-
i18n (0.
|
45
|
-
|
46
|
-
|
44
|
+
hashie (3.5.7)
|
45
|
+
i18n (0.9.5)
|
46
|
+
concurrent-ruby (~> 1.0)
|
47
|
+
json (1.8.6)
|
48
|
+
jwt (1.5.1)
|
47
49
|
metaclass (0.0.4)
|
48
|
-
minitest (5.
|
49
|
-
mocha (1.
|
50
|
+
minitest (5.11.3)
|
51
|
+
mocha (1.3.0)
|
50
52
|
metaclass (~> 0.0.1)
|
51
53
|
mono_logger (1.1.0)
|
52
|
-
multi_json (1.
|
53
|
-
multi_xml (0.
|
54
|
+
multi_json (1.13.1)
|
55
|
+
multi_xml (0.6.0)
|
54
56
|
multipart-post (2.0.0)
|
55
|
-
oauth2 (1.
|
57
|
+
oauth2 (1.1.0)
|
56
58
|
faraday (>= 0.8, < 0.10)
|
57
|
-
jwt (~> 1.0)
|
59
|
+
jwt (~> 1.0, < 1.5.2)
|
58
60
|
multi_json (~> 1.3)
|
59
61
|
multi_xml (~> 0.5)
|
60
|
-
rack (
|
61
|
-
omniauth (1.
|
62
|
-
hashie (>=
|
63
|
-
rack (>= 1.
|
64
|
-
omniauth-oauth2 (1.
|
65
|
-
oauth2 (~> 1.
|
62
|
+
rack (>= 1.2, < 3)
|
63
|
+
omniauth (1.8.1)
|
64
|
+
hashie (>= 3.4.6, < 3.6.0)
|
65
|
+
rack (>= 1.6.2, < 3)
|
66
|
+
omniauth-oauth2 (1.5.0)
|
67
|
+
oauth2 (~> 1.1)
|
66
68
|
omniauth (~> 1.2)
|
67
|
-
omniauth-shopify-oauth2 (1.1.
|
69
|
+
omniauth-shopify-oauth2 (1.1.17)
|
70
|
+
oauth2 (~> 1.1.0)
|
68
71
|
omniauth-oauth2 (~> 1.2)
|
69
|
-
rack (1.6.
|
72
|
+
rack (1.6.9)
|
70
73
|
rack-flash3 (1.0.5)
|
71
74
|
rack
|
72
|
-
rack-protection (1.5.
|
75
|
+
rack-protection (1.5.5)
|
73
76
|
rack
|
74
|
-
rack-test (0.
|
75
|
-
rack (>= 1.0)
|
76
|
-
rails-observers (0.1.
|
77
|
-
activemodel (
|
78
|
-
rake (
|
79
|
-
redis (
|
80
|
-
redis-namespace (1.
|
81
|
-
redis (
|
77
|
+
rack-test (0.8.3)
|
78
|
+
rack (>= 1.0, < 3)
|
79
|
+
rails-observers (0.1.5)
|
80
|
+
activemodel (>= 4.0)
|
81
|
+
rake (12.3.0)
|
82
|
+
redis (4.0.1)
|
83
|
+
redis-namespace (1.6.0)
|
84
|
+
redis (>= 3.0.4)
|
82
85
|
resque (1.25.2)
|
83
86
|
mono_logger (~> 1.0)
|
84
87
|
multi_json (~> 1.0)
|
85
88
|
redis-namespace (~> 1.3)
|
86
89
|
sinatra (>= 0.9.2)
|
87
90
|
vegas (~> 0.1.2)
|
88
|
-
shopify_api (4.
|
89
|
-
activeresource
|
91
|
+
shopify_api (4.9.1)
|
92
|
+
activeresource (>= 3.0.0)
|
90
93
|
rack
|
91
|
-
sinatra (1.4.
|
92
|
-
rack (~> 1.
|
94
|
+
sinatra (1.4.8)
|
95
|
+
rack (~> 1.5)
|
93
96
|
rack-protection (~> 1.4)
|
94
97
|
tilt (>= 1.3, < 3)
|
95
|
-
sinatra-activerecord (2.0.
|
98
|
+
sinatra-activerecord (2.0.13)
|
96
99
|
activerecord (>= 3.2)
|
97
|
-
sinatra (
|
100
|
+
sinatra (>= 1.0)
|
98
101
|
sinatra-redis (0.3.0)
|
99
102
|
redis
|
100
103
|
sinatra (>= 0.9.4)
|
101
|
-
sqlite3 (1.3.
|
102
|
-
thread_safe (0.3.
|
103
|
-
tilt (2.0.
|
104
|
-
tzinfo (1.2.
|
104
|
+
sqlite3 (1.3.13)
|
105
|
+
thread_safe (0.3.6)
|
106
|
+
tilt (2.0.8)
|
107
|
+
tzinfo (1.2.5)
|
105
108
|
thread_safe (~> 0.1)
|
106
109
|
vegas (0.1.11)
|
107
110
|
rack (>= 1.0.0)
|
@@ -119,4 +122,4 @@ DEPENDENCIES
|
|
119
122
|
sqlite3
|
120
123
|
|
121
124
|
BUNDLED WITH
|
122
|
-
1.
|
125
|
+
1.16.1
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ This will create a new skeleton shopify-sinatra-app. The generator will create s
|
|
40
40
|
|
41
41
|
`Gemfile` --> manages the dependencies of the app
|
42
42
|
|
43
|
-
`
|
43
|
+
`src/app.rb` --> This file is the skeleton app file. More details on how to use the methods provided by this extension are given in the following section. There are more comments inside this file explaining the skeleton app.
|
44
44
|
|
45
45
|
`Procfile` --> Specific for deploying to Heroku, this file tells heroku how to run the app
|
46
46
|
|
data/example/Gemfile
CHANGED
data/example/Gemfile.lock
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
PATH
|
2
|
-
remote:
|
2
|
+
remote: ..
|
3
3
|
specs:
|
4
4
|
shopify-sinatra-app (0.3.3)
|
5
5
|
activesupport (~> 4.1.1)
|
@@ -7,7 +7,7 @@ PATH
|
|
7
7
|
omniauth-shopify-oauth2 (~> 1.1.11)
|
8
8
|
rack-flash3 (~> 1.0.5)
|
9
9
|
resque (~> 1.25.2)
|
10
|
-
shopify_api (~> 4.0
|
10
|
+
shopify_api (~> 4.9.0)
|
11
11
|
sinatra (~> 1.4.6)
|
12
12
|
sinatra-activerecord (~> 2.0.9)
|
13
13
|
sinatra-redis (~> 0.3.0)
|
@@ -15,18 +15,18 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activemodel (4.1.
|
19
|
-
activesupport (= 4.1.
|
18
|
+
activemodel (4.1.16)
|
19
|
+
activesupport (= 4.1.16)
|
20
20
|
builder (~> 3.1)
|
21
|
-
activerecord (4.1.
|
22
|
-
activemodel (= 4.1.
|
23
|
-
activesupport (= 4.1.
|
21
|
+
activerecord (4.1.16)
|
22
|
+
activemodel (= 4.1.16)
|
23
|
+
activesupport (= 4.1.16)
|
24
24
|
arel (~> 5.0.0)
|
25
25
|
activeresource (4.1.0)
|
26
26
|
activemodel (~> 4.0)
|
27
27
|
activesupport (~> 4.0)
|
28
28
|
rails-observers (~> 0.1.2)
|
29
|
-
activesupport (4.1.
|
29
|
+
activesupport (4.1.16)
|
30
30
|
i18n (~> 0.6, >= 0.6.9)
|
31
31
|
json (~> 1.7, >= 1.7.7)
|
32
32
|
minitest (~> 5.1)
|
@@ -35,25 +35,27 @@ GEM
|
|
35
35
|
arel (5.0.1.20140414130214)
|
36
36
|
attr_encrypted (1.3.5)
|
37
37
|
encryptor (~> 1.3.0)
|
38
|
-
builder (3.2.
|
39
|
-
byebug (
|
40
|
-
|
38
|
+
builder (3.2.3)
|
39
|
+
byebug (10.0.0)
|
40
|
+
concurrent-ruby (1.0.5)
|
41
|
+
dotenv (2.2.1)
|
41
42
|
encryptor (1.3.0)
|
42
43
|
fakeweb (1.3.0)
|
43
44
|
faraday (0.9.2)
|
44
45
|
multipart-post (>= 1.2, < 3)
|
45
|
-
foreman (0.
|
46
|
+
foreman (0.84.0)
|
46
47
|
thor (~> 0.19.1)
|
47
|
-
hashie (3.
|
48
|
-
i18n (0.
|
49
|
-
|
48
|
+
hashie (3.5.7)
|
49
|
+
i18n (0.9.5)
|
50
|
+
concurrent-ruby (~> 1.0)
|
51
|
+
json (1.8.6)
|
50
52
|
jwt (1.5.1)
|
51
53
|
metaclass (0.0.4)
|
52
|
-
minitest (5.
|
53
|
-
mocha (1.
|
54
|
+
minitest (5.11.3)
|
55
|
+
mocha (1.3.0)
|
54
56
|
metaclass (~> 0.0.1)
|
55
57
|
mono_logger (1.1.0)
|
56
|
-
multi_json (1.
|
58
|
+
multi_json (1.13.1)
|
57
59
|
multi_xml (0.6.0)
|
58
60
|
multipart-post (2.0.0)
|
59
61
|
oauth2 (1.1.0)
|
@@ -62,53 +64,53 @@ GEM
|
|
62
64
|
multi_json (~> 1.3)
|
63
65
|
multi_xml (~> 0.5)
|
64
66
|
rack (>= 1.2, < 3)
|
65
|
-
omniauth (1.
|
66
|
-
hashie (>=
|
67
|
-
rack (>= 1.
|
68
|
-
omniauth-oauth2 (1.
|
69
|
-
oauth2 (~> 1.
|
67
|
+
omniauth (1.8.1)
|
68
|
+
hashie (>= 3.4.6, < 3.6.0)
|
69
|
+
rack (>= 1.6.2, < 3)
|
70
|
+
omniauth-oauth2 (1.5.0)
|
71
|
+
oauth2 (~> 1.1)
|
70
72
|
omniauth (~> 1.2)
|
71
|
-
omniauth-shopify-oauth2 (1.1.
|
73
|
+
omniauth-shopify-oauth2 (1.1.17)
|
72
74
|
oauth2 (~> 1.1.0)
|
73
75
|
omniauth-oauth2 (~> 1.2)
|
74
|
-
pg (0.
|
75
|
-
rack (1.6.
|
76
|
+
pg (1.0.0)
|
77
|
+
rack (1.6.9)
|
76
78
|
rack-flash3 (1.0.5)
|
77
79
|
rack
|
78
|
-
rack-protection (1.5.
|
80
|
+
rack-protection (1.5.5)
|
79
81
|
rack
|
80
|
-
rack-test (0.
|
81
|
-
rack (>= 1.0)
|
82
|
-
rails-observers (0.1.
|
83
|
-
activemodel (
|
84
|
-
rake (
|
85
|
-
redis (
|
86
|
-
redis-namespace (1.
|
87
|
-
redis (
|
82
|
+
rack-test (0.8.3)
|
83
|
+
rack (>= 1.0, < 3)
|
84
|
+
rails-observers (0.1.5)
|
85
|
+
activemodel (>= 4.0)
|
86
|
+
rake (12.3.0)
|
87
|
+
redis (4.0.1)
|
88
|
+
redis-namespace (1.6.0)
|
89
|
+
redis (>= 3.0.4)
|
88
90
|
resque (1.25.2)
|
89
91
|
mono_logger (~> 1.0)
|
90
92
|
multi_json (~> 1.0)
|
91
93
|
redis-namespace (~> 1.3)
|
92
94
|
sinatra (>= 0.9.2)
|
93
95
|
vegas (~> 0.1.2)
|
94
|
-
shopify_api (4.
|
95
|
-
activeresource
|
96
|
+
shopify_api (4.9.1)
|
97
|
+
activeresource (>= 3.0.0)
|
96
98
|
rack
|
97
|
-
sinatra (1.4.
|
98
|
-
rack (~> 1.
|
99
|
+
sinatra (1.4.8)
|
100
|
+
rack (~> 1.5)
|
99
101
|
rack-protection (~> 1.4)
|
100
102
|
tilt (>= 1.3, < 3)
|
101
|
-
sinatra-activerecord (2.0.
|
103
|
+
sinatra-activerecord (2.0.13)
|
102
104
|
activerecord (>= 3.2)
|
103
|
-
sinatra (
|
105
|
+
sinatra (>= 1.0)
|
104
106
|
sinatra-redis (0.3.0)
|
105
107
|
redis
|
106
108
|
sinatra (>= 0.9.4)
|
107
|
-
sqlite3 (1.3.
|
108
|
-
thor (0.19.
|
109
|
-
thread_safe (0.3.
|
110
|
-
tilt (2.0.
|
111
|
-
tzinfo (1.2.
|
109
|
+
sqlite3 (1.3.13)
|
110
|
+
thor (0.19.4)
|
111
|
+
thread_safe (0.3.6)
|
112
|
+
tilt (2.0.8)
|
113
|
+
tzinfo (1.2.5)
|
112
114
|
thread_safe (~> 0.1)
|
113
115
|
vegas (0.1.11)
|
114
116
|
rack (>= 1.0.0)
|
@@ -132,7 +134,7 @@ DEPENDENCIES
|
|
132
134
|
sqlite3
|
133
135
|
|
134
136
|
RUBY VERSION
|
135
|
-
ruby 2.
|
137
|
+
ruby 2.5.0p0
|
136
138
|
|
137
139
|
BUNDLED WITH
|
138
|
-
1.
|
140
|
+
1.16.1
|
data/example/Rakefile
CHANGED
data/example/config.ru
CHANGED
data/example/{lib → src}/app.rb
RENAMED
File without changes
|
data/example/test/app_test.rb
CHANGED
@@ -19,7 +19,7 @@ module Sinatra
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def logout
|
22
|
-
session
|
22
|
+
session.delete(:shopify)
|
23
23
|
end
|
24
24
|
|
25
25
|
def base_url
|
@@ -153,7 +153,7 @@ module Sinatra
|
|
153
153
|
|
154
154
|
def verify_shopify_webhook
|
155
155
|
data = request.body.read.to_s
|
156
|
-
digest = OpenSSL::Digest
|
156
|
+
digest = OpenSSL::Digest.new('sha256')
|
157
157
|
calculated_hmac = Base64.encode64(OpenSSL::HMAC.digest(digest, settings.shared_secret, data)).strip
|
158
158
|
request.body.rewind
|
159
159
|
|
@@ -188,7 +188,7 @@ module Sinatra
|
|
188
188
|
|
189
189
|
app.use Rack::Flash, sweep: true
|
190
190
|
app.use Rack::MethodOverride
|
191
|
-
app.use Rack::Session::Cookie, key: '
|
191
|
+
app.use Rack::Session::Cookie, key: 'rack.session',
|
192
192
|
path: '/',
|
193
193
|
secret: app.settings.secret,
|
194
194
|
expire_after: 60 * 30 # half an hour in seconds
|
data/shopify-sinatra-app.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'shopify-sinatra-app'
|
3
|
-
s.version = '0.3.
|
3
|
+
s.version = '0.3.4'
|
4
4
|
|
5
5
|
s.summary = 'A classy shopify app'
|
6
6
|
s.description = 'A Sinatra extension for building Shopify Apps. Akin to the shopify_app gem but for Sinatra'
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.add_runtime_dependency 'resque', '~> 1.25.2'
|
24
24
|
|
25
|
-
s.add_runtime_dependency 'shopify_api', '~> 4.0
|
25
|
+
s.add_runtime_dependency 'shopify_api', '~> 4.9.0'
|
26
26
|
s.add_runtime_dependency 'omniauth-shopify-oauth2', '~> 1.1.11'
|
27
27
|
|
28
28
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify-sinatra-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Hughes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 4.0
|
117
|
+
version: 4.9.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 4.0
|
124
|
+
version: 4.9.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: omniauth-shopify-oauth2
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -244,14 +244,13 @@ files:
|
|
244
244
|
- example/Rakefile
|
245
245
|
- example/config.ru
|
246
246
|
- example/config/database.yml
|
247
|
-
- example/db/.keep
|
248
247
|
- example/db/migrate/20140413221328_create_shops.rb
|
249
248
|
- example/db/migrate/20140414042317_add_index_to_shops.rb
|
250
249
|
- example/db/schema.rb
|
251
250
|
- example/db/seeds.rb
|
252
|
-
- example/lib/app.rb
|
253
251
|
- example/public/icon.png
|
254
252
|
- example/public/legend.gif
|
253
|
+
- example/src/app.rb
|
255
254
|
- example/test/app_test.rb
|
256
255
|
- example/test/test_helper.rb
|
257
256
|
- example/views/_flash_messages.erb
|
@@ -282,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
281
|
version: '0'
|
283
282
|
requirements: []
|
284
283
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.
|
284
|
+
rubygems_version: 2.7.3
|
286
285
|
signing_key:
|
287
286
|
specification_version: 4
|
288
287
|
summary: A classy shopify app
|
data/example/db/.keep
DELETED
File without changes
|