Skip to content

Commit 59ce640

Browse files
committed
Setup Commit
0 parents  commit 59ce640

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1701
-0
lines changed

.byebug_history

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
quit
2+
12: render json: { token: token }, status: :ok
3+
11: expire(token, 3600)
4+
=> 10: hmset(token, 'user_id', @user.id, 'username', @user.username, 'email', @user.email)
5+
9: byebug
6+
8: token = SecureRandom.hex(10)
7+
7: if @user&.authenticate(params[:password])
8+
6: @user = User.find_by(username: params[:username])
9+
def login
10+
quit
11+
hmset(token, 'user_id', @user.id, 'username', @user.username, 'email', @user.email)
12+
8: token = SecureRandom.hex(10)
13+
7: if @user&.authenticate(params[:password])
14+
@user = User.find_by(username: params[:username])

.gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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

.gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
/.env
10+
# Ignore all logfiles and tempfiles.
11+
/log/*
12+
/tmp/*
13+
!/log/.keep
14+
!/tmp/.keep
15+
16+
# Ignore pidfiles, but keep the directory.
17+
/tmp/pids/*
18+
!/tmp/pids/
19+
!/tmp/pids/.keep
20+
21+
# Ignore uploaded files in development.
22+
/storage/*
23+
!/storage/.keep
24+
/tmp/storage/*
25+
!/tmp/storage/
26+
!/tmp/storage/.keep
27+
28+
# Ignore master key for decrypting credentials and more.
29+
/config/master.key

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--require spec_helper

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.0

Gemfile

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5+
6+
ruby '2.7.0'
7+
8+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
9+
gem 'rails', '~> 7.0.4'
10+
11+
# Use postgresql as the database for Active Record
12+
gem 'pg', '~> 1.1'
13+
14+
# Use the Puma web server [https://github.com/puma/puma]
15+
gem 'puma', '~> 5.0'
16+
17+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
18+
# gem "jbuilder"
19+
20+
# Redis to run Action Cable & store sessions, fast_jsonapi for json serializers
21+
gem 'dotenv-rails'
22+
gem 'fast_jsonapi'
23+
gem 'hiredis'
24+
gem 'redis-actionpack'
25+
gem 'redis-namespace'
26+
gem 'redis-objects'
27+
gem 'redis-rails'
28+
29+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
30+
# gem "kredis"
31+
32+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
33+
gem 'bcrypt'
34+
35+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
36+
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
37+
38+
# Reduces boot times through caching; required in config/boot.rb
39+
gem 'bootsnap', require: false
40+
41+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
42+
# gem "image_processing", "~> 1.2"
43+
gem 'faker', require: false
44+
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
45+
gem 'rack-cors'
46+
group :development, :test do
47+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
48+
gem 'annotate'
49+
gem 'byebug', platforms: %i[mri mingw x64_mingw]
50+
gem 'factory_bot_rails'
51+
gem 'rspec-rails'
52+
gem 'rubocop-rails', require: false
53+
gem 'shoulda-callback-matchers'
54+
gem 'shoulda-matchers'
55+
gem 'simplecov'
56+
end

Gemfile.lock

+273
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actioncable (7.0.4)
5+
actionpack (= 7.0.4)
6+
activesupport (= 7.0.4)
7+
nio4r (~> 2.0)
8+
websocket-driver (>= 0.6.1)
9+
actionmailbox (7.0.4)
10+
actionpack (= 7.0.4)
11+
activejob (= 7.0.4)
12+
activerecord (= 7.0.4)
13+
activestorage (= 7.0.4)
14+
activesupport (= 7.0.4)
15+
mail (>= 2.7.1)
16+
net-imap
17+
net-pop
18+
net-smtp
19+
actionmailer (7.0.4)
20+
actionpack (= 7.0.4)
21+
actionview (= 7.0.4)
22+
activejob (= 7.0.4)
23+
activesupport (= 7.0.4)
24+
mail (~> 2.5, >= 2.5.4)
25+
net-imap
26+
net-pop
27+
net-smtp
28+
rails-dom-testing (~> 2.0)
29+
actionpack (7.0.4)
30+
actionview (= 7.0.4)
31+
activesupport (= 7.0.4)
32+
rack (~> 2.0, >= 2.2.0)
33+
rack-test (>= 0.6.3)
34+
rails-dom-testing (~> 2.0)
35+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36+
actiontext (7.0.4)
37+
actionpack (= 7.0.4)
38+
activerecord (= 7.0.4)
39+
activestorage (= 7.0.4)
40+
activesupport (= 7.0.4)
41+
globalid (>= 0.6.0)
42+
nokogiri (>= 1.8.5)
43+
actionview (7.0.4)
44+
activesupport (= 7.0.4)
45+
builder (~> 3.1)
46+
erubi (~> 1.4)
47+
rails-dom-testing (~> 2.0)
48+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49+
activejob (7.0.4)
50+
activesupport (= 7.0.4)
51+
globalid (>= 0.3.6)
52+
activemodel (7.0.4)
53+
activesupport (= 7.0.4)
54+
activerecord (7.0.4)
55+
activemodel (= 7.0.4)
56+
activesupport (= 7.0.4)
57+
activestorage (7.0.4)
58+
actionpack (= 7.0.4)
59+
activejob (= 7.0.4)
60+
activerecord (= 7.0.4)
61+
activesupport (= 7.0.4)
62+
marcel (~> 1.0)
63+
mini_mime (>= 1.1.0)
64+
activesupport (7.0.4)
65+
concurrent-ruby (~> 1.0, >= 1.0.2)
66+
i18n (>= 1.6, < 2)
67+
minitest (>= 5.1)
68+
tzinfo (~> 2.0)
69+
annotate (3.2.0)
70+
activerecord (>= 3.2, < 8.0)
71+
rake (>= 10.4, < 14.0)
72+
ast (2.4.2)
73+
bcrypt (3.1.18)
74+
bootsnap (1.13.0)
75+
msgpack (~> 1.2)
76+
builder (3.2.4)
77+
byebug (11.1.3)
78+
concurrent-ruby (1.1.10)
79+
crass (1.0.6)
80+
diff-lcs (1.5.0)
81+
docile (1.4.0)
82+
dotenv (2.8.1)
83+
dotenv-rails (2.8.1)
84+
dotenv (= 2.8.1)
85+
railties (>= 3.2)
86+
erubi (1.11.0)
87+
factory_bot (6.2.1)
88+
activesupport (>= 5.0.0)
89+
factory_bot_rails (6.2.0)
90+
factory_bot (~> 6.2.0)
91+
railties (>= 5.0.0)
92+
faker (2.23.0)
93+
i18n (>= 1.8.11, < 2)
94+
fast_jsonapi (1.5)
95+
activesupport (>= 4.2)
96+
globalid (1.0.0)
97+
activesupport (>= 5.0)
98+
hiredis (0.6.3)
99+
i18n (1.12.0)
100+
concurrent-ruby (~> 1.0)
101+
json (2.6.2)
102+
loofah (2.19.0)
103+
crass (~> 1.0.2)
104+
nokogiri (>= 1.5.9)
105+
mail (2.7.1)
106+
mini_mime (>= 0.1.1)
107+
marcel (1.0.2)
108+
method_source (1.0.0)
109+
mini_mime (1.1.2)
110+
minitest (5.16.3)
111+
msgpack (1.6.0)
112+
net-imap (0.3.1)
113+
net-protocol
114+
net-pop (0.1.2)
115+
net-protocol
116+
net-protocol (0.1.3)
117+
timeout
118+
net-smtp (0.3.2)
119+
net-protocol
120+
nio4r (2.5.8)
121+
nokogiri (1.13.8-x86_64-linux)
122+
racc (~> 1.4)
123+
parallel (1.22.1)
124+
parser (3.1.2.1)
125+
ast (~> 2.4.1)
126+
pg (1.4.4)
127+
puma (5.6.5)
128+
nio4r (~> 2.0)
129+
racc (1.6.0)
130+
rack (2.2.4)
131+
rack-cors (1.1.1)
132+
rack (>= 2.0.0)
133+
rack-test (2.0.2)
134+
rack (>= 1.3)
135+
rails (7.0.4)
136+
actioncable (= 7.0.4)
137+
actionmailbox (= 7.0.4)
138+
actionmailer (= 7.0.4)
139+
actionpack (= 7.0.4)
140+
actiontext (= 7.0.4)
141+
actionview (= 7.0.4)
142+
activejob (= 7.0.4)
143+
activemodel (= 7.0.4)
144+
activerecord (= 7.0.4)
145+
activestorage (= 7.0.4)
146+
activesupport (= 7.0.4)
147+
bundler (>= 1.15.0)
148+
railties (= 7.0.4)
149+
rails-dom-testing (2.0.3)
150+
activesupport (>= 4.2.0)
151+
nokogiri (>= 1.6)
152+
rails-html-sanitizer (1.4.3)
153+
loofah (~> 2.3)
154+
railties (7.0.4)
155+
actionpack (= 7.0.4)
156+
activesupport (= 7.0.4)
157+
method_source
158+
rake (>= 12.2)
159+
thor (~> 1.0)
160+
zeitwerk (~> 2.5)
161+
rainbow (3.1.1)
162+
rake (13.0.6)
163+
redis (4.8.0)
164+
redis-actionpack (5.3.0)
165+
actionpack (>= 5, < 8)
166+
redis-rack (>= 2.1.0, < 3)
167+
redis-store (>= 1.1.0, < 2)
168+
redis-activesupport (5.3.0)
169+
activesupport (>= 3, < 8)
170+
redis-store (>= 1.3, < 2)
171+
redis-namespace (1.9.0)
172+
redis (>= 4)
173+
redis-objects (1.7.0)
174+
redis
175+
redis-rack (2.1.4)
176+
rack (>= 2.0.8, < 3)
177+
redis-store (>= 1.2, < 2)
178+
redis-rails (5.0.2)
179+
redis-actionpack (>= 5.0, < 6)
180+
redis-activesupport (>= 5.0, < 6)
181+
redis-store (>= 1.2, < 2)
182+
redis-store (1.9.1)
183+
redis (>= 4, < 5)
184+
regexp_parser (2.6.0)
185+
rexml (3.2.5)
186+
rspec-core (3.11.0)
187+
rspec-support (~> 3.11.0)
188+
rspec-expectations (3.11.1)
189+
diff-lcs (>= 1.2.0, < 2.0)
190+
rspec-support (~> 3.11.0)
191+
rspec-mocks (3.11.1)
192+
diff-lcs (>= 1.2.0, < 2.0)
193+
rspec-support (~> 3.11.0)
194+
rspec-rails (6.0.0)
195+
actionpack (>= 6.1)
196+
activesupport (>= 6.1)
197+
railties (>= 6.1)
198+
rspec-core (~> 3.11)
199+
rspec-expectations (~> 3.11)
200+
rspec-mocks (~> 3.11)
201+
rspec-support (~> 3.11)
202+
rspec-support (3.11.1)
203+
rubocop (1.36.0)
204+
json (~> 2.3)
205+
parallel (~> 1.10)
206+
parser (>= 3.1.2.1)
207+
rainbow (>= 2.2.2, < 4.0)
208+
regexp_parser (>= 1.8, < 3.0)
209+
rexml (>= 3.2.5, < 4.0)
210+
rubocop-ast (>= 1.20.1, < 2.0)
211+
ruby-progressbar (~> 1.7)
212+
unicode-display_width (>= 1.4.0, < 3.0)
213+
rubocop-ast (1.21.0)
214+
parser (>= 3.1.1.0)
215+
rubocop-rails (2.16.1)
216+
activesupport (>= 4.2.0)
217+
rack (>= 1.1)
218+
rubocop (>= 1.33.0, < 2.0)
219+
ruby-progressbar (1.11.0)
220+
shoulda-callback-matchers (1.1.4)
221+
activesupport (>= 3)
222+
shoulda-matchers (5.2.0)
223+
activesupport (>= 5.2.0)
224+
simplecov (0.21.2)
225+
docile (~> 1.1)
226+
simplecov-html (~> 0.11)
227+
simplecov_json_formatter (~> 0.1)
228+
simplecov-html (0.12.3)
229+
simplecov_json_formatter (0.1.4)
230+
thor (1.2.1)
231+
timeout (0.3.0)
232+
tzinfo (2.0.5)
233+
concurrent-ruby (~> 1.0)
234+
unicode-display_width (2.3.0)
235+
websocket-driver (0.7.5)
236+
websocket-extensions (>= 0.1.0)
237+
websocket-extensions (0.1.5)
238+
zeitwerk (2.6.1)
239+
240+
PLATFORMS
241+
ruby
242+
x86_64-linux
243+
244+
DEPENDENCIES
245+
annotate
246+
bcrypt
247+
bootsnap
248+
byebug
249+
dotenv-rails
250+
factory_bot_rails
251+
faker
252+
fast_jsonapi
253+
hiredis
254+
pg (~> 1.1)
255+
puma (~> 5.0)
256+
rack-cors
257+
rails (~> 7.0.4)
258+
redis-actionpack
259+
redis-namespace
260+
redis-objects
261+
redis-rails
262+
rspec-rails
263+
rubocop-rails
264+
shoulda-callback-matchers
265+
shoulda-matchers
266+
simplecov
267+
tzinfo-data
268+
269+
RUBY VERSION
270+
ruby 2.7.0p0
271+
272+
BUNDLED WITH
273+
2.3.23

0 commit comments

Comments
 (0)