about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Gemfile12
-rw-r--r--Gemfile.lock323
-rwxr-xr-xbin/rails11
-rwxr-xr-xbin/rake9
-rwxr-xr-xbin/setup31
-rw-r--r--config/application.rb2
-rw-r--r--config/boot.rb4
-rw-r--r--config/deploy.rb2
-rw-r--r--config/environment.rb2
-rw-r--r--config/environments/development.rb42
-rw-r--r--config/environments/test.rb40
-rw-r--r--config/initializers/content_security_policy.rb25
-rw-r--r--config/initializers/filter_parameter_logging.rb8
-rw-r--r--config/initializers/inflections.rb8
-rw-r--r--config/initializers/lingo.rb1
-rw-r--r--config/initializers/new_framework_defaults_7_0.rb135
-rw-r--r--config/initializers/permissions_policy.rb11
-rw-r--r--config/lingo.yml4
-rw-r--r--config/routes.rb1
-rw-r--r--config/storage.yml34
-rw-r--r--db/migrate/20221210170526_add_service_name_to_active_storage_blobs.active_storage.rb22
-rw-r--r--db/migrate/20221210170527_create_active_storage_variant_records.active_storage.rb27
-rw-r--r--db/migrate/20221210170528_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb8
-rw-r--r--db/migrate/20221210170549_create_lingo_scores.lingo.rb13
-rw-r--r--db/schema.rb208
-rw-r--r--yarn.lock4
26 files changed, 691 insertions, 296 deletions
diff --git a/Gemfile b/Gemfile index cbffc52..fa1a218 100644 --- a/Gemfile +++ b/Gemfile
@@ -7,17 +7,18 @@ end
7 7
8 8
9# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 9# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10gem 'rails', '~> 5.2.0' 10gem 'rails', '~> 7.0.3'
11# Use sqlite3 as the database for Active Record 11# Use sqlite3 as the database for Active Record
12gem 'sqlite3' 12gem 'sqlite3'
13# Use Puma as the app server 13# Use Puma as the app server
14gem 'puma', '>= 4.3.8' 14#gem 'puma', '>= 6.0.0'
15gem 'webrick', '~> 1.7'
15# Use SCSS for stylesheets 16# Use SCSS for stylesheets
16gem 'sassc-rails' 17gem 'sassc-rails'
17# Use Uglifier as compressor for JavaScript assets 18# Use Uglifier as compressor for JavaScript assets
18gem 'uglifier', '>= 1.3.0' 19gem 'uglifier', '>= 1.3.0'
19# See https://github.com/rails/execjs#readme for more supported runtimes 20# See https://github.com/rails/execjs#readme for more supported runtimes
20gem 'node', platforms: :ruby 21gem 'therubyracer', platforms: :ruby
21 22
22# Use CoffeeScript for .coffee assets and views 23# Use CoffeeScript for .coffee assets and views
23gem 'coffee-rails', '~> 4.2' 24gem 'coffee-rails', '~> 4.2'
@@ -72,6 +73,7 @@ gem 'pokeviewer', github: "hatkirby/pokeviewer"
72gem 'acts-as-taggable-on' 73gem 'acts-as-taggable-on'
73gem 'jquery-ui-rails' 74gem 'jquery-ui-rails'
74gem 'js-routes' 75gem 'js-routes'
75gem 'audited', '~> 4.7' 76gem 'audited', '~> 5.0'
76gem 'enumerize' 77gem 'enumerize'
77gem 'sprockets', '3.7.2' \ No newline at end of file 78gem 'sprockets', '3.7.2'
79gem 'lingo', github: "hatkirby/lingo", glob: "rails/*.gemspec", branch: "main" \ No newline at end of file
diff --git a/Gemfile.lock b/Gemfile.lock index eea9708..6367d9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock
@@ -1,6 +1,17 @@
1GIT 1GIT
2 remote: https://github.com/hatkirby/lingo.git
3 revision: 787745956f13bb63c596ed80a53b386708b56508
4 branch: main
5 glob: rails/*.gemspec
6 specs:
7 lingo (0.1.0)
8 haml-rails (~> 2.0)
9 rails (>= 7.0.3)
10 sassc-rails
11
12GIT
2 remote: https://github.com/hatkirby/pokeviewer.git 13 remote: https://github.com/hatkirby/pokeviewer.git
3 revision: 32d4d3c1fc54721c3c99a15415cf698475237984 14 revision: e28f6b73ab7f2e59605ebd800e921a6146fc49ae
4 specs: 15 specs:
5 pokeviewer (0.1.0) 16 pokeviewer (0.1.0)
6 activerecord-diff 17 activerecord-diff
@@ -9,7 +20,7 @@ GIT
9 haml 20 haml
10 jquery-rails 21 jquery-rails
11 normalize-rails 22 normalize-rails
12 rails (~> 5.2.0) 23 rails (~> 7.0.3)
13 sassc-rails 24 sassc-rails
14 sequenced 25 sequenced
15 victor 26 victor
@@ -17,71 +28,94 @@ GIT
17GEM 28GEM
18 remote: https://rubygems.org/ 29 remote: https://rubygems.org/
19 specs: 30 specs:
20 actioncable (5.2.6) 31 actioncable (7.0.4)
21 actionpack (= 5.2.6) 32 actionpack (= 7.0.4)
33 activesupport (= 7.0.4)
22 nio4r (~> 2.0) 34 nio4r (~> 2.0)
23 websocket-driver (>= 0.6.1) 35 websocket-driver (>= 0.6.1)
24 actionmailer (5.2.6) 36 actionmailbox (7.0.4)
25 actionpack (= 5.2.6) 37 actionpack (= 7.0.4)
26 actionview (= 5.2.6) 38 activejob (= 7.0.4)
27 activejob (= 5.2.6) 39 activerecord (= 7.0.4)
40 activestorage (= 7.0.4)
41 activesupport (= 7.0.4)
42 mail (>= 2.7.1)
43 net-imap
44 net-pop
45 net-smtp
46 actionmailer (7.0.4)
47 actionpack (= 7.0.4)
48 actionview (= 7.0.4)
49 activejob (= 7.0.4)
50 activesupport (= 7.0.4)
28 mail (~> 2.5, >= 2.5.4) 51 mail (~> 2.5, >= 2.5.4)
52 net-imap
53 net-pop
54 net-smtp
29 rails-dom-testing (~> 2.0) 55 rails-dom-testing (~> 2.0)
30 actionpack (5.2.6) 56 actionpack (7.0.4)
31 actionview (= 5.2.6) 57 actionview (= 7.0.4)
32 activesupport (= 5.2.6) 58 activesupport (= 7.0.4)
33 rack (~> 2.0, >= 2.0.8) 59 rack (~> 2.0, >= 2.2.0)
34 rack-test (>= 0.6.3) 60 rack-test (>= 0.6.3)
35 rails-dom-testing (~> 2.0) 61 rails-dom-testing (~> 2.0)
36 rails-html-sanitizer (~> 1.0, >= 1.0.2) 62 rails-html-sanitizer (~> 1.0, >= 1.2.0)
37 actionview (5.2.6) 63 actiontext (7.0.4)
38 activesupport (= 5.2.6) 64 actionpack (= 7.0.4)
65 activerecord (= 7.0.4)
66 activestorage (= 7.0.4)
67 activesupport (= 7.0.4)
68 globalid (>= 0.6.0)
69 nokogiri (>= 1.8.5)
70 actionview (7.0.4)
71 activesupport (= 7.0.4)
39 builder (~> 3.1) 72 builder (~> 3.1)
40 erubi (~> 1.4) 73 erubi (~> 1.4)
41 rails-dom-testing (~> 2.0) 74 rails-dom-testing (~> 2.0)
42 rails-html-sanitizer (~> 1.0, >= 1.0.3) 75 rails-html-sanitizer (~> 1.1, >= 1.2.0)
43 activejob (5.2.6) 76 activejob (7.0.4)
44 activesupport (= 5.2.6) 77 activesupport (= 7.0.4)
45 globalid (>= 0.3.6) 78 globalid (>= 0.3.6)
46 activemodel (5.2.6) 79 activemodel (7.0.4)
47 activesupport (= 5.2.6) 80 activesupport (= 7.0.4)
48 activerecord (5.2.6) 81 activerecord (7.0.4)
49 activemodel (= 5.2.6) 82 activemodel (= 7.0.4)
50 activesupport (= 5.2.6) 83 activesupport (= 7.0.4)
51 arel (>= 9.0)
52 activerecord-diff (2.0.0) 84 activerecord-diff (2.0.0)
53 activestorage (5.2.6) 85 activestorage (7.0.4)
54 actionpack (= 5.2.6) 86 actionpack (= 7.0.4)
55 activerecord (= 5.2.6) 87 activejob (= 7.0.4)
56 marcel (~> 1.0.0) 88 activerecord (= 7.0.4)
57 activesupport (5.2.6) 89 activesupport (= 7.0.4)
90 marcel (~> 1.0)
91 mini_mime (>= 1.1.0)
92 activesupport (7.0.4)
58 concurrent-ruby (~> 1.0, >= 1.0.2) 93 concurrent-ruby (~> 1.0, >= 1.0.2)
59 i18n (>= 0.7, < 2) 94 i18n (>= 1.6, < 2)
60 minitest (~> 5.1) 95 minitest (>= 5.1)
61 tzinfo (~> 1.1) 96 tzinfo (~> 2.0)
62 acts-as-taggable-on (8.1.0) 97 acts-as-taggable-on (9.0.1)
63 activerecord (>= 5.0, < 6.2) 98 activerecord (>= 6.0, < 7.1)
64 addressable (2.8.0) 99 addressable (2.8.1)
65 public_suffix (>= 2.0.2, < 5.0) 100 public_suffix (>= 2.0.2, < 6.0)
66 airbrussh (1.4.0) 101 airbrussh (1.4.1)
67 sshkit (>= 1.6.1, != 1.7.0) 102 sshkit (>= 1.6.1, != 1.7.0)
68 arel (9.0.0) 103 audited (5.0.2)
69 audited (4.10.0) 104 activerecord (>= 5.0, < 7.1)
70 activerecord (>= 4.2, < 6.2) 105 bcrypt (3.1.18)
71 bcrypt (3.1.16)
72 bindex (0.8.1) 106 bindex (0.8.1)
73 builder (3.2.4) 107 builder (3.2.4)
74 byebug (11.1.3) 108 byebug (11.1.3)
75 capistrano (3.16.0) 109 capistrano (3.17.1)
76 airbrussh (>= 1.0.0) 110 airbrussh (>= 1.0.0)
77 i18n 111 i18n
78 rake (>= 10.0.0) 112 rake (>= 10.0.0)
79 sshkit (>= 1.9.0) 113 sshkit (>= 1.9.0)
80 capistrano-bundler (2.0.1) 114 capistrano-bundler (2.1.0)
81 capistrano (~> 3.1) 115 capistrano (~> 3.1)
82 capistrano-passenger (0.2.1) 116 capistrano-passenger (0.2.1)
83 capistrano (~> 3.0) 117 capistrano (~> 3.0)
84 capistrano-rails (1.6.1) 118 capistrano-rails (1.6.2)
85 capistrano (~> 3.1) 119 capistrano (~> 3.1)
86 capistrano-bundler (>= 1.1, < 3) 120 capistrano-bundler (>= 1.1, < 3)
87 capistrano-rvm (0.1.2) 121 capistrano-rvm (0.1.2)
@@ -94,7 +128,6 @@ GEM
94 rack (>= 1.0.0) 128 rack (>= 1.0.0)
95 rack-test (>= 0.5.4) 129 rack-test (>= 0.5.4)
96 xpath (>= 2.0, < 4.0) 130 xpath (>= 2.0, < 4.0)
97 childprocess (3.0.0)
98 ckeditor (4.2.4) 131 ckeditor (4.2.4)
99 cocaine 132 cocaine
100 orm_adapter (~> 0.5.0) 133 orm_adapter (~> 0.5.0)
@@ -108,70 +141,84 @@ GEM
108 coffee-script-source 141 coffee-script-source
109 execjs 142 execjs
110 coffee-script-source (1.12.2) 143 coffee-script-source (1.12.2)
111 concurrent-ruby (1.1.9) 144 concurrent-ruby (1.1.10)
112 crass (1.0.6) 145 crass (1.0.6)
113 devise (4.8.0) 146 date (3.3.1)
147 devise (4.8.1)
114 bcrypt (~> 3.0) 148 bcrypt (~> 3.0)
115 orm_adapter (~> 0.1) 149 orm_adapter (~> 0.1)
116 railties (>= 4.1.0) 150 railties (>= 4.1.0)
117 responders 151 responders
118 warden (~> 1.2.3) 152 warden (~> 1.2.3)
119 enumerize (2.4.0) 153 enumerize (2.5.0)
120 activesupport (>= 3.2) 154 activesupport (>= 3.2)
121 erubi (1.10.0) 155 erubi (1.11.0)
122 execjs (2.8.1) 156 execjs (2.8.1)
123 ffi (1.15.3) 157 ffi (1.15.5)
124 globalid (0.4.2) 158 globalid (1.0.0)
125 activesupport (>= 4.2.0) 159 activesupport (>= 5.0)
126 haml (5.2.1) 160 haml (6.1.1)
127 temple (>= 0.8.0) 161 temple (>= 0.8.2)
162 thor
128 tilt 163 tilt
164 haml-rails (2.1.0)
165 actionpack (>= 5.1)
166 activesupport (>= 5.1)
167 haml (>= 4.0.6)
168 railties (>= 5.1)
129 highline (2.0.3) 169 highline (2.0.3)
130 i18n (1.8.10) 170 i18n (1.12.0)
131 concurrent-ruby (~> 1.0) 171 concurrent-ruby (~> 1.0)
132 jbuilder (2.11.2) 172 jbuilder (2.11.5)
173 actionview (>= 5.0.0)
133 activesupport (>= 5.0.0) 174 activesupport (>= 5.0.0)
134 jquery-rails (4.4.0) 175 jquery-rails (4.5.1)
135 rails-dom-testing (>= 1, < 3) 176 rails-dom-testing (>= 1, < 3)
136 railties (>= 4.2.0) 177 railties (>= 4.2.0)
137 thor (>= 0.14, < 2.0) 178 thor (>= 0.14, < 2.0)
138 jquery-ui-rails (6.0.1) 179 jquery-ui-rails (6.0.1)
139 railties (>= 3.2.16) 180 railties (>= 3.2.16)
140 js-routes (2.0.7) 181 js-routes (2.2.4)
141 railties (>= 4) 182 railties (>= 4)
142 listen (3.1.5) 183 libv8 (3.16.14.19)
184 listen (3.0.8)
143 rb-fsevent (~> 0.9, >= 0.9.4) 185 rb-fsevent (~> 0.9, >= 0.9.4)
144 rb-inotify (~> 0.9, >= 0.9.7) 186 rb-inotify (~> 0.9, >= 0.9.7)
145 ruby_dep (~> 1.2) 187 loofah (2.19.0)
146 loofah (2.10.0)
147 crass (~> 1.0.2) 188 crass (~> 1.0.2)
148 nokogiri (>= 1.5.9) 189 nokogiri (>= 1.5.9)
149 mail (2.7.1) 190 mail (2.8.0)
150 mini_mime (>= 0.1.1) 191 mini_mime (>= 0.1.1)
151 marcel (1.0.1) 192 net-imap
193 net-pop
194 net-smtp
195 marcel (1.0.2)
152 method_source (1.0.0) 196 method_source (1.0.0)
153 mime-types (3.3.1) 197 mime-types (3.4.1)
154 mime-types-data (~> 3.2015) 198 mime-types-data (~> 3.2015)
155 mime-types-data (3.2021.0704) 199 mime-types-data (3.2022.0105)
156 mimemagic (0.3.10) 200 mimemagic (0.3.10)
157 nokogiri (~> 1) 201 nokogiri (~> 1)
158 rake 202 rake
159 mini_mime (1.1.0) 203 mini_mime (1.1.2)
160 mini_portile2 (2.5.3) 204 mini_portile2 (2.8.0)
161 minitest (5.14.4) 205 minitest (5.16.3)
162 mysql2 (0.5.3) 206 mysql2 (0.5.4)
163 net-scp (3.0.0) 207 net-imap (0.3.2)
164 net-ssh (>= 2.6.5, < 7.0.0) 208 date
165 net-ssh (6.1.0) 209 net-protocol
166 nio4r (2.5.7) 210 net-pop (0.1.2)
167 node (2.1.0) 211 net-protocol
168 node_impl (~> 1.0.0) 212 net-protocol (0.2.1)
169 node_int (~> 0.1.0) 213 timeout
170 node_impl (1.0.0) 214 net-scp (4.0.0)
171 node_int (~> 0.1.0) 215 net-ssh (>= 2.6.5, < 8.0.0)
172 node_int (0.1.3) 216 net-smtp (0.3.3)
173 nokogiri (1.11.7) 217 net-protocol
174 mini_portile2 (~> 2.5.0) 218 net-ssh (7.0.1)
219 nio4r (2.5.8)
220 nokogiri (1.13.10)
221 mini_portile2 (~> 2.8.0)
175 racc (~> 1.4) 222 racc (~> 1.4)
176 normalize-rails (8.0.1) 223 normalize-rails (8.0.1)
177 orm_adapter (0.5.0) 224 orm_adapter (0.5.0)
@@ -181,45 +228,46 @@ GEM
181 mime-types 228 mime-types
182 mimemagic (~> 0.3.0) 229 mimemagic (~> 0.3.0)
183 terrapin (~> 0.6.0) 230 terrapin (~> 0.6.0)
184 public_suffix (4.0.6) 231 public_suffix (5.0.1)
185 puma (5.3.2) 232 racc (1.6.1)
186 nio4r (~> 2.0) 233 rack (2.2.4)
187 racc (1.5.2) 234 rack-test (2.0.2)
188 rack (2.2.3) 235 rack (>= 1.3)
189 rack-test (1.1.0) 236 rails (7.0.4)
190 rack (>= 1.0, < 3) 237 actioncable (= 7.0.4)
191 rails (5.2.6) 238 actionmailbox (= 7.0.4)
192 actioncable (= 5.2.6) 239 actionmailer (= 7.0.4)
193 actionmailer (= 5.2.6) 240 actionpack (= 7.0.4)
194 actionpack (= 5.2.6) 241 actiontext (= 7.0.4)
195 actionview (= 5.2.6) 242 actionview (= 7.0.4)
196 activejob (= 5.2.6) 243 activejob (= 7.0.4)
197 activemodel (= 5.2.6) 244 activemodel (= 7.0.4)
198 activerecord (= 5.2.6) 245 activerecord (= 7.0.4)
199 activestorage (= 5.2.6) 246 activestorage (= 7.0.4)
200 activesupport (= 5.2.6) 247 activesupport (= 7.0.4)
201 bundler (>= 1.3.0) 248 bundler (>= 1.15.0)
202 railties (= 5.2.6) 249 railties (= 7.0.4)
203 sprockets-rails (>= 2.0.0)
204 rails-dom-testing (2.0.3) 250 rails-dom-testing (2.0.3)
205 activesupport (>= 4.2.0) 251 activesupport (>= 4.2.0)
206 nokogiri (>= 1.6) 252 nokogiri (>= 1.6)
207 rails-html-sanitizer (1.3.0) 253 rails-html-sanitizer (1.4.3)
208 loofah (~> 2.3) 254 loofah (~> 2.3)
209 railties (5.2.6) 255 railties (7.0.4)
210 actionpack (= 5.2.6) 256 actionpack (= 7.0.4)
211 activesupport (= 5.2.6) 257 activesupport (= 7.0.4)
212 method_source 258 method_source
213 rake (>= 0.8.7) 259 rake (>= 12.2)
214 thor (>= 0.19.0, < 2.0) 260 thor (~> 1.0)
261 zeitwerk (~> 2.5)
215 rake (13.0.6) 262 rake (13.0.6)
216 rb-fsevent (0.11.0) 263 rb-fsevent (0.11.2)
217 rb-inotify (0.10.1) 264 rb-inotify (0.10.1)
218 ffi (~> 1.0) 265 ffi (~> 1.0)
266 ref (2.0.0)
219 responders (3.0.1) 267 responders (3.0.1)
220 actionpack (>= 5.0) 268 actionpack (>= 5.0)
221 railties (>= 5.0) 269 railties (>= 5.0)
222 ruby_dep (1.5.0) 270 rexml (3.2.5)
223 rubyzip (2.3.2) 271 rubyzip (2.3.2)
224 sassc (2.4.0) 272 sassc (2.4.0)
225 ffi (~> 1.9) 273 ffi (~> 1.9)
@@ -229,10 +277,11 @@ GEM
229 sprockets (> 3.0) 277 sprockets (> 3.0)
230 sprockets-rails 278 sprockets-rails
231 tilt 279 tilt
232 selenium-webdriver (3.142.7) 280 selenium-webdriver (4.7.1)
233 childprocess (>= 0.5, < 4.0) 281 rexml (~> 3.2, >= 3.2.5)
234 rubyzip (>= 1.2.2) 282 rubyzip (>= 1.2.2, < 3.0)
235 sequenced (3.2.0) 283 websocket (~> 1.0)
284 sequenced (4.0.0)
236 activerecord (>= 3.0) 285 activerecord (>= 3.0)
237 activesupport (>= 3.0) 286 activesupport (>= 3.0)
238 spring (2.1.1) 287 spring (2.1.1)
@@ -242,47 +291,54 @@ GEM
242 sprockets (3.7.2) 291 sprockets (3.7.2)
243 concurrent-ruby (~> 1.0) 292 concurrent-ruby (~> 1.0)
244 rack (> 1, < 3) 293 rack (> 1, < 3)
245 sprockets-rails (3.2.2) 294 sprockets-rails (3.4.2)
246 actionpack (>= 4.0) 295 actionpack (>= 5.2)
247 activesupport (>= 4.0) 296 activesupport (>= 5.2)
248 sprockets (>= 3.0.0) 297 sprockets (>= 3.0.0)
249 sqlite3 (1.4.2) 298 sqlite3 (1.5.4)
250 sshkit (1.21.2) 299 mini_portile2 (~> 2.8.0)
300 sshkit (1.21.3)
251 net-scp (>= 1.1.2) 301 net-scp (>= 1.1.2)
252 net-ssh (>= 2.8.0) 302 net-ssh (>= 2.8.0)
253 temple (0.8.2) 303 temple (0.9.1)
254 terrapin (0.6.0) 304 terrapin (0.6.0)
255 climate_control (>= 0.0.3, < 1.0) 305 climate_control (>= 0.0.3, < 1.0)
256 thor (1.1.0) 306 therubyracer (0.12.3)
257 thread_safe (0.3.6) 307 libv8 (~> 3.16.14.15)
258 tilt (2.0.10) 308 ref
309 thor (1.2.1)
310 tilt (2.0.11)
311 timeout (0.3.1)
259 turbolinks (5.2.1) 312 turbolinks (5.2.1)
260 turbolinks-source (~> 5.2) 313 turbolinks-source (~> 5.2)
261 turbolinks-source (5.2.0) 314 turbolinks-source (5.2.0)
262 tzinfo (1.2.9) 315 tzinfo (2.0.5)
263 thread_safe (~> 0.1) 316 concurrent-ruby (~> 1.0)
264 uglifier (4.2.0) 317 uglifier (4.2.0)
265 execjs (>= 0.3.0, < 3) 318 execjs (>= 0.3.0, < 3)
266 victor (0.3.3) 319 victor (0.3.4)
267 warden (1.2.9) 320 warden (1.2.9)
268 rack (>= 2.0.9) 321 rack (>= 2.0.9)
269 web-console (3.7.0) 322 web-console (4.2.0)
270 actionview (>= 5.0) 323 actionview (>= 6.0.0)
271 activemodel (>= 5.0) 324 activemodel (>= 6.0.0)
272 bindex (>= 0.4.0) 325 bindex (>= 0.4.0)
273 railties (>= 5.0) 326 railties (>= 6.0.0)
327 webrick (1.7.0)
328 websocket (1.2.9)
274 websocket-driver (0.7.5) 329 websocket-driver (0.7.5)
275 websocket-extensions (>= 0.1.0) 330 websocket-extensions (>= 0.1.0)
276 websocket-extensions (0.1.5) 331 websocket-extensions (0.1.5)
277 xpath (3.2.0) 332 xpath (3.2.0)
278 nokogiri (~> 1.8) 333 nokogiri (~> 1.8)
334 zeitwerk (2.6.6)
279 335
280PLATFORMS 336PLATFORMS
281 ruby 337 ruby
282 338
283DEPENDENCIES 339DEPENDENCIES
284 acts-as-taggable-on 340 acts-as-taggable-on
285 audited (~> 4.7) 341 audited (~> 5.0)
286 byebug 342 byebug
287 capistrano (~> 3.0) 343 capistrano (~> 3.0)
288 capistrano-bundler 344 capistrano-bundler
@@ -300,24 +356,25 @@ DEPENDENCIES
300 jquery-rails 356 jquery-rails
301 jquery-ui-rails 357 jquery-ui-rails
302 js-routes 358 js-routes
359 lingo!
303 listen (>= 3.0.5, < 3.2) 360 listen (>= 3.0.5, < 3.2)
304 mysql2 361 mysql2
305 node
306 normalize-rails 362 normalize-rails
307 paperclip 363 paperclip
308 pokeviewer! 364 pokeviewer!
309 puma (>= 4.3.8) 365 rails (~> 7.0.3)
310 rails (~> 5.2.0)
311 sassc-rails 366 sassc-rails
312 selenium-webdriver 367 selenium-webdriver
313 spring 368 spring
314 spring-watcher-listen (~> 2.0.0) 369 spring-watcher-listen (~> 2.0.0)
315 sprockets (= 3.7.2) 370 sprockets (= 3.7.2)
316 sqlite3 371 sqlite3
372 therubyracer
317 turbolinks (~> 5) 373 turbolinks (~> 5)
318 tzinfo-data 374 tzinfo-data
319 uglifier (>= 1.3.0) 375 uglifier (>= 1.3.0)
320 web-console (>= 3.3.0) 376 web-console (>= 3.3.0)
377 webrick (~> 1.7)
321 378
322BUNDLED WITH 379BUNDLED WITH
323 2.2.3 380 2.2.3
diff --git a/bin/rails b/bin/rails index 5badb2f..efc0377 100755 --- a/bin/rails +++ b/bin/rails
@@ -1,9 +1,4 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2begin 2APP_PATH = File.expand_path("../config/application", __dir__)
3 load File.expand_path('../spring', __FILE__) 3require_relative "../config/boot"
4rescue LoadError => e 4require "rails/commands"
5 raise unless e.message.include?('spring')
6end
7APP_PATH = File.expand_path('../config/application', __dir__)
8require_relative '../config/boot'
9require 'rails/commands'
diff --git a/bin/rake b/bin/rake index d87d5f5..4fbf10b 100755 --- a/bin/rake +++ b/bin/rake
@@ -1,9 +1,4 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2begin 2require_relative "../config/boot"
3 load File.expand_path('../spring', __FILE__) 3require "rake"
4rescue LoadError => e
5 raise unless e.message.include?('spring')
6end
7require_relative '../config/boot'
8require 'rake'
9Rake.application.run 4Rake.application.run
diff --git a/bin/setup b/bin/setup index 78c4e86..ec47b79 100755 --- a/bin/setup +++ b/bin/setup
@@ -1,38 +1,33 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2require 'pathname' 2require "fileutils"
3require 'fileutils'
4include FileUtils
5 3
6# path to your application root. 4# path to your application root.
7APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) 5APP_ROOT = File.expand_path("..", __dir__)
8 6
9def system!(*args) 7def system!(*args)
10 system(*args) || abort("\n== Command #{args} failed ==") 8 system(*args) || abort("\n== Command #{args} failed ==")
11end 9end
12 10
13chdir APP_ROOT do 11FileUtils.chdir APP_ROOT do
14 # This script is a starting point to setup your application. 12 # This script is a way to set up or update your development environment automatically.
13 # This script is idempotent, so that you can run it at any time and get an expectable outcome.
15 # Add necessary setup steps to this file. 14 # Add necessary setup steps to this file.
16 15
17 puts '== Installing dependencies ==' 16 puts "== Installing dependencies =="
18 system! 'gem install bundler --conservative' 17 system! "gem install bundler --conservative"
19 system('bundle check') || system!('bundle install') 18 system("bundle check") || system!("bundle install")
20
21 # Install JavaScript dependencies if using Yarn
22 # system('bin/yarn')
23
24 19
25 # puts "\n== Copying sample files ==" 20 # puts "\n== Copying sample files =="
26 # unless File.exist?('config/database.yml') 21 # unless File.exist?("config/database.yml")
27 # cp 'config/database.yml.sample', 'config/database.yml' 22 # FileUtils.cp "config/database.yml.sample", "config/database.yml"
28 # end 23 # end
29 24
30 puts "\n== Preparing database ==" 25 puts "\n== Preparing database =="
31 system! 'bin/rails db:setup' 26 system! "bin/rails db:prepare"
32 27
33 puts "\n== Removing old logs and tempfiles ==" 28 puts "\n== Removing old logs and tempfiles =="
34 system! 'bin/rails log:clear tmp:clear' 29 system! "bin/rails log:clear tmp:clear"
35 30
36 puts "\n== Restarting application server ==" 31 puts "\n== Restarting application server =="
37 system! 'bin/rails restart' 32 system! "bin/rails restart"
38end 33end
diff --git a/config/application.rb b/config/application.rb index f909eaa..e855cbf 100644 --- a/config/application.rb +++ b/config/application.rb
@@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
9module Thoughts 9module Thoughts
10 class Application < Rails::Application 10 class Application < Rails::Application
11 # Initialize configuration defaults for originally generated Rails version. 11 # Initialize configuration defaults for originally generated Rails version.
12 config.load_defaults 5.1 12 config.load_defaults Rails::VERSION::STRING.to_f
13 13
14 # Settings in config/environments/* take precedence over those specified here. 14 # Settings in config/environments/* take precedence over those specified here.
15 # Application configuration should go into files in config/initializers 15 # Application configuration should go into files in config/initializers
diff --git a/config/boot.rb b/config/boot.rb index 30f5120..2820116 100644 --- a/config/boot.rb +++ b/config/boot.rb
@@ -1,3 +1,3 @@
1ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 1ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2 2
3require 'bundler/setup' # Set up gems listed in the Gemfile. 3require "bundler/setup" # Set up gems listed in the Gemfile.
diff --git a/config/deploy.rb b/config/deploy.rb index 3843db6..db44532 100644 --- a/config/deploy.rb +++ b/config/deploy.rb
@@ -21,7 +21,7 @@ set :deploy_to, "/srv/www/thoughts"
21# set :pty, true 21# set :pty, true
22 22
23# Default value for :linked_files is [] 23# Default value for :linked_files is []
24append :linked_files, "config/database.yml", "config/secrets.yml" 24append :linked_files, "config/database.yml", "config/secrets.yml", "config/lingo.yml"
25 25
26# Default value for linked_dirs is [] 26# Default value for linked_dirs is []
27append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uploads" 27append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uploads"
diff --git a/config/environment.rb b/config/environment.rb index 426333b..cac5315 100644 --- a/config/environment.rb +++ b/config/environment.rb
@@ -1,5 +1,5 @@
1# Load the Rails application. 1# Load the Rails application.
2require_relative 'application' 2require_relative "application"
3 3
4# Initialize the Rails application. 4# Initialize the Rails application.
5Rails.application.initialize! 5Rails.application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb index 1b0c4b3..8500f45 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb
@@ -1,8 +1,10 @@
1require "active_support/core_ext/integer/time"
2
1Rails.application.configure do 3Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb. 4 # Settings specified here will take precedence over those in config/application.rb.
3 5
4 # In the development environment your application's code is reloaded on 6 # In the development environment your application's code is reloaded any time
5 # every request. This slows down response time but is perfect for development 7 # it changes. This slows down response time but is perfect for development
6 # since you don't have to restart the web server when you make code changes. 8 # since you don't have to restart the web server when you make code changes.
7 config.cache_classes = false 9 config.cache_classes = false
8 10
@@ -12,13 +14,18 @@ Rails.application.configure do
12 # Show full error reports. 14 # Show full error reports.
13 config.consider_all_requests_local = true 15 config.consider_all_requests_local = true
14 16
17 # Enable server timing
18 config.server_timing = true
19
15 # Enable/disable caching. By default caching is disabled. 20 # Enable/disable caching. By default caching is disabled.
16 if Rails.root.join('tmp/caching-dev.txt').exist? 21 # Run rails dev:cache to toggle caching.
22 if Rails.root.join("tmp/caching-dev.txt").exist?
17 config.action_controller.perform_caching = true 23 config.action_controller.perform_caching = true
24 config.action_controller.enable_fragment_cache_logging = true
18 25
19 config.cache_store = :memory_store 26 config.cache_store = :memory_store
20 config.public_file_server.headers = { 27 config.public_file_server.headers = {
21 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" 28 "Cache-Control" => "public, max-age=#{2.days.to_i}"
22 } 29 }
23 else 30 else
24 config.action_controller.perform_caching = false 31 config.action_controller.perform_caching = false
@@ -26,6 +33,9 @@ Rails.application.configure do
26 config.cache_store = :null_store 33 config.cache_store = :null_store
27 end 34 end
28 35
36 # Store uploaded files on the local file system (see config/storage.yml for options).
37 config.active_storage.service = :local
38
29 # Don't care if the mailer can't send. 39 # Don't care if the mailer can't send.
30 config.action_mailer.raise_delivery_errors = false 40 config.action_mailer.raise_delivery_errors = false
31 41
@@ -34,23 +44,27 @@ Rails.application.configure do
34 # Print deprecation notices to the Rails logger. 44 # Print deprecation notices to the Rails logger.
35 config.active_support.deprecation = :log 45 config.active_support.deprecation = :log
36 46
47 # Raise exceptions for disallowed deprecations.
48 config.active_support.disallowed_deprecation = :raise
49
50 # Tell Active Support which deprecation messages to disallow.
51 config.active_support.disallowed_deprecation_warnings = []
52
37 # Raise an error on page load if there are pending migrations. 53 # Raise an error on page load if there are pending migrations.
38 config.active_record.migration_error = :page_load 54 config.active_record.migration_error = :page_load
39 55
40 # Debug mode disables concatenation and preprocessing of assets. 56 # Highlight code that triggered database queries in logs.
41 # This option may cause significant delays in view rendering with a large 57 config.active_record.verbose_query_logs = true
42 # number of complex assets.
43 config.assets.debug = true
44 58
45 # Suppress logger output for asset requests. 59 # Suppress logger output for asset requests.
46 config.assets.quiet = true 60 config.assets.quiet = true
47 61
48 # Raises error for missing translations 62 # Raises error for missing translations.
49 # config.action_view.raise_on_missing_translations = true 63 # config.i18n.raise_on_missing_translations = true
50 64
51 # Use an evented file watcher to asynchronously detect changes in source code, 65 # Annotate rendered view with file names.
52 # routes, locales, etc. This feature depends on the listen gem. 66 # config.action_view.annotate_rendered_view_with_filenames = true
53 config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54 67
55 config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } 68 # Uncomment if you wish to allow Action Cable access from any origin.
69 # config.action_cable.disable_request_forgery_protection = true
56end 70end
diff --git a/config/environments/test.rb b/config/environments/test.rb index 8e5cbde..6ea4d1e 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb
@@ -1,32 +1,41 @@
1require "active_support/core_ext/integer/time"
2
3# The test environment is used exclusively to run your application's
4# test suite. You never need to work with it otherwise. Remember that
5# your test database is "scratch space" for the test suite and is wiped
6# and recreated between test runs. Don't rely on the data there!
7
1Rails.application.configure do 8Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb. 9 # Settings specified here will take precedence over those in config/application.rb.
3 10
4 # The test environment is used exclusively to run your application's 11 # Turn false under Spring and add config.action_view.cache_template_loading = true.
5 # test suite. You never need to work with it otherwise. Remember that
6 # your test database is "scratch space" for the test suite and is wiped
7 # and recreated between test runs. Don't rely on the data there!
8 config.cache_classes = true 12 config.cache_classes = true
9 13
10 # Do not eager load code on boot. This avoids loading your whole application 14 # Eager loading loads your whole application. When running a single test locally,
11 # just for the purpose of running a single test. If you are using a tool that 15 # this probably isn't necessary. It's a good idea to do in a continuous integration
12 # preloads Rails for running tests, you may have to set it to true. 16 # system, or in some way before deploying your code.
13 config.eager_load = false 17 config.eager_load = ENV["CI"].present?
14 18
15 # Configure public file server for tests with Cache-Control for performance. 19 # Configure public file server for tests with Cache-Control for performance.
16 config.public_file_server.enabled = true 20 config.public_file_server.enabled = true
17 config.public_file_server.headers = { 21 config.public_file_server.headers = {
18 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" 22 "Cache-Control" => "public, max-age=#{1.hour.to_i}"
19 } 23 }
20 24
21 # Show full error reports and disable caching. 25 # Show full error reports and disable caching.
22 config.consider_all_requests_local = true 26 config.consider_all_requests_local = true
23 config.action_controller.perform_caching = false 27 config.action_controller.perform_caching = false
28 config.cache_store = :null_store
24 29
25 # Raise exceptions instead of rendering exception templates. 30 # Raise exceptions instead of rendering exception templates.
26 config.action_dispatch.show_exceptions = false 31 config.action_dispatch.show_exceptions = false
27 32
28 # Disable request forgery protection in test environment. 33 # Disable request forgery protection in test environment.
29 config.action_controller.allow_forgery_protection = false 34 config.action_controller.allow_forgery_protection = false
35
36 # Store uploaded files on the local file system in a temporary directory.
37 config.active_storage.service = :test
38
30 config.action_mailer.perform_caching = false 39 config.action_mailer.perform_caching = false
31 40
32 # Tell Action Mailer not to deliver emails to the real world. 41 # Tell Action Mailer not to deliver emails to the real world.
@@ -37,6 +46,15 @@ Rails.application.configure do
37 # Print deprecation notices to the stderr. 46 # Print deprecation notices to the stderr.
38 config.active_support.deprecation = :stderr 47 config.active_support.deprecation = :stderr
39 48
40 # Raises error for missing translations 49 # Raise exceptions for disallowed deprecations.
41 # config.action_view.raise_on_missing_translations = true 50 config.active_support.disallowed_deprecation = :raise
51
52 # Tell Active Support which deprecation messages to disallow.
53 config.active_support.disallowed_deprecation_warnings = []
54
55 # Raises error for missing translations.
56 # config.i18n.raise_on_missing_translations = true
57
58 # Annotate rendered view with file names.
59 # config.action_view.annotate_rendered_view_with_filenames = true
42end 60end
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb new file mode 100644 index 0000000..54f47cf --- /dev/null +++ b/config/initializers/content_security_policy.rb
@@ -0,0 +1,25 @@
1# Be sure to restart your server when you modify this file.
2
3# Define an application-wide content security policy.
4# See the Securing Rails Applications Guide for more information:
5# https://guides.rubyonrails.org/security.html#content-security-policy-header
6
7# Rails.application.configure do
8# config.content_security_policy do |policy|
9# policy.default_src :self, :https
10# policy.font_src :self, :https, :data
11# policy.img_src :self, :https, :data
12# policy.object_src :none
13# policy.script_src :self, :https
14# policy.style_src :self, :https
15# # Specify URI for violation reports
16# # policy.report_uri "/csp-violation-report-endpoint"
17# end
18#
19# # Generate session nonces for permitted importmap and inline scripts
20# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21# config.content_security_policy_nonce_directives = %w(script-src)
22#
23# # Report violations without enforcing the policy.
24# # config.content_security_policy_report_only = true
25# end
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1..adc6568 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb
@@ -1,4 +1,8 @@
1# Be sure to restart your server when you modify this file. 1# Be sure to restart your server when you modify this file.
2 2
3# Configure sensitive parameters which will be filtered from the log file. 3# Configure parameters to be filtered from the log file. Use this to limit dissemination of
4Rails.application.config.filter_parameters += [:password] 4# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5# notations and behaviors.
6Rails.application.config.filter_parameters += [
7 :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8]
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf..3860f65 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb
@@ -4,13 +4,13 @@
4# are locale specific, and you may define rules for as many different 4# are locale specific, and you may define rules for as many different
5# locales as you wish. All of these examples are active by default: 5# locales as you wish. All of these examples are active by default:
6# ActiveSupport::Inflector.inflections(:en) do |inflect| 6# ActiveSupport::Inflector.inflections(:en) do |inflect|
7# inflect.plural /^(ox)$/i, '\1en' 7# inflect.plural /^(ox)$/i, "\\1en"
8# inflect.singular /^(ox)en/i, '\1' 8# inflect.singular /^(ox)en/i, "\\1"
9# inflect.irregular 'person', 'people' 9# inflect.irregular "person", "people"
10# inflect.uncountable %w( fish sheep ) 10# inflect.uncountable %w( fish sheep )
11# end 11# end
12 12
13# These inflection rules are supported but not enabled by default: 13# These inflection rules are supported but not enabled by default:
14# ActiveSupport::Inflector.inflections(:en) do |inflect| 14# ActiveSupport::Inflector.inflections(:en) do |inflect|
15# inflect.acronym 'RESTful' 15# inflect.acronym "RESTful"
16# end 16# end
diff --git a/config/initializers/lingo.rb b/config/initializers/lingo.rb new file mode 100644 index 0000000..edb76d8 --- /dev/null +++ b/config/initializers/lingo.rb
@@ -0,0 +1 @@
Lingo.secret_code = Rails.application.config_for(:lingo)[:secret_code] \ No newline at end of file
diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb new file mode 100644 index 0000000..4d58024 --- /dev/null +++ b/config/initializers/new_framework_defaults_7_0.rb
@@ -0,0 +1,135 @@
1# Be sure to restart your server when you modify this file.
2#
3# This file eases your Rails 7.0 framework defaults upgrade.
4#
5# Uncomment each configuration one by one to switch to the new default.
6# Once your application is ready to run with all new defaults, you can remove
7# this file and set the `config.load_defaults` to `7.0`.
8#
9# Read the Guide for Upgrading Ruby on Rails for more info on each option.
10# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11
12# `button_to` view helper will render `<button>` element, regardless of whether
13# or not the content is passed as the first argument or as a block.
14# Rails.application.config.action_view.button_to_generates_button_tag = true
15
16# `stylesheet_link_tag` view helper will not render the media attribute by default.
17# Rails.application.config.action_view.apply_stylesheet_media_default = false
18
19# Change the digest class for the key generators to `OpenSSL::Digest::SHA256`.
20# Changing this default means invalidate all encrypted messages generated by
21# your application and, all the encrypted cookies. Only change this after you
22# rotated all the messages using the key rotator.
23#
24# See upgrading guide for more information on how to build a rotator.
25# https://guides.rubyonrails.org/v7.0/upgrading_ruby_on_rails.html
26# Rails.application.config.active_support.key_generator_hash_digest_class = OpenSSL::Digest::SHA256
27
28# Change the digest class for ActiveSupport::Digest.
29# Changing this default means that for example Etags change and
30# various cache keys leading to cache invalidation.
31# Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256
32
33# Don't override ActiveSupport::TimeWithZone.name and use the default Ruby
34# implementation.
35# Rails.application.config.active_support.remove_deprecated_time_with_zone_name = true
36
37# Calls `Rails.application.executor.wrap` around test cases.
38# This makes test cases behave closer to an actual request or job.
39# Several features that are normally disabled in test, such as Active Record query cache
40# and asynchronous queries will then be enabled.
41# Rails.application.config.active_support.executor_around_test_case = true
42
43# Define the isolation level of most of Rails internal state.
44# If you use a fiber based server or job processor, you should set it to `:fiber`.
45# Otherwise the default of `:thread` if preferable.
46# Rails.application.config.active_support.isolation_level = :thread
47
48# Set both the `:open_timeout` and `:read_timeout` values for `:smtp` delivery method.
49# Rails.application.config.action_mailer.smtp_timeout = 5
50
51# The ActiveStorage video previewer will now use scene change detection to generate
52# better preview images (rather than the previous default of using the first frame
53# of the video).
54# Rails.application.config.active_storage.video_preview_arguments =
55# "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1' -frames:v 1 -f image2"
56
57# Automatically infer `inverse_of` for associations with a scope.
58# Rails.application.config.active_record.automatic_scope_inversing = true
59
60# Raise when running tests if fixtures contained foreign key violations
61# Rails.application.config.active_record.verify_foreign_keys_for_fixtures = true
62
63# Disable partial inserts.
64# This default means that all columns will be referenced in INSERT queries
65# regardless of whether they have a default or not.
66# Rails.application.config.active_record.partial_inserts = false
67
68# Protect from open redirect attacks in `redirect_back_or_to` and `redirect_to`.
69# Rails.application.config.action_controller.raise_on_open_redirects = true
70
71# Change the variant processor for Active Storage.
72# Changing this default means updating all places in your code that
73# generate variants to use image processing macros and ruby-vips
74# operations. See the upgrading guide for detail on the changes required.
75# The `:mini_magick` option is not deprecated; it's fine to keep using it.
76# Rails.application.config.active_storage.variant_processor = :vips
77
78# Enable parameter wrapping for JSON.
79# Previously this was set in an initializer. It's fine to keep using that initializer if you've customized it.
80# To disable parameter wrapping entirely, set this config to `false`.
81# Rails.application.config.action_controller.wrap_parameters_by_default = true
82
83# Specifies whether generated namespaced UUIDs follow the RFC 4122 standard for namespace IDs provided as a
84# `String` to `Digest::UUID.uuid_v3` or `Digest::UUID.uuid_v5` method calls.
85#
86# See https://guides.rubyonrails.org/configuring.html#config-active-support-use-rfc4122-namespaced-uuids for
87# more information.
88# Rails.application.config.active_support.use_rfc4122_namespaced_uuids = true
89
90# Change the default headers to disable browsers' flawed legacy XSS protection.
91# Rails.application.config.action_dispatch.default_headers = {
92# "X-Frame-Options" => "SAMEORIGIN",
93# "X-XSS-Protection" => "0",
94# "X-Content-Type-Options" => "nosniff",
95# "X-Download-Options" => "noopen",
96# "X-Permitted-Cross-Domain-Policies" => "none",
97# "Referrer-Policy" => "strict-origin-when-cross-origin"
98# }
99
100
101# ** Please read carefully, this must be configured in config/application.rb **
102# Change the format of the cache entry.
103# Changing this default means that all new cache entries added to the cache
104# will have a different format that is not supported by Rails 6.1 applications.
105# Only change this value after your application is fully deployed to Rails 7.0
106# and you have no plans to rollback.
107# When you're ready to change format, add this to `config/application.rb` (NOT this file):
108# config.active_support.cache_format_version = 7.0
109
110
111# Cookie serializer: 2 options
112#
113# If you're upgrading and haven't set `cookies_serializer` previously, your cookie serializer
114# is `:marshal`. The default for new apps is `:json`.
115#
116# Rails.application.config.action_dispatch.cookies_serializer = :json
117#
118#
119# To migrate an existing application to the `:json` serializer, use the `:hybrid` option.
120#
121# Rails transparently deserializes existing (Marshal-serialized) cookies on read and
122# re-writes them in the JSON format.
123#
124# It is fine to use `:hybrid` long term; you should do that until you're confident *all* your cookies
125# have been converted to JSON. To keep using `:hybrid` long term, move this config to its own
126# initializer or to `config/application.rb`.
127#
128# Rails.application.config.action_dispatch.cookies_serializer = :hybrid
129#
130#
131# If your cookies can't yet be serialized to JSON, keep using `:marshal` for backward-compatibility.
132#
133# If you have configured the serializer elsewhere, you can remove this section of the file.
134#
135# See https://guides.rubyonrails.org/action_controller_overview.html#cookies for more information.
diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb new file mode 100644 index 0000000..00f64d7 --- /dev/null +++ b/config/initializers/permissions_policy.rb
@@ -0,0 +1,11 @@
1# Define an application-wide HTTP permissions policy. For further
2# information see https://developers.google.com/web/updates/2018/06/feature-policy
3#
4# Rails.application.config.permissions_policy do |f|
5# f.camera :none
6# f.gyroscope :none
7# f.microphone :none
8# f.usb :none
9# f.fullscreen :self
10# f.payment :self, "https://secure.example.com"
11# end
diff --git a/config/lingo.yml b/config/lingo.yml new file mode 100644 index 0000000..96c5e56 --- /dev/null +++ b/config/lingo.yml
@@ -0,0 +1,4 @@
1production:
2 secret_code: ""
3development:
4 secret_code: "test" \ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb index 240beae..f524cf1 100644 --- a/config/routes.rb +++ b/config/routes.rb
@@ -39,4 +39,5 @@ Rails.application.routes.draw do
39 end 39 end
40 40
41 mount Pokeviewer::Engine => '/poke3' 41 mount Pokeviewer::Engine => '/poke3'
42 mount Lingo::Engine => '/lingo'
42end 43end
diff --git a/config/storage.yml b/config/storage.yml new file mode 100644 index 0000000..4942ab6 --- /dev/null +++ b/config/storage.yml
@@ -0,0 +1,34 @@
1test:
2 service: Disk
3 root: <%= Rails.root.join("tmp/storage") %>
4
5local:
6 service: Disk
7 root: <%= Rails.root.join("storage") %>
8
9# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10# amazon:
11# service: S3
12# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14# region: us-east-1
15# bucket: your_own_bucket-<%= Rails.env %>
16
17# Remember not to checkin your GCS keyfile to a repository
18# google:
19# service: GCS
20# project: your_project
21# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22# bucket: your_own_bucket-<%= Rails.env %>
23
24# Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25# microsoft:
26# service: AzureStorage
27# storage_account_name: your_account_name
28# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29# container: your_container_name-<%= Rails.env %>
30
31# mirror:
32# service: Mirror
33# primary: local
34# mirrors: [ amazon, google, microsoft ]
diff --git a/db/migrate/20221210170526_add_service_name_to_active_storage_blobs.active_storage.rb b/db/migrate/20221210170526_add_service_name_to_active_storage_blobs.active_storage.rb new file mode 100644 index 0000000..a15c6ce --- /dev/null +++ b/db/migrate/20221210170526_add_service_name_to_active_storage_blobs.active_storage.rb
@@ -0,0 +1,22 @@
1# This migration comes from active_storage (originally 20190112182829)
2class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
3 def up
4 return unless table_exists?(:active_storage_blobs)
5
6 unless column_exists?(:active_storage_blobs, :service_name)
7 add_column :active_storage_blobs, :service_name, :string
8
9 if configured_service = ActiveStorage::Blob.service.name
10 ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
11 end
12
13 change_column :active_storage_blobs, :service_name, :string, null: false
14 end
15 end
16
17 def down
18 return unless table_exists?(:active_storage_blobs)
19
20 remove_column :active_storage_blobs, :service_name
21 end
22end
diff --git a/db/migrate/20221210170527_create_active_storage_variant_records.active_storage.rb b/db/migrate/20221210170527_create_active_storage_variant_records.active_storage.rb new file mode 100644 index 0000000..94ac83a --- /dev/null +++ b/db/migrate/20221210170527_create_active_storage_variant_records.active_storage.rb
@@ -0,0 +1,27 @@
1# This migration comes from active_storage (originally 20191206030411)
2class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
3 def change
4 return unless table_exists?(:active_storage_blobs)
5
6 # Use Active Record's configured type for primary key
7 create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t|
8 t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type
9 t.string :variation_digest, null: false
10
11 t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
12 t.foreign_key :active_storage_blobs, column: :blob_id
13 end
14 end
15
16 private
17 def primary_key_type
18 config = Rails.configuration.generators
19 config.options[config.orm][:primary_key_type] || :primary_key
20 end
21
22 def blobs_primary_key_type
23 pkey_name = connection.primary_key(:active_storage_blobs)
24 pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name }
25 pkey_column.bigint? ? :bigint : pkey_column.type
26 end
27end
diff --git a/db/migrate/20221210170528_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb b/db/migrate/20221210170528_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb new file mode 100644 index 0000000..93c8b85 --- /dev/null +++ b/db/migrate/20221210170528_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
@@ -0,0 +1,8 @@
1# This migration comes from active_storage (originally 20211119233751)
2class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0]
3 def change
4 return unless table_exists?(:active_storage_blobs)
5
6 change_column_null(:active_storage_blobs, :checksum, true)
7 end
8end
diff --git a/db/migrate/20221210170549_create_lingo_scores.lingo.rb b/db/migrate/20221210170549_create_lingo_scores.lingo.rb new file mode 100644 index 0000000..f56790f --- /dev/null +++ b/db/migrate/20221210170549_create_lingo_scores.lingo.rb
@@ -0,0 +1,13 @@
1# This migration comes from lingo (originally 20221210011146)
2class CreateLingoScores < ActiveRecord::Migration[7.0]
3 def change
4 create_table :lingo_scores do |t|
5 t.integer :user_id
6 t.string :username
7 t.string :avatar_url
8 t.integer :score
9
10 t.timestamps
11 end
12 end
13end
diff --git a/db/schema.rb b/db/schema.rb index 0ae9b11..0b14b24 100644 --- a/db/schema.rb +++ b/db/schema.rb
@@ -2,17 +2,16 @@
2# of editing this file, please use the migrations feature of Active Record to 2# of editing this file, please use the migrations feature of Active Record to
3# incrementally modify your database, and then regenerate this schema definition. 3# incrementally modify your database, and then regenerate this schema definition.
4# 4#
5# Note that this schema.rb definition is the authoritative source for your 5# This file is the source Rails uses to define your schema when running `bin/rails
6# database schema. If you need to create the application database on another 6# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7# system, you should be using db:schema:load, not running all the migrations 7# be faster and is potentially less error prone than running all of your
8# from scratch. The latter is a flawed and unsustainable approach (the more migrations 8# migrations from scratch. Old migrations may fail to apply correctly if those
9# you'll amass, the slower it'll run and the greater likelihood for issues). 9# migrations use external dependencies or application code.
10# 10#
11# It's strongly recommended that you check this file into your version control system. 11# It's strongly recommended that you check this file into your version control system.
12 12
13ActiveRecord::Schema.define(version: 2019_03_13_123149) do 13ActiveRecord::Schema[7.0].define(version: 2022_12_10_170549) do
14 14 create_table "audits", force: :cascade do |t|
15 create_table "audits", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t|
16 t.integer "auditable_id" 15 t.integer "auditable_id"
17 t.string "auditable_type" 16 t.string "auditable_type"
18 t.integer "associated_id" 17 t.integer "associated_id"
@@ -26,7 +25,7 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
26 t.string "comment" 25 t.string "comment"
27 t.string "remote_address" 26 t.string "remote_address"
28 t.string "request_uuid" 27 t.string "request_uuid"
29 t.datetime "created_at" 28 t.datetime "created_at", precision: nil
30 t.index ["associated_type", "associated_id"], name: "associated_index" 29 t.index ["associated_type", "associated_id"], name: "associated_index"
31 t.index ["auditable_type", "auditable_id", "version"], name: "auditable_index" 30 t.index ["auditable_type", "auditable_id", "version"], name: "auditable_index"
32 t.index ["created_at"], name: "index_audits_on_created_at" 31 t.index ["created_at"], name: "index_audits_on_created_at"
@@ -34,17 +33,17 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
34 t.index ["user_id", "user_type"], name: "user_index" 33 t.index ["user_id", "user_type"], name: "user_index"
35 end 34 end
36 35
37 create_table "blogs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 36 create_table "blogs", force: :cascade do |t|
38 t.string "title" 37 t.string "title"
39 t.text "body" 38 t.text "body"
40 t.string "slug" 39 t.string "slug"
41 t.datetime "created_at", null: false 40 t.datetime "created_at", precision: nil, null: false
42 t.datetime "updated_at", null: false 41 t.datetime "updated_at", precision: nil, null: false
43 t.boolean "published", default: false, null: false 42 t.boolean "published", default: false, null: false
44 t.datetime "published_at" 43 t.datetime "published_at", precision: nil
45 end 44 end
46 45
47 create_table "ckeditor_assets", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 46 create_table "ckeditor_assets", force: :cascade do |t|
48 t.string "data_file_name", null: false 47 t.string "data_file_name", null: false
49 t.string "data_content_type" 48 t.string "data_content_type"
50 t.integer "data_file_size" 49 t.integer "data_file_size"
@@ -52,67 +51,76 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
52 t.string "type", limit: 30 51 t.string "type", limit: 30
53 t.integer "width" 52 t.integer "width"
54 t.integer "height" 53 t.integer "height"
55 t.datetime "created_at", null: false 54 t.datetime "created_at", precision: nil, null: false
56 t.datetime "updated_at", null: false 55 t.datetime "updated_at", precision: nil, null: false
57 t.index ["type"], name: "index_ckeditor_assets_on_type" 56 t.index ["type"], name: "index_ckeditor_assets_on_type"
58 end 57 end
59 58
60 create_table "games", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| 59 create_table "games", force: :cascade do |t|
61 t.string "title" 60 t.string "title"
62 t.string "status" 61 t.string "status"
63 t.text "progress" 62 t.text "progress"
64 t.text "description" 63 t.text "description"
65 t.integer "score" 64 t.integer "score"
66 t.datetime "created_at", null: false 65 t.datetime "created_at", precision: nil, null: false
67 t.datetime "updated_at", null: false 66 t.datetime "updated_at", precision: nil, null: false
68 t.date "started_on" 67 t.date "started_on"
69 t.date "finished_on" 68 t.date "finished_on"
70 end 69 end
71 70
72 create_table "links", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| 71 create_table "lingo_scores", force: :cascade do |t|
73 t.string "title", null: false 72 t.integer "user_id"
74 t.string "url", null: false 73 t.string "username"
74 t.string "avatar_url"
75 t.integer "score"
75 t.datetime "created_at", null: false 76 t.datetime "created_at", null: false
76 t.datetime "updated_at", null: false 77 t.datetime "updated_at", null: false
77 end 78 end
78 79
79 create_table "pokeviewer_abilities", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 80 create_table "links", force: :cascade do |t|
80 t.string "name", null: false 81 t.string "title", null: false
82 t.string "url", null: false
83 t.datetime "created_at", precision: nil, null: false
84 t.datetime "updated_at", precision: nil, null: false
85 end
86
87 create_table "pokeviewer_abilities", force: :cascade do |t|
88 t.string "name", limit: 191, null: false
81 t.string "description", null: false 89 t.string "description", null: false
82 t.datetime "created_at", null: false 90 t.datetime "created_at", precision: nil, null: false
83 t.datetime "updated_at", null: false 91 t.datetime "updated_at", precision: nil, null: false
84 t.index ["name"], name: "index_pokeviewer_abilities_on_name", unique: true 92 t.index ["name"], name: "index_pokeviewer_abilities_on_name", unique: true
85 end 93 end
86 94
87 create_table "pokeviewer_gift_ribbons", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 95 create_table "pokeviewer_gift_ribbons", force: :cascade do |t|
88 t.string "description", null: false 96 t.string "description", null: false
89 t.datetime "created_at", null: false 97 t.datetime "created_at", precision: nil, null: false
90 t.datetime "updated_at", null: false 98 t.datetime "updated_at", precision: nil, null: false
91 end 99 end
92 100
93 create_table "pokeviewer_items", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 101 create_table "pokeviewer_items", force: :cascade do |t|
94 t.string "name", null: false 102 t.string "name", null: false
95 t.boolean "tm", default: false, null: false 103 t.boolean "tm", default: false, null: false
96 t.integer "move_id" 104 t.integer "move_id"
97 t.string "rs_description" 105 t.string "rs_description"
98 t.string "frlg_description" 106 t.string "frlg_description"
99 t.string "emerald_description" 107 t.string "emerald_description"
100 t.datetime "created_at", null: false 108 t.datetime "created_at", precision: nil, null: false
101 t.datetime "updated_at", null: false 109 t.datetime "updated_at", precision: nil, null: false
102 t.index ["move_id"], name: "index_pokeviewer_items_on_move_id" 110 t.index ["move_id"], name: "index_pokeviewer_items_on_move_id"
103 end 111 end
104 112
105 create_table "pokeviewer_locations", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 113 create_table "pokeviewer_locations", force: :cascade do |t|
106 t.string "name", null: false 114 t.string "name", null: false
107 t.datetime "created_at", null: false 115 t.datetime "created_at", precision: nil, null: false
108 t.datetime "updated_at", null: false 116 t.datetime "updated_at", precision: nil, null: false
109 end 117 end
110 118
111 create_table "pokeviewer_moves", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 119 create_table "pokeviewer_moves", force: :cascade do |t|
112 t.string "name", null: false 120 t.string "name", limit: 191, null: false
113 t.integer "pp", null: false 121 t.integer "pp", null: false
114 t.datetime "created_at", null: false 122 t.datetime "created_at", precision: nil, null: false
115 t.datetime "updated_at", null: false 123 t.datetime "updated_at", precision: nil, null: false
116 t.string "move_type", null: false 124 t.string "move_type", null: false
117 t.string "rs_description", null: false 125 t.string "rs_description", null: false
118 t.string "frlg_description", null: false 126 t.string "frlg_description", null: false
@@ -120,21 +128,21 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
120 t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true 128 t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true
121 end 129 end
122 130
123 create_table "pokeviewer_pokedex_entries", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 131 create_table "pokeviewer_pokedex_entries", force: :cascade do |t|
124 t.bigint "trainer_id" 132 t.integer "trainer_id"
125 t.bigint "species_id" 133 t.integer "species_id"
126 t.boolean "caught", default: false 134 t.boolean "caught", default: false
127 t.datetime "created_at", null: false 135 t.datetime "created_at", precision: nil, null: false
128 t.datetime "updated_at", null: false 136 t.datetime "updated_at", precision: nil, null: false
129 t.index ["species_id"], name: "index_pokeviewer_pokedex_entries_on_species_id" 137 t.index ["species_id"], name: "index_pokeviewer_pokedex_entries_on_species_id"
130 t.index ["trainer_id", "species_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id_and_species_id", unique: true 138 t.index ["trainer_id", "species_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id_and_species_id", unique: true
131 t.index ["trainer_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id" 139 t.index ["trainer_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id"
132 end 140 end
133 141
134 create_table "pokeviewer_pokemon", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 142 create_table "pokeviewer_pokemon", force: :cascade do |t|
135 t.string "uuid", null: false 143 t.string "uuid", limit: 191, null: false
136 t.integer "trainer_id" 144 t.integer "trainer_id"
137 t.string "key" 145 t.string "key", limit: 191
138 t.string "ot_name", null: false 146 t.string "ot_name", null: false
139 t.integer "ot_number", null: false 147 t.integer "ot_number", null: false
140 t.string "met_type", null: false 148 t.string "met_type", null: false
@@ -144,21 +152,22 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
144 t.string "gender", null: false 152 t.string "gender", null: false
145 t.boolean "second_ability", null: false 153 t.boolean "second_ability", null: false
146 t.string "unown_letter", limit: 1 154 t.string "unown_letter", limit: 1
147 t.datetime "created_at", null: false 155 t.datetime "created_at", precision: nil, null: false
148 t.datetime "updated_at", null: false 156 t.datetime "updated_at", precision: nil, null: false
149 t.string "ot_gender", default: "", null: false 157 t.string "ot_gender", default: "", null: false
150 t.integer "box" 158 t.integer "box"
151 t.integer "slot" 159 t.integer "slot"
152 t.integer "location_id" 160 t.integer "location_id"
153 t.string "pokeball", null: false 161 t.string "pokeball", null: false
154 t.bigint "current_id" 162 t.integer "current_id"
155 t.index ["current_id"], name: "index_pokeviewer_pokemon_on_current_id" 163 t.index ["current_id"], name: "index_pokeviewer_pokemon_on_current_id"
156 t.index ["key"], name: "index_pokeviewer_pokemon_on_key", unique: true 164 t.index ["key"], name: "index_pokeviewer_pokemon_on_key", unique: true
165 t.index ["location_id"], name: "index_pokeviewer_pokemon_on_location_id"
157 t.index ["trainer_id"], name: "index_pokeviewer_pokemon_on_trainer_id" 166 t.index ["trainer_id"], name: "index_pokeviewer_pokemon_on_trainer_id"
158 t.index ["uuid"], name: "index_pokeviewer_pokemon_on_uuid", unique: true 167 t.index ["uuid"], name: "index_pokeviewer_pokemon_on_uuid", unique: true
159 end 168 end
160 169
161 create_table "pokeviewer_revisions", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 170 create_table "pokeviewer_revisions", force: :cascade do |t|
162 t.integer "pokemon_id", null: false 171 t.integer "pokemon_id", null: false
163 t.integer "sequential_id", null: false 172 t.integer "sequential_id", null: false
164 t.string "nickname", null: false 173 t.string "nickname", null: false
@@ -176,7 +185,6 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
176 t.integer "smartness", null: false 185 t.integer "smartness", null: false
177 t.integer "toughness", null: false 186 t.integer "toughness", null: false
178 t.integer "sheen", null: false 187 t.integer "sheen", null: false
179 t.integer "item_id"
180 t.integer "move_1_id", null: false 188 t.integer "move_1_id", null: false
181 t.integer "move_2_id" 189 t.integer "move_2_id"
182 t.integer "move_3_id" 190 t.integer "move_3_id"
@@ -185,8 +193,8 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
185 t.integer "move_2_pp_bonuses", default: 0, null: false 193 t.integer "move_2_pp_bonuses", default: 0, null: false
186 t.integer "move_3_pp_bonuses", default: 0, null: false 194 t.integer "move_3_pp_bonuses", default: 0, null: false
187 t.integer "move_4_pp_bonuses", default: 0, null: false 195 t.integer "move_4_pp_bonuses", default: 0, null: false
188 t.datetime "created_at", null: false 196 t.datetime "created_at", precision: nil, null: false
189 t.datetime "updated_at", null: false 197 t.datetime "updated_at", precision: nil, null: false
190 t.integer "cool_ribbons", default: 0, null: false 198 t.integer "cool_ribbons", default: 0, null: false
191 t.integer "beauty_ribbons", default: 0, null: false 199 t.integer "beauty_ribbons", default: 0, null: false
192 t.integer "cute_ribbons", default: 0, null: false 200 t.integer "cute_ribbons", default: 0, null: false
@@ -204,7 +212,9 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
204 t.boolean "national_ribbon", default: false 212 t.boolean "national_ribbon", default: false
205 t.boolean "earth_ribbon", default: false 213 t.boolean "earth_ribbon", default: false
206 t.boolean "world_ribbon", default: false 214 t.boolean "world_ribbon", default: false
207 t.bigint "species_id", null: false 215 t.integer "item_id"
216 t.integer "species_id", null: false
217 t.index ["item_id"], name: "index_pokeviewer_revisions_on_item_id"
208 t.index ["move_1_id"], name: "index_pokeviewer_revisions_on_move_1_id" 218 t.index ["move_1_id"], name: "index_pokeviewer_revisions_on_move_1_id"
209 t.index ["move_2_id"], name: "index_pokeviewer_revisions_on_move_2_id" 219 t.index ["move_2_id"], name: "index_pokeviewer_revisions_on_move_2_id"
210 t.index ["move_3_id"], name: "index_pokeviewer_revisions_on_move_3_id" 220 t.index ["move_3_id"], name: "index_pokeviewer_revisions_on_move_3_id"
@@ -214,23 +224,25 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
214 t.index ["species_id"], name: "index_pokeviewer_revisions_on_species_id" 224 t.index ["species_id"], name: "index_pokeviewer_revisions_on_species_id"
215 end 225 end
216 226
217 create_table "pokeviewer_species", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 227 create_table "pokeviewer_species", force: :cascade do |t|
218 t.string "name", null: false 228 t.string "name", limit: 191, null: false
219 t.datetime "created_at", null: false 229 t.datetime "created_at", precision: nil, null: false
220 t.datetime "updated_at", null: false 230 t.datetime "updated_at", precision: nil, null: false
221 t.string "type_1", null: false 231 t.string "type_1", null: false
222 t.string "type_2" 232 t.string "type_2"
223 t.integer "ability_1_id", null: false 233 t.integer "ability_1_id", null: false
224 t.integer "ability_2_id" 234 t.integer "ability_2_id"
235 t.index ["ability_1_id"], name: "index_pokeviewer_species_on_ability_1_id"
236 t.index ["ability_2_id"], name: "index_pokeviewer_species_on_ability_2_id"
225 t.index ["name"], name: "index_pokeviewer_species_on_name", unique: true 237 t.index ["name"], name: "index_pokeviewer_species_on_name", unique: true
226 end 238 end
227 239
228 create_table "pokeviewer_trainers", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 240 create_table "pokeviewer_trainers", force: :cascade do |t|
229 t.string "game", null: false 241 t.string "game", null: false
230 t.string "name", null: false 242 t.string "name", limit: 191, null: false
231 t.integer "number", null: false 243 t.integer "number", null: false
232 t.datetime "created_at", null: false 244 t.datetime "created_at", precision: nil, null: false
233 t.datetime "updated_at", null: false 245 t.datetime "updated_at", precision: nil, null: false
234 t.integer "marine_ribbon_id" 246 t.integer "marine_ribbon_id"
235 t.integer "land_ribbon_id" 247 t.integer "land_ribbon_id"
236 t.integer "sky_ribbon_id" 248 t.integer "sky_ribbon_id"
@@ -262,31 +274,31 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
262 t.index ["world_ribbon_id"], name: "index_pokeviewer_trainers_on_world_ribbon_id" 274 t.index ["world_ribbon_id"], name: "index_pokeviewer_trainers_on_world_ribbon_id"
263 end 275 end
264 276
265 create_table "records", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 277 create_table "records", force: :cascade do |t|
266 t.text "description" 278 t.text "description"
267 t.string "recordable_type" 279 t.string "recordable_type", limit: 191
268 t.integer "recordable_id" 280 t.integer "recordable_id"
269 t.datetime "created_at", null: false 281 t.datetime "created_at", precision: nil, null: false
270 t.datetime "updated_at", null: false 282 t.datetime "updated_at", precision: nil, null: false
271 t.index ["recordable_type", "recordable_id"], name: "index_records_on_recordable_type_and_recordable_id" 283 t.index ["recordable_type", "recordable_id"], name: "index_records_on_recordable_type_and_recordable_id"
272 end 284 end
273 285
274 create_table "streams", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| 286 create_table "streams", force: :cascade do |t|
275 t.string "title" 287 t.string "title"
276 t.text "body" 288 t.text "body"
277 t.string "slug" 289 t.string "slug"
278 t.datetime "created_at", null: false 290 t.datetime "created_at", precision: nil, null: false
279 t.datetime "updated_at", null: false 291 t.datetime "updated_at", precision: nil, null: false
280 end 292 end
281 293
282 create_table "taggings", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| 294 create_table "taggings", force: :cascade do |t|
283 t.integer "tag_id" 295 t.integer "tag_id"
284 t.string "taggable_type" 296 t.string "taggable_type"
285 t.integer "taggable_id" 297 t.integer "taggable_id"
286 t.string "tagger_type" 298 t.string "tagger_type"
287 t.integer "tagger_id" 299 t.integer "tagger_id"
288 t.string "context", limit: 128 300 t.string "context", limit: 128
289 t.datetime "created_at" 301 t.datetime "created_at", precision: nil
290 t.index ["context"], name: "index_taggings_on_context" 302 t.index ["context"], name: "index_taggings_on_context"
291 t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true 303 t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
292 t.index ["tag_id"], name: "index_taggings_on_tag_id" 304 t.index ["tag_id"], name: "index_taggings_on_tag_id"
@@ -298,44 +310,62 @@ ActiveRecord::Schema.define(version: 2019_03_13_123149) do
298 t.index ["tagger_id"], name: "index_taggings_on_tagger_id" 310 t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
299 end 311 end
300 312
301 create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| 313 create_table "tags", force: :cascade do |t|
302 t.string "name", limit: 255, collation: "utf8_bin" 314 t.string "name"
303 t.integer "taggings_count", default: 0 315 t.integer "taggings_count", default: 0
304 t.index ["name"], name: "index_tags_on_name", unique: true 316 t.index ["name"], name: "index_tags_on_name", unique: true
305 end 317 end
306 318
307 create_table "updates", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci", force: :cascade do |t| 319 create_table "updates", force: :cascade do |t|
308 t.bigint "stream_id" 320 t.integer "stream_id"
309 t.text "body" 321 t.text "body"
310 t.datetime "created_at", null: false 322 t.datetime "created_at", precision: nil, null: false
311 t.datetime "updated_at", null: false 323 t.datetime "updated_at", precision: nil, null: false
312 t.index ["stream_id"], name: "index_updates_on_stream_id" 324 t.index ["stream_id"], name: "index_updates_on_stream_id"
313 end 325 end
314 326
315 create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin", force: :cascade do |t| 327 create_table "users", force: :cascade do |t|
316 t.string "login", default: "", null: false 328 t.string "login", limit: 191, default: "", null: false
317 t.string "email", default: "", null: false 329 t.string "email", limit: 191, default: "", null: false
318 t.string "encrypted_password", default: "", null: false 330 t.string "encrypted_password", default: "", null: false
319 t.string "reset_password_token" 331 t.string "reset_password_token", limit: 191
320 t.datetime "reset_password_sent_at" 332 t.datetime "reset_password_sent_at", precision: nil
321 t.datetime "remember_created_at" 333 t.datetime "remember_created_at", precision: nil
322 t.integer "sign_in_count", default: 0, null: false 334 t.integer "sign_in_count", default: 0, null: false
323 t.datetime "current_sign_in_at" 335 t.datetime "current_sign_in_at", precision: nil
324 t.datetime "last_sign_in_at" 336 t.datetime "last_sign_in_at", precision: nil
325 t.string "current_sign_in_ip" 337 t.string "current_sign_in_ip"
326 t.string "last_sign_in_ip" 338 t.string "last_sign_in_ip"
327 t.datetime "created_at", null: false 339 t.datetime "created_at", precision: nil, null: false
328 t.datetime "updated_at", null: false 340 t.datetime "updated_at", precision: nil, null: false
329 t.string "pokeviewer_token" 341 t.string "pokeviewer_token", limit: 191
330 t.index ["email"], name: "index_users_on_email", unique: true 342 t.index ["email"], name: "index_users_on_email", unique: true
331 t.index ["login"], name: "index_users_on_login", unique: true 343 t.index ["login"], name: "index_users_on_login", unique: true
332 t.index ["pokeviewer_token"], name: "index_users_on_pokeviewer_token", unique: true 344 t.index ["pokeviewer_token"], name: "index_users_on_pokeviewer_token", unique: true
333 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true 345 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
334 end 346 end
335 347
348 add_foreign_key "pokeviewer_items", "pokeviewer_moves", column: "move_id"
336 add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_species", column: "species_id" 349 add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_species", column: "species_id"
337 add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_trainers", column: "trainer_id" 350 add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_trainers", column: "trainer_id"
351 add_foreign_key "pokeviewer_pokemon", "pokeviewer_locations", column: "location_id"
338 add_foreign_key "pokeviewer_pokemon", "pokeviewer_revisions", column: "current_id" 352 add_foreign_key "pokeviewer_pokemon", "pokeviewer_revisions", column: "current_id"
353 add_foreign_key "pokeviewer_pokemon", "pokeviewer_trainers", column: "trainer_id"
354 add_foreign_key "pokeviewer_revisions", "pokeviewer_items", column: "item_id"
355 add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_1_id"
356 add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_2_id"
357 add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_3_id"
358 add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_4_id"
359 add_foreign_key "pokeviewer_revisions", "pokeviewer_pokemon", column: "pokemon_id"
339 add_foreign_key "pokeviewer_revisions", "pokeviewer_species", column: "species_id" 360 add_foreign_key "pokeviewer_revisions", "pokeviewer_species", column: "species_id"
361 add_foreign_key "pokeviewer_species", "pokeviewer_abilities", column: "ability_1_id"
362 add_foreign_key "pokeviewer_species", "pokeviewer_abilities", column: "ability_2_id"
363 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "country_ribbon_id"
364 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "earth_ribbon_id"
365 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "land_ribbon_id"
366 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "marine_ribbon_id"
367 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "national_ribbon_id"
368 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "sky_ribbon_id"
369 add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "world_ribbon_id"
340 add_foreign_key "updates", "streams" 370 add_foreign_key "updates", "streams"
341end 371end
diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock
@@ -0,0 +1,4 @@
1# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2# yarn lockfile v1
3
4