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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 690b390609470928dd357a47ea6d0715a1c7bcf5
4
- data.tar.gz: 74d8e79f7b432d1a35a0362d5c677d4bb6a7f3a4
2
+ SHA256:
3
+ metadata.gz: 053fdbd162a95abe2d22b6240a079f43643a88a4fcbddf7bb3e2e83a48596d88
4
+ data.tar.gz: 8737bdff0e820844c1b1e5cf07db63333e9dfc13d6368b9204046b9a901a62fe
5
5
  SHA512:
6
- metadata.gz: 52eac4ac352dc1abb6bbc5313290829e8bc29e70588da303733156d336332c2b61fc0a3b45d7b702c593811d1c3919a68706f19fcf1f79022c6ff25ea226b47e
7
- data.tar.gz: 8b67bf57e2c976db7d1487035fcba9fe456231b2e97f37eeffeb48dd0c8c6052d9ca035bd1713ce0009279433dabbfab7a4af1672b84507c84c62a1fc70046ac
6
+ metadata.gz: 6f53afc8ccf52753ed917a589df57c6a0a251c19c9f76b1b117837a21a8ed8e9bd224ef8f64d61ee1e7b77c2c092af302b37648a8f1d9293cb32b8d1760a8b68
7
+ data.tar.gz: ea6f0a145386d5c4d4d21173241e43b7c76c77786958c70e8f919fda3413310d355464ef45b19d64ff517c3aebfd8e9f4659c67bcdd3689f7a18297a5ec3c33a
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.3.1
4
+ - 2.3.3
5
5
 
6
6
  gemfile: example/Gemfile
7
7
 
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.3.4
2
+ -----
3
+ * rename lib to src in the example/template
4
+
1
5
  0.3.3
2
6
  -----
3
7
  * fix a bug in the generator
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-sinatra-app (0.2.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.2)
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.14)
19
- activesupport (= 4.1.14)
18
+ activemodel (4.1.16)
19
+ activesupport (= 4.1.16)
20
20
  builder (~> 3.1)
21
- activerecord (4.1.14)
22
- activemodel (= 4.1.14)
23
- activesupport (= 4.1.14)
21
+ activerecord (4.1.16)
22
+ activemodel (= 4.1.16)
23
+ activesupport (= 4.1.16)
24
24
  arel (~> 5.0.0)
25
- activeresource (4.0.0)
25
+ activeresource (4.1.0)
26
26
  activemodel (~> 4.0)
27
27
  activesupport (~> 4.0)
28
- rails-observers (~> 0.1.1)
29
- activesupport (4.1.14)
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.4)
37
- encryptor (>= 1.3.0)
38
- builder (3.2.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.4.3)
44
- i18n (0.7.0)
45
- json (1.8.3)
46
- jwt (1.5.2)
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.8.3)
49
- mocha (1.1.0)
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.11.2)
53
- multi_xml (0.5.5)
54
+ multi_json (1.13.1)
55
+ multi_xml (0.6.0)
54
56
  multipart-post (2.0.0)
55
- oauth2 (1.0.0)
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 (~> 1.2)
61
- omniauth (1.3.1)
62
- hashie (>= 1.2, < 4)
63
- rack (>= 1.0, < 3)
64
- omniauth-oauth2 (1.4.0)
65
- oauth2 (~> 1.0)
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.11)
69
+ omniauth-shopify-oauth2 (1.1.17)
70
+ oauth2 (~> 1.1.0)
68
71
  omniauth-oauth2 (~> 1.2)
69
- rack (1.6.4)
72
+ rack (1.6.9)
70
73
  rack-flash3 (1.0.5)
71
74
  rack
72
- rack-protection (1.5.3)
75
+ rack-protection (1.5.5)
73
76
  rack
74
- rack-test (0.6.3)
75
- rack (>= 1.0)
76
- rails-observers (0.1.2)
77
- activemodel (~> 4.0)
78
- rake (10.4.2)
79
- redis (3.2.2)
80
- redis-namespace (1.5.2)
81
- redis (~> 3.0, >= 3.0.4)
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.0.7)
89
- activeresource
91
+ shopify_api (4.9.1)
92
+ activeresource (>= 3.0.0)
90
93
  rack
91
- sinatra (1.4.6)
92
- rack (~> 1.4)
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.9)
98
+ sinatra-activerecord (2.0.13)
96
99
  activerecord (>= 3.2)
