Commit f508435d3e9aca4f79b9de6c010111a1d3aa8d59

Authored by Samson Rollo Jr
1 parent 0610f81b

OJT21-52: Add rack-cors, devise, devise-jwt, and active_model_serializer gems

Showing 2 changed files with 50 additions and 1 deletions
@@ -17,6 +17,8 @@ gem 'puma', '~> 5.0' @@ -17,6 +17,8 @@ gem 'puma', '~> 5.0'
17 # gem 'redis', '~> 4.0' 17 # gem 'redis', '~> 4.0'
18 # Use Active Model has_secure_password 18 # Use Active Model has_secure_password
19 # gem 'bcrypt', '~> 3.1.7' 19 # gem 'bcrypt', '~> 3.1.7'
  20 +gem 'devise', '~> 4.8'
  21 +gem 'devise-jwt', '~> 0.8.1'
20 22
21 # Use Active Storage variant 23 # Use Active Storage variant
22 # gem 'image_processing', '~> 1.2' 24 # gem 'image_processing', '~> 1.2'
@@ -25,7 +27,8 @@ gem 'puma', '~> 5.0' @@ -25,7 +27,8 @@ gem 'puma', '~> 5.0'
25 gem 'bootsnap', '>= 1.4.4', require: false 27 gem 'bootsnap', '>= 1.4.4', require: false
26 28
27 # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible 29 # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
28 -# gem 'rack-cors' 30 +gem 'active_model_serializers', '~> 0.10.12'
  31 +gem 'rack-cors'
29 32
30 group :development, :test do 33 group :development, :test do
31 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 34 # Call 'byebug' anywhere in the code to stop execution and get a debugger console
@@ -39,6 +39,11 @@ GEM @@ -39,6 +39,11 @@ GEM
39 erubi (~> 1.4) 39 erubi (~> 1.4)
40 rails-dom-testing (~> 2.0) 40 rails-dom-testing (~> 2.0)
41 rails-html-sanitizer (~> 1.1, >= 1.2.0) 41 rails-html-sanitizer (~> 1.1, >= 1.2.0)
  42 + active_model_serializers (0.10.12)
  43 + actionpack (>= 4.1, < 6.2)
  44 + activemodel (>= 4.1, < 6.2)
  45 + case_transform (>= 0.2)
  46 + jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
42 activejob (6.1.4) 47 activejob (6.1.4)
43 activesupport (= 6.1.4) 48 activesupport (= 6.1.4)
44 globalid (>= 0.3.6) 49 globalid (>= 0.3.6)
@@ -61,18 +66,42 @@ GEM @@ -61,18 +66,42 @@ GEM
61 tzinfo (~> 2.0) 66 tzinfo (~> 2.0)
62 zeitwerk (~> 2.3) 67 zeitwerk (~> 2.3)
63 ast (2.4.2) 68 ast (2.4.2)
  69 + bcrypt (3.1.16)
64 bootsnap (1.7.6) 70 bootsnap (1.7.6)
65 msgpack (~> 1.0) 71 msgpack (~> 1.0)
66 builder (3.2.4) 72 builder (3.2.4)
67 byebug (11.1.3) 73 byebug (11.1.3)
  74 + case_transform (0.2)
  75 + activesupport
68 concurrent-ruby (1.1.9) 76 concurrent-ruby (1.1.9)
69 crass (1.0.6) 77 crass (1.0.6)
  78 + devise (4.8.0)
  79 + bcrypt (~> 3.0)
  80 + orm_adapter (~> 0.1)
  81 + railties (>= 4.1.0)
  82 + responders
  83 + warden (~> 1.2.3)
  84 + devise-jwt (0.8.1)
  85 + devise (~> 4.0)
  86 + warden-jwt_auth (~> 0.5)
  87 + dry-auto_inject (0.8.0)
  88 + dry-container (>= 0.3.4)
  89 + dry-configurable (0.12.1)
  90 + concurrent-ruby (~> 1.0)
  91 + dry-core (~> 0.5, >= 0.5.0)
  92 + dry-container (0.8.0)
  93 + concurrent-ruby (~> 1.0)
  94 + dry-configurable (~> 0.1, >= 0.1.3)
  95 + dry-core (0.7.1)
  96 + concurrent-ruby (~> 1.0)
