fuck

Changed files
+3857
app
assets
channels
application_cable
controllers
helpers
javascript
jobs
mailers
models
views
bin
config
lib
assets
tasks
log
public
storage
test
tmp
pids
storage
vendor
+37
.dockerignore
··· 1 + # See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. 2 + 3 + # Ignore git directory. 4 + /.git/ 5 + 6 + # Ignore bundler config. 7 + /.bundle 8 + 9 + # Ignore all environment files (except templates). 10 + /.env* 11 + !/.env*.erb 12 + 13 + # Ignore all default key files. 14 + /config/master.key 15 + /config/credentials/*.key 16 + 17 + # Ignore all logfiles and tempfiles. 18 + /log/* 19 + /tmp/* 20 + !/log/.keep 21 + !/tmp/.keep 22 + 23 + # Ignore pidfiles, but keep the directory. 24 + /tmp/pids/* 25 + !/tmp/pids/.keep 26 + 27 + # Ignore storage (uploaded files in development and any SQLite databases). 28 + /storage/* 29 + !/storage/.keep 30 + /tmp/storage/* 31 + !/tmp/storage/.keep 32 + 33 + # Ignore assets. 34 + /node_modules/ 35 + /app/assets/builds/* 36 + !/app/assets/builds/.keep 37 + /public/assets
+9
.gitattributes
··· 1 + # See https://git-scm.com/docs/gitattributes for more about git attribute files. 2 + 3 + # Mark the database schema as having been generated. 4 + db/schema.rb linguist-generated 5 + 6 + # Mark any vendored files as having been vendored. 7 + vendor/* linguist-vendored 8 + config/credentials/*.yml.enc diff=rails_credentials 9 + config/credentials.yml.enc diff=rails_credentials
+40
.gitignore
··· 1 + # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 + # 3 + # If you find yourself ignoring temporary files generated by your text editor 4 + # or operating system, you probably want to add a global ignore instead: 5 + # git config --global core.excludesfile '~/.gitignore_global' 6 + 7 + # Ignore bundler config. 8 + /.bundle 9 + 10 + # Ignore all environment files (except templates). 11 + /.env* 12 + !/.env*.erb 13 + 14 + # Ignore all logfiles and tempfiles. 15 + /log/* 16 + /tmp/* 17 + !/log/.keep 18 + !/tmp/.keep 19 + 20 + # Ignore pidfiles, but keep the directory. 21 + /tmp/pids/* 22 + !/tmp/pids/ 23 + !/tmp/pids/.keep 24 + 25 + # Ignore storage (uploaded files in development and any SQLite databases). 26 + /storage/* 27 + !/storage/.keep 28 + /tmp/storage/* 29 + !/tmp/storage/ 30 + !/tmp/storage/.keep 31 + 32 + /public/assets 33 + 34 + # Ignore master key for decrypting credentials and more. 35 + /config/master.key 36 + 37 + /db/* 38 + 39 + nohup.out 40 + start
+1
.ruby-version
··· 1 + ruby-3.0.2
+62
Dockerfile
··· 1 + # syntax = docker/dockerfile:1 2 + 3 + # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile 4 + ARG RUBY_VERSION=3.0.2 5 + FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base 6 + 7 + # Rails app lives here 8 + WORKDIR /rails 9 + 10 + # Set production environment 11 + ENV RAILS_ENV="production" \ 12 + BUNDLE_DEPLOYMENT="1" \ 13 + BUNDLE_PATH="/usr/local/bundle" \ 14 + BUNDLE_WITHOUT="development" 15 + 16 + 17 + # Throw-away build stage to reduce size of final image 18 + FROM base as build 19 + 20 + # Install packages needed to build gems 21 + RUN apt-get update -qq && \ 22 + apt-get install --no-install-recommends -y build-essential git libvips pkg-config 23 + 24 + # Install application gems 25 + COPY Gemfile Gemfile.lock ./ 26 + RUN bundle install && \ 27 + rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ 28 + bundle exec bootsnap precompile --gemfile 29 + 30 + # Copy application code 31 + COPY . . 32 + 33 + # Precompile bootsnap code for faster boot times 34 + RUN bundle exec bootsnap precompile app/ lib/ 35 + 36 + # Precompiling assets for production without requiring secret RAILS_MASTER_KEY 37 + RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile 38 + 39 + 40 + # Final stage for app image 41 + FROM base 42 + 43 + # Install packages needed for deployment 44 + RUN apt-get update -qq && \ 45 + apt-get install --no-install-recommends -y curl libsqlite3-0 libvips && \ 46 + rm -rf /var/lib/apt/lists /var/cache/apt/archives 47 + 48 + # Copy built artifacts: gems, application 49 + COPY --from=build /usr/local/bundle /usr/local/bundle 50 + COPY --from=build /rails /rails 51 + 52 + # Run and own only the runtime files as a non-root user for security 53 + RUN useradd rails --create-home --shell /bin/bash && \ 54 + chown -R rails:rails db log storage tmp 55 + USER rails:rails 56 + 57 + # Entrypoint prepares the database. 58 + ENTRYPOINT ["/rails/bin/docker-entrypoint"] 59 + 60 + # Start the server by default, this can be overwritten at runtime 61 + EXPOSE 3000 62 + CMD ["./bin/rails", "server"]
+73
Gemfile
··· 1 + source "https://rubygems.org" 2 + 3 + ruby "3.0.2" 4 + 5 + # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" 6 + gem "rails", "~> 7.1.3", ">= 7.1.3.2" 7 + 8 + # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] 9 + gem "sprockets-rails" 10 + 11 + # Use sqlite3 as the database for Active Record 12 + gem "sqlite3", "~> 1.4" 13 + 14 + # Use the Puma web server [https://github.com/puma/puma] 15 + gem "puma", ">= 5.0" 16 + 17 + # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] 18 + gem "importmap-rails" 19 + 20 + # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] 21 + gem "turbo-rails" 22 + 23 + # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] 24 + gem "stimulus-rails" 25 + 26 + # Build JSON APIs with ease [https://github.com/rails/jbuilder] 27 + gem "jbuilder" 28 + 29 + # Use Redis adapter to run Action Cable in production 30 + # gem "redis", ">= 4.0.1" 31 + 32 + # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] 33 + # gem "kredis" 34 + 35 + # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] 36 + # gem "bcrypt", "~> 3.1.7" 37 + 38 + # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 39 + gem "tzinfo-data", platforms: %i[ mswin mswin64 mingw x64_mingw jruby ] 40 + 41 + # Reduces boot times through caching; required in config/boot.rb 42 + gem "bootsnap", require: false 43 + 44 + # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] 45 + # gem "image_processing", "~> 1.2" 46 + 47 + gem "paperclip", "~> 5.1.0" 48 + 49 + gem "devise" 50 + 51 + gem "pry" 52 + 53 + group :development, :test do 54 + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem 55 + gem "debug", platforms: %i[ mri mswin mswin64 mingw x64_mingw ] 56 + end 57 + 58 + group :development do 59 + # Use console on exceptions pages [https://github.com/rails/web-console] 60 + gem "web-console" 61 + 62 + # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] 63 + # gem "rack-mini-profiler" 64 + 65 + # Speed up commands on slow machines / big apps [https://github.com/rails/spring] 66 + # gem "spring" 67 + end 68 + 69 + group :test do 70 + # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] 71 + gem "capybara" 72 + gem "selenium-webdriver" 73 + end
+293
Gemfile.lock
··· 1 + GEM 2 + remote: https://rubygems.org/ 3 + specs: 4 + actioncable (7.1.3.2) 5 + actionpack (= 7.1.3.2) 6 + activesupport (= 7.1.3.2) 7 + nio4r (~> 2.0) 8 + websocket-driver (>= 0.6.1) 9 + zeitwerk (~> 2.6) 10 + actionmailbox (7.1.3.2) 11 + actionpack (= 7.1.3.2) 12 + activejob (= 7.1.3.2) 13 + activerecord (= 7.1.3.2) 14 + activestorage (= 7.1.3.2) 15 + activesupport (= 7.1.3.2) 16 + mail (>= 2.7.1) 17 + net-imap 18 + net-pop 19 + net-smtp 20 + actionmailer (7.1.3.2) 21 + actionpack (= 7.1.3.2) 22 + actionview (= 7.1.3.2) 23 + activejob (= 7.1.3.2) 24 + activesupport (= 7.1.3.2) 25 + mail (~> 2.5, >= 2.5.4) 26 + net-imap 27 + net-pop 28 + net-smtp 29 + rails-dom-testing (~> 2.2) 30 + actionpack (7.1.3.2) 31 + actionview (= 7.1.3.2) 32 + activesupport (= 7.1.3.2) 33 + nokogiri (>= 1.8.5) 34 + racc 35 + rack (>= 2.2.4) 36 + rack-session (>= 1.0.1) 37 + rack-test (>= 0.6.3) 38 + rails-dom-testing (~> 2.2) 39 + rails-html-sanitizer (~> 1.6) 40 + actiontext (7.1.3.2) 41 + actionpack (= 7.1.3.2) 42 + activerecord (= 7.1.3.2) 43 + activestorage (= 7.1.3.2) 44 + activesupport (= 7.1.3.2) 45 + globalid (>= 0.6.0) 46 + nokogiri (>= 1.8.5) 47 + actionview (7.1.3.2) 48 + activesupport (= 7.1.3.2) 49 + builder (~> 3.1) 50 + erubi (~> 1.11) 51 + rails-dom-testing (~> 2.2) 52 + rails-html-sanitizer (~> 1.6) 53 + activejob (7.1.3.2) 54 + activesupport (= 7.1.3.2) 55 + globalid (>= 0.3.6) 56 + activemodel (7.1.3.2) 57 + activesupport (= 7.1.3.2) 58 + activerecord (7.1.3.2) 59 + activemodel (= 7.1.3.2) 60 + activesupport (= 7.1.3.2) 61 + timeout (>= 0.4.0) 62 + activestorage (7.1.3.2) 63 + actionpack (= 7.1.3.2) 64 + activejob (= 7.1.3.2) 65 + activerecord (= 7.1.3.2) 66 + activesupport (= 7.1.3.2) 67 + marcel (~> 1.0) 68 + activesupport (7.1.3.2) 69 + base64 70 + bigdecimal 71 + concurrent-ruby (~> 1.0, >= 1.0.2) 72 + connection_pool (>= 2.2.5) 73 + drb 74 + i18n (>= 1.6, < 2) 75 + minitest (>= 5.1) 76 + mutex_m 77 + tzinfo (~> 2.0) 78 + addressable (2.8.6) 79 + public_suffix (>= 2.0.2, < 6.0) 80 + base64 (0.2.0) 81 + bcrypt (3.1.20) 82 + bigdecimal (3.1.7) 83 + bindex (0.8.1) 84 + bootsnap (1.18.3) 85 + msgpack (~> 1.2) 86 + builder (3.2.4) 87 + capybara (3.40.0) 88 + addressable 89 + matrix 90 + mini_mime (>= 0.1.3) 91 + nokogiri (~> 1.11) 92 + rack (>= 1.6.0) 93 + rack-test (>= 0.6.3) 94 + regexp_parser (>= 1.5, < 3.0) 95 + xpath (~> 3.2) 96 + climate_control (0.2.0) 97 + cocaine (0.5.8) 98 + climate_control (>= 0.0.3, < 1.0) 99 + coderay (1.1.3) 100 + concurrent-ruby (1.2.3) 101 + connection_pool (2.4.1) 102 + crass (1.0.6) 103 + date (3.3.4) 104 + debug (1.9.2) 105 + irb (~> 1.10) 106 + reline (>= 0.3.8) 107 + devise (4.9.4) 108 + bcrypt (~> 3.0) 109 + orm_adapter (~> 0.1) 110 + railties (>= 4.1.0) 111 + responders 112 + warden (~> 1.2.3) 113 + drb (2.2.1) 114 + erubi (1.12.0) 115 + globalid (1.2.1) 116 + activesupport (>= 6.1) 117 + i18n (1.14.4) 118 + concurrent-ruby (~> 1.0) 119 + importmap-rails (2.0.1) 120 + actionpack (>= 6.0.0) 121 + activesupport (>= 6.0.0) 122 + railties (>= 6.0.0) 123 + io-console (0.7.2) 124 + irb (1.12.0) 125 + rdoc 126 + reline (>= 0.4.2) 127 + jbuilder (2.11.5) 128 + actionview (>= 5.0.0) 129 + activesupport (>= 5.0.0) 130 + loofah (2.22.0) 131 + crass (~> 1.0.2) 132 + nokogiri (>= 1.12.0) 133 + mail (2.8.1) 134 + mini_mime (>= 0.1.1) 135 + net-imap 136 + net-pop 137 + net-smtp 138 + marcel (1.0.4) 139 + matrix (0.4.2) 140 + method_source (1.1.0) 141 + mime-types (3.5.2) 142 + mime-types-data (~> 3.2015) 143 + mime-types-data (3.2024.0305) 144 + mimemagic (0.3.10) 145 + nokogiri (~> 1) 146 + rake 147 + mini_mime (1.1.5) 148 + minitest (5.22.3) 149 + msgpack (1.7.2) 150 + mutex_m (0.2.0) 151 + net-imap (0.4.10) 152 + date 153 + net-protocol 154 + net-pop (0.1.2) 155 + net-protocol 156 + net-protocol (0.2.2) 157 + timeout 158 + net-smtp (0.5.0) 159 + net-protocol 160 + nio4r (2.7.1) 161 + nokogiri (1.16.4-x86_64-linux) 162 + racc (~> 1.4) 163 + orm_adapter (0.5.0) 164 + paperclip (5.1.0) 165 + activemodel (>= 4.2.0) 166 + activesupport (>= 4.2.0) 167 + cocaine (~> 0.5.5) 168 + mime-types 169 + mimemagic (~> 0.3.0) 170 + pry (0.14.2) 171 + coderay (~> 1.1) 172 + method_source (~> 1.0) 173 + psych (5.1.2) 174 + stringio 175 + public_suffix (5.0.5) 176 + puma (6.4.2) 177 + nio4r (~> 2.0) 178 + racc (1.7.3) 179 + rack (3.0.10) 180 + rack-session (2.0.0) 181 + rack (>= 3.0.0) 182 + rack-test (2.1.0) 183 + rack (>= 1.3) 184 + rackup (2.1.0) 185 + rack (>= 3) 186 + webrick (~> 1.8) 187 + rails (7.1.3.2) 188 + actioncable (= 7.1.3.2) 189 + actionmailbox (= 7.1.3.2) 190 + actionmailer (= 7.1.3.2) 191 + actionpack (= 7.1.3.2) 192 + actiontext (= 7.1.3.2) 193 + actionview (= 7.1.3.2) 194 + activejob (= 7.1.3.2) 195 + activemodel (= 7.1.3.2) 196 + activerecord (= 7.1.3.2) 197 + activestorage (= 7.1.3.2) 198 + activesupport (= 7.1.3.2) 199 + bundler (>= 1.15.0) 200 + railties (= 7.1.3.2) 201 + rails-dom-testing (2.2.0) 202 + activesupport (>= 5.0.0) 203 + minitest 204 + nokogiri (>= 1.6) 205 + rails-html-sanitizer (1.6.0) 206 + loofah (~> 2.21) 207 + nokogiri (~> 1.14) 208 + railties (7.1.3.2) 209 + actionpack (= 7.1.3.2) 210 + activesupport (= 7.1.3.2) 211 + irb 212 + rackup (>= 1.0.0) 213 + rake (>= 12.2) 214 + thor (~> 1.0, >= 1.2.2) 215 + zeitwerk (~> 2.6) 216 + rake (13.2.1) 217 + rdoc (6.6.3.1) 218 + psych (>= 4.0.0) 219 + regexp_parser (2.9.0) 220 + reline (0.5.2) 221 + io-console (~> 0.5) 222 + responders (3.1.1) 223 + actionpack (>= 5.2) 224 + railties (>= 5.2) 225 + rexml (3.2.6) 226 + rubyzip (2.3.2) 227 + selenium-webdriver (4.19.0) 228 + base64 (~> 0.2) 229 + rexml (~> 3.2, >= 3.2.5) 230 + rubyzip (>= 1.2.2, < 3.0) 231 + websocket (~> 1.0) 232 + sprockets (4.2.1) 233 + concurrent-ruby (~> 1.0) 234 + rack (>= 2.2.4, < 4) 235 + sprockets-rails (3.4.2) 236 + actionpack (>= 5.2) 237 + activesupport (>= 5.2) 238 + sprockets (>= 3.0.0) 239 + sqlite3 (1.7.3-x86_64-linux) 240 + stimulus-rails (1.3.3) 241 + railties (>= 6.0.0) 242 + stringio (3.1.0) 243 + thor (1.3.1) 244 + timeout (0.4.1) 245 + turbo-rails (2.0.5) 246 + actionpack (>= 6.0.0) 247 + activejob (>= 6.0.0) 248 + railties (>= 6.0.0) 249 + tzinfo (2.0.6) 250 + concurrent-ruby (~> 1.0) 251 + warden (1.2.9) 252 + rack (>= 2.0.9) 253 + web-console (4.2.1) 254 + actionview (>= 6.0.0) 255 + activemodel (>= 6.0.0) 256 + bindex (>= 0.4.0) 257 + railties (>= 6.0.0) 258 + webrick (1.8.1) 259 + websocket (1.2.10) 260 + websocket-driver (0.7.6) 261 + websocket-extensions (>= 0.1.0) 262 + websocket-extensions (0.1.5) 263 + xpath (3.2.0) 264 + nokogiri (~> 1.8) 265 + zeitwerk (2.6.13) 266 + 267 + PLATFORMS 268 + x86_64-linux 269 + 270 + DEPENDENCIES 271 + bootsnap 272 + capybara 273 + debug 274 + devise 275 + importmap-rails 276 + jbuilder 277 + paperclip (~> 5.1.0) 278 + pry 279 + puma (>= 5.0) 280 + rails (~> 7.1.3, >= 7.1.3.2) 281 + selenium-webdriver 282 + sprockets-rails 283 + sqlite3 (~> 1.4) 284 + stimulus-rails 285 + turbo-rails 286 + tzinfo-data 287 + web-console 288 + 289 + RUBY VERSION 290 + ruby 3.0.2p107 291 + 292 + BUNDLED WITH 293 + 2.2.22
+1
README.md
··· 23 23 24 24 * ... 25 25 hi this is my new git repo for my blog bubblegum. i wrote this based on the rails first app guide and then i added stuff. it's a fucking mess i know 26 + hi this is my new git repo for my blog bubblegum. i wrote this based on the rails first app guide and then i added stuff. it's a fucking mess i know
+6
Rakefile
··· 1 + # Add your own tasks in files placed in lib/tasks ending in .rake, 2 + # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 + 4 + require_relative "config/application" 5 + 6 + Rails.application.load_tasks
+2
app/assets/config/manifest.js
··· 1 + //= link_tree ../images 2 + //= link_directory ../stylesheets .css
app/assets/fonts/Raleway-Italic-VariableFont_wght.ttf

