Skip to content

Commit 47cd0c5

Browse files
committed
ready to deploy
1 parent 8171370 commit 47cd0c5

File tree

18 files changed

+234
-245
lines changed

18 files changed

+234
-245
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.log
2+
tmp/*
3+
log/*
4+
vendor/bundle
5+
node_modules

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@
2929

3030
# Ignore master key for decrypting credentials and more.
3131
/config/master.key
32+
/config/master.key
33+
/config/credentials.yml.enc
34+
35+
/public/packs
36+
/public/packs-test
37+
/node_modules
38+
/yarn-error.log
39+
yarn-debug.log*
40+
.yarn-integrity

Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Use the official Ruby image from Docker Hub
2+
FROM ruby:3.1.2
3+
4+
# Install dependencies
5+
RUN apt-get update -qq && apt-get install -y curl gnupg build-essential libpq-dev
6+
7+
# Install Node.js and Yarn
8+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
9+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
10+
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
11+
RUN apt-get update && apt-get install -y nodejs yarn
12+
13+
# Set the working directory
14+
WORKDIR /myapp
15+
16+
# Copy Gemfile and Gemfile.lock
17+
COPY Gemfile Gemfile.lock ./
18+
19+
# Install gems
20+
RUN gem update --system 3.3.22 && bundle install
21+
22+
# Copy the main application
23+
COPY . .
24+
25+
# Copy master key for Rails credentials
26+
COPY config/master.key /myapp/config/master.key
27+
28+
# Install JavaScript dependencies
29+
RUN yarn install
30+
31+
# Precompile assets
32+
RUN RAILS_ENV=production bundle exec rake assets:precompile
33+
34+
# Set the command to run the application
35+
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]

Gemfile

Lines changed: 14 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,32 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

44
ruby '3.1.2'
55

6-
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
7-
gem 'rails', '~> 6.1.4'
8-
# Use sqlite3 as the database for Active Record
9-
gem 'sqlite3', '~> 1.4'
10-
# Use Puma as the app server
6+
gem 'rails', '~> 6.1.0'
7+
gem 'pg', '>= 1.1'
118
gem 'puma', '~> 5.0'
12-
# Use SCSS for stylesheets
139
gem 'sass-rails', '>= 6'
14-
# Use Uglifier as compressor for JavaScript assets
15-
gem 'uglifier', '>= 4.2.0'
16-
# See https://github.com/rails/execjs#readme for more supported runtimes
17-
# gem 'mini_racer', platforms: :ruby
18-
19-
gem 'rspec-rails', group: [:development, :test]
20-
21-
# Use CoffeeScript for .coffee assets and views
10+
gem 'uglifier', '>= 4.1.20'
2211
gem 'coffee-rails', '~> 5.0'
23-
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
2412
gem 'turbolinks', '~> 5'
25-
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
26-
gem 'jbuilder', '~> 2.10'
27-
# Use Redis adapter to run Action Cable in production
28-
# gem 'redis', '~> 4.0'
29-
# Use ActiveModel has_secure_password
30-
# gem 'bcrypt', '~> 3.1.7'
13+
gem 'jbuilder', '~> 2.7'
14+
gem 'bcrypt', '~> 3.1.7'
15+
gem 'bootsnap', '>= 1.4.4', require: false
16+
gem 'rack-cors'
17+
gem 'sprockets-rails', '~> 3.2'
3118

32-
# Use ActiveStorage variant
33-
# gem 'mini_magick', '~> 4.8'
3419

35-
# Use Capistrano for deployment
36-
# gem 'capistrano-rails', group: :development
37-
38-
# Reduces boot times through caching; required in config/boot.rb
39-
gem 'bootsnap', '>= 1.4.4', require: false
4020

4121
group :development, :test do
42-
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
4322
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
23+
gem 'capybara', '>= 3.26'
24+
gem 'selenium-webdriver', '>= 4.11'
25+
gem 'webdrivers', '>= 5.0', '< 5.3'
26+
gem 'sqlite3', '~> 1.4'
4427
end
4528

4629
group :development do
47-
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
48-
gem 'web-console', '>= 4.0.4'
49-
gem 'listen', '>= 3.2.1'
50-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
51-
gem 'spring'
52-
gem 'spring-watcher-listen', '~> 2.0.0'
53-
end
54-
55-
group :test do
56-
# Adds support for Capybara system testing and selenium driver
57-
gem 'capybara', '>= 3.35'
58-
gem 'selenium-webdriver', '~> 4.11'
59-
# Easy installation and use of chromedriver to run system tests with Chrome
30+
gem 'web-console', '>= 4.1.0'
31+
gem 'listen', '>= 3.2.0'
6032
end
6133

62-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
6334
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Gemfile.lock

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ GEM
6363
addressable (2.8.6)
6464
public_suffix (>= 2.0.2, < 6.0)
6565
base64 (0.2.0)
66+
bcrypt (3.1.20)
6667
bindex (0.8.1)
6768
bootsnap (1.18.3)
6869
msgpack (~> 1.2)
@@ -87,7 +88,6 @@ GEM
8788
concurrent-ruby (1.3.3)
8889
crass (1.0.6)
8990
date (3.3.4)
90-
diff-lcs (1.5.1)
9191
erubi (1.13.0)
9292
execjs (2.9.1)
9393
ffi (1.17.0-arm64-darwin)
@@ -130,11 +130,14 @@ GEM
130130
racc (~> 1.4)
131131
nokogiri (1.16.6-x86_64-darwin)
132132
racc (~> 1.4)
133+
pg (1.5.6)
133134
public_suffix (5.1.1)
134135
puma (5.6.8)
135136
nio4r (~> 2.0)
136137
racc (1.8.0)
137138
rack (2.2.9)
139+
rack-cors (2.0.2)
140+
rack (>= 2.0.0)
138141
rack-test (2.1.0)
139142
rack (>= 1.3)
140143
rails (6.1.7.8)
@@ -172,23 +175,6 @@ GEM
172175
regexp_parser (2.9.2)
173176
rexml (3.3.0)
174177
strscan
175-
rspec-core (3.13.0)
176-
rspec-support (~> 3.13.0)
177-
rspec-expectations (3.13.1)
178-
diff-lcs (>= 1.2.0, < 2.0)
179-
rspec-support (~> 3.13.0)
180-
rspec-mocks (3.13.1)
181-
diff-lcs (>= 1.2.0, < 2.0)
182-
rspec-support (~> 3.13.0)
183-
rspec-rails (6.1.2)
184-
actionpack (>= 6.1)
185-
activesupport (>= 6.1)
186-
railties (>= 6.1)
187-
rspec-core (~> 3.13)
188-
rspec-expectations (~> 3.13)
189-
rspec-mocks (~> 3.13)
190-
rspec-support (~> 3.13)
191-
rspec-support (3.13.1)
192178
rubyzip (2.3.2)
193179
sass-rails (6.0.0)
194180
sassc-rails (~> 2.1, >= 2.1.1)
@@ -205,10 +191,6 @@ GEM
205191
rexml (~> 3.2, >= 3.2.5)
206192
rubyzip (>= 1.2.2, < 3.0)
207193
websocket (~> 1.0)
208-
spring (2.1.1)
209-
spring-watcher-listen (2.0.1)
210-
listen (>= 2.7, < 4.0)
211-
spring (>= 1.2, < 3.0)
212194
sprockets (4.2.1)
213195
concurrent-ruby (~> 1.0)
214196
rack (>= 2.2.4, < 4)
@@ -234,6 +216,10 @@ GEM
234216
activemodel (>= 6.0.0)
235217
bindex (>= 0.4.0)
236218
railties (>= 6.0.0)
219+
webdrivers (5.2.0)
220+
nokogiri (~> 1.6)
221+
rubyzip (>= 1.3.0)
222+
selenium-webdriver (~> 4.0)
237223
websocket (1.2.10)
238224
websocket-driver (0.7.6)
239225
websocket-extensions (>= 0.1.0)
@@ -243,28 +229,30 @@ GEM
243229
zeitwerk (2.6.16)
244230

245231
PLATFORMS
246-
arm64-darwin
232+
arm64-darwin-23
247233
x86_64-darwin
248234

249235
DEPENDENCIES
236+
bcrypt (~> 3.1.7)
250237
bootsnap (>= 1.4.4)
251238
byebug
252-
capybara (>= 3.35)
239+
capybara (>= 3.26)
253240
coffee-rails (~> 5.0)
254-
jbuilder (~> 2.10)
255-
listen (>= 3.2.1)
241+
jbuilder (~> 2.7)
242+
listen (>= 3.2.0)
243+
pg (>= 1.1)
256244
puma (~> 5.0)
257-
rails (~> 6.1.4)
258-
rspec-rails
245+
rack-cors
246+
rails (~> 6.1.0)
259247
sass-rails (>= 6)
260-
selenium-webdriver (~> 4.11)
261-
spring
262-
spring-watcher-listen (~> 2.0.0)
248+
selenium-webdriver (>= 4.11)
249+
sprockets-rails (~> 3.2)
263250
sqlite3 (~> 1.4)
264251
turbolinks (~> 5)
265252
tzinfo-data
266-
uglifier (>= 4.2.0)
267-
web-console (>= 4.0.4)
253+
uglifier (>= 4.1.20)
254+
web-console (>= 4.1.0)
255+
webdrivers (>= 5.0, < 5.3)
268256

269257
RUBY VERSION
270258
ruby 3.1.2p20

Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: ./bin/update_rubygems.sh
2+
web: bundle exec puma -C config/puma.rb

app/assets/stylesheets/application.css

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
body {
2+
font-family: 'Helvetica', 'Arial', sans-serif;
3+
background-color: #fff;
4+
margin: 0;
5+
padding: 0;
6+
color: #333;
7+
}
8+
9+
h1 {
10+
margin: 0;
11+
padding: 0;
12+
padding-top: 30px;
13+
font-size: 2.5em;
14+
color: #333;
15+
text-align: center;
16+
}
17+
18+
h2 {
19+
font-size: 1.5em;
20+
color: #003366;
21+
margin: 0;
22+
padding-top: 5px;
23+
text-align: center;
24+
margin-bottom: 60px;
25+
}
26+
27+
#info {
28+
text-align: center;
29+
padding: 20px;
30+
margin-bottom: 30px;
31+
}
32+
33+
#info a {
34+
text-decoration: none;
35+
color: inherit;
36+
}
37+
38+
#info p {
39+
margin-bottom: 0px;
40+
}
41+
42+
.letters {
43+
display: flex;
44+
justify-content: center;
45+
flex-wrap: wrap;
46+
margin-bottom: 20px;
47+
}
48+
49+
.letter {
50+
background: linear-gradient(90deg, #676d75, #EFF1F3);
51+
color: white;
52+
padding: 15px;
53+
width: 50px;
54+
height: 50px;
55+
border: 1px solid black;
56+
margin: 5px;
57+
text-align: center;
58+
font-size: 29px;
59+
font-weight: bold;
60+
box-shadow: 2px 2px 5px gray;
61+
}
62+
63+
form {
64+
display: flex;
65+
flex-direction: column;
66+
align-items: center;
67+
margin-bottom: 20px;
68+
}
69+
70+
input[type="text"] {
71+
padding: 10px;
72+
border: 1px solid #ddd;
73+
border-radius: 4px;
74+
width: 300px;
75+
margin-bottom: 10px;
76+
font-size: 16px;
77+
}
78+
79+
input[type="submit"],
80+
.button {
81+
background-color: transparent;
82+
color: #333;
83+
border: 1px solid #ccc;
84+
padding: 15px 32px;
85+
text-align: center;
86+
text-decoration: none;
87+
display: inline-block;
88+
font-size: 16px;
89+
margin: 4px 2px;
90+
cursor: pointer;
91+
border-radius: 10px;
92+
transition: background-color 0.3s, transform 0.3s;
93+
}
94+
95+
input[type="submit"]:hover,
96+
.button:hover {
97+
background-color: #f0f0f0;
98+
transform: translateY(-2px);
99+
}
100+
101+
input[type="submit"]:hover,
102+
.button:active {
103+
transform: translateY(0);
104+
}
105+
106+
.box {
107+
text-align: center;
108+
}
109+

0 commit comments

Comments
 (0)