Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9c6d8c4
Update hard_job_spec.rb
mkolosek May 15, 2023
b57186e
Update hard_job_spec.rb
mkolosek May 15, 2023
6d9749b
Update README.md
mkolosek May 18, 2023
ab2d19f
Update README.md 2
mkolosek May 18, 2023
a7f13ab
Update README.md 3
mkolosek May 19, 2023
aee9fc6
Create hard_job2.rb
mkolosek May 19, 2023
c9dacf7
Create hard_job3.rb
mkolosek May 19, 2023
9eaf5e0
Create hard_job4.rb
mkolosek May 19, 2023
df19fea
Create hard_job2_spec.rb
mkolosek May 19, 2023
ab6a64d
Create hard_job3_spec.rb
mkolosek May 19, 2023
55db8ab
Create hard_job4_spec.rb
mkolosek May 19, 2023
8e3af96
Update hard_job_spec.rb
mkolosek May 22, 2023
2c1a5f3
Update hard_job_spec.rb
mkolosek May 22, 2023
94de51b
Update hard_job_spec.rb
mkolosek May 22, 2023
5b3553a
Update hard_job_spec.rb
mkolosek May 22, 2023
0caac1e
Update hard_job_spec.rb
mkolosek May 22, 2023
9cac70c
Test suite overhaul
May 23, 2023
c514aab
A
May 23, 2023
7b9e104
Test updates
May 23, 2023
dc977d9
Update hard_job_spec.rb
mkolosek May 23, 2023
f49c7c4
Schema error test
May 24, 2023
56e6ce4
Switch to postgres
May 24, 2023
4079764
Switch to sqlite
May 24, 2023
68c002b
Switch to postgres
May 24, 2023
4715530
Fix schema error
May 24, 2023
03c9370
Helper update
May 24, 2023
af6cefa
Broken require
May 24, 2023
2c6b199
Fixes broken require
May 24, 2023
33a4056
Webpack install
May 25, 2023
c53d765
Brakeman testing
May 26, 2023
75e8af1
Revert "Webpack install"
May 26, 2023
fd41f05
Gem update
Jun 1, 2023
7ad1e82
Gem update
Jun 1, 2023
d6096b9
Gem update
Jun 1, 2023
9ecadf1
Testing pause
mkolosek Jun 8, 2023
bf70699
Test paused skip
mkolosek Jun 8, 2023
b91b9e2
Remove gems
Jun 8, 2023
2f17eff
Adds feature spec
Jun 9, 2023
c34d352
Specific webdriver config
Jun 9, 2023
ebeae6a
Speed up tests
Jun 9, 2023
d76cb74
Remove selenium config
Jun 9, 2023
b751693
Testing new...
mkolosek Jul 4, 2023
e0723d0
Update ruby to 3.3.2
Jun 20, 2024
e3d76c9
Update nokogiri
Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.7.6
ruby-3.3.2
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "2.7.6"
ruby "3.3.2"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.4"
Expand All @@ -10,7 +10,8 @@ gem "rails", "~> 7.0.4"
gem "sprockets-rails"

# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"
# gem "sqlite3", "~> 1.4"
gem 'pg', '>= 0.18', '< 2.0'

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
Expand All @@ -28,7 +29,7 @@ gem "stimulus-rails"
gem "jbuilder"

#Background processing
gem "sidekiq"
gem "sidekiq", "~> 7.0.7"

