shopify-sinatra-app 0.3.4 → 0.4.0

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
2
  SHA256:
3
- metadata.gz: 053fdbd162a95abe2d22b6240a079f43643a88a4fcbddf7bb3e2e83a48596d88
4
- data.tar.gz: 8737bdff0e820844c1b1e5cf07db63333e9dfc13d6368b9204046b9a901a62fe
3
+ metadata.gz: ace215ee071106c2951a8dd56261221309c1660bb1fa8895dfeec5c765b5a750
4
+ data.tar.gz: 493dc41a6aee4cead57e017f9dec5740c79ef6b453990c5f22443ae1734fed5a
5
5
  SHA512:
6
- metadata.gz: 6f53afc8ccf52753ed917a589df57c6a0a251c19c9f76b1b117837a21a8ed8e9bd224ef8f64d61ee1e7b77c2c092af302b37648a8f1d9293cb32b8d1760a8b68
7
- data.tar.gz: ea6f0a145386d5c4d4d21173241e43b7c76c77786958c70e8f919fda3413310d355464ef45b19d64ff517c3aebfd8e9f4659c67bcdd3689f7a18297a5ec3c33a
6
+ metadata.gz: ce73f628ac172a2f6f9f96c534a443dd8154c23a816f9a3e18a18ae0c99a004569b545d5e2e36f9e70d7b015de854cbe60f4ac7dbe721d0fd864027fd3d15bcb
7
+ data.tar.gz: cdac82b2797ec0d8e75fe85459a0efefc49c1faf9fd6bbad625eba74201000d7c4fca7b0b9589c3a14ddf90cd4a79408e2af0d69f5bcf102ef14fc4c820c3fc4
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.3.3
4
+ - 2.5.0
5
5
 
6
6
  gemfile: example/Gemfile
7
7
 
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 0.4.0
2
+ -----
3
+ * update to sinatra 2.0.1
4
+ * update to attr_encrypted 3.1.0
5
+ * remove SHOPIFY_REDIRECT_URI param
6
+
1
7
  0.3.4
2
8
  -----
3
9
  * rename lib to src in the example/template
data/Gemfile.lock CHANGED
@@ -1,51 +1,52 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-sinatra-app (0.3.3)
5
- activesupport (~> 4.1.1)
6
- attr_encrypted (~> 1.3.2)
7
- omniauth-shopify-oauth2 (~> 1.1.11)
4
+ shopify-sinatra-app (0.4.0)
5
+ activesupport
6
+ attr_encrypted (~> 3.1.0)
7
+ omniauth-shopify-oauth2
8
8
  rack-flash3 (~> 1.0.5)
9
- resque (~> 1.25.2)
10
- shopify_api (~> 4.9.0)
11
- sinatra (~> 1.4.6)
9
+ resque
10
+ shopify_api
11
+ sinatra (~> 2.0.1)
12
12
  sinatra-activerecord (~> 2.0.9)
13
13
  sinatra-redis (~> 0.3.0)
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- activemodel (4.1.16)
19
- activesupport (= 4.1.16)
18
+ activemodel (5.1.5)
19
+ activesupport (= 5.1.5)
20
+ activemodel-serializers-xml (1.0.2)
21
+ activemodel (> 5.x)
22
+ activesupport (> 5.x)
20
23
  builder (~> 3.1)
21
- activerecord (4.1.16)
22
- activemodel (= 4.1.16)
23
- activesupport (= 4.1.16)
24
- arel (~> 5.0.0)
25
- activeresource (4.1.0)
26
- activemodel (~> 4.0)
27
- activesupport (~> 4.0)
28
- rails-observers (~> 0.1.2)
29
- activesupport (4.1.16)
30
- i18n (~> 0.6, >= 0.6.9)
31
- json (~> 1.7, >= 1.7.7)
24
+ activerecord (5.1.5)
25
+ activemodel (= 5.1.5)
26
+ activesupport (= 5.1.5)
27
+ arel (~> 8.0)
28
+ activeresource (5.0.0)
29
+ activemodel (>= 5.0, < 6)
30
+ activemodel-serializers-xml (~> 1.0)
31
+ activesupport (>= 5.0, < 6)
32
+ activesupport (5.1.5)
33
+ concurrent-ruby (~> 1.0, >= 1.0.2)
34
+ i18n (~> 0.7)
32
35
  minitest (~> 5.1)
