1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00

Compare commits

..

No commits in common. "2f1f7db2183b0a9670d2c415547d044d66ffe859" and "2d4f6daba0b43fbbbf90d09b4b981658a6f9f94e" have entirely different histories.

33 changed files with 418 additions and 673 deletions

7
.gitattributes vendored
View File

@ -1,7 +0,0 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
# Mark the database schema as having been generated.
db/schema.rb linguist-generated
# Mark any vendored files as having been vendored.
vendor/* linguist-vendored

25
.gitignore vendored
View File

@ -9,34 +9,19 @@
# Ignore the default SQLite database. # Ignore the default SQLite database.
/db/*.sqlite3 /db/*.sqlite3
/db/*.sqlite3-* /db/*.sqlite3-journal
# Ignore all logfiles and tempfiles. # Ignore all logfiles and tempfiles.
/log/* /log/*.log
/tmp/* /tmp
!/log/.keep
!/tmp/.keep
# Ignore environment variables # Ignore environment variables
.env .env
# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
# Ignore dragonfly uploads # Ignore dragonfly uploads
/public/system /public/system
/public/packs /public/packs
/public/packs-test /public/packs-test
/node_modules /node_modules
# Ignore uploaded files in development. yarn-debug.log*
/storage/* .yarn-integrity
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep
/public/assets
# Ignore master key for decrypting credentials and more.
/config/master.key

View File

@ -1 +1 @@
ruby-3.2.1 2.5.1

View File

@ -1,2 +1,2 @@
ruby 3.2.1 ruby 2.5.1
nodejs 10.4.0 nodejs 10.4.0

21
Gemfile
View File

@ -1,33 +1,24 @@
source "https://rubygems.org" source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.2.1" ruby "2.5.1"
gem "rails", "~> 7.0.5", ">= 7.0.5.1"
gem "dotenv-rails", groups: %i[development test] gem "dotenv-rails", groups: %i[development test]
gem "bootsnap", require: false gem "rails", "5.2.4.1"
gem "delayed_job_active_record" gem "delayed_job_active_record"
gem "dragonfly" gem "dragonfly"
gem "http" gem "http"
gem "image_processing", "~> 1.2"
gem "importmap-rails"
gem "jbuilder"
gem "omniauth"
gem "omniauth-rails_csrf_protection"
gem "omniauth-github" gem "omniauth-github"
gem "pg" gem "pg"
gem "puma" gem "puma"
gem "sassc-rails" gem "sass-rails"
gem "simple_form" gem "simple_form"
gem "stimulus-rails"
gem "turbo-rails"
gem "uglifier" gem "uglifier"
gem "webpacker" gem "webpacker"
group :development do group :doc do
gem "web-console" gem "sdoc", require: false
end end
group :development, :test do group :development, :test do

View File

@ -1,381 +1,295 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (7.0.6) actioncable (5.2.4.1)
actionpack (= 7.0.6) actionpack (= 5.2.4.1)
activesupport (= 7.0.6)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailbox (7.0.6) actionmailer (5.2.4.1)
actionpack (= 7.0.6) actionpack (= 5.2.4.1)
activejob (= 7.0.6) actionview (= 5.2.4.1)
activerecord (= 7.0.6) activejob (= 5.2.4.1)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.6)
actionpack (= 7.0.6)
actionview (= 7.0.6)
activejob (= 7.0.6)
activesupport (= 7.0.6)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (7.0.6) actionpack (5.2.4.1)
actionview (= 7.0.6) actionview (= 5.2.4.1)
activesupport (= 7.0.6) activesupport (= 5.2.4.1)
rack (~> 2.0, >= 2.2.4) rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actiontext (7.0.6) actionview (5.2.4.1)
actionpack (= 7.0.6) activesupport (= 5.2.4.1)
activerecord (= 7.0.6)
activestorage (= 7.0.6)
activesupport (= 7.0.6)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.6)
activesupport (= 7.0.6)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (7.0.6) activejob (5.2.4.1)
activesupport (= 7.0.6) activesupport (= 5.2.4.1)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (7.0.6) activemodel (5.2.4.1)
activesupport (= 7.0.6) activesupport (= 5.2.4.1)
activerecord (7.0.6) activerecord (5.2.4.1)
activemodel (= 7.0.6) activemodel (= 5.2.4.1)
activesupport (= 7.0.6) activesupport (= 5.2.4.1)
activestorage (7.0.6) arel (>= 9.0)
actionpack (= 7.0.6) activestorage (5.2.4.1)
activejob (= 7.0.6) actionpack (= 5.2.4.1)
activerecord (= 7.0.6) activerecord (= 5.2.4.1)
activesupport (= 7.0.6) marcel (~> 0.3.1)
marcel (~> 1.0) activesupport (5.2.4.1)
mini_mime (>= 1.1.0)
activesupport (7.0.6)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2) i18n (>= 0.7, < 2)
minitest (>= 5.1) minitest (~> 5.1)
tzinfo (~> 2.0) tzinfo (~> 1.1)
addressable (2.8.4) addressable (2.7.0)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 5.0)
archive-zip (0.12.0) archive-zip (0.12.0)
io-like (~> 0.3.0) io-like (~> 0.3.0)
better_errors (2.10.1) arel (9.0.0)
better_errors (2.5.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0) erubi (>= 1.0.0)
rack (>= 0.9.0) rack (>= 0.9.0)
rouge (>= 1.0.0) binding_of_caller (0.8.0)
bindex (0.8.1)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
builder (3.2.4) builder (3.2.4)
capybara (3.39.2) capybara (3.31.0)
addressable addressable
matrix
mini_mime (>= 0.1.3) mini_mime (>= 0.1.3)
nokogiri (~> 1.8) nokogiri (~> 1.8)
rack (>= 1.6.0) rack (>= 1.6.0)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0) regexp_parser (~> 1.5)
xpath (~> 3.2) xpath (~> 3.2)
coderay (1.1.3) childprocess (3.0.0)
concurrent-ruby (1.2.2) coderay (1.1.2)
crack (0.4.5) concurrent-ruby (1.1.5)
rexml crack (0.4.3)
crass (1.0.6) safe_yaml (~> 1.0.0)
date (3.3.3) crass (1.0.5)
debug_inspector (1.1.0) debug_inspector (0.0.3)
delayed_job (4.1.11) delayed_job (4.1.8)
activesupport (>= 3.0, < 8.0) activesupport (>= 3.0, < 6.1)
delayed_job_active_record (4.1.7) delayed_job_active_record (4.1.4)
activerecord (>= 3.0, < 8.0) activerecord (>= 3.0, < 6.1)
delayed_job (>= 3.0, < 5) delayed_job (>= 3.0, < 5)
diff-lcs (1.5.0) diff-lcs (1.3)
domain_name (0.5.20190701) domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1) dotenv (2.7.5)
dotenv-rails (2.8.1) dotenv-rails (2.7.5)
dotenv (= 2.8.1) dotenv (= 2.7.5)
railties (>= 3.2) railties (>= 3.2, < 6.1)
dragonfly (1.4.0) dragonfly (1.2.0)
addressable (~> 2.3) addressable (~> 2.3)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (>= 1.3) rack (>= 1.3)
erubi (1.12.0) erubi (1.9.0)
execjs (2.8.1) execjs (2.7.0)
faraday (2.7.9) faraday (1.0.0)
faraday-net_http (>= 2.0, < 3.1) multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4) ffi (1.11.3)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi-compiler (1.0.1) ffi-compiler (1.0.1)
ffi (>= 1.0.0) ffi (>= 1.0.0)
rake rake
geckodriver-helper (0.24.0) geckodriver-helper (0.24.0)
archive-zip (~> 0.7) archive-zip (~> 0.7)
globalid (1.1.0) globalid (0.4.2)
activesupport (>= 5.0) activesupport (>= 4.2.0)
hashdiff (1.0.1) hashdiff (1.0.0)
hashie (5.0.0) hashie (3.6.0)
http (5.1.1) http (4.3.0)
addressable (~> 2.8) addressable (~> 2.3)
http-cookie (~> 1.0) http-cookie (~> 1.0)
http-form_data (~> 2.2) http-form_data (~> 2.2)
llhttp-ffi (~> 0.4.0) http-parser (~> 1.2.0)
http-cookie (1.0.5) http-cookie (1.0.3)
domain_name (~> 0.5) domain_name (~> 0.5)
http-form_data (2.3.0) http-form_data (2.2.0)
i18n (1.14.1) http-parser (1.2.1)
ffi-compiler (>= 1.0, < 2.0)
i18n (1.8.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
image_processing (1.12.2) io-like (0.3.0)
mini_magick (>= 4.9.5, < 5) jwt (2.2.1)
ruby-vips (>= 2.0.17, < 3) launchy (2.4.3)
importmap-rails (1.2.1) addressable (~> 2.3)
actionpack (>= 6.0.0) loofah (2.4.0)
railties (>= 6.0.0)
io-like (0.3.1)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jwt (2.7.1)
launchy (2.5.2)
addressable (~> 2.8)
llhttp-ffi (0.4.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
loofah (2.21.3)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.5.9)
mail (2.8.1) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
net-imap marcel (0.3.3)
net-pop mimemagic (~> 0.3.2)
net-smtp method_source (0.9.2)
marcel (1.0.2) mimemagic (0.3.3)
matrix (0.4.2) mini_mime (1.0.2)
method_source (1.0.0) mini_portile2 (2.4.0)
mini_magick (4.12.0) minitest (5.13.0)
mini_mime (1.1.2) multi_json (1.14.1)
minitest (5.18.1)
msgpack (1.7.1)
multi_json (1.15.0)
multi_xml (0.6.0) multi_xml (0.6.0)
net-imap (0.3.6) multipart-post (2.1.1)
date nio4r (2.5.2)
net-protocol nokogiri (1.10.7)
net-pop (0.1.2) mini_portile2 (~> 2.4.0)
net-protocol oauth2 (1.4.3)
net-protocol (0.2.1) faraday (>= 0.8, < 2.0)
timeout
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.2-arm64-darwin)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0) jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5) multi_xml (~> 0.5)
rack (>= 1.2, < 4) rack (>= 1.2, < 3)
snaky_hash (~> 2.0) omniauth (1.9.0)
version_gem (~> 1.1) hashie (>= 3.4.6, < 3.7.0)
omniauth (2.1.1) rack (>= 1.6.2, < 3)
hashie (>= 3.4.6) omniauth-github (1.4.0)
rack (>= 2.2.3) omniauth (~> 1.5)
rack-protection omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-github (2.0.1) omniauth-oauth2 (1.6.0)
omniauth (~> 2.0) oauth2 (~> 1.1)
omniauth-oauth2 (~> 1.8) omniauth (~> 1.9)
omniauth-oauth2 (1.8.0) pg (1.2.2)
oauth2 (>= 1.4, < 3) pry (0.12.2)
omniauth (~> 2.0) coderay (~> 1.1.0)
omniauth-rails_csrf_protection (1.0.1) method_source (~> 0.9.0)
actionpack (>= 4.2) public_suffix (4.0.3)
omniauth (~> 2.0) puma (3.12.1)
pg (1.5.3) rack (2.2.2)
pry (0.14.2) rack-proxy (0.6.5)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.1)
puma (6.3.0)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.7)
rack-protection (3.0.6)
rack rack
rack-proxy (0.7.6) rack-test (1.1.0)
rack rack (>= 1.0, < 3)
rack-test (2.1.0) rails (5.2.4.1)
rack (>= 1.3) actioncable (= 5.2.4.1)
rails (7.0.6) actionmailer (= 5.2.4.1)
actioncable (= 7.0.6) actionpack (= 5.2.4.1)
actionmailbox (= 7.0.6) actionview (= 5.2.4.1)
actionmailer (= 7.0.6) activejob (= 5.2.4.1)
actionpack (= 7.0.6) activemodel (= 5.2.4.1)
actiontext (= 7.0.6) activerecord (= 5.2.4.1)
actionview (= 7.0.6) activestorage (= 5.2.4.1)
activejob (= 7.0.6) activesupport (= 5.2.4.1)
activemodel (= 7.0.6) bundler (>= 1.3.0)
activerecord (= 7.0.6) railties (= 5.2.4.1)
activestorage (= 7.0.6) sprockets-rails (>= 2.0.0)
activesupport (= 7.0.6) rails-dom-testing (2.0.3)
bundler (>= 1.15.0) activesupport (>= 4.2.0)
railties (= 7.0.6)
rails-dom-testing (2.1.1)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0) rails-html-sanitizer (1.3.0)
loofah (~> 2.21) loofah (~> 2.3)
nokogiri (~> 1.14) railties (5.2.4.1)
railties (7.0.6) actionpack (= 5.2.4.1)
actionpack (= 7.0.6) activesupport (= 5.2.4.1)
activesupport (= 7.0.6)
method_source method_source
rake (>= 12.2) rake (>= 0.8.7)
thor (~> 1.0) thor (>= 0.19.0, < 2.0)
zeitwerk (~> 2.5) rake (13.0.1)
rake (13.0.6) rb-fsevent (0.10.3)
regexp_parser (2.8.1) rb-inotify (0.9.10)
rexml (3.2.5) ffi (>= 0.5.0, < 2)
rouge (4.1.2) rdoc (6.0.4)
rspec-core (3.12.2) regexp_parser (1.6.0)
rspec-support (~> 3.12.0) rspec-core (3.9.0)
rspec-expectations (3.12.3) rspec-support (~> 3.9.0)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0) rspec-support (~> 3.9.0)
rspec-mocks (3.12.5) rspec-mocks (3.9.0)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0) rspec-support (~> 3.9.0)
rspec-rails (6.0.3) rspec-rails (3.9.0)
actionpack (>= 6.1) actionpack (>= 3.0)
activesupport (>= 6.1) activesupport (>= 3.0)
railties (>= 6.1) railties (>= 3.0)
rspec-core (~> 3.12) rspec-core (~> 3.9.0)
rspec-expectations (~> 3.12) rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.12) rspec-mocks (~> 3.9.0)
rspec-support (~> 3.12) rspec-support (~> 3.9.0)
rspec-support (3.12.1) rspec-support (3.9.0)
ruby-vips (2.1.4) rubyzip (2.0.0)
ffi (~> 1.12) safe_yaml (1.0.5)
ruby2_keywords (0.0.5) sass (3.5.7)
rubyzip (2.3.2) sass-listen (~> 4.0.0)
sassc (2.4.0) sass-listen (4.0.0)
ffi (~> 1.9) rb-fsevent (~> 0.9, >= 0.9.4)
sassc-rails (2.1.2) rb-inotify (~> 0.9, >= 0.9.7)
railties (>= 4.0.0) sass-rails (5.0.7)
sassc (>= 2.0) railties (>= 4.0.0, < 6)
sprockets (> 3.0) sass (~> 3.1)
sprockets-rails sprockets (>= 2.8, < 4.0)
tilt sprockets-rails (>= 2.0, < 4.0)
selenium-webdriver (4.10.0) tilt (>= 1.1, < 3)
rexml (~> 3.2, >= 3.2.5) sdoc (1.0.0)
rubyzip (>= 1.2.2, < 3.0) rdoc (>= 5.0)
websocket (~> 1.0) selenium-webdriver (3.142.7)
semantic_range (3.0.0) childprocess (>= 0.5, < 4.0)
shoulda-matchers (5.3.0) rubyzip (>= 1.2.2)
activesupport (>= 5.2.0) shoulda-matchers (4.2.0)
simple_form (5.2.0) activesupport (>= 4.2.0)
actionpack (>= 5.2) simple_form (4.1.0)
activemodel (>= 5.2) actionpack (>= 5.0)
snaky_hash (2.0.1) activemodel (>= 5.0)
hashie sprockets (3.7.2)
version_gem (~> 1.1, >= 1.1.1)
sprockets (4.2.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4) rack (> 1, < 3)
sprockets-rails (3.4.2) sprockets-rails (3.2.1)
actionpack (>= 5.2) actionpack (>= 4.0)
activesupport (>= 5.2) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
stimulus-rails (1.2.1) thor (1.0.1)
railties (>= 6.0.0) thread_safe (0.3.6)
thor (1.2.2) tilt (2.0.8)
tilt (2.2.0) tzinfo (1.2.6)
timeout (0.4.0) thread_safe (~> 0.1)
turbo-rails (1.4.0)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (4.2.0) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.8.2) unf_ext (0.0.7.6)
version_gem (1.1.3) webmock (3.8.2)
web-console (4.2.0) addressable (>= 2.3.6)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2) crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0) hashdiff (>= 0.4.0, < 2.0.0)
webpacker (5.4.4) webpacker (4.2.2)
activesupport (>= 5.2) activesupport (>= 4.2)
rack-proxy (>= 0.6.1) rack-proxy (>= 0.6.1)
railties (>= 5.2) railties (>= 4.2)
semantic_range (>= 2.3.0) websocket-driver (0.7.1)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5) websocket-extensions (0.1.4)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
zeitwerk (2.6.8)
PLATFORMS PLATFORMS
arm64-darwin-22 ruby
DEPENDENCIES DEPENDENCIES
better_errors better_errors
binding_of_caller binding_of_caller
bootsnap
capybara capybara
delayed_job_active_record delayed_job_active_record
dotenv-rails dotenv-rails
dragonfly dragonfly
geckodriver-helper geckodriver-helper
http http
image_processing (~> 1.2)
importmap-rails
jbuilder
launchy launchy
omniauth
omniauth-github omniauth-github
omniauth-rails_csrf_protection
pg pg
pry pry
puma puma
rails (~> 7.0.5, >= 7.0.5.1) rails (= 5.2.4.1)
rspec-rails rspec-rails
sassc-rails sass-rails
sdoc
selenium-webdriver selenium-webdriver
shoulda-matchers shoulda-matchers
simple_form simple_form
stimulus-rails
turbo-rails
uglifier uglifier
web-console
webmock webmock
webpacker webpacker
RUBY VERSION RUBY VERSION
ruby 3.2.1p31 ruby 2.5.1p57
BUNDLED WITH BUNDLED WITH
2.4.10 1.16.4

View File

@ -1,6 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake, # Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require_relative "config/application" require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks MyImages::Application.load_tasks

View File

@ -2,6 +2,7 @@ class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock # Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked # retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available # Most jobs are safe to ignore if the underlying records
# are no longer available
# discard_on ActiveJob::DeserializationError # discard_on ActiveJob::DeserializationError
end end

View File

@ -1,5 +1,3 @@
require "clarifai"
class TagImageJob < ApplicationJob class TagImageJob < ApplicationJob
queue_as :default queue_as :default
@ -7,6 +5,6 @@ class TagImageJob < ApplicationJob
image = Image.find(image_id) image = Image.find(image_id)
tags = Clarifai.new(image.image.file.path).tags tags = Clarifai.new(image.image.file.path).tags
image.update(tags: tags) image.update_attributes(tags: tags)
end end
end end

View File

@ -1,5 +1,5 @@
<% content_for :title do %> <% content_for :title do %>
<h1><%= link_to "My Images", user_images_path %></h1> <h1>My Images</h1>
&rarr; &rarr;
<%= @image.image.name %> <%= @image.image.name %>
<% end %> <% end %>

View File

@ -1,7 +1,7 @@
<% content_for :title, "My Images" %> <% content_for :title, "My Images" %>
<div class="centre-stage"> <div class="centre-stage">
<%= link_to '/auth/github', class: "github-button", method: :post do %> <%= link_to '/auth/github', class: "github-button" do %>
<%= image_tag "github.svg" %> <%= image_tag "github.svg" %>
Sign in with GitHub Sign in with GitHub
<% end %> <% end %>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
APP_PATH = File.expand_path("../config/application", __dir__) APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative "../config/boot" require_relative '../config/boot'
require "rails/commands" require 'rails/commands'

View File

@ -1,4 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require_relative "../config/boot" require_relative '../config/boot'
require "rake" require 'rake'
Rake.application.run Rake.application.run

View File

@ -1,33 +1,23 @@
#!/usr/bin/env ruby #!/usr/bin/env sh
require "fileutils"
# path to your application root. # Set up Rails app. Run this script immediately after cloning the codebase.
APP_ROOT = File.expand_path("..", __dir__) # https://github.com/thoughtbot/guides/tree/master/protocol
def system!(*args) # Exit if any subcommand fails
system(*args) || abort("\n== Command #{args} failed ==") set -e
end
FileUtils.chdir APP_ROOT do # Set up Ruby dependencies via Bundler
# This script is a way to set up or update your development environment automatically. gem list bundler --installed >/dev/null || gem install bundler
# This script is idempotent, so that you can run it at any time and get an expectable outcome. gem list foreman --installed >/dev/null || gem install foreman
# Add necessary setup steps to this file. bundle install
puts "== Installing dependencies ==" # Install Javascript dependencies
system! "gem install bundler --conservative" yarn install
system("bundle check") || system!("bundle install")
# puts "\n== Copying sample files ==" # Set up configurable environment variables
# unless File.exist?("config/database.yml") if [ ! -f .env ]; then
# FileUtils.cp "config/database.yml.sample", "config/database.yml" cp .env.sample .env
# end fi
puts "\n== Preparing database ==" # Set up database and add any development seed data
system! "bin/rails db:prepare" bundle exec rake db:setup
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"
puts "\n== Restarting application server =="
system! "bin/rails restart"
end

View File

@ -1,6 +1,4 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require_relative "config/environment" require ::File.expand_path('../config/environment', __FILE__)
run Rails.application run Rails.application
Rails.application.load_server

View File

@ -1,6 +1,6 @@
require_relative "boot" require File.expand_path('../boot', __FILE__)
require "rails/all" require 'rails/all'
# Require the gems listed in Gemfile, including any gems # Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production. # you've limited to :test, :development, or :production.
@ -8,15 +8,25 @@ Bundler.require(*Rails.groups)
module MyImages module MyImages
class Application < Rails::Application class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version. # Settings in config/environments/* take precedence over
config.load_defaults 7.0 # those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Configuration for the application, engines, and railties goes here. # Set Time.zone default to the specified zone and make
# # Active Record auto-convert to this zone.
# These settings can be overridden in specific environments using the files # Run "rake -D time" for a list of tasks for finding time zone names.
# in config/environments, which are processed later. # Default is UTC.
# # config.time_zone = 'Central Time (US & Canada)'
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras") # The default locale is :en and all translations from
# config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[
# Rails.root.join('my', 'locales', '*.{rb,yml}').to_s
# ]
# config.i18n.default_locale = :de
config.autoload_paths += %W(#{config.root}/lib)
config.active_job.queue_adapter = :delayed_job
end end
end end

View File

@ -1,4 +1,4 @@
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) # Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require "bundler/setup" # Set up gems listed in the Gemfile. require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require "bootsnap/setup" # Speed up boot time by caching expensive operations.

View File

@ -1,5 +1,5 @@
# Load the Rails application. # Load the Rails application.
require_relative "application" require File.expand_path('../application', __FILE__)
# Initialize the Rails application. # Initialize the Rails application.
Rails.application.initialize! MyImages::Application.initialize!

View File

@ -1,70 +1,33 @@
require "active_support/core_ext/integer/time" MyImages::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded any time # In the development environment your application's code is reloaded on
# it changes. This slows down response time but is perfect for development # every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes. # since you don't have to restart the web server when you make code changes.
config.cache_classes = false config.cache_classes = false
# Do not eager load code on boot. # Do not eager load code on boot.
config.eager_load = false config.eager_load = false
# Show full error reports. # Show full error reports and disable caching.
config.consider_all_requests_local = true config.consider_all_requests_local = true
# Enable server timing
config.server_timing = true
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
config.cache_store = :null_store
end
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# Don't care if the mailer can't send. # Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger. # Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log config.active_support.deprecation = :log
# Raise exceptions for disallowed deprecations. # Raise an error on page load if there are pending migrations
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load config.active_record.migration_error = :page_load
# Highlight code that triggered database queries in logs. # Debug mode disables concatenation and preprocessing of assets.
config.active_record.verbose_query_logs = true # This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# Suppress logger output for asset requests. config.generators do |g|
config.assets.quiet = true g.test_framework :rspec
end
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
end end

View File

@ -1,13 +1,11 @@
require "active_support/core_ext/integer/time" MyImages::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb. # Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests. # Code is not reloaded between requests.
config.cache_classes = true config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and # Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers # your application in memory, allowing both thread web servers
# and those relying on copy on write to perform better. # and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance. # Rake tasks automatically ignore this option for performance.
config.eager_load = true config.eager_load = true
@ -16,53 +14,52 @@ Rails.application.configure do
config.consider_all_requests_local = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] # Enable Rack::Cache to put a simple HTTP cache in front of your application
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files). # Add `rack-cache` to your Gemfile before enabling this.
# config.require_master_key = true # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable serving static files from the `/public` folder by default since # Disable Rails's static asset server (Apache or nginx will already do this).
# Apache or NGINX already handles this. config.serve_static_assets = false
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
# Compress CSS using a preprocessor. # Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass # config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed. # Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false config.assets.compile = false
# Enable serving of images, stylesheets, and JavaScripts from an asset server. # Generate digests for assets URLs.
# config.asset_host = "http://assets.example.com" config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
# Specifies the header that your server uses for sending files. # Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# Mount Action Cable outside main process or domain.
# config.action_cable.mount_path = nil
# config.action_cable.url = "wss://example.com/cable"
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true # config.force_ssl = true
# Include generic and useful information about system operation, but avoid logging too much # Set to :debug to see everything in the log.
# information to avoid inadvertent exposure of personally identifiable information (PII).
config.log_level = :info config.log_level = :info
# Prepend all log lines with the following tags. # Prepend all log lines with the following tags.
config.log_tags = [ :request_id ] # config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production. # Use a different cache store in production.
# config.cache_store = :mem_cache_store # config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment). # Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.active_job.queue_adapter = :resque # config.action_controller.asset_host = "http://assets.example.com"
# config.active_job.queue_name_prefix = "my_images_production"
config.action_mailer.perform_caching = false # Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )
# Ignore bad email addresses and do not raise email delivery errors. # Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@ -72,22 +69,12 @@ Rails.application.configure do
# the I18n.default_locale when a translation can not be found). # the I18n.default_locale when a translation can not be found).
config.i18n.fallbacks = true config.i18n.fallbacks = true
# Don't log any deprecations. # Send deprecation notices to registered listeners.
config.active_support.report_deprecations = false config.active_support.deprecation = :notify
# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false
# Use default logging formatter so that PID and timestamp are not suppressed. # Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new config.log_formatter = ::Logger::Formatter.new
# Use a different logger for distributed setups.
# require "syslog/logger"
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end end

View File

@ -1,42 +1,30 @@
require "active_support/core_ext/integer/time" MyImages::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that # test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped # your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there! # and recreated between test runs. Don't rely on the data there!
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Turn false under Spring and add config.action_view.cache_template_loading = true.
config.cache_classes = true config.cache_classes = true
# Eager loading loads your whole application. When running a single test locally, # Do not eager load code on boot. This avoids loading your whole application
# this probably isn't necessary. It's a good idea to do in a continuous integration # just for the purpose of running a single test. If you are using a tool that
# system, or in some way before deploying your code. # preloads Rails for running tests, you may have to set it to true.
config.eager_load = ENV["CI"].present? config.eager_load = false
# Configure public file server for tests with Cache-Control for performance. # Configure static asset server for tests with Cache-Control for performance.
config.public_file_server.enabled = true config.serve_static_assets = true
config.public_file_server.headers = { config.static_cache_control = "public, max-age=3600"
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
}
# Show full error reports and disable caching. # Show full error reports and disable caching.
config.consider_all_requests_local = true config.consider_all_requests_local = true
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
config.cache_store = :null_store
# Raise exceptions instead of rendering exception templates. # Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment. # Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false config.action_controller.allow_forgery_protection = true
# Store uploaded files on the local file system in a temporary directory.
config.active_storage.service = :test
config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world. # Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the # The :test delivery method accumulates sent emails in the
@ -45,16 +33,4 @@ Rails.application.configure do
# Print deprecation notices to the stderr. # Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
end end

View File

@ -1,8 +1,4 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Configure parameters to be filtered from the log file. Use this to limit dissemination of # Configure sensitive parameters which will be filtered from the log file.
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported Rails.application.config.filter_parameters += [:password]
# notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]

View File

@ -4,13 +4,13 @@
# are locale specific, and you may define rules for as many different # are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default: # locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect| # ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, "\\1en" # inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, "\\1" # inflect.singular /^(ox)en/i, '\1'
# inflect.irregular "person", "people" # inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep ) # inflect.uncountable %w( fish sheep )
# end # end
# These inflection rules are supported but not enabled by default: # These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect| # ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym "RESTful" # inflect.acronym 'RESTful'
# end # end

View File

@ -1,3 +1,6 @@
Rails.application.config.middleware.use OmniAuth::Builder do Rails.application.config.middleware.use OmniAuth::Builder do
provider(:github, ENV["GITHUB_KEY"], ENV["GITHUB_SECRET"], scope: "read:org") provider :github,
ENV["GITHUB_KEY"],
ENV["GITHUB_SECRET"],
scope: "read:org"
end end

View File

@ -4,11 +4,11 @@
# #
# To use the locales, use `I18n.t`: # To use the locales, use `I18n.t`:
# #
# I18n.t "hello" # I18n.t 'hello'
# #
# In views, this is aliased to just `t`: # In views, this is aliased to just `t`:
# #
# <%= t("hello") %> # <%= t('hello') %>
# #
# To use a different locale, set it with `I18n.locale`: # To use a different locale, set it with `I18n.locale`:
# #
@ -16,18 +16,8 @@
# #
# This would use the information in config/locales/es.yml. # This would use the information in config/locales/es.yml.
# #
# The following keys must be escaped otherwise they will not be retrieved by
# the default I18n backend:
#
# true, false, on, off, yes, no
#
# Instead, surround them with single quotes.
#
# en:
# "true": "foo"
#
# To learn more, please read the Rails Internationalization guide # To learn more, please read the Rails Internationalization guide
# available at https://guides.rubyonrails.org/i18n.html. # available at http://guides.rubyonrails.org/i18n.html.
en: en:
hello: "Hello world" hello: "Hello world"

View File

@ -1,43 +1,15 @@
# Puma can serve each request in a thread from an internal thread pool. workers Integer(ENV["WEB_CONCURRENCY"] || 2)
# The `threads` method setting takes two numbers: a minimum and maximum. threads_count = Integer(ENV["RAILS_MAX_THREADS"] || 5)
# Any libraries that use thread pools should be configured to match threads threads_count, threads_count
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record.
#
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count
# Specifies the `worker_timeout` threshold that Puma will use to wait before preload_app!
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. rackup DefaultRackup
# port ENV["PORT"] || 3000
port ENV.fetch("PORT") { 3000 } environment ENV["RACK_ENV"] || "development"
# Specifies the `environment` that Puma will run in. on_worker_boot do
# # Worker specific setup for Rails 4.1+
environment ENV.fetch("RAILS_ENV") { "development" } # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
# Specifies the `pidfile` that Puma will use. end
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked web server processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory.
#
# preload_app!
# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart

View File

@ -1,4 +1,4 @@
Rails.application.routes.draw do MyImages::Application.routes.draw do
root "home#index" root "home#index"
resource :session, only: %i[new destroy] resource :session, only: %i[new destroy]

View File

@ -2,15 +2,16 @@
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
# #
# This file is the source Rails uses to define your schema when running `bin/rails # Note that this schema.rb definition is the authoritative source for your
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to # database schema. If you need to create the application database on another
# be faster and is potentially less error prone than running all of your # system, you should be using db:schema:load, not running all the migrations
# migrations from scratch. Old migrations may fail to apply correctly if those # from scratch. The latter is a flawed and unsustainable approach (the more migrations
# migrations use external dependencies or application code. # you'll amass, the slower it'll run and the greater likelihood for issues).
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2018_08_26_163510) do ActiveRecord::Schema.define(version: 2018_08_26_163510) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"

View File

@ -1,7 +1,7 @@
# This file should contain all the record creation needed to seed the database with its default values. # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
# #
# Examples: # Examples:
# #
# movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Character.create(name: "Luke", movie: movies.first) # Mayor.create(name: 'Emanuel', city: cities.first)

View File

@ -2,23 +2,17 @@
<html> <html>
<head> <head>
<title>The page you were looking for doesn't exist (404)</title> <title>The page you were looking for doesn't exist (404)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style> <style>
.rails-default-error-page { body {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
font-family: arial, sans-serif; font-family: arial, sans-serif;
margin: 0;
} }
.rails-default-error-page div.dialog { div.dialog {
width: 95%; width: 25em;
max-width: 33em; margin: 4em auto 0 auto;
margin: 4em auto 0;
}
.rails-default-error-page div.dialog > div {
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999; border-left-color: #999;
@ -27,23 +21,22 @@
border-top-left-radius: 9px; border-top-left-radius: 9px;
border-top-right-radius: 9px; border-top-right-radius: 9px;
background-color: white; background-color: white;
padding: 7px 12% 0; padding: 7px 4em 0 4em;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
} }
.rails-default-error-page h1 { h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
.rails-default-error-page div.dialog > p { body > p {
margin: 0 0 1em; width: 33em;
padding: 1em; margin: 0 auto 1em;
padding: 1em 0;
background-color: #F7F7F7; background-color: #F7F7F7;
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999; border-bottom-color: #999;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
@ -54,14 +47,12 @@
</style> </style>
</head> </head>
<body class="rails-default-error-page"> <body>
<!-- This file lives in public/404.html --> <!-- This file lives in public/404.html -->
<div class="dialog"> <div class="dialog">
<div>
<h1>The page you were looking for doesn't exist.</h1> <h1>The page you were looking for doesn't exist.</h1>
<p>You may have mistyped the address or the page may have moved.</p> <p>You may have mistyped the address or the page may have moved.</p>
</div> </div>
<p>If you are the application owner check the logs for more information.</p> <p>If you are the application owner check the logs for more information.</p>
</div>
</body> </body>
</html> </html>

View File

@ -2,23 +2,17 @@
<html> <html>
<head> <head>
<title>The change you wanted was rejected (422)</title> <title>The change you wanted was rejected (422)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style> <style>
.rails-default-error-page { body {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
font-family: arial, sans-serif; font-family: arial, sans-serif;
margin: 0;
} }
.rails-default-error-page div.dialog { div.dialog {
width: 95%; width: 25em;
max-width: 33em; margin: 4em auto 0 auto;
margin: 4em auto 0;
}
.rails-default-error-page div.dialog > div {
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999; border-left-color: #999;
@ -27,23 +21,22 @@
border-top-left-radius: 9px; border-top-left-radius: 9px;
border-top-right-radius: 9px; border-top-right-radius: 9px;
background-color: white; background-color: white;
padding: 7px 12% 0; padding: 7px 4em 0 4em;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
} }
.rails-default-error-page h1 { h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
.rails-default-error-page div.dialog > p { body > p {
margin: 0 0 1em; width: 33em;
padding: 1em; margin: 0 auto 1em;
padding: 1em 0;
background-color: #F7F7F7; background-color: #F7F7F7;
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999; border-bottom-color: #999;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
@ -54,14 +47,12 @@
</style> </style>
</head> </head>
<body class="rails-default-error-page"> <body>
<!-- This file lives in public/422.html --> <!-- This file lives in public/422.html -->
<div class="dialog"> <div class="dialog">
<div>
<h1>The change you wanted was rejected.</h1> <h1>The change you wanted was rejected.</h1>
<p>Maybe you tried to change something you didn't have access to.</p> <p>Maybe you tried to change something you didn't have access to.</p>
</div> </div>
<p>If you are the application owner check the logs for more information.</p> <p>If you are the application owner check the logs for more information.</p>
</div>
</body> </body>
</html> </html>

View File

@ -2,23 +2,17 @@
<html> <html>
<head> <head>
<title>We're sorry, but something went wrong (500)</title> <title>We're sorry, but something went wrong (500)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style> <style>
.rails-default-error-page { body {
background-color: #EFEFEF; background-color: #EFEFEF;
color: #2E2F30; color: #2E2F30;
text-align: center; text-align: center;
font-family: arial, sans-serif; font-family: arial, sans-serif;
margin: 0;
} }
.rails-default-error-page div.dialog { div.dialog {
width: 95%; width: 25em;
max-width: 33em; margin: 4em auto 0 auto;
margin: 4em auto 0;
}
.rails-default-error-page div.dialog > div {
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999; border-left-color: #999;
@ -27,23 +21,22 @@
border-top-left-radius: 9px; border-top-left-radius: 9px;
border-top-right-radius: 9px; border-top-right-radius: 9px;
background-color: white; background-color: white;
padding: 7px 12% 0; padding: 7px 4em 0 4em;
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
} }
.rails-default-error-page h1 { h1 {
font-size: 100%; font-size: 100%;
color: #730E15; color: #730E15;
line-height: 1.5em; line-height: 1.5em;
} }
.rails-default-error-page div.dialog > p { body > p {
margin: 0 0 1em; width: 33em;
padding: 1em; margin: 0 auto 1em;
padding: 1em 0;
background-color: #F7F7F7; background-color: #F7F7F7;
border: 1px solid #CCC; border: 1px solid #CCC;
border-right-color: #999; border-right-color: #999;
border-left-color: #999;
border-bottom-color: #999; border-bottom-color: #999;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
@ -54,13 +47,11 @@
</style> </style>
</head> </head>
<body class="rails-default-error-page"> <body>
<!-- This file lives in public/500.html --> <!-- This file lives in public/500.html -->
<div class="dialog"> <div class="dialog">
<div>
<h1>We're sorry, but something went wrong.</h1> <h1>We're sorry, but something went wrong.</h1>
</div> </div>
<p>If you are the application owner check the logs for more information.</p> <p>If you are the application owner check the logs for more information.</p>
</div>
</body> </body>
</html> </html>

View File

@ -1 +1,5 @@
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-agent: *
# Disallow: /