diff --git a/Gemfile b/Gemfile
index 6f8b4c0..747dd70 100644
--- a/Gemfile
+++ b/Gemfile
@@ -46,8 +46,11 @@ gem "kaminari", "1.2.2"
gem "whenever", "1.0.0", require: false
group :development, :test do
- # fake data for development and testing
+ # Fake data for development and testing
gem "faker", "3.1.0"
+
+ # Code linting
+ gem "rubocop-rails", "2.17.4", require: false
end
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Gemfile.lock b/Gemfile.lock
index c23a12d..1a3377b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -76,6 +76,7 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
+ ast (2.4.2)
bindex (0.8.1)
bootsnap (1.15.0)
msgpack (~> 1.2)
@@ -177,6 +178,7 @@ GEM
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
+ json (2.6.3)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
@@ -219,6 +221,9 @@ GEM
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
+ parallel (1.22.1)
+ parser (3.2.0.0)
+ ast (~> 2.4.1)
pg (1.4.5)
public_suffix (5.0.1)
puma (5.6.5)
@@ -253,6 +258,7 @@ GEM
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
+ rainbow (3.1.1)
rake (13.0.6)
redis (5.0.5)
redis-client (>= 0.9.0)
@@ -260,6 +266,23 @@ GEM
connection_pool
regexp_parser (2.6.1)
rexml (3.2.5)
+ rubocop (1.44.1)
+ json (~> 2.3)
+ parallel (~> 1.10)
+ parser (>= 3.2.0.0)
+ rainbow (>= 2.2.2, < 4.0)
+ regexp_parser (>= 1.8, < 3.0)
+ rexml (>= 3.2.5, < 4.0)
+ rubocop-ast (>= 1.24.1, < 2.0)
+ ruby-progressbar (~> 1.7)
+ unicode-display_width (>= 2.4.0, < 3.0)
+ rubocop-ast (1.24.1)
+ parser (>= 3.1.1.0)
+ rubocop-rails (2.17.4)
+ activesupport (>= 4.2.0)
+ rack (>= 1.1)
+ rubocop (>= 1.33.0, < 2.0)
+ ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sanitize (6.0.0)
@@ -291,8 +314,7 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
- tzinfo-data (1.2022.7)
- tzinfo (>= 1.0.0)
+ unicode-display_width (2.4.2)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
@@ -329,6 +351,7 @@ DEPENDENCIES
puma (= 5.6.5)
rails (= 7.0.4.2)
redis (= 5.0.5)
+ rubocop-rails (= 2.17.4)
sanitize (= 6.0.0)
selenium-webdriver (= 4.7.1)
sidekiq (= 7.0.2)
diff --git a/README.md b/README.md
index 38a9274..5d9c3c8 100644
--- a/README.md
+++ b/README.md
@@ -110,6 +110,14 @@ Rails 7 Application is Ready in Minutes!
Puma |
Application Web Server. To launch Rails app |
+
+ Code Quality |
+
+
+ |
+ Rubocop |
+ Ruby static code analyzer (a.k.a. linter) and formatter. |
+
@@ -144,11 +152,6 @@ What I'm going to add...
RSpec |
Testing Framework for Rails |
-
- |
- Rubocop |
- Ruby static code analyzer (a.k.a. linter) and formatter. |
-
@@ -195,13 +198,14 @@ What was done:
4. Launching PgSQL Container
5. Launching Redis Container
6. Launching Rails Container
-7. Installing Gems. Please Wait
+7. Installing Gems
8. Create DB. Migrate DB. Create Seeds
9. Indexing Article Model
10. Launching Rails App with Puma
11. Launching Sidekiq
-12. Visit Rails App: http://localhost:3000
-13. Visit Mail Service: http://localhost:1080
+12. Rubocop is Checking
+13. Visit Rails App: http://localhost:3000
+14. Visit Mail Service: http://localhost:1080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Welcome to RAILS 7!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/bin/setup b/bin/setup
index f8a1a65..ed48e6e 100755
--- a/bin/setup
+++ b/bin/setup
@@ -40,7 +40,7 @@ FileUtils.chdir APP_ROOT do
system('docker compose -f docker/docker-compose.yml up rails -d')
wait('to launch Rails Container')
- step_info "Installing Gems. Please Wait"
+ step_info "Installing Gems"
rails_install_gems
step_info "Create DB. Migrate DB. Create Seeds"
@@ -55,6 +55,9 @@ FileUtils.chdir APP_ROOT do
step_info "Launching Sidekiq"
sidekiq_start
+ step_info "Rubocop is Checking"
+ rubocop
+
step_info "Visit Rails App: http://localhost:3000"
step_info "Visit Mail Service: http://localhost:1080"
diff --git a/config/initializers/_SIDEKIQ.rb b/config/initializers/_SIDEKIQ.rb
index 20099eb..5ca4df3 100644
--- a/config/initializers/_SIDEKIQ.rb
+++ b/config/initializers/_SIDEKIQ.rb
@@ -9,7 +9,7 @@
puts "Sidekiq service address: #{redis_url}"
SQ_ERR_LOGGER = Logger.new(
- Rails.root.join('/log/sidekiq.errors.log')
+ Rails.root.join('log/sidekiq.errors.log')
)
Sidekiq.configure_client do |config|
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 7aec8eb..53db928 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -89,5 +89,3 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | b
COPY Gemfile Gemfile
COPY --chown=lucky:lucky Gemfile.lock Gemfile.lock
RUN bundle
-
-RUN gem install rubocop-rails -v 2.17.4
diff --git a/docs/releases/Rails7.StartKit-1.3.jpg b/docs/releases/Rails7.StartKit-1.3.jpg
new file mode 100644
index 0000000..f9838c0
Binary files /dev/null and b/docs/releases/Rails7.StartKit-1.3.jpg differ