33
- thread_safe (~> 0.1)
34
36
  tzinfo (~> 1.1)
35
- arel (5.0.1.20140414130214)
36
- attr_encrypted (1.3.5)
37
- encryptor (~> 1.3.0)
37
+ arel (8.0.0)
38
+ attr_encrypted (3.1.0)
39
+ encryptor (~> 3.0.0)
38
40
  builder (3.2.3)
39
41
  concurrent-ruby (1.0.5)
40
- encryptor (1.3.0)
42
+ encryptor (3.0.0)
41
43
  fakeweb (1.3.0)
42
- faraday (0.9.2)
44
+ faraday (0.12.2)
43
45
  multipart-post (>= 1.2, < 3)
44
46
  hashie (3.5.7)
45
47
  i18n (0.9.5)
46
48
  concurrent-ruby (~> 1.0)
47
- json (1.8.6)
48
- jwt (1.5.1)
49
+ jwt (1.5.6)
49
50
  metaclass (0.0.4)
50
51
  minitest (5.11.3)
51
52
  mocha (1.3.0)
@@ -54,9 +55,10 @@ GEM
54
55
  multi_json (1.13.1)
55
56
  multi_xml (0.6.0)
56
57
  multipart-post (2.0.0)
57
- oauth2 (1.1.0)
58
- faraday (>= 0.8, < 0.10)
59
- jwt (~> 1.0, < 1.5.2)
58
+ mustermann (1.0.2)
59
+ oauth2 (1.4.0)
60
+ faraday (>= 0.8, < 0.13)
61
+ jwt (~> 1.0)
60
62
  multi_json (~> 1.3)
61
63
  multi_xml (~> 0.5)
62
64
  rack (>= 1.2, < 3)
@@ -66,35 +68,33 @@ GEM
66
68
  omniauth-oauth2 (1.5.0)
67
69
  oauth2 (~> 1.1)
68
70
  omniauth (~> 1.2)
69
- omniauth-shopify-oauth2 (1.1.17)
70
- oauth2 (~> 1.1.0)
71
- omniauth-oauth2 (~> 1.2)
72
- rack (1.6.9)
71
+ omniauth-shopify-oauth2 (1.2.1)
72
+ omniauth-oauth2 (~> 1.5.0)
73
+ rack (2.0.4)
73
74
  rack-flash3 (1.0.5)
74
75
  rack
75
- rack-protection (1.5.5)
76
+ rack-protection (2.0.1)
76
77
  rack
77
78
  rack-test (0.8.3)
78
79
  rack (>= 1.0, < 3)
79
- rails-observers (0.1.5)
80
- activemodel (>= 4.0)
81
80
  rake (12.3.0)
82
81
  redis (4.0.1)
83
82
  redis-namespace (1.6.0)
84
83
  redis (>= 3.0.4)
85
- resque (1.25.2)
84
+ resque (1.27.4)
86
85
  mono_logger (~> 1.0)
87
86
  multi_json (~> 1.0)
88
87
  redis-namespace (~> 1.3)
89
88
  sinatra (>= 0.9.2)
90
89
  vegas (~> 0.1.2)
91
- shopify_api (4.9.1)
90
+ shopify_api (4.10.0)
92
91
  activeresource (>= 3.0.0)
93
92
  rack
94
- sinatra (1.4.8)
95
- rack (~> 1.5)
96
- rack-protection (~> 1.4)
97
- tilt (>= 1.3, < 3)
93
+ sinatra (2.0.1)
94
+ mustermann (~> 1.0)
95
+ rack (~> 2.0)
96
+ rack-protection (= 2.0.1)
97
+ tilt (~> 2.0)
98
98
  sinatra-activerecord (2.0.13)
99
99
  activerecord (>= 3.2)
100
100
  sinatra (>= 1.0)
@@ -40,7 +40,6 @@ class Generator
40
40
  file = File.open(app_dir + '/.env', 'w')
