serverless_hub 1.0.6 → 1.1.1

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: 444afb3a166a1fb99256c2da643ecaacb9509aa67bde174352f7b8ed056f60b5
4
- data.tar.gz: 74c7c2466c102badb36d1047f116317a8b458a4285fc26214e997e3a176278f6
3
+ metadata.gz: 2a7af672f89f81f34e03ca4c2480105877576fe28c26cbd9ed570424ae30bad5
4
+ data.tar.gz: d7a20f0463ea2dbd8ef6bcf93a64b2561764e2e1ecca57deb77fecd167c8ed89
5
5
  SHA512:
6
- metadata.gz: 46557709b60e80c9e402cc855ef31f07900b629f7cf0288262380b77c39a326450544af3c8119c689c10b3803b48f6d8f12737c740f2373195cbdc0db8fdfb96
7
- data.tar.gz: 578201df5fe2d5b4bbd1aa78807d84be1d6ea77054de0e460bbce7d70822760d8771d4038202e9d2208924e3943a3185e5e5ffb8dd15bd76996e52eba7422f05
6
+ metadata.gz: 7a34b33d2d5cbcce0e4280d450fca6c4248f0d19dd070f481e176ffdfa765160c105ec56f00269ac265a3a7cef2a05a60e912066ccab6da051d4813da10a80c0
7
+ data.tar.gz: 1e94a90697c94a6a822f1a0243ce7d52224aa4bc569cc187df7530721ba8d0a9ab2ca1f046bb23212e8b84235ee6ee90fec5ab79d3c409547bcb7525e9653c5e
@@ -10,56 +10,56 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.0.1)
14
- actionpack (= 6.0.1)
13
+ actioncable (6.0.2.2)
14
+ actionpack (= 6.0.2.2)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.1)
18
- actionpack (= 6.0.1)
19
- activejob (= 6.0.1)
20
- activerecord (= 6.0.1)
21
- activestorage (= 6.0.1)
22
- activesupport (= 6.0.1)
17
+ actionmailbox (6.0.2.2)
18
+ actionpack (= 6.0.2.2)
19
+ activejob (= 6.0.2.2)
20
+ activerecord (= 6.0.2.2)
21
+ activestorage (= 6.0.2.2)
22
+ activesupport (= 6.0.2.2)
23
23
  mail (>= 2.7.1)
24
- actionmailer (6.0.1)
25
- actionpack (= 6.0.1)
26
- actionview (= 6.0.1)
27
- activejob (= 6.0.1)
24
+ actionmailer (6.0.2.2)
25
+ actionpack (= 6.0.2.2)
26
+ actionview (= 6.0.2.2)
27
+ activejob (= 6.0.2.2)
28
28
  mail (~> 2.5, >= 2.5.4)
29
29
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.1)
31
- actionview (= 6.0.1)
32
- activesupport (= 6.0.1)
33
- rack (~> 2.0)
30
+ actionpack (6.0.2.2)
31
+ actionview (= 6.0.2.2)
32
+ activesupport (= 6.0.2.2)
33
+ rack (~> 2.0, >= 2.0.8)
34
34
  rack-test (>= 0.6.3)
35
35
  rails-dom-testing (~> 2.0)
36
36
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.1)
38
- actionpack (= 6.0.1)
39
- activerecord (= 6.0.1)
40
- activestorage (= 6.0.1)
41
- activesupport (= 6.0.1)
37
+ actiontext (6.0.2.2)
38
+ actionpack (= 6.0.2.2)
39
+ activerecord (= 6.0.2.2)
40
+ activestorage (= 6.0.2.2)
41
+ activesupport (= 6.0.2.2)
42
42
  nokogiri (>= 1.8.5)
43
- actionview (6.0.1)
44
- activesupport (= 6.0.1)
43
+ actionview (6.0.2.2)
44
+ activesupport (= 6.0.2.2)
45
45
  builder (~> 3.1)
46
46
  erubi (~> 1.4)
47
47
  rails-dom-testing (~> 2.0)
48
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.1)
50
- activesupport (= 6.0.1)
49
+ activejob (6.0.2.2)
50
+ activesupport (= 6.0.2.2)
51
51
  globalid (>= 0.3.6)