This is a binary file and will not be displayed.

app/assets/fonts/Raleway-VariableFont_wght.ttf

This is a binary file and will not be displayed.

app/assets/images/.keep

This is a binary file and will not be displayed.

app/assets/images/bg.jpg

This is a binary file and will not be displayed.

app/assets/images/bg3.jpg

This is a binary file and will not be displayed.

app/assets/images/bg4.jpg

This is a binary file and will not be displayed.

app/assets/images/bg5.jpg

This is a binary file and will not be displayed.

+161
app/assets/stylesheets/application.css
··· 1 + /* 2 + * This is a manifest file that'll be compiled into application.css, which will include all the files 3 + * listed below. 4 + * 5 + * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's 6 + * vendor/assets/stylesheets directory can be referenced here using a relative path. 7 + * 8 + * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 + * compiled file so the styles you add here take precedence over styles defined in any other CSS 10 + * files in this directory. Styles in this file should be added after the last require_* statement. 11 + * It is generally better to create a new file per style scope. 12 + * 13 + *= require_tree . 14 + *= require_self 15 + */ 16 + 17 + @font-face { 18 + font-family: 'Raleway'; 19 + font-weight: 400; 20 + src: url('Raleway-VariableFont_wght.ttf'); 21 + } 22 + 23 + body { 24 + background: url('bg5.jpg') repeat; 25 + font: 1em 'Raleway', 'courier new'; 26 + } 27 + 28 + .main { 29 + background: #e8effc; 30 + width: 800px; 31 + min-height: 800px; 32 + max-height: 10000px; 33 + margin: auto auto 1em auto; 34 + padding: 1em; 35 + text-align:left; 36 + color: #0d141a; 37 + } 38 + 39 + h1,h2,h3,h4,h5, strong { 40 + color: #4f6599; 41 + } 42 + 43 + a:link, a:link:active, a:visited, a:visited:active { 44 + color: #509145; 45 + } 46 + 47 + a:hover { 48 + text-decoration: none; 49 + } 50 + 51 + ::selection { 52 + background: #4f6599; 53 + color: #e8effc; 54 + } 55 + 56 + ul { 57 + padding: 0; 58 + margin-top: .5em; 59 + } 60 + 61 + li { 62 + list-style-type: none; 63 + margin-bottom: .5em; 64 + } 65 + 66 + li:before { 67 + content: "○"; 68 + margin: 0 10px 0 0; 69 + } 70 + 71 + .icon { 72 + /* text-align:center; */ 73 + } 74 + 75 + p.profile_list { 76 + color: #4f6599; 77 + text-align:center; 78 + } 79 + 80 + ul.profile_list { 81 + color: #4f6599; 82 + } 83 + 84 + .profile_list li::before { 85 + margin: 0 10px 0 0; 86 + } 87 + 88 + .useroptions { 89 + float: right; 90 + } 91 + 92 + .test2 { 93 + padding-left: 1em; 94 + display: flex; 95 + flex-direction: row; 96 + align-items: baseline; 97 + } 98 + 99 + hr { 100 + border-top: 1px solid #4f6599; 101 + border-bottom: none; 102 + margin: 1.5em 0 1.5em 0; 103 + } 104 + 105 + hr::after { 106 + content: '🐬'; 107 + display: inline-block; 108 + position: absolute; 109 + left: 50%; 110 + background: #e8effc; 111 + padding: 1rem; 112 + transform: translate(-50%, -50%); 113 + transform-origin: 50% 50%; 114 + } 115 + 116 + .pfp { 117 + float:left; 118 + } 119 + 120 + .footer { 121 + display: flex; 122 + flex-wrap: wrap; 123 + } 124 + 125 + .footer ul { 126 + list-style: none; 127 + display: flex; 128 + flex-wrap: wrap; 129 + gap: 5px; 130 + margin-top: 0; 131 + } 132 + 133 + .footer li::before { 134 + margin: 0 10px 0 0; 135 + } 136 + 137 + .profile { 138 + margin: 1em 0 1em 0; 139 + } 140 + 141 + .article_date { 142 + color: #4f6599; 143 + text-transform: lowercase; 144 + } 145 + 146 + .pbody p { 147 + font-family: 'Raleway', 'Times New Roman'; 148 + } 149 + 150 + .pbody li { 151 + font-family: 'Raleway', 'Times New Roman'; 152 + } 153 + 154 + .pbody code { 155 + color: #509145; 156 + padding-left: 2em; 157 + display: block; 158 + text-align: left; 159 + border-left: 1px solid #4f6599; 160 + margin-top: 1em; 161 + }
+4
app/channels/application_cable/channel.rb
··· 1 + module ApplicationCable 2 + class Channel < ActionCable::Channel::Base 3 + end 4 + end
+4
app/channels/application_cable/connection.rb
··· 1 + module ApplicationCable 2 + class Connection < ActionCable::Connection::Base 3 + end 4 + end
+10
app/controllers/application_controller.rb
··· 1 + class ApplicationController < ActionController::Base 2 + include IconHelper 3 + 4 + before_action :configure_permitted_parameters, if: :devise_controller? 5 + protected 6 + def configure_permitted_parameters 7 + devise_parameter_sanitizer.permit(:sign_up) { |u| u.permit(:email, :password, :icon)} 8 + devise_parameter_sanitizer.permit(:account_update) { |u| u.permit(:icon, :email, :password, :current_password)} 9 + end 10 + end
+62
app/controllers/articles_controller.rb
··· 1 + class ArticlesController < ApplicationController 2 + before_action :authenticate_user!, :except => [:show, :index] 3 + 4 + def index 5 + @article = Article.all 6 + @profiles = Profile.all 7 + respond_to do |format| 8 + format.html 9 + format.rss { render :layout => false } 10 + end 11 + 12 + if params[:tag] 13 + @article = Article.tagged_with(params[:tag]) 14 + else 15 + @article = Article.all 16 + end 17 + end 18 + 19 + def show 20 + @article = Article.find(params[:id]) 21 + end 22 + 23 + def new 24 + @article = Article.new 25 + end 26 + 27 + def create 28 + @article = Article.new(article_params) 29 + 30 + if @article.save 31 + redirect_to @article 32 + else 33 + render :new, status: :unprocessable_entity 34 + end 35 + end 36 + 37 + def edit 38 + @article = Article.find(params[:id]) 39 + end 40 + 41 + def update 42 + @article = Article.find(params[:id]) 43 + 44 + if @article.update(article_params) 45 + redirect_to @article 46 + else 47 + render :edit, status: :unprocessable_entity 48 + end 49 + end 50 + 51 + def destroy 52 + @article = Article.find(params[:id]) 53 + @article.destroy 54 + 55 + redirect_to root_path, status: :see_other 56 + end 57 + 58 + private 59 + def article_params 60 + params.require(:article).permit(:title, :body, :status, :icon, :all_tags) 61 + end 62 + end
+19
app/controllers/comments_controller.rb
··· 1 + class CommentsController < ApplicationController 2 + def create 3 + @article = Article.find(params[:article_id]) 4 + @comment = @article.comments.create(comment_params) 5 + redirect_to article_path(@article) 6 + end 7 + 8 + def destroy 9 + @article = Article.find(params[:article_id]) 10 + @comment = @article.comments.find(params[:id]) 11 + @comment.destroy 12 + redirect_to article_path(@article), status: :see_other 13 + end 14 + 15 + private 16 + def comment_params 17 + params.require(:comment).permit(:commenter, :body, :status) 18 + end 19 + end
app/controllers/concerns/.keep

This is a binary file and will not be displayed.

+70
app/controllers/galleries_controller.rb
··· 1 + class GalleriesController < ApplicationController 2 + before_action :set_gallery, only: %i[ show edit update destroy ] 3 + 4 + # GET /galleries or /galleries.json 5 + def index 6 + @galleries = Gallery.all 7 + end 8 + 9 + # GET /galleries/1 or /galleries/1.json 10 + def show 11 + end 12 + 13 + # GET /galleries/new 14 + def new 15 + @gallery = Gallery.new 16 + end 17 + 18 + # GET /galleries/1/edit 19 + def edit 20 + end 21 + 22 + # POST /galleries or /galleries.json 23 + def create 24 + @gallery = Gallery.new(gallery_params) 25 + 26 + respond_to do |format| 27 + if @gallery.save 28 + format.html { redirect_to gallery_url(@gallery), notice: "Gallery was successfully created." } 29 + format.json { render :show, status: :created, location: @gallery } 30 + else 31 + format.html { render :new, status: :unprocessable_entity } 32 + format.json { render json: @gallery.errors, status: :unprocessable_entity } 33 + end 34 + end 35 + end 36 + 37 + # PATCH/PUT /galleries/1 or /galleries/1.json 38 + def update 39 + respond_to do |format| 40 + if @gallery.update(gallery_params) 41 + format.html { redirect_to gallery_url(@gallery), notice: "Gallery was successfully updated." } 42 + format.json { render :show, status: :ok, location: @gallery } 43 + else 44 + format.html { render :edit, status: :unprocessable_entity } 45 + format.json { render json: @gallery.errors, status: :unprocessable_entity } 46 + end 47 + end 48 + end 49 + 50 + # DELETE /galleries/1 or /galleries/1.json 51 + def destroy 52 + @gallery.destroy! 53 + 54 + respond_to do |format| 55 + format.html { redirect_to galleries_url, notice: "Gallery was successfully destroyed." } 56 + format.json { head :no_content } 57 + end 58 + end 59 + 60 + private 61 + # Use callbacks to share common setup or constraints between actions. 62 + def set_gallery 63 + @gallery = Gallery.find(params[:id]) 64 + end 65 + 66 + # Only allow a list of trusted parameters through. 67 + def gallery_params 68 + params.require(:gallery).permit(:name, :description, :user_id) 69 + end 70 + end
+52
app/controllers/profiles_controller.rb
··· 1 + class ProfilesController < ApplicationController 2 + before_action :authenticate_user!, :except => [:show] 3 + before_action :set_profile, only: [:show, :edit, :update] 4 + 5 + def index 6 + @profile = Profile.all 7 + end 8 + 9 + def new 10 + @profile = current_user.build_profile 11 + end 12 + 13 + def create 14 + @profile = current_user.build_profile(profile_params) 15 + if @profile.save 16 + flash[:success] = "profile saved" 17 + redirect_to root_path 18 + else 19 + flash[:error] = "Error" 20 + render :new 21 + end 22 + end 23 + 24 + def edit 25 + end 26 + 27 + def update 28 + if @profile.update(profile_params) 29 + redirect_to @profile, notice: 'profile was successfully updated!' 30 + else 31 + render :edit 32 + end 33 + end 34 + 35 + def after_sign_in_path_for(resource) 36 + redirect_to edit_user_profile_path 37 + end 38 + 39 + def show 40 + @profile = Profile.find(params[:id]) 41 + end 42 + 43 + private 44 + 45 + def set_profile 46 + @profile = Profile.find(params[:id]) 47 + end 48 + 49 + def profile_params 50 + params.require(:profile).permit(:bio, :age, :pronouns, :name, :icon) 51 + end 52 + end
+25
app/controllers/tags_controller.rb
··· 1 + class TagsController < ApplicationController 2 + def index 3 + @tags = Tag.all 4 + end 5 + 6 + def create 7 + @tags = Tag.new(tag_params) 8 + 9 + if @tags.save 10 + redirect_to @tags 11 + else 12 + render :new, status: :unprocessable_entity 13 + end 14 + end 15 + 16 + def show 17 + @tags = Tag.find(params[:id]) 18 + end 19 + 20 + private 21 + def tag_params 22 + params.require(:tags).permit(:name) 23 + end 24 + 25 + end
+5
app/controllers/user_controller.rb
··· 1 + class UserController < ApplicationController 2 + def index 3 + @users = User.all 4 + end 5 + end
+30
app/controllers/users/confirmations_controller.rb
··· 1 + # frozen_string_literal: true 2 + 3 + class Users::ConfirmationsController < Devise::ConfirmationsController 4 + # GET /resource/confirmation/new 5 + # def new 6 + # super 7 + # end 8 + 9 + # POST /resource/confirmation 10 + # def create 11 + # super 12 + # end 13 + 14 + # GET /resource/confirmation?confirmation_token=abcdef 15 + # def show 16 + # super 17 + # end 18 + 19 + # protected 20 + 21 + # The path used after resending confirmation instructions. 22 + # def after_resending_confirmation_instructions_path_for(resource_name) 23 + # super(resource_name) 24 + # end 25 + 26 + # The path used after confirmation. 27 + # def after_confirmation_path_for(resource_name, resource) 28 + # super(resource_name, resource) 29 + # end 30 + end
+30
app/controllers/users/omniauth_callbacks_controller.rb
··· 1 + # frozen_string_literal: true 2 + 3 + class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController 4 + # You should configure your model like this: 5 + # devise :omniauthable, omniauth_providers: [:twitter] 6 + 7 + # You should also create an action method in this controller like this: 8 + # def twitter 9 + # end 10 + 11 + # More info at: 12 + # https://github.com/heartcombo/devise#omniauth 13 + 14 + # GET|POST /resource/auth/twitter 15 + # def passthru 16 + # super 17 + # end 18 + 19 + # GET|POST /users/auth/twitter/callback 20 + # def failure 21 + # super 22 + # end 23 + 24 + # protected 25 + 26 + # The path used when OmniAuth fails 27 + # def after_omniauth_failure_path_for(scope) 28 + # super(scope) 29 + # end 30 + end
+34
app/controllers/users/passwords_controller.rb
··· 1 + # frozen_string_literal: true 2 + 3 + class Users::PasswordsController < Devise::PasswordsController 4 + # GET /resource/password/new 5 + # def new 6 + # super 7 + # end 8 + 9 + # POST /resource/password 10 + # def create 11 + # super 12 + # end 13 + 14 + # GET /resource/password/edit?reset_password_token=abcdef 15 + # def edit 16 + # super 17 + # end 18 + 19 + # PUT /resource/password 20 + # def update 21 + # super 22 + # end 23 + 24 + # protected 25 + 26 + # def after_resetting_password_path_for(resource) 27 + # super(resource) 28 + # end 29 + 30 + # The path used after sending reset password instructions 31 + # def after_sending_reset_password_instructions_path_for(resource_name) 32 + # super(resource_name) 33 + # end 34 + end
+69
app/controllers/users/registrations_controller.rb
··· 1 + # frozen_string_literal: true 2 + 3 + class Users::RegistrationsController < Devise::RegistrationsController 4 + # before_action :configure_sign_up_params, only: [:create] 5 + # before_action :configure_account_update_params, only: [:update] 6 + 7 + # GET /resource/sign_up 8 + # def new 9 + # super 10 + # end 11 + 12 + # POST /resource 13 + # def create 14 + # super 15 + # end 16 + 17 + # GET /resource/edit 18 + # def edit 19 + # super 20 + # end 21 + 22 + # PUT /resource 23 + # def update 24 + # super 25 + # end 26 + 27 + # DELETE /resource 28 + # def destroy 29 + # super 30 + # end 31 + 32 + # GET /resource/cancel 33 + # Forces the session data which is usually expired after sign 34 + # in to be expired now. This is useful if the user wants to 35 + # cancel oauth signing in/up in the middle of the process, 36 + # removing all OAuth session data. 37 + # def cancel 38 + # super 39 + # end 40 + 41 + # protected 42 + 43 + # If you have extra params to permit, append them to the sanitizer. 44 + # def configure_sign_up_params 45 + # devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute]) 46 + # end 47 + 48 + # If you have extra params to permit, append them to the sanitizer. 49 + # def configure_account_update_params 50 + # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute]) 51 + # end 52 + 53 + # The path used after sign up. 54 + # def after_sign_up_path_for(resource) 55 + # super(resource) 56 + # end 57 + 58 + # The path used after sign up for inactive accounts. 59 + # def after_inactive_sign_up_path_for(resource) 60 + # super(resource) 61 + # end 62 + 63 + before_action :configure_account_update_params, only: [:update] 64 + 65 + def configure_account_update_params 66 + devise_parameter_sanitizer.permit(:account_update, keys: %i[name icon]) 67 + end 68 + 69 + end
+27
app/controllers/users/sessions_controller.rb
··· 1 + # frozen_string_literal: true 2 + 3 + class Users::SessionsController < Devise::SessionsController 4 + # before_action :configure_sign_in_params, only: [:create] 5 + 6 + # GET /resource/sign_in 7 + # def new 8 + # super 9 + # end 10 + 11 + # POST /resource/sign_in 12 + # def create 13 + # super 14 + # end 15 + 16 + # DELETE /resource/sign_out 17 + # def destroy 18 + # super 19 + # end 20 + 21 + # protected 22 + 23 + # If you have extra params to permit, append them to the sanitizer. 24 + # def configure_sign_in_params 25 + # devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute]) 26 + # end 27 + end
+30
app/controllers/users/unlocks_controller.rb
··· 1 + # frozen_string_literal: true 2 + 3 + class Users::UnlocksController < Devise::UnlocksController 4 + # GET /resource/unlock/new 5 + # def new 6 + # super 7 + # end 8 + 9 + # POST /resource/unlock 10 + # def create 11 + # super 12 + # end 13 + 14 + # GET /resource/unlock?unlock_token=abcdef 15 + # def show 16 + # super 17 + # end 18 + 19 + # protected 20 + 21 + # The path used after sending unlock password instructions 22 + # def after_sending_unlock_instructions_path_for(resource) 23 + # super(resource) 24 + # end 25 + 26 + # The path used after unlocking the resource 27 + # def after_unlock_path_for(resource) 28 + # super(resource) 29 + # end 30 + end
+7
app/controllers/users_controller.rb
··· 1 + class UsersController < ApplicationController 2 + 3 + def show 4 + @user = User.find(params[:id]) 5 + end 6 + 7 + end
+2
app/helpers/application_helper.rb
··· 1 + module ApplicationHelper 2 + end
+8
app/helpers/articles_helper.rb
··· 1 + module ArticlesHelper 2 + 3 + def tag_links(tags) 4 + tags.split(",").map{|tag| link_to tag.strip, tag_path(tag.strip) }.join(", ") 5 + end 6 + 7 + 8 + end
+2
app/helpers/comments_helper.rb
··· 1 + module CommentsHelper 2 + end
+2
app/helpers/galleries_helper.rb
··· 1 + module GalleriesHelper 2 + end
+6
app/helpers/icon_helper.rb
··· 1 + module IconHelper 2 + 3 + def icon_for 4 + render "shared/icons" 5 + end 6 + end
+2
app/helpers/profiles_helper.rb
··· 1 + module ProfilesHelper 2 + end
+2
app/helpers/tags_helper.rb
··· 1 + module TagsHelper 2 + end
+2
app/helpers/user_helper.rb
··· 1 + module UserHelper 2 + end
+6
app/javascript/channels/consumer.js
··· 1 + // Action Cable provides the framework to deal with WebSockets in Rails. 2 + // You can generate new channels where WebSocket features live using the `bin/rails generate channel` command. 3 + 4 + import { createConsumer } from "@rails/actioncable" 5 + 6 + export default createConsumer()
+5
app/javascript/channels/index.js
··· 1 + // Load all the channels within this directory and all subdirectories. 2 + // Channel files must be named *_channel.js. 3 + 4 + const channels = require.context('.', true, /_channel\.js$/) 5 + channels.keys().forEach(channels)
+13
app/javascript/packs/application.js
··· 1 + // This file is automatically compiled by Webpack, along with any other files 2 + // present in this directory. You're encouraged to place your actual application logic in 3 + // a relevant structure within app/javascript and only use these pack files to reference 4 + // that code so it'll be compiled. 5 + 6 + import Rails from "@rails/ujs" 7 + import Turbolinks from "turbolinks" 8 + import * as ActiveStorage from "@rails/activestorage" 9 + import "channels" 10 + 11 + Rails.start() 12 + Turbolinks.start() 13 + ActiveStorage.start()
+7
app/jobs/application_job.rb
··· 1 + class ApplicationJob < ActiveJob::Base 2 + # Automatically retry jobs that encountered a deadlock 3 + # retry_on ActiveRecord::Deadlocked 4 + 5 + # Most jobs are safe to ignore if the underlying records are no longer available 6 + # discard_on ActiveJob::DeserializationError 7 + end
+4
app/mailers/application_mailer.rb
··· 1 + class ApplicationMailer < ActionMailer::Base 2 + default from: "from@example.com" 3 + layout "mailer" 4 + end
+3
app/models/application_record.rb
··· 1 + class ApplicationRecord < ActiveRecord::Base 2 + primary_abstract_class 3 + end
+46
app/models/article.rb
··· 1 + class Article < ApplicationRecord 2 + has_many :profiles, through: :users 3 + 4 + include Visible 5 + 6 + has_many :comments, dependent: :destroy 7 + has_one_attached :icon, dependent: :detach 8 + 9 + has_many :taggings 10 + has_many :tags, through: :taggings 11 + 12 + validates :title, presence: true 13 + validates :body, presence: true, length: { minimum: 10 } 14 + 15 + VALID_STATUSES = ['public', 'private', 'archived'] 16 + 17 + validates :status, inclusion: { in: VALID_STATUSES } 18 + 19 + def all_tags=(names) 20 + self.tags = names.split(",").map do |name| 21 + Tag.where(name: name.strip).first_or_create! 22 + end 23 + end 24 + 25 + def all_tags 26 + self.tags.map(&:name).join(", ") 27 + end 28 + 29 + def self.tagged_with(name) 30 + Tag.find_by_name!(name).articles 31 + end 32 + 33 + def to_partial_path 34 + "profiles/profile" 35 + end 36 + 37 + def delete_icon 38 + @icon = ActiveStorage::Blob.find(params[:id]) 39 + @icon.purge 40 + redirect_to root_path 41 + end 42 + 43 + def archived? 44 + status == 'archived' 45 + end 46 + end
+13
app/models/comment.rb
··· 1 + class Comment < ApplicationRecord 2 + include Visible 3 + 4 + belongs_to :article 5 + 6 + VALID_STATUSES = ['public', 'private', 'archived'] 7 + 8 + validates :status, inclusion: { in: VALID_STATUSES } 9 + 10 + def archived? 11 + status == 'archived' 12 + end 13 + end
app/models/concerns/.keep

This is a binary file and will not be displayed.

+19
app/models/concerns/visible.rb
··· 1 + module Visible 2 + extend ActiveSupport::Concern 3 + 4 + VALID_STATUSES = ['public', 'private', 'archived'] 5 + 6 + included do 7 + validates :status, inclusion: { in: VALID_STATUSES } 8 + end 9 + 10 + class_methods do 11 + def public_count 12 + where(status: 'public').count 13 + end 14 + end 15 + 16 + def archived? 17 + status == 'archived' 18 + end 19 + end
+3
app/models/gallery.rb
··· 1 + class Gallery < ApplicationRecord 2 + belongs_to :user 3 + end
+11
app/models/profile.rb
··· 1 + class Profile < ApplicationRecord 2 + has_many :articles, through: :users 3 + 4 + has_one_attached :icon, dependent: :detach 5 + 6 + def delete_icon 7 + @icon = ActiveStorage::Blob.find(params[:id]) 8 + @icon.purge 9 + redirect_to root_path 10 + end 11 + end
+6
app/models/tag.rb
··· 1 + class Tag < ApplicationRecord 2 + 3 + has_many :taggings 4 + has_many :articles, through: :taggings 5 + 6 + end
+4
app/models/tagging.rb
··· 1 + class Tagging < ApplicationRecord 2 + belongs_to :article 3 + belongs_to :tag 4 + end
+18
app/models/user.rb
··· 1 + class User < ApplicationRecord 2 + 3 + belongs_to :profile 4 + belongs_to :article 5 + 6 + # Include default devise modules. Others available are: 7 + # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable 8 + devise :database_authenticatable, 9 + :recoverable, :rememberable, :validatable 10 + after_create :create_user_profile 11 + 12 + private 13 + 14 + def create_user_profile 15 + self.create_profile 16 + end 17 + 18 + end
+36
app/views/articles/_form.html.erb
··· 1 + <%= form_with model: article do |form| %> 2 + <div> 3 + <%= form.label :title %><br> 4 + <%= form.text_field :title %> 5 + <% article.errors.full_messages_for(:title).each do |message| %> 6 + <div><%= message %></div> 7 + <% end %> 8 + </div> 9 + 10 + <div> 11 + <%= form.label :body %><br> 12 + <%= form.text_area :body %><br> 13 + <% article.errors.full_messages_for(:body).each do |message| %> 14 + <div><%= message %></div> 15 + <% end %> 16 + </div> 17 + 18 + <div> 19 + <%= form.label :status %><br> 20 + <%= form.select :status, Visible::VALID_STATUSES, selected: article.status || 'public' %> 21 + </div> 22 + 23 + <div> 24 + <%= form.label :icon %><br /> 25 + <%= form.file_field :icon %> 26 + </div> 27 + 28 + <div> 29 + <%= form.label :all_tags %><br> 30 + <%= form.text_field :all_tags %> 31 + </div> 32 + 33 + <div> 34 + <%= form.submit %> 35 + </div> 36 + <% end %>
+7
app/views/articles/edit.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>edit article</h1> 4 + 5 + <%= render "form", article: @article %> 6 + 7 + </div>
+56
app/views/articles/index.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>🐬 sweet like bubblegum</h1> 4 + 5 + <div class="profile"> 6 + 7 + <% if user_signed_in? %> 8 + <div class="pfp"><%= render @profiles %></div> 9 + <% else %> 10 + <div class="pfp"><%= render @profiles %></div> 11 + <% end %> 12 + 13 + <div class="test2"> 14 + <% if user_signed_in? %> 15 + <div> welcome <%= current_user.email %> </div> 16 + <%= button_to "log out", destroy_user_session_path, method: :delete, style: 'margin-left: .5em' %> 17 + <% else %> 18 + <div> i'm kat! </div> 19 + <%= button_to "log in if you're me", new_user_session_path, style: 'margin-left: .5em' %> 20 + <% end %> 21 + </div> 22 + 23 + <div class="test2"> 24 + <% if user_signed_in? %> 25 + <ul> 26 + <li><%= link_to "new", new_article_path %></li> 27 + <li><%= link_to "edit", edit_profile_path(id: current_user) %></li> 28 + <li><%= link_to "view", profile_path(id: current_user) %></li> 29 + </ul> 30 + <% else %> 31 + <ul> 32 + <li><a href="/profiles/1">me</a></li> 33 + <li><%= link_to "refresh", articles_path %></li> 34 + </ul> 35 + <% end %> 36 + </div> 37 + 38 + </div> 39 + 40 + <hr> 41 + 42 + <p>my blog has <%= Article.public_count %> articles and counting!</p> 43 + 44 + <p><a href="/articles.rss">subscribe via rss</a></p> 45 + 46 + <ul> 47 + <% Article.all.each do |article| %> 48 + <% unless article.archived? %> 49 + <li> 50 + <%= link_to article.title, article %> 51 + </li> 52 + <% end %> 53 + <% end %> 54 + </ul> 55 + 56 + </div>
+18
app/views/articles/index.rss.builder
··· 1 + xml.instruct! :xml, :version => "1.0" 2 + xml.rss :version => "2.0" do 3 + xml.channel do 4 + xml.title "sweet like bubblegum" 5 + xml.description "kat's blog" 6 + xml.link root_url 7 + 8 + @article.each do |article| 9 + xml.item do 10 + xml.title article.title 11 + xml.description article.body 12 + xml.pubDate article.created_at.to_formatted_s(:rfc822) 13 + xml.link article_url(article) 14 + xml.guid article_url(article) 15 + end 16 + end 17 + end 18 + end
+7
app/views/articles/new.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>new article</h1> 4 + 5 + <%= render "form", article: @article %> 6 + 7 + </div>
+34
app/views/articles/show.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1><%= @article.title %></h1> 4 + 5 + <% if @article.icon.attached? %> 6 + <%= image_tag url_for(@article.icon) %> 7 + <% end %> 8 + 9 + <p class="article_date"><%= @article.created_at.strftime('%Y %b %d') %></p> 10 + 11 + <p class="article_date"><%= raw tag_links(@article.all_tags) %></p> 12 + 13 + <div class="pbody"><%== @article.body %></div> 14 + 15 + <% if user_signed_in? %> 16 + <ul> 17 + <li><%= link_to "edit", edit_article_path(@article) %></li> 18 + <li><%= link_to "destroy", article_path(@article), data: { 19 + turbo_method: :delete, 20 + turbo_confirm: "Are you sure?" 21 + } %></li> 22 + 23 + </ul> 24 + <% else %> 25 + <% end %> 26 + 27 + <hr> 28 + 29 + <ul> 30 + <li><%= link_to "home", articles_path %></li> 31 + <li><a href="/profiles/1">me</a></li> 32 + </ul> 33 + 34 + </div>
+23
app/views/comments/_comment.html.erb
··· 1 + <% unless comment.archived? %> 2 + <p> 3 + <strong>Commenter:</strong> 4 + <%= comment.commenter %> 5 + </p> 6 + 7 + <p> 8 + <strong>Comment:</strong> 9 + <%= comment.body %> 10 + </p> 11 + 12 + <p> 13 + <% if user_signed_in? %> 14 + <%= link_to "Destroy Comment", [comment.article, comment], data: { 15 + turbo_method: :delete, 16 + turbo_confirm: "Are you sure?" 17 + } %> 18 + </p> 19 + log in to access comment options 20 + <% end %> 21 + 22 + 23 + <% end %>
+19
app/views/comments/_form.html.erb
··· 1 + <%= form_with model: [ @article, @article.comments.build ] do |form| %> 2 + <p> 3 + <%= form.label :commenter %><br> 4 + <%= form.text_field :commenter %> 5 + </p> 6 + <p> 7 + <%= form.label :body %><br> 8 + <%= form.text_area :body %> 9 + </p> 10 + 11 + <p> 12 + <%= form.label :status %><br> 13 + <%= form.select :status, Visible::VALID_STATUSES, selected: 'public' %> 14 + </p> 15 + 16 + <p> 17 + <%= form.submit %> 18 + </p> 19 + <% end %>
+16
app/views/devise/confirmations/new.html.erb
··· 1 + <h2>Resend confirmation instructions</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 4 + <%= render "devise/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 9 + </div> 10 + 11 + <div class="actions"> 12 + <%= f.submit "Resend confirmation instructions" %> 13 + </div> 14 + <% end %> 15 + 16 + <%= render "devise/shared/links" %>
+5
app/views/devise/mailer/confirmation_instructions.html.erb
··· 1 + <p>Welcome <%= @email %>!</p> 2 + 3 + <p>You can confirm your account email through the link below:</p> 4 + 5 + <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
+7
app/views/devise/mailer/email_changed.html.erb
··· 1 + <p>Hello <%= @email %>!</p> 2 + 3 + <% if @resource.try(:unconfirmed_email?) %> 4 + <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p> 5 + <% else %> 6 + <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p> 7 + <% end %>
+3
app/views/devise/mailer/password_change.html.erb
··· 1 + <p>Hello <%= @resource.email %>!</p> 2 + 3 + <p>We're contacting you to notify you that your password has been changed.</p>
+8
app/views/devise/mailer/reset_password_instructions.html.erb
··· 1 + <p>Hello <%= @resource.email %>!</p> 2 + 3 + <p>Someone has requested a link to change your password. You can do this through the link below.</p> 4 + 5 + <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p> 6 + 7 + <p>If you didn't request this, please ignore this email.</p> 8 + <p>Your password won't change until you access the link above and create a new one.</p>
+7
app/views/devise/mailer/unlock_instructions.html.erb
··· 1 + <p>Hello <%= @resource.email %>!</p> 2 + 3 + <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p> 4 + 5 + <p>Click the link below to unlock your account:</p> 6 + 7 + <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
+25
app/views/devise/passwords/edit.html.erb
··· 1 + <h2>Change your password</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> 4 + <%= render "devise/shared/error_messages", resource: resource %> 5 + <%= f.hidden_field :reset_password_token %> 6 + 7 + <div class="field"> 8 + <%= f.label :password, "New password" %><br /> 9 + <% if @minimum_password_length %> 10 + <em>(<%= @minimum_password_length %> characters minimum)</em><br /> 11 + <% end %> 12 + <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %> 13 + </div> 14 + 15 + <div class="field"> 16 + <%= f.label :password_confirmation, "Confirm new password" %><br /> 17 + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> 18 + </div> 19 + 20 + <div class="actions"> 21 + <%= f.submit "Change my password" %> 22 + </div> 23 + <% end %> 24 + 25 + <%= render "devise/shared/links" %>
+16
app/views/devise/passwords/new.html.erb
··· 1 + <h2>Forgot your password?</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 4 + <%= render "devise/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <div class="actions"> 12 + <%= f.submit "Send me reset password instructions" %> 13 + </div> 14 + <% end %> 15 + 16 + <%= render "devise/shared/links" %>
+48
app/views/devise/registrations/edit.html.erb
··· 1 + <h2>Edit <%= resource_name.to_s.humanize %></h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> 4 + <%= render "devise/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> 12 + <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> 13 + <% end %> 14 + 15 + <div class="field"> 16 + <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> 17 + <%= f.password_field :password, autocomplete: "new-password" %> 18 + <% if @minimum_password_length %> 19 + <br /> 20 + <em><%= @minimum_password_length %> characters minimum</em> 21 + <% end %> 22 + </div> 23 + 24 + <div class="field"> 25 + <%= f.label :password_confirmation %><br /> 26 + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> 27 + </div> 28 + 29 + <div class="field"> 30 + <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> 31 + <%= f.password_field :current_password, autocomplete: "current-password" %> 32 + </div> 33 + 34 + <div class="field"> 35 + <%= f.label :icon %><br /> 36 + <%= f.file_field :icon %> 37 + </div> 38 + 39 + <div class="actions"> 40 + <%= f.submit "Update" %> 41 + </div> 42 + <% end %> 43 + 44 + <h3>Cancel my account</h3> 45 + 46 + <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div> 47 + 48 + <%= link_to "Back", :back %>
+34
app/views/devise/registrations/new.html.erb
··· 1 + <h2>Sign up</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> 4 + <%= render "devise/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <div class="field"> 12 + <%= f.label :password %> 13 + <% if @minimum_password_length %> 14 + <em>(<%= @minimum_password_length %> characters minimum)</em> 15 + <% end %><br /> 16 + <%= f.password_field :password, autocomplete: "new-password" %> 17 + </div> 18 + 19 + <div class="field"> 20 + <%= f.label :password_confirmation %><br /> 21 + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> 22 + </div> 23 + 24 + <div class="field"> 25 + <%= f.label :icon %><br /> 26 + <%= f.file_field :icon %> 27 + </div> 28 + 29 + <div class="actions"> 30 + <%= f.submit "Sign up" %> 31 + </div> 32 + <% end %> 33 + 34 + <%= render "devise/shared/links" %>
+31
app/views/devise/sessions/new.html.erb
··· 1 + <h2>log in</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 4 + <div class="field"> 5 + <%= f.label :email %><br /> 6 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 7 + </div> 8 + 9 + <div class="field"> 10 + <%= f.label :password %><br /> 11 + <%= f.password_field :password, autocomplete: "current-password" %> 12 + </div> 13 + 14 + <% if devise_mapping.rememberable? %> 15 + <div class="field"> 16 + <%= f.check_box :remember_me %> 17 + <%= f.label :remember_me %> 18 + </div> 19 + <% end %> 20 + 21 + <div class="field"> 22 + <%= f.label :icon %><br /> 23 + <%= f.file_field :icon %> 24 + </div> 25 + 26 + <div class="actions"> 27 + <%= f.submit "log in" %> 28 + </div> 29 + <% end %> 30 + 31 + <%= render "devise/shared/links" %>
+15
app/views/devise/shared/_error_messages.html.erb
··· 1 + <% if resource.errors.any? %> 2 + <div id="error_explanation" data-turbo-cache="false"> 3 + <h2> 4 + <%= I18n.t("errors.messages.not_saved", 5 + count: resource.errors.count, 6 + resource: resource.class.model_name.human.downcase) 7 + %> 8 + </h2> 9 + <ul> 10 + <% resource.errors.full_messages.each do |message| %> 11 + <li><%= message %></li> 12 + <% end %> 13 + </ul> 14 + </div> 15 + <% end %>
+25
app/views/devise/shared/_links.html.erb
··· 1 + <%- if controller_name != 'sessions' %> 2 + <%= link_to "Log in", new_session_path(resource_name) %><br /> 3 + <% end %> 4 + 5 + <%- if devise_mapping.registerable? && controller_name != 'registrations' %> 6 + <%= link_to "Sign up", new_registration_path(resource_name) %><br /> 7 + <% end %> 8 + 9 + <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> 10 + <%= link_to "Forgot your password?", new_password_path(resource_name) %><br /> 11 + <% end %> 12 + 13 + <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> 14 + <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br /> 15 + <% end %> 16 + 17 + <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> 18 + <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br /> 19 + <% end %> 20 + 21 + <%- if devise_mapping.omniauthable? %> 22 + <%- resource_class.omniauth_providers.each do |provider| %> 23 + <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><br /> 24 + <% end %> 25 + <% end %>
+16
app/views/devise/unlocks/new.html.erb
··· 1 + <h2>Resend unlock instructions</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 + <%= render "devise/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <div class="actions"> 12 + <%= f.submit "Resend unlock instructions" %> 13 + </div> 14 + <% end %> 15 + 16 + <%= render "devise/shared/links" %>
+32
app/views/galleries/_form.html.erb
··· 1 + <%= form_with(model: gallery) do |form| %> 2 + <% if gallery.errors.any? %> 3 + <div style="color: red"> 4 + <h2><%= pluralize(gallery.errors.count, "error") %> prohibited this gallery from being saved:</h2> 5 + 6 + <ul> 7 + <% gallery.errors.each do |error| %> 8 + <li><%= error.full_message %></li> 9 + <% end %> 10 + </ul> 11 + </div> 12 + <% end %> 13 + 14 + <div> 15 + <%= form.label :name, style: "display: block" %> 16 + <%= form.text_field :name %> 17 + </div> 18 + 19 + <div> 20 + <%= form.label :description, style: "display: block" %> 21 + <%= form.text_area :description %> 22 + </div> 23 + 24 + <div> 25 + <%= form.label :user_id, style: "display: block" %> 26 + <%= form.text_field :user_id %> 27 + </div> 28 + 29 + <div> 30 + <%= form.submit %> 31 + </div> 32 + <% end %>
+17
app/views/galleries/_gallery.html.erb
··· 1 + <div id="<%= dom_id gallery %>"> 2 + <p> 3 + <strong>Name:</strong> 4 + <%= gallery.name %> 5 + </p> 6 + 7 + <p> 8 + <strong>Description:</strong> 9 + <%= gallery.description %> 10 + </p> 11 + 12 + <p> 13 + <strong>User:</strong> 14 + <%= gallery.user_id %> 15 + </p> 16 + 17 + </div>
+2
app/views/galleries/_gallery.json.jbuilder
··· 1 + json.extract! gallery, :id, :name, :description, :user_id, :created_at, :updated_at 2 + json.url gallery_url(gallery, format: :json)
+10
app/views/galleries/edit.html.erb
··· 1 + <h1>Editing gallery</h1> 2 + 3 + <%= render "form", gallery: @gallery %> 4 + 5 + <br> 6 + 7 + <div> 8 + <%= link_to "Show this gallery", @gallery %> | 9 + <%= link_to "Back to galleries", galleries_path %> 10 + </div>
+14
app/views/galleries/index.html.erb
··· 1 + <p style="color: green"><%= notice %></p> 2 + 3 + <h1>Galleries</h1> 4 + 5 + <div id="galleries"> 6 + <% @galleries.each do |gallery| %> 7 + <%= render gallery %> 8 + <p> 9 + <%= link_to "Show this gallery", gallery %> 10 + </p> 11 + <% end %> 12 + </div> 13 + 14 + <%= link_to "New gallery", new_gallery_path %>
+1
app/views/galleries/index.json.jbuilder
··· 1 + json.array! @galleries, partial: "galleries/gallery", as: :gallery
+9
app/views/galleries/new.html.erb
··· 1 + <h1>New gallery</h1> 2 + 3 + <%= render "form", gallery: @gallery %> 4 + 5 + <br> 6 + 7 + <div> 8 + <%= link_to "Back to galleries", galleries_path %> 9 + </div>
+10
app/views/galleries/show.html.erb
··· 1 + <p style="color: green"><%= notice %></p> 2 + 3 + <%= render @gallery %> 4 + 5 + <div> 6 + <%= link_to "Edit this gallery", edit_gallery_path(@gallery) %> | 7 + <%= link_to "Back to galleries", galleries_path %> 8 + 9 + <%= button_to "Destroy this gallery", @gallery, method: :delete %> 10 + </div>
+1
app/views/galleries/show.json.jbuilder
··· 1 + json.partial! "galleries/gallery", gallery: @gallery
+19
app/views/layouts/application.html.erb
··· 1 + <!DOCTYPE html> 2 + <html> 3 + <head> 4 + <title>🐬 sweet like bubblegum</title> 5 + <meta name="viewport" content="width=device-width,initial-scale=1"> 6 + <%= csrf_meta_tags %> 7 + <%= csp_meta_tag %> 8 + 9 + <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> 10 + <%= stylesheet_link_tag "application.css" %> 11 + 12 + <%= auto_discovery_link_tag :rss, articles_url(:format => :rss) %> 13 + 14 + </head> 15 + 16 + <body> 17 + <%= yield %> 18 + </body> 19 + </html>
+13
app/views/layouts/mailer.html.erb
··· 1 + <!DOCTYPE html> 2 + <html> 3 + <head> 4 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 + <style> 6 + /* Email styles need to be inline */ 7 + </style> 8 + </head> 9 + 10 + <body> 11 + <%= yield %> 12 + </body> 13 + </html>
+1
app/views/layouts/mailer.text.erb
··· 1 + <%= yield %>
+34
app/views/profiles/_form.html.erb
··· 1 + <%= form_with model: profile do |form| %> 2 + <% if @profile.errors.any? %> 3 + <p>whoops</p> 4 + <% end %> 5 + 6 + <div> 7 + <%= form.label :icon %><br /> 8 + <%= form.file_field :icon %> 9 + </div> 10 + 11 + <div> 12 + <%= form.label :name %><br> 13 + <%= form.text_area :name %> 14 + </div> 15 + 16 + <div> 17 + <%= form.label :bio %><br> 18 + <%= form.text_area :bio %> 19 + </div> 20 + 21 + <div> 22 + <%= form.label :age %><br> 23 + <%= form.text_area :age %><br> 24 + </div> 25 + 26 + <div> 27 + <%= form.label :pronouns %><br> 28 + <%= form.text_area :pronouns %><br> 29 + </div> 30 + 31 + <div> 32 + <%= form.submit %> 33 + <% end %> 34 + </div>
+3
app/views/profiles/_icon.html.erb
··· 1 + <div class="icon"> 2 + 3 + </div>
+1
app/views/profiles/_profile.html.erb
··· 1 + <%= image_tag(profile.icon, alt: "kat user icon featuring yamauchi mizuki from akb48") %>
+7
app/views/profiles/edit.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>edit profile</h1> 4 + 5 + <%= render "form", profile: @profile %> 6 + 7 + </div>
+7
app/views/profiles/index.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>current users</h1> 4 + 5 + <p><a href="/profiles/1">melo!</a></p> 6 + 7 + </div>
+7
app/views/profiles/new.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>create profile</h1> 4 + 5 + <%= render "form", profile: @profile %> 6 + 7 + </div>
+31
app/views/profiles/show.html.erb
··· 1 + <div class="main"> 2 + 3 + <h1>🐬 sweet like bubblegum</h1> 4 + 5 + <div class="pfp"><%= render @profile %></div> 6 + 7 + <div class="test2"> 8 + <ul class="profile_list"> 9 + <li><%= @profile.name %></li> 10 + <li><%= @profile.pronouns %></li> 11 + <li><%= @profile.age %></li> 12 + </ul> 13 + </div> 14 + 15 + <div class="pbody"><%== @profile.bio %></div> 16 + 17 + <% if user_signed_in? %> 18 + <ul> 19 + <li><%= link_to "edit", edit_profile_path(id: current_user) %></li> 20 + </ul> 21 + <% else %> 22 + <% end %> 23 + 24 + <hr> 25 + 26 + <ul> 27 + <li><a href="/profiles/1">refresh</a></li> 28 + <li><%= link_to "home", articles_path %></li> 29 + </ul> 30 + 31 + </div>
+7
app/views/shared/_icons.html.erb
··· 1 + <div class="icon"> 2 + <% if @profile.icon.attached? %> 3 + <%= image_tag @profile.icon %> 4 + <% else %> 5 + nope 6 + <% end %> 7 + </div>
+2
app/views/tags/create.html.erb
··· 1 + <h1>Tags#create</h1> 2 + <p>Find me in app/views/tags/create.html.erb</p>
+11
app/views/tags/index.html.erb
··· 1 + <div class="main"> 2 + 3 + <ul> 4 + <% Tag.all.each do |tag| %> 5 + <li> 6 + <%= link_to tag.name, tag_path(tag.name) %> 7 + </li> 8 + <% end %> 9 + </ul> 10 + 11 + </div>
+11
app/views/tags/show.html.erb
··· 1 + <div class="main"> 2 + 3 + <ul> 4 + <% Tag.articles.each do |articles| %> 5 + <li> 6 + <%= link_to article.title, article %> 7 + </li> 8 + <% end %> 9 + </ul> 10 + 11 + </div>
+2
app/views/user/index.html.erb
··· 1 + <h1>User#index</h1> 2 + <p>Find me in app/views/user/index.html.erb</p>
+2
app/views/user/show.html.erb
··· 1 + <h1>User#show</h1> 2 + <p>Find me in app/views/user/show.html.erb</p>
+16
app/views/users/confirmations/new.html.erb
··· 1 + <h2>Resend confirmation instructions</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> 4 + <%= render "users/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> 9 + </div> 10 + 11 + <div class="actions"> 12 + <%= f.submit "Resend confirmation instructions" %> 13 + </div> 14 + <% end %> 15 + 16 + <%= render "users/shared/links" %>
+1
app/views/users/index.html.erb
··· 1 + <%= current_user.email %>
+5
app/views/users/mailer/confirmation_instructions.html.erb
··· 1 + <p>Welcome <%= @email %>!</p> 2 + 3 + <p>You can confirm your account email through the link below:</p> 4 + 5 + <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
+7
app/views/users/mailer/email_changed.html.erb
··· 1 + <p>Hello <%= @email %>!</p> 2 + 3 + <% if @resource.try(:unconfirmed_email?) %> 4 + <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p> 5 + <% else %> 6 + <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p> 7 + <% end %>
+3
app/views/users/mailer/password_change.html.erb
··· 1 + <p>Hello <%= @resource.email %>!</p> 2 + 3 + <p>We're contacting you to notify you that your password has been changed.</p>
+8
app/views/users/mailer/reset_password_instructions.html.erb
··· 1 + <p>Hello <%= @resource.email %>!</p> 2 + 3 + <p>Someone has requested a link to change your password. You can do this through the link below.</p> 4 + 5 + <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p> 6 + 7 + <p>If you didn't request this, please ignore this email.</p> 8 + <p>Your password won't change until you access the link above and create a new one.</p>
+7
app/views/users/mailer/unlock_instructions.html.erb
··· 1 + <p>Hello <%= @resource.email %>!</p> 2 + 3 + <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p> 4 + 5 + <p>Click the link below to unlock your account:</p> 6 + 7 + <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
+25
app/views/users/passwords/edit.html.erb
··· 1 + <h2>Change your password</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> 4 + <%= render "users/shared/error_messages", resource: resource %> 5 + <%= f.hidden_field :reset_password_token %> 6 + 7 + <div class="field"> 8 + <%= f.label :password, "New password" %><br /> 9 + <% if @minimum_password_length %> 10 + <em>(<%= @minimum_password_length %> characters minimum)</em><br /> 11 + <% end %> 12 + <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %> 13 + </div> 14 + 15 + <div class="field"> 16 + <%= f.label :password_confirmation, "Confirm new password" %><br /> 17 + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> 18 + </div> 19 + 20 + <div class="actions"> 21 + <%= f.submit "Change my password" %> 22 + </div> 23 + <% end %> 24 + 25 + <%= render "users/shared/links" %>
+16
app/views/users/passwords/new.html.erb
··· 1 + <h2>Forgot your password?</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> 4 + <%= render "users/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <div class="actions"> 12 + <%= f.submit "Send me reset password instructions" %> 13 + </div> 14 + <% end %> 15 + 16 + <%= render "users/shared/links" %>
+47
app/views/users/registrations/edit.html.erb
··· 1 + <div id="main"> 2 + 3 + <h2>edit <%= resource_name.to_s.humanize %></h2> 4 + 5 + <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> 6 + <%= render "users/shared/error_messages", resource: resource %> 7 + 8 + <div class="field"> 9 + <%= f.label :email %><br /> 10 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 11 + </div> 12 + 13 + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> 14 + <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> 15 + <% end %> 16 + 17 + <div class="field"> 18 + <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> 19 + <%= f.password_field :password, autocomplete: "new-password" %> 20 + <% if @minimum_password_length %> 21 + <br /> 22 + <em><%= @minimum_password_length %> characters minimum</em> 23 + <% end %> 24 + </div> 25 + 26 + <div class="field"> 27 + <%= f.label :password_confirmation %><br /> 28 + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> 29 + </div> 30 + 31 + <div class="field"> 32 + <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> 33 + <%= f.password_field :current_password, autocomplete: "current-password" %> 34 + </div> 35 + 36 + <div class="actions"> 37 + <%= f.submit "Update" %> 38 + </div> 39 + <% end %> 40 + 41 + <h3>Cancel my account</h3> 42 + 43 + <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div> 44 + 45 + <%= link_to "Back", :back %> 46 + 47 + </div>
+33
app/views/users/registrations/new.html.erb
··· 1 + <div id="main"> 2 + 3 + <h2>sign up</h2> 4 + 5 + <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> 6 + <%= render "users/shared/error_messages", resource: resource %> 7 + 8 + <div class="field"> 9 + <%= f.label :email %><br /> 10 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 11 + </div> 12 + 13 + <div class="field"> 14 + <%= f.label :password %> 15 + <% if @minimum_password_length %> 16 + <em>(<%= @minimum_password_length %> characters minimum)</em> 17 + <% end %><br /> 18 + <%= f.password_field :password, autocomplete: "new-password" %> 19 + </div> 20 + 21 + <div class="field"> 22 + <%= f.label :password_confirmation %><br /> 23 + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> 24 + </div> 25 + 26 + <div class="actions"> 27 + <%= f.submit "Sign up" %> 28 + </div> 29 + <% end %> 30 + 31 + <%= render "users/shared/links" %> 32 + 33 + </div>
+35
app/views/users/sessions/new.html.erb
··· 1 + <div id="main"> 2 + 3 + <h2>log in</h2> 4 + 5 + <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <div class="field"> 12 + <%= f.label :password %><br /> 13 + <%= f.password_field :password, autocomplete: "current-password" %> 14 + </div> 15 + 16 + <% if devise_mapping.rememberable? %> 17 + <div class="field"> 18 + <%= f.check_box :remember_me %> 19 + <%= f.label :remember_me %> 20 + </div> 21 + <% end %> 22 + 23 + <div class="field"> 24 + <%= f.label :icon %><br /> 25 + <%= f.file_field :icon %> 26 + </div> 27 + 28 + <div class="actions"> 29 + <%= f.submit "Log in" %> 30 + </div> 31 + <% end %> 32 + 33 + <%= render "users/shared/links" %> 34 + 35 + </div>
+15
app/views/users/shared/_error_messages.html.erb
··· 1 + <% if resource.errors.any? %> 2 + <div id="error_explanation" data-turbo-cache="false"> 3 + <h2> 4 + <%= I18n.t("errors.messages.not_saved", 5 + count: resource.errors.count, 6 + resource: resource.class.model_name.human.downcase) 7 + %> 8 + </h2> 9 + <ul> 10 + <% resource.errors.full_messages.each do |message| %> 11 + <li><%= message %></li> 12 + <% end %> 13 + </ul> 14 + </div> 15 + <% end %>
+25
app/views/users/shared/_links.html.erb
··· 1 + <%- if controller_name != 'sessions' %> 2 + <%= link_to "Log in", new_session_path(resource_name) %><br /> 3 + <% end %> 4 + 5 + <%- if devise_mapping.registerable? && controller_name != 'registrations' %> 6 + <%= link_to "Sign up", new_registration_path(resource_name) %><br /> 7 + <% end %> 8 + 9 + <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> 10 + <%= link_to "Forgot your password?", new_password_path(resource_name) %><br /> 11 + <% end %> 12 + 13 + <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> 14 + <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br /> 15 + <% end %> 16 + 17 + <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> 18 + <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br /> 19 + <% end %> 20 + 21 + <%- if devise_mapping.omniauthable? %> 22 + <%- resource_class.omniauth_providers.each do |provider| %> 23 + <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><br /> 24 + <% end %> 25 + <% end %>
+2
app/views/users/show.html.erb
··· 1 + <%= current_user.email %> 2 + <%= image_tag url_for(current_user.icon) %>
+16
app/views/users/unlocks/new.html.erb
··· 1 + <h2>Resend unlock instructions</h2> 2 + 3 + <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> 4 + <%= render "users/shared/error_messages", resource: resource %> 5 + 6 + <div class="field"> 7 + <%= f.label :email %><br /> 8 + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> 9 + </div> 10 + 11 + <div class="actions"> 12 + <%= f.submit "Resend unlock instructions" %> 13 + </div> 14 + <% end %> 15 + 16 + <%= render "users/shared/links" %>
+8
bin/docker-entrypoint
··· 1 + #!/bin/bash -e 2 + 3 + # If running the rails server then create or migrate existing database 4 + if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then 5 + ./bin/rails db:prepare 6 + fi 7 + 8 + exec "${@}"
+4
bin/rails
··· 1 + #!/usr/bin/env ruby 2 + APP_PATH = File.expand_path("../config/application", __dir__) 3 + require_relative "../config/boot" 4 + require "rails/commands"
+4
bin/rake
··· 1 + #!/usr/bin/env ruby 2 + require_relative "../config/boot" 3 + require "rake" 4 + Rake.application.run
+33
bin/setup
··· 1 + #!/usr/bin/env ruby 2 + require "fileutils" 3 + 4 + # path to your application root. 5 + APP_ROOT = File.expand_path("..", __dir__) 6 + 7 + def system!(*args) 8 + system(*args, exception: true) 9 + end 10 + 11 + FileUtils.chdir APP_ROOT do 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. 14 + # Add necessary setup steps to this file. 15 + 16 + puts "== Installing dependencies ==" 17 + system! "gem install bundler --conservative" 18 + system("bundle check") || system!("bundle install") 19 + 20 + # puts "\n== Copying sample files ==" 21 + # unless File.exist?("config/database.yml") 22 + # FileUtils.cp "config/database.yml.sample", "config/database.yml" 23 + # end 24 + 25 + puts "\n== Preparing database ==" 26 + system! "bin/rails db:prepare" 27 + 28 + puts "\n== Removing old logs and tempfiles ==" 29 + system! "bin/rails log:clear tmp:clear" 30 + 31 + puts "\n== Restarting application server ==" 32 + system! "bin/rails restart" 33 + end
+14
bin/spring
··· 1 + #!/usr/bin/env ruby 2 + if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"]) 3 + gem "bundler" 4 + require "bundler" 5 + 6 + # Load Spring without loading other gems in the Gemfile, for speed. 7 + Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring| 8 + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path 9 + gem "spring", spring.version 10 + require "spring/binstub" 11 + rescue Gem::LoadError 12 + # Ignore when Spring is not installed. 13 + end 14 + end
+17
bin/yarn
··· 1 + #!/usr/bin/env ruby 2 + APP_ROOT = File.expand_path('..', __dir__) 3 + Dir.chdir(APP_ROOT) do 4 + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). 5 + select { |dir| File.expand_path(dir) != __dir__ }. 6 + product(["yarn", "yarn.cmd", "yarn.ps1"]). 7 + map { |dir, file| File.expand_path(file, dir) }. 8 + find { |file| File.executable?(file) } 9 + 10 + if yarn 11 + exec yarn, *ARGV 12 + else 13 + $stderr.puts "Yarn executable was not detected in the system." 14 + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" 15 + exit 1 16 + end 17 + end
+5
config.ru
··· 1 + # This file is used by Rack-based servers to start the application. 2 + require_relative "config/environment" 3 + 4 + run Rails.application 5 + Rails.application.load_server
+27
config/application.rb
··· 1 + require_relative "boot" 2 + 3 + require "rails/all" 4 + 5 + # Require the gems listed in Gemfile, including any gems 6 + # you've limited to :test, :development, or :production. 7 + Bundler.require(*Rails.groups) 8 + 9 + module Blog 10 + class Application < Rails::Application 11 + # Initialize configuration defaults for originally generated Rails version. 12 + config.load_defaults 7.1 13 + 14 + # Please, add to the `ignore` list any other `lib` subdirectories that do 15 + # not contain `.rb` files, or that should not be reloaded or eager loaded. 16 + # Common ones are `templates`, `generators`, or `middleware`, for example. 17 + config.autoload_lib(ignore: %w(assets tasks)) 18 + 19 + # Configuration for the application, engines, and railties goes here. 20 + # 21 + # These settings can be overridden in specific environments using the files 22 + # in config/environments, which are processed later. 23 + # 24 + # config.time_zone = "Central Time (US & Canada)" 25 + # config.eager_load_paths << Rails.root.join("extras") 26 + end 27 + end
+4
config/boot.rb
··· 1 + ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 + 3 + require "bundler/setup" # Set up gems listed in the Gemfile. 4 + require "bootsnap/setup" # Speed up boot time by caching expensive operations.
+10
config/cable.yml
··· 1 + development: 2 + adapter: async 3 + 4 + test: 5 + adapter: test 6 + 7 + production: 8 + adapter: redis 9 + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 + channel_prefix: blog_production
+1
config/credentials.yml.enc
··· 1 + PGrPe4QYsqXsjO51tLkwQy5ClZBF+KZk5BaxV60PwYA66YMxp8gXvu1ai1vSXoIdlogrQted6wkl1sLWHeTFUZ5jiMvupseHx+z4n4nPrAe4pUtdAmUNDJak5MlFvA78TZGxzjCAE9A820Dc3xEF5arL9ZabwsfU36cOfra1z1p3hNFZgOC8xX6xwtTzXfUkOLQOnF1TQrdhNA86138BU8UQa4eGacgWci/mW27C6EWZKZp3ZXIoNh7bgcA8i1EsIGNBLXTKLWMBzjHcbeRvUhOvT28uoBYFlhKcKeO44ROK4YFJzROoqAtjAHDESPz5Nq+lk6I05E3OYcT3DRrPuI0YxKh4Pr4ho5NyBCiVPoXdeKxw2Hm7LKK1xYMgirqJgHhxG3PTLIKHB++JV4x/4yGldEAzr5BOpnl1--oedhME+eh1J2+PFZ--wx6csBuHRygMeoBOFYBa7w==
+25
config/database.yml
··· 1 + # SQLite. Versions 3.8.0 and up are supported. 2 + # gem install sqlite3 3 + # 4 + # Ensure the SQLite 3 gem is defined in your Gemfile 5 + # gem "sqlite3" 6 + # 7 + default: &default 8 + adapter: sqlite3 9 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 10 + timeout: 5000 11 + 12 + development: 13 + <<: *default 14 + database: storage/development.sqlite3 15 + 16 + # Warning: The database defined as "test" will be erased and 17 + # re-generated from your development database when you run "rake". 18 + # Do not set this db to the same as development or production. 19 + test: 20 + <<: *default 21 + database: storage/test.sqlite3 22 + 23 + production: 24 + <<: *default 25 + database: storage/production.sqlite3
+5
config/environment.rb
··· 1 + # Load the Rails application. 2 + require_relative "application" 3 + 4 + # Initialize the Rails application. 5 + Rails.application.initialize!
+76
config/environments/development.rb
··· 1 + require "active_support/core_ext/integer/time" 2 + 3 + Rails.application.configure do 4 + # Settings specified here will take precedence over those in config/application.rb. 5 + 6 + # In the development environment your application's code is reloaded any time 7 + # it changes. This slows down response time but is perfect for development 8 + # since you don't have to restart the web server when you make code changes. 9 + config.enable_reloading = true 10 + 11 + # Do not eager load code on boot. 12 + config.eager_load = false 13 + 14 + # Show full error reports. 15 + config.consider_all_requests_local = true 16 + 17 + # Enable server timing 18 + config.server_timing = true 19 + 20 + # Enable/disable caching. By default caching is disabled. 21 + # Run rails dev:cache to toggle caching. 22 + if Rails.root.join("tmp/caching-dev.txt").exist? 23 + config.action_controller.perform_caching = true 24 + config.action_controller.enable_fragment_cache_logging = true 25 + 26 + config.cache_store = :memory_store 27 + config.public_file_server.headers = { 28 + "Cache-Control" => "public, max-age=#{2.days.to_i}" 29 + } 30 + else 31 + config.action_controller.perform_caching = false 32 + 33 + config.cache_store = :null_store 34 + end 35 + 36 + # Store uploaded files on the local file system (see config/storage.yml for options). 37 + config.active_storage.service = :local 38 + 39 + # Don't care if the mailer can't send. 40 + config.action_mailer.raise_delivery_errors = false 41 + 42 + config.action_mailer.perform_caching = false 43 + 44 + # Print deprecation notices to the Rails logger. 45 + config.active_support.deprecation = :log 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 + 53 + # Raise an error on page load if there are pending migrations. 54 + config.active_record.migration_error = :page_load 55 + 56 + # Highlight code that triggered database queries in logs. 57 + config.active_record.verbose_query_logs = true 58 + 59 + # Highlight code that enqueued background job in logs. 60 + config.active_job.verbose_enqueue_logs = true 61 + 62 + # Suppress logger output for asset requests. 63 + config.assets.quiet = true 64 + 65 + # Raises error for missing translations. 66 + # config.i18n.raise_on_missing_translations = true 67 + 68 + # Annotate rendered view with file names. 69 + # config.action_view.annotate_rendered_view_with_filenames = true 70 + 71 + # Uncomment if you wish to allow Action Cable access from any origin. 72 + # config.action_cable.disable_request_forgery_protection = true 73 + 74 + # Raise error when a before_action's only/except options reference missing actions 75 + config.action_controller.raise_on_missing_callback_actions = true 76 + end
+99
config/environments/production.rb
··· 1 + require "active_support/core_ext/integer/time" 2 + 3 + Rails.application.configure do 4 + # Settings specified here will take precedence over those in config/application.rb. 5 + 6 + # Code is not reloaded between requests. 7 + config.enable_reloading = false 8 + 9 + # Eager load code on boot. This eager loads most of Rails and 10 + # your application in memory, allowing both threaded web servers 11 + # and those relying on copy on write to perform better. 12 + # Rake tasks automatically ignore this option for performance. 13 + config.eager_load = true 14 + 15 + # Full error reports are disabled and caching is turned on. 16 + config.consider_all_requests_local = false 17 + config.action_controller.perform_caching = false 18 + 19 + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment 20 + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). 21 + # config.require_master_key = true 22 + 23 + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. 24 + # config.public_file_server.enabled = false 25 + 26 + # Compress CSS using a preprocessor. 27 + # config.assets.css_compressor = :sass 28 + 29 + # Do not fall back to assets pipeline if a precompiled asset is missed. 30 + config.assets.compile = false 31 + 32 + # Enable serving of images, stylesheets, and JavaScripts from an asset server. 33 + # config.asset_host = "http://assets.example.com" 34 + 35 + # Specifies the header that your server uses for sending files. 36 + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache 37 + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX 38 + 39 + # Store uploaded files on the local file system (see config/storage.yml for options). 40 + config.active_storage.service = :local 41 + 42 + # Mount Action Cable outside main process or domain. 43 + # config.action_cable.mount_path = nil 44 + # config.action_cable.url = "wss://example.com/cable" 45 + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] 46 + 47 + # Assume all access to the app is happening through a SSL-terminating reverse proxy. 48 + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. 49 + # config.assume_ssl = true 50 + 51 + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 52 + config.force_ssl = true 53 + 54 + # Log to STDOUT by default 55 + config.logger = ActiveSupport::Logger.new(STDOUT) 56 + .tap { |logger| logger.formatter = ::Logger::Formatter.new } 57 + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } 58 + 59 + # Prepend all log lines with the following tags. 60 + config.log_tags = [ :request_id ] 61 + 62 + # "info" includes generic and useful information about system operation, but avoids logging too much 63 + # information to avoid inadvertent exposure of personally identifiable information (PII). If you 64 + # want to log everything, set the level to "debug". 65 + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") 66 + 67 + # Use a different cache store in production. 68 + # config.cache_store = :mem_cache_store 69 + 70 + # Use a real queuing backend for Active Job (and separate queues per environment). 71 + # config.active_job.queue_adapter = :resque 72 + # config.active_job.queue_name_prefix = "blog_production" 73 + 74 + config.action_mailer.perform_caching = false 75 + 76 + # Ignore bad email addresses and do not raise email delivery errors. 77 + # Set this to true and configure the email server for immediate delivery to raise delivery errors. 78 + # config.action_mailer.raise_delivery_errors = false 79 + 80 + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 81 + # the I18n.default_locale when a translation cannot be found). 82 + config.i18n.fallbacks = true 83 + 84 + # Don't log any deprecations. 85 + config.active_support.report_deprecations = false 86 + 87 + # Do not dump schema after migrations. 88 + config.active_record.dump_schema_after_migration = false 89 + 90 + # Enable DNS rebinding protection and other `Host` header attacks. 91 + # config.hosts = [ 92 + # "example.com", # Allow requests from example.com 93 + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` 94 + # ] 95 + # Skip DNS rebinding protection for the default health check endpoint. 96 + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } 97 + config.hosts = [ "bubblegum.sayitditto.net", "https://bubblegum.sayitditto.net", "http://bubblegum.sayitditto.net", "71.255.50.6", "192.168.1.204", "192.168.1.219" ] 98 + 99 + end
+64
config/environments/test.rb
··· 1 + require "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 + 8 + Rails.application.configure do 9 + # Settings specified here will take precedence over those in config/application.rb. 10 + 11 + # While tests run files are not watched, reloading is not necessary. 12 + config.enable_reloading = false 13 + 14 + # Eager loading loads your entire application. When running a single test locally, 15 + # this is usually not necessary, and can slow down your test suite. However, it's 16 + # recommended that you enable it in continuous integration systems to ensure eager 17 + # loading is working properly before deploying your code. 18 + config.eager_load = ENV["CI"].present? 19 + 20 + # Configure public file server for tests with Cache-Control for performance. 21 + config.public_file_server.enabled = true 22 + config.public_file_server.headers = { 23 + "Cache-Control" => "public, max-age=#{1.hour.to_i}" 24 + } 25 + 26 + # Show full error reports and disable caching. 27 + config.consider_all_requests_local = true 28 + config.action_controller.perform_caching = false 29 + config.cache_store = :null_store 30 + 31 + # Render exception templates for rescuable exceptions and raise for other exceptions. 32 + config.action_dispatch.show_exceptions = :rescuable 33 + 34 + # Disable request forgery protection in test environment. 35 + config.action_controller.allow_forgery_protection = false 36 + 37 + # Store uploaded files on the local file system in a temporary directory. 38 + config.active_storage.service = :test 39 + 40 + config.action_mailer.perform_caching = false 41 + 42 + # Tell Action Mailer not to deliver emails to the real world. 43 + # The :test delivery method accumulates sent emails in the 44 + # ActionMailer::Base.deliveries array. 45 + config.action_mailer.delivery_method = :test 46 + 47 + # Print deprecation notices to the stderr. 48 + config.active_support.deprecation = :stderr 49 + 50 + # Raise exceptions for disallowed deprecations. 51 + config.active_support.disallowed_deprecation = :raise 52 + 53 + # Tell Active Support which deprecation messages to disallow. 54 + config.active_support.disallowed_deprecation_warnings = [] 55 + 56 + # Raises error for missing translations. 57 + # config.i18n.raise_on_missing_translations = true 58 + 59 + # Annotate rendered view with file names. 60 + # config.action_view.annotate_rendered_view_with_filenames = true 61 + 62 + # Raise error when a before_action's only/except options reference missing actions 63 + config.action_controller.raise_on_missing_callback_actions = true 64 + end
+8
config/initializers/application_controller_renderer.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # ActiveSupport::Reloader.to_prepare do 4 + # ApplicationController.renderer.defaults.merge!( 5 + # http_host: 'example.org', 6 + # https: false 7 + # ) 8 + # end
+12
config/initializers/assets.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # Version of your assets, change this if you want to expire all your assets. 4 + Rails.application.config.assets.version = "1.0" 5 + 6 + # Add additional assets to the asset load path. 7 + # Rails.application.config.assets.paths << Emoji.images_path 8 + 9 + # Precompile additional assets. 10 + # application.js, application.css, and all non-JS/CSS in the app/assets 11 + # folder are already added. 12 + # Rails.application.config.assets.precompile += %w( admin.js admin.css )
+8
config/initializers/backtrace_silencers.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 + # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } 5 + 6 + # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code 7 + # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". 8 + Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
+25
config/initializers/content_security_policy.rb
··· 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, inline scripts, and inline styles. 20 + # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } 21 + # config.content_security_policy_nonce_directives = %w(script-src style-src) 22 + # 23 + # # Report violations without enforcing the policy. 24 + # # config.content_security_policy_report_only = true 25 + # end
+5
config/initializers/cookies_serializer.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # Specify a serializer for the signed and encrypted cookie jars. 4 + # Valid options are :json, :marshal, and :hybrid. 5 + Rails.application.config.action_dispatch.cookies_serializer = :json
+313
config/initializers/devise.rb
··· 1 + # frozen_string_literal: true 2 + 3 + # Assuming you have not yet modified this file, each configuration option below 4 + # is set to its default value. Note that some are commented out while others 5 + # are not: uncommented lines are intended to protect your configuration from 6 + # breaking changes in upgrades (i.e., in the event that future versions of 7 + # Devise change the default values for those options). 8 + # 9 + # Use this hook to configure devise mailer, warden hooks and so forth. 10 + # Many of these configuration options can be set straight in your model. 11 + Devise.setup do |config| 12 + # The secret key used by Devise. Devise uses this key to generate 13 + # random tokens. Changing this key will render invalid all existing 14 + # confirmation, reset password and unlock tokens in the database. 15 + # Devise will use the `secret_key_base` as its `secret_key` 16 + # by default. You can change it below and use your own secret key. 17 + # config.secret_key = '909fb32bd4ca6e01f658eeba8e40376f28498528d23a0a8794c32e8d92c7f609e310ab029ecbc8e8af3c86a2fc898c3c50ceebb8bf9ccc6e97a8f3161e3a125b' 18 + 19 + # ==> Controller configuration 20 + # Configure the parent class to the devise controllers. 21 + # config.parent_controller = 'DeviseController' 22 + 23 + # ==> Mailer Configuration 24 + # Configure the e-mail address which will be shown in Devise::Mailer, 25 + # note that it will be overwritten if you use your own mailer class 26 + # with default "from" parameter. 27 + config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com' 28 + 29 + # Configure the class responsible to send e-mails. 30 + # config.mailer = 'Devise::Mailer' 31 + 32 + # Configure the parent class responsible to send e-mails. 33 + # config.parent_mailer = 'ActionMailer::Base' 34 + 35 + # ==> ORM configuration 36 + # Load and configure the ORM. Supports :active_record (default) and 37 + # :mongoid (bson_ext recommended) by default. Other ORMs may be 38 + # available as additional gems. 39 + require 'devise/orm/active_record' 40 + 41 + # ==> Configuration for any authentication mechanism 42 + # Configure which keys are used when authenticating a user. The default is 43 + # just :email. You can configure it to use [:username, :subdomain], so for 44 + # authenticating a user, both parameters are required. Remember that those 45 + # parameters are used only when authenticating and not when retrieving from 46 + # session. If you need permissions, you should implement that in a before filter. 47 + # You can also supply a hash where the value is a boolean determining whether 48 + # or not authentication should be aborted when the value is not present. 49 + # config.authentication_keys = [:email] 50 + 51 + # Configure parameters from the request object used for authentication. Each entry 52 + # given should be a request method and it will automatically be passed to the 53 + # find_for_authentication method and considered in your model lookup. For instance, 54 + # if you set :request_keys to [:subdomain], :subdomain will be used on authentication. 55 + # The same considerations mentioned for authentication_keys also apply to request_keys. 56 + # config.request_keys = [] 57 + 58 + # Configure which authentication keys should be case-insensitive. 59 + # These keys will be downcased upon creating or modifying a user and when used 60 + # to authenticate or find a user. Default is :email. 61 + config.case_insensitive_keys = [:email] 62 + 63 + # Configure which authentication keys should have whitespace stripped. 64 + # These keys will have whitespace before and after removed upon creating or 65 + # modifying a user and when used to authenticate or find a user. Default is :email. 66 + config.strip_whitespace_keys = [:email] 67 + 68 + # Tell if authentication through request.params is enabled. True by default. 69 + # It can be set to an array that will enable params authentication only for the 70 + # given strategies, for example, `config.params_authenticatable = [:database]` will 71 + # enable it only for database (email + password) authentication. 72 + # config.params_authenticatable = true 73 + 74 + # Tell if authentication through HTTP Auth is enabled. False by default. 75 + # It can be set to an array that will enable http authentication only for the 76 + # given strategies, for example, `config.http_authenticatable = [:database]` will 77 + # enable it only for database authentication. 78 + # For API-only applications to support authentication "out-of-the-box", you will likely want to 79 + # enable this with :database unless you are using a custom strategy. 80 + # The supported strategies are: 81 + # :database = Support basic authentication with authentication key + password 82 + # config.http_authenticatable = false 83 + 84 + # If 401 status code should be returned for AJAX requests. True by default. 85 + # config.http_authenticatable_on_xhr = true 86 + 87 + # The realm used in Http Basic Authentication. 'Application' by default. 88 + # config.http_authentication_realm = 'Application' 89 + 90 + # It will change confirmation, password recovery and other workflows 91 + # to behave the same regardless if the e-mail provided was right or wrong. 92 + # Does not affect registerable. 93 + # config.paranoid = true 94 + 95 + # By default Devise will store the user in session. You can skip storage for 96 + # particular strategies by setting this option. 97 + # Notice that if you are skipping storage for all authentication paths, you 98 + # may want to disable generating routes to Devise's sessions controller by 99 + # passing skip: :sessions to `devise_for` in your config/routes.rb 100 + config.skip_session_storage = [:http_auth] 101 + 102 + # By default, Devise cleans up the CSRF token on authentication to 103 + # avoid CSRF token fixation attacks. This means that, when using AJAX 104 + # requests for sign in and sign up, you need to get a new CSRF token 105 + # from the server. You can disable this option at your own risk. 106 + # config.clean_up_csrf_token_on_authentication = true 107 + 108 + # When false, Devise will not attempt to reload routes on eager load. 109 + # This can reduce the time taken to boot the app but if your application 110 + # requires the Devise mappings to be loaded during boot time the application 111 + # won't boot properly. 112 + # config.reload_routes = true 113 + 114 + # ==> Configuration for :database_authenticatable 115 + # For bcrypt, this is the cost for hashing the password and defaults to 12. If 116 + # using other algorithms, it sets how many times you want the password to be hashed. 117 + # The number of stretches used for generating the hashed password are stored 118 + # with the hashed password. This allows you to change the stretches without 119 + # invalidating existing passwords. 120 + # 121 + # Limiting the stretches to just one in testing will increase the performance of 122 + # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use 123 + # a value less than 10 in other environments. Note that, for bcrypt (the default 124 + # algorithm), the cost increases exponentially with the number of stretches (e.g. 125 + # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation). 126 + config.stretches = Rails.env.test? ? 1 : 12 127 + 128 + # Set up a pepper to generate the hashed password. 129 + # config.pepper = '0a718316f6fb001bd43384114a1a8c0eee1bd1b9c6aacaa1770502c2f768699aef9f348029af471cdbe4c7aebf165526f4d115ba342b12dd804fd20357430547' 130 + 131 + # Send a notification to the original email when the user's email is changed. 132 + # config.send_email_changed_notification = false 133 + 134 + # Send a notification email when the user's password is changed. 135 + # config.send_password_change_notification = false 136 + 137 + # ==> Configuration for :confirmable 138 + # A period that the user is allowed to access the website even without 139 + # confirming their account. For instance, if set to 2.days, the user will be 140 + # able to access the website for two days without confirming their account, 141 + # access will be blocked just in the third day. 142 + # You can also set it to nil, which will allow the user to access the website 143 + # without confirming their account. 144 + # Default is 0.days, meaning the user cannot access the website without 145 + # confirming their account. 146 + # config.allow_unconfirmed_access_for = 2.days 147 + 148 + # A period that the user is allowed to confirm their account before their 149 + # token becomes invalid. For example, if set to 3.days, the user can confirm 150 + # their account within 3 days after the mail was sent, but on the fourth day 151 + # their account can't be confirmed with the token any more. 152 + # Default is nil, meaning there is no restriction on how long a user can take 153 + # before confirming their account. 154 + # config.confirm_within = 3.days 155 + 156 + # If true, requires any email changes to be confirmed (exactly the same way as 157 + # initial account confirmation) to be applied. Requires additional unconfirmed_email 158 + # db field (see migrations). Until confirmed, new email is stored in 159 + # unconfirmed_email column, and copied to email column on successful confirmation. 160 + config.reconfirmable = true 161 + 162 + # Defines which key will be used when confirming an account 163 + # config.confirmation_keys = [:email] 164 + 165 + # ==> Configuration for :rememberable 166 + # The time the user will be remembered without asking for credentials again. 167 + # config.remember_for = 2.weeks 168 + 169 + # Invalidates all the remember me tokens when the user signs out. 170 + config.expire_all_remember_me_on_sign_out = true 171 + 172 + # If true, extends the user's remember period when remembered via cookie. 173 + # config.extend_remember_period = false 174 + 175 + # Options to be passed to the created cookie. For instance, you can set 176 + # secure: true in order to force SSL only cookies. 177 + # config.rememberable_options = {} 178 + 179 + # ==> Configuration for :validatable 180 + # Range for password length. 181 + config.password_length = 6..128 182 + 183 + # Email regex used to validate email formats. It simply asserts that 184 + # one (and only one) @ exists in the given string. This is mainly 185 + # to give user feedback and not to assert the e-mail validity. 186 + config.email_regexp = /\A[^@\s]+@[^@\s]+\z/ 187 + 188 + # ==> Configuration for :timeoutable 189 + # The time you want to timeout the user session without activity. After this 190 + # time the user will be asked for credentials again. Default is 30 minutes. 191 + # config.timeout_in = 30.minutes 192 + 193 + # ==> Configuration for :lockable 194 + # Defines which strategy will be used to lock an account. 195 + # :failed_attempts = Locks an account after a number of failed attempts to sign in. 196 + # :none = No lock strategy. You should handle locking by yourself. 197 + # config.lock_strategy = :failed_attempts 198 + 199 + # Defines which key will be used when locking and unlocking an account 200 + # config.unlock_keys = [:email] 201 + 202 + # Defines which strategy will be used to unlock an account. 203 + # :email = Sends an unlock link to the user email 204 + # :time = Re-enables login after a certain amount of time (see :unlock_in below) 205 + # :both = Enables both strategies 206 + # :none = No unlock strategy. You should handle unlocking by yourself. 207 + # config.unlock_strategy = :both 208 + 209 + # Number of authentication tries before locking an account if lock_strategy 210 + # is failed attempts. 211 + # config.maximum_attempts = 20 212 + 213 + # Time interval to unlock the account if :time is enabled as unlock_strategy. 214 + # config.unlock_in = 1.hour 215 + 216 + # Warn on the last attempt before the account is locked. 217 + # config.last_attempt_warning = true 218 + 219 + # ==> Configuration for :recoverable 220 + # 221 + # Defines which key will be used when recovering the password for an account 222 + # config.reset_password_keys = [:email] 223 + 224 + # Time interval you can reset your password with a reset password key. 225 + # Don't put a too small interval or your users won't have the time to 226 + # change their passwords. 227 + config.reset_password_within = 6.hours 228 + 229 + # When set to false, does not sign a user in automatically after their password is 230 + # reset. Defaults to true, so a user is signed in automatically after a reset. 231 + # config.sign_in_after_reset_password = true 232 + 233 + # ==> Configuration for :encryptable 234 + # Allow you to use another hashing or encryption algorithm besides bcrypt (default). 235 + # You can use :sha1, :sha512 or algorithms from others authentication tools as 236 + # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20 237 + # for default behavior) and :restful_authentication_sha1 (then you should set 238 + # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper). 239 + # 240 + # Require the `devise-encryptable` gem when using anything other than bcrypt 241 + # config.encryptor = :sha512 242 + 243 + # ==> Scopes configuration 244 + # Turn scoped views on. Before rendering "sessions/new", it will first check for 245 + # "users/sessions/new". It's turned off by default because it's slower if you 246 + # are using only default views. 247 + config.scoped_views = true 248 + 249 + # Configure the default scope given to Warden. By default it's the first 250 + # devise role declared in your routes (usually :user). 251 + # config.default_scope = :user 252 + 253 + # Set this configuration to false if you want /users/sign_out to sign out 254 + # only the current scope. By default, Devise signs out all scopes. 255 + # config.sign_out_all_scopes = true 256 + 257 + # ==> Navigation configuration 258 + # Lists the formats that should be treated as navigational. Formats like 259 + # :html should redirect to the sign in page when the user does not have 260 + # access, but formats like :xml or :json, should return 401. 261 + # 262 + # If you have any extra navigational formats, like :iphone or :mobile, you 263 + # should add them to the navigational formats lists. 264 + # 265 + # The "*/*" below is required to match Internet Explorer requests. 266 + config.navigational_formats = ['*/*', :html, :turbo_stream] 267 + 268 + # The default HTTP method used to sign out a resource. Default is :delete. 269 + config.sign_out_via = :delete 270 + 271 + # ==> OmniAuth 272 + # Add a new OmniAuth provider. Check the wiki for more information on setting 273 + # up on your models and hooks. 274 + # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo' 275 + 276 + # ==> Warden configuration 277 + # If you want to use other strategies, that are not supported by Devise, or 278 + # change the failure app, you can configure them inside the config.warden block. 279 + # 280 + # config.warden do |manager| 281 + # manager.intercept_401 = false 282 + # manager.default_strategies(scope: :user).unshift :some_external_strategy 283 + # end 284 + 285 + # ==> Mountable engine configurations 286 + # When using Devise inside an engine, let's call it `MyEngine`, and this engine 287 + # is mountable, there are some extra configurations to be taken into account. 288 + # The following options are available, assuming the engine is mounted as: 289 + # 290 + # mount MyEngine, at: '/my_engine' 291 + # 292 + # The router that invoked `devise_for`, in the example above, would be: 293 + # config.router_name = :my_engine 294 + # 295 + # When using OmniAuth, Devise cannot automatically set OmniAuth path, 296 + # so you need to do it manually. For the users scope, it would be: 297 + # config.omniauth_path_prefix = '/my_engine/users/auth' 298 + 299 + # ==> Hotwire/Turbo configuration 300 + # When using Devise with Hotwire/Turbo, the http status for error responses 301 + # and some redirects must match the following. The default in Devise for existing 302 + # apps is `200 OK` and `302 Found` respectively, but new apps are generated with 303 + # these new defaults that match Hotwire/Turbo behavior. 304 + # Note: These might become the new default in future versions of Devise. 305 + config.responder.error_status = :unprocessable_entity 306 + config.responder.redirect_status = :see_other 307 + 308 + # ==> Configuration for :registerable 309 + 310 + # When set to false, does not sign a user in automatically after their password is 311 + # changed. Defaults to true, so a user is signed in automatically after changing a password. 312 + # config.sign_in_after_change_password = true 313 + end
+8
config/initializers/filter_parameter_logging.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. 4 + # Use this to limit dissemination of sensitive information. 5 + # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. 6 + Rails.application.config.filter_parameters += [ 7 + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn 8 + ]
+16
config/initializers/inflections.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # Add new inflection rules using the following format. Inflections 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: 6 + # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 + # inflect.plural /^(ox)$/i, "\\1en" 8 + # inflect.singular /^(ox)en/i, "\\1" 9 + # inflect.irregular "person", "people" 10 + # inflect.uncountable %w( fish sheep ) 11 + # end 12 + 13 + # These inflection rules are supported but not enabled by default: 14 + # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 + # inflect.acronym "RESTful" 16 + # end
+4
config/initializers/mime_types.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # Add new mime types for use in respond_to blocks: 4 + # Mime::Type.register "text/richtext", :rtf
+13
config/initializers/permissions_policy.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # Define an application-wide HTTP permissions policy. For further 4 + # information see: https://developers.google.com/web/updates/2018/06/feature-policy 5 + 6 + # Rails.application.config.permissions_policy do |policy| 7 + # policy.camera :none 8 + # policy.gyroscope :none 9 + # policy.microphone :none 10 + # policy.usb :none 11 + # policy.fullscreen :self 12 + # policy.payment :self, "https://secure.example.com" 13 + # end
+14
config/initializers/wrap_parameters.rb
··· 1 + # Be sure to restart your server when you modify this file. 2 + 3 + # This file contains settings for ActionController::ParamsWrapper which 4 + # is enabled by default. 5 + 6 + # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 + ActiveSupport.on_load(:action_controller) do 8 + wrap_parameters format: [:json] 9 + end 10 + 11 + # To enable root element in JSON for ActiveRecord objects. 12 + # ActiveSupport.on_load(:active_record) do 13 + # self.include_root_in_json = true 14 + # end
+65
config/locales/devise.en.yml
··· 1 + # Additional translations at https://github.com/heartcombo/devise/wiki/I18n 2 + 3 + en: 4 + devise: 5 + confirmations: 6 + confirmed: "Your email address has been successfully confirmed." 7 + send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes." 8 + send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes." 9 + failure: 10 + already_authenticated: "You are already signed in." 11 + inactive: "Your account is not activated yet." 12 + invalid: "Invalid %{authentication_keys} or password." 13 + locked: "Your account is locked." 14 + last_attempt: "You have one more attempt before your account is locked." 15 + not_found_in_database: "Invalid %{authentication_keys} or password." 16 + timeout: "Your session expired. Please sign in again to continue." 17 + unauthenticated: "You need to sign in or sign up before continuing." 18 + unconfirmed: "You have to confirm your email address before continuing." 19 + mailer: 20 + confirmation_instructions: 21 + subject: "Confirmation instructions" 22 + reset_password_instructions: 23 + subject: "Reset password instructions" 24 + unlock_instructions: 25 + subject: "Unlock instructions" 26 + email_changed: 27 + subject: "Email Changed" 28 + password_change: 29 + subject: "Password Changed" 30 + omniauth_callbacks: 31 + failure: "Could not authenticate you from %{kind} because \"%{reason}\"." 32 + success: "Successfully authenticated from %{kind} account." 33 + passwords: 34 + no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." 35 + send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes." 36 + send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." 37 + updated: "Your password has been changed successfully. You are now signed in." 38 + updated_not_active: "Your password has been changed successfully." 39 + registrations: 40 + destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon." 41 + signed_up: "Welcome! You have signed up successfully." 42 + signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." 43 + signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." 44 + signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." 45 + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address." 46 + updated: "Your account has been updated successfully." 47 + updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again." 48 + sessions: 49 + signed_in: "Signed in successfully." 50 + signed_out: "Signed out successfully." 51 + already_signed_out: "Signed out successfully." 52 + unlocks: 53 + send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes." 54 + send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes." 55 + unlocked: "Your account has been unlocked successfully. Please sign in to continue." 56 + errors: 57 + messages: 58 + already_confirmed: "was already confirmed, please try signing in" 59 + confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" 60 + expired: "has expired, please request a new one" 61 + not_found: "not found" 62 + not_locked: "was not locked" 63 + not_saved: 64 + one: "1 error prohibited this %{resource} from being saved:" 65 + other: "%{count} errors prohibited this %{resource} from being saved:"
+31
config/locales/en.yml
··· 1 + # Files in the config/locales directory are used for internationalization and 2 + # are automatically loaded by Rails. If you want to use locales other than 3 + # English, add the necessary files in this directory. 4 + # 5 + # To use the locales, use `I18n.t`: 6 + # 7 + # I18n.t "hello" 8 + # 9 + # In views, this is aliased to just `t`: 10 + # 11 + # <%= t("hello") %> 12 + # 13 + # To use a different locale, set it with `I18n.locale`: 14 + # 15 + # I18n.locale = :es 16 + # 17 + # This would use the information in config/locales/es.yml. 18 + # 19 + # To learn more about the API, please read the Rails Internationalization guide 20 + # at https://guides.rubyonrails.org/i18n.html. 21 + # 22 + # Be aware that YAML interprets the following case-insensitive strings as 23 + # booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings 24 + # must be quoted to be interpreted as strings. For example: 25 + # 26 + # en: 27 + # "yes": yup 28 + # enabled: "ON" 29 + 30 + en: 31 + hello: "Hello world"
+35
config/puma.rb
··· 1 + # This configuration file will be evaluated by Puma. The top-level methods that 2 + # are invoked here are part of Puma's configuration DSL. For more information 3 + # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. 4 + 5 + # Puma can serve each request in a thread from an internal thread pool. 6 + # The `threads` method setting takes two numbers: a minimum and maximum. 7 + # Any libraries that use thread pools should be configured to match 8 + # the maximum value specified for Puma. Default is set to 5 threads for minimum 9 + # and maximum; this matches the default thread size of Active Record. 10 + max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } 11 + min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } 12 + threads min_threads_count, max_threads_count 13 + 14 + # Specifies that the worker count should equal the number of processors in production. 15 + if ENV["RAILS_ENV"] == "production" 16 + require "concurrent-ruby" 17 + worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) 18 + workers worker_count if worker_count > 1 19 + end 20 + 21 + # Specifies the `worker_timeout` threshold that Puma will use to wait before 22 + # terminating a worker in development environments. 23 + worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" 24 + 25 + # Specifies the `port` that Puma will listen on to receive requests; default is 3000. 26 + port ENV.fetch("PORT") { 3000 } 27 + 28 + # Specifies the `environment` that Puma will run in. 29 + environment ENV.fetch("RAILS_ENV") { "development" } 30 + 31 + # Specifies the `pidfile` that Puma will use. 32 + pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } 33 + 34 + # Allow puma to be restarted by `bin/rails restart` command. 35 + plugin :tmp_restart
+48
config/routes.rb
··· 1 + Rails.application.routes.draw do 2 + get 'tags/index' 3 + get 'tags/create' 4 + resources :galleries 5 + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html 6 + 7 + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. 8 + # Can be used by load balancers and uptime monitors to verify that the app is live. 9 + get "up" => "rails/health#show", as: :rails_health_check 10 + 11 + # Defines the root path route ("/") 12 + # root "posts#index" 13 + end 14 + 15 + Rails.application.routes.draw do 16 + get 'tags/index' 17 + get 'tags/create' 18 + get "/tags", to: "tags#index" 19 + get "tags/:id" => "tags#show", as: :tag 20 + 21 + resources :galleries 22 + get "/articles", to: "articles#index" 23 + # get 'tags/:tag', to: 'articles#index', as: "tag" 24 + # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html 25 + end 26 + 27 + Rails.application.routes.draw do 28 + resources :galleries 29 + get "/users", to: "users#index", via: "get" 30 + end 31 + 32 + Rails.application.routes.draw do 33 + resources :galleries 34 + root "articles#index" 35 + 36 + resources :profiles 37 + resources :articles do 38 + resources :comments 39 + end 40 + 41 + Rails.application.routes.draw do 42 + resources :galleries 43 + devise_for :users, controllers: { registrations: "users/registrations" } 44 + get "users/:id" => "users#show", as: :user 45 + 46 + resources :profiles 47 + end 48 + end
+6
config/spring.rb
··· 1 + Spring.watch( 2 + ".ruby-version", 3 + ".rbenv-vars", 4 + "tmp/restart.txt", 5 + "tmp/caching-dev.txt" 6 + )
+34
config/storage.yml
··· 1 + test: 2 + service: Disk 3 + root: <%= Rails.root.join("tmp/storage") %> 4 + 5 + local: 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 ]
lib/assets/.keep