41
41
  file.write("SHOPIFY_API_KEY=your_api_key\n")
42
42
  file.write("SHOPIFY_SHARED_SECRET=your_shared_secret\n")
43
- file.write("SHOPIFY_REDIRECT_URI=your_redirect_uri\n")
44
43
  file.write("SECRET=random_string_to_encrypt_credentials_with\n")
45
44
  file.close
46
45
  end
data/example/Gemfile.lock CHANGED
@@ -1,55 +1,56 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- shopify-sinatra-app (0.3.3)
5
- activesupport (~> 4.1.1)
6
- attr_encrypted (~> 1.3.2)
7
- omniauth-shopify-oauth2 (~> 1.1.11)
4
+ shopify-sinatra-app (0.4.0)
5
+ activesupport
6
+ attr_encrypted (~> 3.1.0)
7
+ omniauth-shopify-oauth2
8
8
  rack-flash3 (~> 1.0.5)
9
- resque (~> 1.25.2)
10
- shopify_api (~> 4.9.0)
11
- sinatra (~> 1.4.6)
9
+ resque
10
+ shopify_api
11
+ sinatra (~> 2.0.1)
12
12
  sinatra-activerecord (~> 2.0.9)
13
13
  sinatra-redis (~> 0.3.0)
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- activemodel (4.1.16)
19
- activesupport (= 4.1.16)
18
+ activemodel (5.1.5)
19
+ activesupport (= 5.1.5)
20
+ activemodel-serializers-xml (1.0.2)
21
+ activemodel (> 5.x)
22
+ activesupport (> 5.x)
20
23
  builder (~> 3.1)
21
- activerecord (4.1.16)
22
- activemodel (= 4.1.16)
23
- activesupport (= 4.1.16)
24
- arel (~> 5.0.0)
25
- activeresource (4.1.0)
26
- activemodel (~> 4.0)
27
- activesupport (~> 4.0)
28
- rails-observers (~> 0.1.2)
29
- activesupport (4.1.16)
30
- i18n (~> 0.6, >= 0.6.9)
31
- json (~> 1.7, >= 1.7.7)
24
+ activerecord (5.1.5)
25
+ activemodel (= 5.1.5)
26
+ activesupport (= 5.1.5)
27
+ arel (~> 8.0)
28
+ activeresource (5.0.0)
29
+ activemodel (>= 5.0, < 6)
30
+ activemodel-serializers-xml (~> 1.0)
31
+ activesupport (>= 5.0, < 6)
32
+ activesupport (5.1.5)
33
+ concurrent-ruby (~> 1.0, >= 1.0.2)
34
+ i18n (~> 0.7)
32
35
  minitest (~> 5.1)
33
- thread_safe (~> 0.1)
34
36
  tzinfo (~> 1.1)
35
- arel (5.0.1.20140414130214)
36
- attr_encrypted (1.3.5)
37
- encryptor (~> 1.3.0)
37
+ arel (8.0.0)
38
+ attr_encrypted (3.1.0)
39
+ encryptor (~> 3.0.0)
38
40
  builder (3.2.3)
39
41
  byebug (10.0.0)
40
42
  concurrent-ruby (1.0.5)
41
43
  dotenv (2.2.1)
42
- encryptor (1.3.0)
44
+ encryptor (3.0.0)
43
45
  fakeweb (1.3.0)
44
- faraday (0.9.2)
46
+ faraday (0.12.2)
45
47
  multipart-post (>= 1.2, < 3)
46
48
  foreman (0.84.0)
47
49
  thor (~> 0.19.1)
48
50
  hashie (3.5.7)
49
51
  i18n (0.9.5)
50
52
  concurrent-ruby (~> 1.0)
51
- json (1.8.6)
52
- jwt (1.5.1)
53
+ jwt (1.5.6)
53
54
  metaclass (0.0.4)
54
55
  minitest (5.11.3)
55
56
  mocha (1.3.0)
@@ -58,9 +59,10 @@ GEM
58
59
  multi_json (1.13.1)
59
60
  multi_xml (0.6.0)