70 erubi (1.10.0) 97 erubi (1.10.0)
71 ffi (1.15.3) 98 ffi (1.15.3)
72 globalid (0.5.1) 99 globalid (0.5.1)
73 activesupport (>= 5.0) 100 activesupport (>= 5.0)
74 i18n (1.8.10) 101 i18n (1.8.10)
75 concurrent-ruby (~> 1.0) 102 concurrent-ruby (~> 1.0)
  103 + jsonapi-renderer (0.2.2)
  104 + jwt (2.2.3)
76 listen (3.6.0) 105 listen (3.6.0)
77 rb-fsevent (~> 0.10, >= 0.10.3) 106 rb-fsevent (~> 0.10, >= 0.10.3)
78 rb-inotify (~> 0.9, >= 0.9.10) 107 rb-inotify (~> 0.9, >= 0.9.10)
@@ -90,6 +119,7 @@ GEM @@ -90,6 +119,7 @@ GEM
90 nio4r (2.5.7) 119 nio4r (2.5.7)
91 nokogiri (1.11.7-x86_64-linux) 120 nokogiri (1.11.7-x86_64-linux)
92 racc (~> 1.4) 121 racc (~> 1.4)
  122 + orm_adapter (0.5.0)
93 parallel (1.20.1) 123 parallel (1.20.1)
94 parser (3.0.2.0) 124 parser (3.0.2.0)
95 ast (~> 2.4.1) 125 ast (~> 2.4.1)
@@ -97,6 +127,8 @@ GEM @@ -97,6 +127,8 @@ GEM
97 nio4r (~> 2.0) 127 nio4r (~> 2.0)
98 racc (1.5.2) 128 racc (1.5.2)
99 rack (2.2.3) 129 rack (2.2.3)
  130 + rack-cors (1.1.1)
  131 + rack (>= 2.0.0)
100 rack-test (1.1.0) 132 rack-test (1.1.0)
101 rack (>= 1.0, < 3) 133 rack (>= 1.0, < 3)
102 rails (6.1.4) 134 rails (6.1.4)
@@ -131,6 +163,9 @@ GEM @@ -131,6 +163,9 @@ GEM
131 rb-inotify (0.10.1) 163 rb-inotify (0.10.1)
132 ffi (~> 1.0) 164 ffi (~> 1.0)
133 regexp_parser (2.1.1) 165 regexp_parser (2.1.1)
  166 + responders (3.0.1)
  167 + actionpack (>= 5.0)
  168 + railties (>= 5.0)
134 rexml (3.2.5) 169 rexml (3.2.5)
135 rubocop (1.18.4) 170 rubocop (1.18.4)
136 parallel (~> 1.10) 171 parallel (~> 1.10)
@@ -156,6 +191,13 @@ GEM @@ -156,6 +191,13 @@ GEM
156 tzinfo (2.0.4) 191 tzinfo (2.0.4)
157 concurrent-ruby (~> 1.0) 192 concurrent-ruby (~> 1.0)
158 unicode-display_width (2.0.0) 193 unicode-display_width (2.0.0)
  194 + warden (1.2.9)
  195 + rack (>= 2.0.9)
  196 + warden-jwt_auth (0.5.0)
  197 + dry-auto_inject (~> 0.6)
  198 + dry-configurable (~> 0.9)
  199 + jwt (~> 2.1)
  200 + warden (~> 1.2)
159 websocket-driver (0.7.5) 201 websocket-driver (0.7.5)
160 websocket-extensions (>= 0.1.0) 202 websocket-extensions (>= 0.1.0)
161 websocket-extensions (0.1.5) 203 websocket-extensions (0.1.5)
@@ -165,11 +207,15 @@ PLATFORMS @@ -165,11 +207,15 @@ PLATFORMS
165 x86_64-linux 207 x86_64-linux
166 208
167 DEPENDENCIES 209 DEPENDENCIES
  210 + active_model_serializers (~> 0.10.12)
168 bootsnap (>= 1.4.4) 211 bootsnap (>= 1.4.4)
169 byebug 212 byebug
  213 + devise (~> 4.8)
  214 + devise-jwt (~> 0.8.1)
170 listen (~> 3.3) 215 listen (~> 3.3)
171 mysql2 (~> 0.5) 216 mysql2 (~> 0.5)
172 puma (~> 5.0) 217 puma (~> 5.0)
  218 + rack-cors
173 rails (~> 6.1.4) 219 rails (~> 6.1.4)
174 rubocop 220 rubocop
175 spring 221 spring