52
- activemodel (6.0.1)
53
- activesupport (= 6.0.1)
54
- activerecord (6.0.1)
55
- activemodel (= 6.0.1)
56
- activesupport (= 6.0.1)
57
- activestorage (6.0.1)
58
- actionpack (= 6.0.1)
59
- activejob (= 6.0.1)
60
- activerecord (= 6.0.1)
52
+ activemodel (6.0.2.2)
53
+ activesupport (= 6.0.2.2)
54
+ activerecord (6.0.2.2)
55
+ activemodel (= 6.0.2.2)
56
+ activesupport (= 6.0.2.2)
57
+ activestorage (6.0.2.2)
58
+ actionpack (= 6.0.2.2)
59
+ activejob (= 6.0.2.2)
60
+ activerecord (= 6.0.2.2)
61
61
  marcel (~> 0.3.1)
62
- activesupport (6.0.1)
62
+ activesupport (6.0.2.2)
63
63
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
64
  i18n (>= 0.7, < 2)
65
65
  minitest (~> 5.1)
@@ -67,9 +67,9 @@ GEM
67
67
  zeitwerk (~> 2.2)
68
68
  aes_key_wrap (1.0.1)
69
69
  bindata (2.4.4)
70
- builder (3.2.3)
71
- concurrent-ruby (1.1.5)
72
- crass (1.0.5)
70
+ builder (3.2.4)
71
+ concurrent-ruby (1.1.6)
72
+ crass (1.0.6)
73
73
  diff-lcs (1.3)
74
74
  domain_name (0.5.20190701)
75
75
  unf (>= 0.0.5, < 1.0.0)
@@ -79,7 +79,7 @@ GEM
79
79
  http-accept (1.7.0)
80
80
  http-cookie (1.0.3)
81
81
  domain_name (~> 0.5)
82
- i18n (1.7.0)
82
+ i18n (1.8.2)
83
83
  concurrent-ruby (~> 1.0)
84
84
  json-jwt (1.11.0)
85
85
  activesupport (>= 4.2)
@@ -89,55 +89,55 @@ GEM
89
89
  lamby (1.0.2)
90
90
  rack
91
91
  rails
92
- loofah (2.3.1)
92
+ loofah (2.4.0)
93
93
  crass (~> 1.0.2)
94
94
  nokogiri (>= 1.5.9)
95
95
  mail (2.7.1)
96
96
  mini_mime (>= 0.1.1)
97
97
  marcel (0.3.3)
98
98
  mimemagic (~> 0.3.2)
99
- method_source (0.9.2)
99
+ method_source (1.0.0)
100
100
  mime-types (3.3)
101
101
  mime-types-data (~> 3.2015)
102
102
  mime-types-data (3.2019.1009)
103
- mimemagic (0.3.3)
103
+ mimemagic (0.3.4)
104
104
  mini_mime (1.0.2)
105
105
  mini_portile2 (2.4.0)
106
- minitest (5.13.0)
106
+ minitest (5.14.0)
107
107
  netrc (0.11.0)
108
108
  nio4r (2.5.2)
109
- nokogiri (1.10.5)
109
+ nokogiri (1.10.9)
110
110
  mini_portile2 (~> 2.4.0)
111
- rack (2.0.7)
111
+ rack (2.2.2)
112
112
  rack-test (1.1.0)
113
113
  rack (>= 1.0, < 3)
114
- rails (6.0.1)
115
- actioncable (= 6.0.1)
116
- actionmailbox (= 6.0.1)
117
- actionmailer (= 6.0.1)
118
- actionpack (= 6.0.1)
119
- actiontext (= 6.0.1)
120
- actionview (= 6.0.1)
121
- activejob (= 6.0.1)
122
- activemodel (= 6.0.1)
123
- activerecord (= 6.0.1)
124
- activestorage (= 6.0.1)
125
- activesupport (= 6.0.1)
114
+ rails (6.0.2.2)
115
+ actioncable (= 6.0.2.2)
116
+ actionmailbox (= 6.0.2.2)
117
+ actionmailer (= 6.0.2.2)
118
+ actionpack (= 6.0.2.2)
119
+ actiontext (= 6.0.2.2)
120
+ actionview (= 6.0.2.2)
121
+ activejob (= 6.0.2.2)
122
+ activemodel (= 6.0.2.2)
123
+ activerecord (= 6.0.2.2)
124
+ activestorage (= 6.0.2.2)
125
+ activesupport (= 6.0.2.2)
126
126
  bundler (>= 1.3.0)
127
- railties (= 6.0.1)
127
+ railties (= 6.0.2.2)
128
128
  sprockets-rails (>= 2.0.0)
129
129
  rails-dom-testing (2.0.3)
130
130
  activesupport (>= 4.2.0)
131
131
  nokogiri (>= 1.6)
132
132
  rails-html-sanitizer (1.3.0)