60
61
  multipart-post (2.0.0)
61
- oauth2 (1.1.0)
62
- faraday (>= 0.8, < 0.10)
63
- jwt (~> 1.0, < 1.5.2)
62
+ mustermann (1.0.2)
63
+ oauth2 (1.4.0)
64
+ faraday (>= 0.8, < 0.13)
65
+ jwt (~> 1.0)
64
66
  multi_json (~> 1.3)
65
67
  multi_xml (~> 0.5)
66
68
  rack (>= 1.2, < 3)
@@ -70,36 +72,34 @@ GEM
70
72
  omniauth-oauth2 (1.5.0)
71
73
  oauth2 (~> 1.1)
72
74
  omniauth (~> 1.2)
73
- omniauth-shopify-oauth2 (1.1.17)
74
- oauth2 (~> 1.1.0)
75
- omniauth-oauth2 (~> 1.2)
75
+ omniauth-shopify-oauth2 (1.2.1)
76
+ omniauth-oauth2 (~> 1.5.0)
76
77
  pg (1.0.0)
77
- rack (1.6.9)
78
+ rack (2.0.4)
78
79
  rack-flash3 (1.0.5)
79
80
  rack
80
- rack-protection (1.5.5)
81
+ rack-protection (2.0.1)
81
82
  rack
82
83
  rack-test (0.8.3)
83
84
  rack (>= 1.0, < 3)
84
- rails-observers (0.1.5)
85
- activemodel (>= 4.0)
86
85
  rake (12.3.0)
87
86
  redis (4.0.1)
88
87
  redis-namespace (1.6.0)
89
88
  redis (>= 3.0.4)
90
- resque (1.25.2)
89
+ resque (1.27.4)
91
90
  mono_logger (~> 1.0)
92
91
  multi_json (~> 1.0)
93
92
  redis-namespace (~> 1.3)
94
93
  sinatra (>= 0.9.2)
95
94
  vegas (~> 0.1.2)
96
- shopify_api (4.9.1)
95
+ shopify_api (4.10.0)
97
96
  activeresource (>= 3.0.0)
98
97
  rack
99
- sinatra (1.4.8)
100
- rack (~> 1.5)
101
- rack-protection (~> 1.4)
102
- tilt (>= 1.3, < 3)
98
+ sinatra (2.0.1)
99
+ mustermann (~> 1.0)
100
+ rack (~> 2.0)
101
+ rack-protection (= 2.0.1)
102
+ tilt (~> 2.0)
103
103
  sinatra-activerecord (2.0.13)
104
104
  activerecord (>= 3.2)
105
105
  sinatra (>= 1.0)
@@ -1,4 +1,4 @@
1
- class CreateShops < ActiveRecord::Migration
1
+ class CreateShops < ActiveRecord::Migration[5.1]
2
2
  def self.up
3
3
  create_table :shops do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class AddIndexToShops < ActiveRecord::Migration
1
+ class AddIndexToShops < ActiveRecord::Migration[5.1]
2
2
  def self.up
3
3
  add_index :shops, :name
4
4
  end
data/example/db/schema.rb CHANGED
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -13,11 +12,10 @@
13
12
 
14
13
  ActiveRecord::Schema.define(version: 20140414042317) do
15
14
 
16
- create_table "shops", force: true do |t|
15
+ create_table "shops", force: :cascade do |t|
17
16
  t.string "name"
18
17
  t.string "token_encrypted"
18
+ t.index ["name"], name: "index_shops_on_name"
19
19
  end
20
20
 
21
- add_index "shops", ["name"], name: "index_shops_on_name"
22
-
23
21
  end
@@ -183,7 +183,6 @@ module Sinatra
183
183
 
184
184
  app.set :api_key, ENV['SHOPIFY_API_KEY']
185
185
  app.set :shared_secret, ENV['SHOPIFY_SHARED_SECRET']
186
- app.set :redirect_uri, ENV['SHOPIFY_REDIRECT_URI']
187
186
  app.set :secret, ENV['SECRET']
188
187
 
189
188
  app.use Rack::Flash, sweep: true