This is a binary file and will not be displayed.

lib/tasks/.keep

This is a binary file and will not be displayed.

log/.keep

This is a binary file and will not be displayed.

+11
package.json
··· 1 + { 2 + "name": "blog", 3 + "private": true, 4 + "dependencies": { 5 + "@rails/ujs": "^6.0.0", 6 + "turbolinks": "^5.2.0", 7 + "@rails/activestorage": "^6.0.0", 8 + "@rails/actioncable": "^6.0.0" 9 + }, 10 + "version": "0.1.0" 11 + }
+67
public/404.html
··· 1 + <!DOCTYPE html> 2 + <html> 3 + <head> 4 + <title>The page you were looking for doesn't exist (404)</title> 5 + <meta name="viewport" content="width=device-width,initial-scale=1"> 6 + <style> 7 + .rails-default-error-page { 8 + background-color: #EFEFEF; 9 + color: #2E2F30; 10 + text-align: center; 11 + font-family: arial, sans-serif; 12 + margin: 0; 13 + } 14 + 15 + .rails-default-error-page div.dialog { 16 + width: 95%; 17 + max-width: 33em; 18 + margin: 4em auto 0; 19 + } 20 + 21 + .rails-default-error-page div.dialog > div { 22 + border: 1px solid #CCC; 23 + border-right-color: #999; 24 + border-left-color: #999; 25 + border-bottom-color: #BBB; 26 + border-top: #B00100 solid 4px; 27 + border-top-left-radius: 9px; 28 + border-top-right-radius: 9px; 29 + background-color: white; 30 + padding: 7px 12% 0; 31 + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); 32 + } 33 + 34 + .rails-default-error-page h1 { 35 + font-size: 100%; 36 + color: #730E15; 37 + line-height: 1.5em; 38 + } 39 + 40 + .rails-default-error-page div.dialog > p { 41 + margin: 0 0 1em; 42 + padding: 1em; 43 + background-color: #F7F7F7; 44 + border: 1px solid #CCC; 45 + border-right-color: #999; 46 + border-left-color: #999; 47 + border-bottom-color: #999; 48 + border-bottom-left-radius: 4px; 49 + border-bottom-right-radius: 4px; 50 + border-top-color: #DADADA; 51 + color: #666; 52 + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); 53 + } 54 + </style> 55 + </head> 56 + 57 + <body class="rails-default-error-page"> 58 + <!-- This file lives in public/404.html --> 59 + <div class="dialog"> 60 + <div> 61 + <h1>The page you were looking for doesn't exist.</h1> 62 + <p>You may have mistyped the address or the page may have moved.</p> 63 + </div> 64 + <p>If you are the application owner check the logs for more information.</p> 65 + </div> 66 + </body> 67 + </html>
+67
public/422.html
··· 1 + <!DOCTYPE html> 2 + <html> 3 + <head> 4 + <title>The change you wanted was rejected (422)</title> 5 + <meta name="viewport" content="width=device-width,initial-scale=1"> 6 + <style> 7 + .rails-default-error-page { 8 + background-color: #EFEFEF; 9 + color: #2E2F30; 10 + text-align: center; 11 + font-family: arial, sans-serif; 12 + margin: 0; 13 + } 14 + 15 + .rails-default-error-page div.dialog { 16 + width: 95%; 17 + max-width: 33em; 18 + margin: 4em auto 0; 19 + } 20 + 21 + .rails-default-error-page div.dialog > div { 22 + border: 1px solid #CCC; 23 + border-right-color: #999; 24 + border-left-color: #999; 25 + border-bottom-color: #BBB; 26 + border-top: #B00100 solid 4px; 27 + border-top-left-radius: 9px; 28 + border-top-right-radius: 9px; 29 + background-color: white; 30 + padding: 7px 12% 0; 31 + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); 32 + } 33 + 34 + .rails-default-error-page h1 { 35 + font-size: 100%; 36 + color: #730E15; 37 + line-height: 1.5em; 38 + } 39 + 40 + .rails-default-error-page div.dialog > p { 41 + margin: 0 0 1em; 42 + padding: 1em; 43 + background-color: #F7F7F7; 44 + border: 1px solid #CCC; 45 + border-right-color: #999; 46 + border-left-color: #999; 47 + border-bottom-color: #999; 48 + border-bottom-left-radius: 4px; 49 + border-bottom-right-radius: 4px; 50 + border-top-color: #DADADA; 51 + color: #666; 52 + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); 53 + } 54 + </style> 55 + </head> 56 + 57 + <body class="rails-default-error-page"> 58 + <!-- This file lives in public/422.html --> 59 + <div class="dialog"> 60 + <div> 61 + <h1>The change you wanted was rejected.</h1> 62 + <p>Maybe you tried to change something you didn't have access to.</p> 63 + </div> 64 + <p>If you are the application owner check the logs for more information.</p> 65 + </div> 66 + </body> 67 + </html>
+66
public/500.html
··· 1 + <!DOCTYPE html> 2 + <html> 3 + <head> 4 + <title>We're sorry, but something went wrong (500)</title> 5 + <meta name="viewport" content="width=device-width,initial-scale=1"> 6 + <style> 7 + .rails-default-error-page { 8 + background-color: #EFEFEF; 9 + color: #2E2F30; 10 + text-align: center; 11 + font-family: arial, sans-serif; 12 + margin: 0; 13 + } 14 + 15 + .rails-default-error-page div.dialog { 16 + width: 95%; 17 + max-width: 33em; 18 + margin: 4em auto 0; 19 + } 20 + 21 + .rails-default-error-page div.dialog > div { 22 + border: 1px solid #CCC; 23 + border-right-color: #999; 24 + border-left-color: #999; 25 + border-bottom-color: #BBB; 26 + border-top: #B00100 solid 4px; 27 + border-top-left-radius: 9px; 28 + border-top-right-radius: 9px; 29 + background-color: white; 30 + padding: 7px 12% 0; 31 + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); 32 + } 33 + 34 + .rails-default-error-page h1 { 35 + font-size: 100%; 36 + color: #730E15; 37 + line-height: 1.5em; 38 + } 39 + 40 + .rails-default-error-page div.dialog > p { 41 + margin: 0 0 1em; 42 + padding: 1em; 43 + background-color: #F7F7F7; 44 + border: 1px solid #CCC; 45 + border-right-color: #999; 46 + border-left-color: #999; 47 + border-bottom-color: #999; 48 + border-bottom-left-radius: 4px; 49 + border-bottom-right-radius: 4px; 50 + border-top-color: #DADADA; 51 + color: #666; 52 + box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); 53 + } 54 + </style> 55 + </head> 56 + 57 + <body class="rails-default-error-page"> 58 + <!-- This file lives in public/500.html --> 59 + <div class="dialog"> 60 + <div> 61 + <h1>We're sorry, but something went wrong.</h1> 62 + </div> 63 + <p>If you are the application owner check the logs for more information.</p> 64 + </div> 65 + </body> 66 + </html>
public/apple-touch-icon-precomposed.png

This is a binary file and will not be displayed.

public/apple-touch-icon.png

This is a binary file and will not be displayed.

public/favicon.ico

This is a binary file and will not be displayed.

+1
public/robots.txt
··· 1 + # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
storage/.keep

This is a binary file and will not be displayed.

+5
test/application_system_test_case.rb
··· 1 + require "test_helper" 2 + 3 + class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 + end
+13
test/channels/application_cable/connection_test.rb
··· 1 + require "test_helper" 2 + 3 + module ApplicationCable 4 + class ConnectionTest < ActionCable::Connection::TestCase 5 + # test "connects with cookies" do 6 + # cookies.signed[:user_id] = 42 7 + # 8 + # connect 9 + # 10 + # assert_equal connection.user_id, "42" 11 + # end 12 + end 13 + end
test/controllers/.keep

This is a binary file and will not be displayed.

+7
test/controllers/articles_controller_test.rb
··· 1 + require "test_helper" 2 + 3 + class ArticlesControllerTest < ActionDispatch::IntegrationTest 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/controllers/comments_controller_test.rb
··· 1 + require "test_helper" 2 + 3 + class CommentsControllerTest < ActionDispatch::IntegrationTest 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+48
test/controllers/galleries_controller_test.rb
··· 1 + require "test_helper" 2 + 3 + class GalleriesControllerTest < ActionDispatch::IntegrationTest 4 + setup do 5 + @gallery = galleries(:one) 6 + end 7 + 8 + test "should get index" do 9 + get galleries_url 10 + assert_response :success 11 + end 12 + 13 + test "should get new" do 14 + get new_gallery_url 15 + assert_response :success 16 + end 17 + 18 + test "should create gallery" do 19 + assert_difference("Gallery.count") do 20 + post galleries_url, params: { gallery: { description: @gallery.description, name: @gallery.name, user_id: @gallery.user_id } } 21 + end 22 + 23 + assert_redirected_to gallery_url(Gallery.last) 24 + end 25 + 26 + test "should show gallery" do 27 + get gallery_url(@gallery) 28 + assert_response :success 29 + end 30 + 31 + test "should get edit" do 32 + get edit_gallery_url(@gallery) 33 + assert_response :success 34 + end 35 + 36 + test "should update gallery" do 37 + patch gallery_url(@gallery), params: { gallery: { description: @gallery.description, name: @gallery.name, user_id: @gallery.user_id } } 38 + assert_redirected_to gallery_url(@gallery) 39 + end 40 + 41 + test "should destroy gallery" do 42 + assert_difference("Gallery.count", -1) do 43 + delete gallery_url(@gallery) 44 + end 45 + 46 + assert_redirected_to galleries_url 47 + end 48 + end
+7
test/controllers/profiles_controller_test.rb
··· 1 + require "test_helper" 2 + 3 + class ProfilesControllerTest < ActionDispatch::IntegrationTest 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+13
test/controllers/tags_controller_test.rb
··· 1 + require "test_helper" 2 + 3 + class TagsControllerTest < ActionDispatch::IntegrationTest 4 + test "should get index" do 5 + get tags_index_url 6 + assert_response :success 7 + end 8 + 9 + test "should get create" do 10 + get tags_create_url 11 + assert_response :success 12 + end 13 + end
+8
test/controllers/user_controller_test.rb
··· 1 + require "test_helper" 2 + 3 + class UserControllerTest < ActionDispatch::IntegrationTest 4 + test "should get index" do 5 + get user_index_url 6 + assert_response :success 7 + end 8 + end
+9
test/fixtures/articles.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + one: 4 + title: MyString 5 + body: MyText 6 + 7 + two: 8 + title: MyString 9 + body: MyText
+11
test/fixtures/comments.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + one: 4 + commenter: MyString 5 + body: MyText 6 + article: one 7 + 8 + two: 9 + commenter: MyString 10 + body: MyText 11 + article: two
test/fixtures/files/.keep

This is a binary file and will not be displayed.

+11
test/fixtures/galleries.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + one: 4 + name: MyString 5 + description: MyText 6 + user: one 7 + 8 + two: 9 + name: MyString 10 + description: MyText 11 + user: two
+11
test/fixtures/profiles.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + one: 4 + bio: MyText 5 + age: 1 6 + user: one 7 + 8 + two: 9 + bio: MyText 10 + age: 1 11 + user: two
+9
test/fixtures/taggings.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + one: 4 + article: one 5 + tag: one 6 + 7 + two: 8 + article: two 9 + tag: two
+7
test/fixtures/tags.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + one: 4 + name: MyString 5 + 6 + two: 7 + name: MyString
+11
test/fixtures/users.yml
··· 1 + # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 + 3 + # This model initially had no columns defined. If you add columns to the 4 + # model remove the "{}" from the fixture names and add the columns immediately 5 + # below each fixture, per the syntax in the comments below 6 + # 7 + one: {} 8 + # column: value 9 + # 10 + two: {} 11 + # column: value
test/helpers/.keep

This is a binary file and will not be displayed.

test/integration/.keep

This is a binary file and will not be displayed.

test/mailers/.keep

This is a binary file and will not be displayed.

test/models/.keep

This is a binary file and will not be displayed.

+7
test/models/article_test.rb
··· 1 + require "test_helper" 2 + 3 + class ArticleTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/models/comment_test.rb
··· 1 + require "test_helper" 2 + 3 + class CommentTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/models/gallery_test.rb
··· 1 + require "test_helper" 2 + 3 + class GalleryTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/models/profile_test.rb
··· 1 + require "test_helper" 2 + 3 + class ProfileTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/models/tag_test.rb
··· 1 + require "test_helper" 2 + 3 + class TagTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/models/tagging_test.rb
··· 1 + require "test_helper" 2 + 3 + class TaggingTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
+7
test/models/user_test.rb
··· 1 + require "test_helper" 2 + 3 + class UserTest < ActiveSupport::TestCase 4 + # test "the truth" do 5 + # assert true 6 + # end 7 + end
test/system/.keep

This is a binary file and will not be displayed.

+45
test/system/galleries_test.rb
··· 1 + require "application_system_test_case" 2 + 3 + class GalleriesTest < ApplicationSystemTestCase 4 + setup do 5 + @gallery = galleries(:one) 6 + end 7 + 8 + test "visiting the index" do 9 + visit galleries_url 10 + assert_selector "h1", text: "Galleries" 11 + end 12 + 13 + test "should create gallery" do 14 + visit galleries_url 15 + click_on "New gallery" 16 + 17 + fill_in "Description", with: @gallery.description 18 + fill_in "Name", with: @gallery.name 19 + fill_in "User", with: @gallery.user_id 20 + click_on "Create Gallery" 21 + 22 + assert_text "Gallery was successfully created" 23 + click_on "Back" 24 + end 25 + 26 + test "should update Gallery" do 27 + visit gallery_url(@gallery) 28 + click_on "Edit this gallery", match: :first 29 + 30 + fill_in "Description", with: @gallery.description 31 + fill_in "Name", with: @gallery.name 32 + fill_in "User", with: @gallery.user_id 33 + click_on "Update Gallery" 34 + 35 + assert_text "Gallery was successfully updated" 36 + click_on "Back" 37 + end 38 + 39 + test "should destroy Gallery" do 40 + visit gallery_url(@gallery) 41 + click_on "Destroy this gallery", match: :first 42 + 43 + assert_text "Gallery was successfully destroyed" 44 + end 45 + end
+15
test/test_helper.rb
··· 1 + ENV["RAILS_ENV"] ||= "test" 2 + require_relative "../config/environment" 3 + require "rails/test_help" 4 + 5 + module ActiveSupport 6 + class TestCase 7 + # Run tests in parallel with specified workers 8 + parallelize(workers: :number_of_processors) 9 + 10 + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 11 + fixtures :all 12 + 13 + # Add more helper methods to be used by all tests here... 14 + end 15 + end
tmp/.keep

This is a binary file and will not be displayed.

tmp/pids/.keep

This is a binary file and will not be displayed.

tmp/storage/.keep

This is a binary file and will not be displayed.

vendor/.keep

This is a binary file and will not be displayed.