# Use Redis adapter to run Action Cable in production
gem "redis", "~> 4.0"
Expand Down
23 changes: 11 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GEM
xpath (~> 3.2)
childprocess (4.1.0)
concurrent-ruby (1.1.10)
connection_pool (2.3.0)
connection_pool (2.4.1)
crass (1.0.6)
debug (1.6.3)
irb (>= 1.3.6)
Expand Down Expand Up @@ -112,7 +112,7 @@ GEM
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
mini_portile2 (2.8.7)
minitest (5.16.3)
msgpack (1.6.0)
net-imap (0.3.1)
Expand All @@ -124,13 +124,14 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.8)
nokogiri (1.13.9)
mini_portile2 (~> 2.8.0)
nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
pg (1.5.3)
public_suffix (5.0.0)
puma (5.6.5)
nio4r (~> 2.0)
racc (1.6.0)
racc (1.8.0)
rack (2.2.4)
rack-test (2.0.2)
rack (>= 1.3)
Expand Down Expand Up @@ -162,7 +163,7 @@ GEM
zeitwerk (~> 2.5)
rake (13.0.6)
redis (4.8.0)
redis-client (0.11.2)
redis-client (0.14.1)
connection_pool
regexp_parser (2.6.1)
reline (0.3.1)
Expand Down Expand Up @@ -191,7 +192,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sidekiq (7.0.2)
sidekiq (7.0.9)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
Expand All @@ -203,8 +204,6 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.5.4)
mini_portile2 (~> 2.8.0)
stimulus-rails (1.1.1)
railties (>= 6.0.0)
thor (1.2.1)
Expand Down Expand Up @@ -241,22 +240,22 @@ DEPENDENCIES
debug
importmap-rails
jbuilder
pg (>= 0.18, < 2.0)
puma (~> 5.0)
rails (~> 7.0.4)
redis (~> 4.0)
rspec-rails
selenium-webdriver
sidekiq
sidekiq (~> 7.0.7)
sprockets-rails
sqlite3 (~> 1.4)
stimulus-rails
turbo-rails
tzinfo-data
web-console
webdrivers

RUBY VERSION
ruby 2.7.6p219
ruby 3.3.2p78

BUNDLED WITH
2.1.4
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Updates

* System dependencies




* Configuration

* Database creation
Expand All @@ -23,5 +26,3 @@ Updates
* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
class ApplicationController < ActionController::Base
# asdasd asd
end
1 change: 1 addition & 0 deletions app/controllers/items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def index

# GET /items/1 or /items/1.json
def show
#asdasd
end

# GET /items/new
Expand Down
1 change: 1 addition & 0 deletions app/models/item.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
class Item < ApplicationRecord
#adfasdasd
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job10.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob10
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job11.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob11
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job12.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob12
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job13.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob13
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job14.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob14
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job15.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob15
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job16.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob16
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job17.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob17
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job18.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob18
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob2
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job3.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob3
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob4
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job5.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob5
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job6.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob6
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job7.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob7
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job8.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob8
include Sidekiq::Job

def perform(*args)
# Do something
end
end
7 changes: 7 additions & 0 deletions app/sidekiq/hard_job9.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class HardJob9
include Sidekiq::Job

def perform(*args)
# Do something
end
end
23 changes: 18 additions & 5 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,34 @@
# gem "sqlite3"
#
default: &default
adapter: sqlite3
adapter: postgresql
timeout: 5
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000

development:
<<: *default
database: db/development.sqlite3
database: basic_app_dev
username: <%= ENV['BASIC_APP_USERNAME'] %>
password: <%= ENV['BASIC_APP_PASSWORD'] %>
host: localhost
port: 5432

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
database: basic_app_test
username: <%= ENV['BASIC_APP_USERNAME'] %>
password: <%= ENV['BASIC_APP_PASSWORD'] %>
host: localhost
port: 5432

production:
<<: *default
database: db/production.sqlite3
database: basic_app
username: <%= ENV['BASIC_APP_USERNAME'] %>
password: <%= ENV['BASIC_APP_PASSWORD'] %>
host: localhost
port: 5432
12 changes: 12 additions & 0 deletions spec/features/test_feature_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

require 'rails_helper'

feature 'Test page' do
context 'user visits root' do
scenario 'user sees page' do
visit items_path
expect(page).to have_text("Items")
end
end
end
8 changes: 6 additions & 2 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!

# some comments go here


# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
Expand All @@ -22,6 +25,7 @@
#
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }


# Checks for pending migrations and applies them before tests are run.
# If you are not using ActiveRecord, you can remove these lines.
begin
Expand Down
18 changes: 18 additions & 0 deletions spec/sidekiq/hard_job10_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'rails_helper'
RSpec.describe HardJob10, type: :job do
it "does a long test" do
expect(1).to eq(1)
end

it "does second long test" do
expect(1).to eq(1)
end

it "does third long test" do
expect(1).to eq(1)
end

it "does forth long test" do
expect(1).to eq(1)
end
end
Loading