@@ -265,7 +264,13 @@ class Shop < ActiveRecord::Base
265
264
  @secret ||= ENV['SECRET']
266
265
  end
267
266
 
268
- attr_encrypted :token, key: secret, attribute: 'token_encrypted'
267
+ attr_encrypted :token,
268
+ key: secret,
269
+ attribute: 'token_encrypted',
270
+ mode: :single_iv_and_salt,
271
+ algorithm: 'aes-256-cbc',
272
+ insecure_mode: true
273
+
269
274
  validates_presence_of :name
270
275
  validates_presence_of :token, on: :create
271
276
  end
@@ -1,29 +1,29 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopify-sinatra-app'
3
- s.version = '0.3.4'
3
+ s.version = '0.4.0'
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'
7
7
 
8
8
  s.authors = ['Kevin Hughes']
9
- s.email = 'kevin.hughes@shopify.com'
10
- s.homepage = 'https://github.com/pickle27/shopify-sinatra-app/'
9
+ s.email = 'kevinhughes27@gmail.com'
10
+ s.homepage = 'https://github.com/kevinhughes27/shopify-sinatra-app/'
11
11
  s.license = 'MIT'
12
12
 
13
13
  s.files = `git ls-files`.split("\n")
14
14
  s.executables << 'shopify-sinatra-app-generator'
15
15
 
16
- s.add_runtime_dependency 'sinatra', '~> 1.4.6'
16
+ s.add_runtime_dependency 'sinatra', '~> 2.0.1'
17
17
  s.add_runtime_dependency 'sinatra-redis', '~> 0.3.0'
18
18
  s.add_runtime_dependency 'sinatra-activerecord', '~> 2.0.9'
19
19
  s.add_runtime_dependency 'rack-flash3', '~> 1.0.5'
20
- s.add_runtime_dependency 'activesupport', '~> 4.1.1'
21
- s.add_runtime_dependency 'attr_encrypted', '~> 1.3.2'
20
+ s.add_runtime_dependency 'activesupport'
21
+ s.add_runtime_dependency 'attr_encrypted', '~> 3.1.0'
22
22
 
23
- s.add_runtime_dependency 'resque', '~> 1.25.2'
23
+ s.add_runtime_dependency 'resque'
24
24
 
25
- s.add_runtime_dependency 'shopify_api', '~> 4.9.0'
26
- s.add_runtime_dependency 'omniauth-shopify-oauth2', '~> 1.1.11'
25
+ s.add_runtime_dependency 'shopify_api'
26
+ s.add_runtime_dependency 'omniauth-shopify-oauth2'
27
27
 
28
28
  s.add_development_dependency 'rake'
29
29
  s.add_development_dependency 'sqlite3'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-sinatra-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Hughes
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.6
19
+ version: 2.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.4.6
26
+ version: 2.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sinatra-redis
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -70,72 +70,72 @@ dependencies:
70
70
  name: activesupport
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 4.1.1
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 4.1.1
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: attr_encrypted
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3.2
89
+ version: 3.1.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.3.2
96
+ version: 3.1.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: resque
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.25.2
103
+ version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 1.25.2
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: shopify_api
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 4.9.0
117
+ version: '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.9.0
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: omniauth-shopify-oauth2
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 1.1.11
131
+ version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 1.1.11
138
+ version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rake
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -222,7 +222,7 @@ dependencies:
222
222
  version: '0'
223
223
  description: A Sinatra extension for building Shopify Apps. Akin to the shopify_app
224
224
  gem but for Sinatra
225
- email: kevin.hughes@shopify.com
225
+ email: kevinhughes27@gmail.com
226
226
  executables:
227
227
  - shopify-sinatra-app-generator
228
228
  extensions: []
@@ -261,7 +261,7 @@ files:
261
261
  - lib/sinatra/shopify-sinatra-app.rb
262
262
  - shopify-sinatra-app.gemspec
263
263
  - test.sh
264
- homepage: https://github.com/pickle27/shopify-sinatra-app/
264
+ homepage: https://github.com/kevinhughes27/shopify-sinatra-app/
265
265
  licenses:
266
266
  - MIT
267
267
  metadata: {}