97
- sinatra (~> 1.0)
100
+ sinatra (>= 1.0)
98
101
  sinatra-redis (0.3.0)
99
102
  redis
100
103
  sinatra (>= 0.9.4)
101
- sqlite3 (1.3.11)
102
- thread_safe (0.3.5)
103
- tilt (2.0.2)
104
- tzinfo (1.2.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.11.2
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
- `lib/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.
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
 
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.3.1'
2
+ ruby '2.5.0'
3
3
 
4
4
  gem 'shopify-sinatra-app', path: '../'
5
5
  gem 'sinatra-activerecord'
@@ -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.2)
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.14)
19
- activesupport (= 4.1.14)
18
+ activemodel (4.1.16)
19
+ activesupport (= 4.1.16)
20
20
  builder (~> 3.1)
21
- activerecord (4.1.14)
22
- activemodel (= 4.1.14)
23
- activesupport (= 4.1.14)
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.14)
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.2)
39
- byebug (8.2.1)
40
- dotenv (2.0.2)
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.78.0)
46
+ foreman (0.84.0)
46
47
  thor (~> 0.19.1)
47
- hashie (3.4.6)
48
- i18n (0.7.0)
49
- json (1.8.3)
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.8.3)
53
- mocha (1.1.0)
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.12.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.3.2)
66
- hashie (>= 1.2, < 4)
67
- rack (>= 1.0, < 3)
68
- omniauth-oauth2 (1.4.0)
69
- oauth2 (~> 1.0)
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.16)
73
+ omniauth-shopify-oauth2 (1.1.17)
72
74
  oauth2 (~> 1.1.0)
73
75
  omniauth-oauth2 (~> 1.2)
74
- pg (0.18.4)
75
- rack (1.6.4)
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.3)
80
+ rack-protection (1.5.5)
79
81
  rack
80
- rack-test (0.6.3)
81
- rack (>= 1.0)
82
- rails-observers (0.1.2)
83
- activemodel (~> 4.0)
84
- rake (10.4.2)
85
- redis (3.3.2)
86
- redis-namespace (1.5.2)
87
- redis (~> 3.0, >= 3.0.4)
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.0.7)
95
- activeresource
96
+ shopify_api (4.9.1)
97
+ activeresource (>= 3.0.0)
96
98
  rack
97
- sinatra (1.4.6)
98
- rack (~> 1.4)
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.9)
103
+ sinatra-activerecord (2.0.13)
102
104
  activerecord (>= 3.2)
103
- sinatra (~> 1.0)
105
+ sinatra (>= 1.0)
104
106
  sinatra-redis (0.3.0)
105
107
  redis
106
108
  sinatra (>= 0.9.4)
107
- sqlite3 (1.3.11)
108
- thor (0.19.1)
109
- thread_safe (0.3.5)
110
- tilt (2.0.1)
111
- tzinfo (1.2.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.3.1p112
137
+ ruby 2.5.0p0
136
138
 
137
139
  BUNDLED WITH
138
- 1.13.6
140
+ 1.16.1
@@ -1,6 +1,6 @@
1
1
  require 'sinatra/activerecord/rake'
2
2
  require 'rake/testtask'
3
- require './lib/app'
3
+ require './src/app'
4
4
 
5
5
  task :creds2heroku do
6
6
  Bundler.with_clean_env do
@@ -3,5 +3,5 @@ if Gem::Specification.find_all_by_name('dotenv').any?
3
3
  Dotenv.load
4
4
  end
5
5
 
6
- require './lib/app'
6
+ require './src/app'
7
7
  SinatraApp.run!
File without changes
@@ -1,5 +1,5 @@
1
1
  require 'test_helper'
2
- require './lib/app'
2
+ require './src/app'
3
3
 
4
4
  class AppTest < Minitest::Test
5
5
  def app
@@ -19,7 +19,7 @@ module Sinatra
19
19
  end
20
20
 
21
21
  def logout
22
- session[:shopify] = nil
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::Digest.new('sha256')
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: '#{base_url}.session',
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopify-sinatra-app'
3
- s.version = '0.3.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.2'
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.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: 2017-02-12 00:00:00.000000000 Z
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.2
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.2
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.5.1
284
+ rubygems_version: 2.7.3
286
285
  signing_key:
287
286
  specification_version: 4
288
287
  summary: A classy shopify app
File without changes