Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ gem 'sassc-rails', '~> 2.1.2'
gem 'sentry-rails', '~> 5.24'
gem 'sentry-ruby', '~> 5.24'
gem 'sentry-sidekiq', '~> 5.24'
gem 'sidekiq', '~> 7.3.9'
gem 'sidekiq', '~> 8.0.3'
gem 'sidekiq-scheduler', '~> 6.0.1'
gem 'simple_form', '~> 5.3.1'
gem 'turbolinks', '~> 5.2.1'
Expand Down
53 changes: 29 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,13 @@ GEM
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
oauth2 (1.4.9)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
rack (>= 1.2, < 4)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
omniauth (2.1.3)
hashie (>= 3.4.6)
rack (>= 2.2.3)
Expand Down Expand Up @@ -342,20 +343,20 @@ GEM
activesupport (>= 3.0.0)
raabro (1.4.0)
racc (1.8.1)
rack (2.2.16)
rack (3.1.14)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-protection (3.0.6)
rack
rack-proxy (0.7.2)
rack
rack-session (1.0.2)
rack (< 3)
rack-session (2.1.1)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.2.0)
rack (>= 1.3)
rackup (1.0.1)
rack (< 3)
webrick
rackup (2.2.1)
rack (>= 3)
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
Expand Down Expand Up @@ -401,17 +402,17 @@ GEM
rdoc (6.13.1)
psych (>= 4.0.0)
redis (4.8.1)
redis-actionpack (5.3.0)
actionpack (>= 5, < 8)
redis-rack (>= 2.1.0, < 3)
redis-actionpack (5.5.0)
actionpack (>= 5)
redis-rack (>= 2.1.0, < 4)
redis-store (>= 1.1.0, < 2)
redis-activesupport (5.3.0)
activesupport (>= 3, < 8)
redis-store (>= 1.3, < 2)
redis-client (0.24.0)
connection_pool
redis-rack (2.1.4)
rack (>= 2.0.8, < 3)
redis-rack (3.0.0)
rack-session (>= 0.2.0)
redis-store (>= 1.2, < 2)
redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6)
Expand Down Expand Up @@ -512,12 +513,12 @@ GEM
sentry-ruby (~> 5.24.0)
sidekiq (>= 3.0)
shellany (0.0.1)
sidekiq (7.3.9)
base64
connection_pool (>= 2.3.0)
logger
rack (>= 2.2.4)
redis-client (>= 0.22.2)
sidekiq (8.0.3)
connection_pool (>= 2.5.0)
json (>= 2.9.0)
logger (>= 1.6.2)
rack (>= 3.1.0)
redis-client (>= 0.23.2)
sidekiq-scheduler (6.0.1)
rufus-scheduler (~> 3.2)
sidekiq (>= 7.3, < 9)
Expand All @@ -531,15 +532,19 @@ GEM
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
spring (4.3.0)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
spring-watcher-listen (2.1.0)
listen (>= 2.7, < 4.0)
spring (>= 4)
sprockets (4.0.3)
sprockets (4.2.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
logger
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
Expand Down Expand Up @@ -575,6 +580,7 @@ GEM
validates_timeliness (7.1.0)
activemodel (>= 7.0.0, < 8)
timeliness (>= 0.3.10, < 1)
version_gem (1.1.8)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.1)
Expand All @@ -587,7 +593,6 @@ GEM
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
webrick (1.9.1)
websocket-driver (0.7.7)
base64
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -660,7 +665,7 @@ DEPENDENCIES
sentry-rails (~> 5.24)
sentry-ruby (~> 5.24)
sentry-sidekiq (~> 5.24)
sidekiq (~> 7.3.9)
sidekiq (~> 8.0.3)
sidekiq-scheduler (~> 6.0.1)
simple_form (~> 5.3.1)
simplecov (~> 0.22.0)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/credit_mutations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

else
format.html { redirect_to which_redirect?, flash: { error: @mutation.errors.full_messages.join(', ') } }
format.json { render json: @mutation.errors, status: :unprocessable_entity }
format.json { render json: @mutation.errors, status: :unprocessable_content }

Check warning on line 30 in app/controllers/credit_mutations_controller.rb

View check run for this annotation

Codecov / codecov/patch

app/controllers/credit_mutations_controller.rb#L30

Added line #L30 was not covered by tests
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
end

def unacceptable
render status: :unprocessable_entity
render status: :unprocessable_content

Check warning on line 11 in app/controllers/errors_controller.rb

View check run for this annotation

Codecov / codecov/patch

app/controllers/errors_controller.rb#L11

Added line #L11 was not covered by tests
end

def internal_server_error
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/orders_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
order_data.user.current_activity = order_data.activity unless order_data.user.nil?
render json: order_data.as_json(include: json_includes)
else
render json: @order.errors, status: :unprocessable_entity
render json: @order.errors, status: :unprocessable_content
end
end

Expand All @@ -46,7 +46,7 @@ def update
if @order.update(permitted_attributes_on_update)
render json: @order.to_json(proper_json)
else
render json: @order.errors, status: :unprocessable_entity
render json: @order.errors, status: :unprocessable_content
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/price_lists_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
if @price_list.save
format.json { render json: @price_list.archived_at }
else
format.json { render json: @price_list.errors, status: :unprocessable_entity }
format.json { render json: @price_list.errors, status: :unprocessable_content }

Check warning on line 57 in app/controllers/price_lists_controller.rb

View check run for this annotation

Codecov / codecov/patch

app/controllers/price_lists_controller.rb#L57

Added line #L57 was not covered by tests
end
end
end
Expand All @@ -69,7 +69,7 @@
if @price_list.save
format.json { render json: @price_list.archived_at }
else
format.json { render json: @price_list.errors, status: :unprocessable_entity }
format.json { render json: @price_list.errors, status: :unprocessable_content }

Check warning on line 72 in app/controllers/price_lists_controller.rb

View check run for this annotation

Codecov / codecov/patch

app/controllers/price_lists_controller.rb#L72

Added line #L72 was not covered by tests
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/products_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if @product.save
render json: @product, include: json_includes, except: json_exludes, methods: :t_category
else
render json: @product.errors, status: :unprocessable_entity
render json: @product.errors, status: :unprocessable_content

Check warning on line 14 in app/controllers/products_controller.rb

View check run for this annotation

Codecov / codecov/patch

app/controllers/products_controller.rb#L14

Added line #L14 was not covered by tests
end
end

Expand All @@ -21,7 +21,7 @@
if @product.update(permitted_attributes)
render json: @product, include: json_includes, except: json_exludes, methods: :t_category
else
render json: @product.errors, status: :unprocessable_entity
render json: @product.errors, status: :unprocessable_content

Check warning on line 24 in app/controllers/products_controller.rb

View check run for this annotation

Codecov / codecov/patch

app/controllers/products_controller.rb#L24

Added line #L24 was not covered by tests
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/controllers/orders_controller/update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

it 'when with order on locked activity' do
request_on_locked_activity
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(Order.first.order_rows.last.product_count).to eq 2
end
end
Expand All @@ -71,7 +71,7 @@

it 'when with order on locked activity' do
request_on_locked_activity
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(Order.first.order_rows.last.product_count).to eq 2
end
end
Expand All @@ -87,7 +87,7 @@

it 'when with order on locked activity' do
request_on_locked_activity
expect(response).to have_http_status(:unprocessable_entity)
expect(response).to have_http_status(:unprocessable_content)
expect(Order.first.order_rows.last.product_count).to eq 2
end
end
Expand Down