133
133
  loofah (~> 2.3)
134
- railties (6.0.1)
135
- actionpack (= 6.0.1)
136
- activesupport (= 6.0.1)
134
+ railties (6.0.2.2)
135
+ actionpack (= 6.0.2.2)
136
+ activesupport (= 6.0.2.2)
137
137
  method_source
138
138
  rake (>= 0.8.7)
139
139
  thor (>= 0.20.3, < 2.0)
140
- rake (10.5.0)
140
+ rake (13.0.1)
141
141
  rest-client (2.1.0)
142
142
  http-accept (>= 1.7.0, < 2.0)
143
143
  http-cookie (>= 1.0.2, < 2.0)
@@ -163,9 +163,9 @@ GEM
163
163
  actionpack (>= 4.0)
164
164
  activesupport (>= 4.0)
165
165
  sprockets (>= 3.0.0)
166
- thor (0.20.3)
166
+ thor (1.0.1)
167
167
  thread_safe (0.3.6)
168
- tzinfo (1.2.5)
168
+ tzinfo (1.2.6)
169
169
  thread_safe (~> 0.1)
170
170
  unf (0.1.4)
171
171
  unf_ext
@@ -173,14 +173,14 @@ GEM
173
173
  websocket-driver (0.7.1)
174
174
  websocket-extensions (>= 0.1.0)
175
175
  websocket-extensions (0.1.4)
176
- zeitwerk (2.2.1)
176
+ zeitwerk (2.3.0)
177
177
 
178
178
  PLATFORMS
179
179
  ruby
180
180
 
181
181
  DEPENDENCIES
182
182
  bundler (~> 2.0.2)
183
- rake (~> 10.0)
183
+ rake (~> 13.0)
184
184
  rspec (~> 3.0)
185
185
  serverless_hub!
186
186
 
@@ -32,8 +32,17 @@ module ServerlessHub
32
32
  private
33
33
 
34
34
  def decoded_token(token)
35
- token = token.split(" ").last
36
- JWT.decode token, jwk_set.first.to_key, true, { algorithm: "RS256" } rescue ""
35
+ token = token.strip
36
+ if token.include? ' '
37
+ token = token.split(" ").last
38
+ end
39
+ decoded = JWT.decode token, jwk_set.first.to_key, false, { algorithm: "RS256" }
40
+ key_id = decoded[1]['kid']
41
+ key = jwk_set.find { |key_obj| key_obj['kid'] == key_id }
42
+ if key == nil
43
+ return ""
44
+ end
45
+ JWT.decode token, key.to_key, true, { algorithm: "RS256" } rescue ""
37
46
  end
38
47
 
39
48
  def jwk_set
@@ -1,6 +1,7 @@
1
1
  if ENV["LAMBDA_TASK_ROOT"].present?
2
2
 
3
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("#{ENV["LAMBDA_TASK_ROOT"]}/Gemfile.serverless", __dir__) rescue nil
3
+ ENV['BUNDLE_GEMFILE'] ||= "#{ENV["LAMBDA_TASK_ROOT"]}/Gemfile.serverless"
4
+ ENV['BUNDLE_WITHOUT'] ||= "development:test"
4
5
 
5
6
  ENV["RAILS_ENV"] ||= "production"
6
7
 
@@ -1,3 +1,3 @@
1
1
  module ServerlessHub
2
- VERSION = "1.0.6"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.require_paths = ["lib"]
38
38
 
39
39
  spec.add_development_dependency "bundler", "~> 2.0.2"
40
- spec.add_development_dependency "rake", "~> 10.0"
40
+ spec.add_development_dependency "rake", "~> 13.0"
41
41
  spec.add_development_dependency "rspec", "~> 3.0"
42
42
 
43
43
  spec.add_runtime_dependency "json-jwt", ">= 1.11.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverless_hub
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2020-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +151,7 @@ metadata:
151
151
  homepage_uri: https://goolge.com.au
152
152
  source_code_uri: https://goolge.com.au
153
153
  changelog_uri: https://goolge.com.au
154
- post_install_message:
154
+ post_install_message:
155
155
  rdoc_options: []
156
156
  require_paths:
157
157
  - lib
@@ -166,9 +166,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  requirements: []
169
- rubyforge_project:
170
- rubygems_version: 2.7.9
171
- signing_key:
169
+ rubygems_version: 3.0.8
170
+ signing_key:
172
171
  specification_version: 4
173
172
  summary: Write a short summary, because RubyGems requires one.
174
173
  test_files: []