mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
commit
eb03d1bdb1
12 changed files with 20 additions and 18 deletions
8
.github/workflows/ruby.yml
vendored
8
.github/workflows/ruby.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-18.04]
|
||||
ruby: [ 2.7 ]
|
||||
ruby: [ 2.7, 3.0 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
||||
steps:
|
||||
|
@ -85,6 +85,10 @@ jobs:
|
|||
path: coverage/codeclimate.${{ matrix.ruby }}.json
|
||||
|
||||
upload_coverage:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ruby: [ 2.7, 3.0 ]
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
env:
|
||||
|
@ -102,7 +106,7 @@ jobs:
|
|||
|
||||
- uses: actions/download-artifact@v2.0.10
|
||||
with:
|
||||
name: coverage-2.7
|
||||
name: coverage-${{ matrix.ruby }}
|
||||
path: coverage
|
||||
|
||||
- name: Aggregate & upload results to Code Climate
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM internetee/ruby:2.7-buster
|
||||
FROM internetee/ruby:3.0-buster
|
||||
|
||||
RUN mkdir -p /opt/webapps/app/tmp/pids
|
||||
WORKDIR /opt/webapps/app
|
||||
|
|
|
@ -74,7 +74,7 @@ module Repp
|
|||
render_epp_error
|
||||
end
|
||||
|
||||
def render_epp_error(status = :bad_request, data = {})
|
||||
def render_epp_error(status = :bad_request, **data)
|
||||
@epp_errors ||= ActiveModel::Errors.new(self)
|
||||
@epp_errors.add(:epp_errors, msg: 'Command failed', code: '2304') if data != {}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ module Repp
|
|||
return
|
||||
end
|
||||
|
||||
render_success(create_update_success_body)
|
||||
render_success(**create_update_success_body)
|
||||
end
|
||||
|
||||
api :PUT, '/repp/v1/contacts/:contact_code'
|
||||
|
@ -58,7 +58,7 @@ module Repp
|
|||
return
|
||||
end
|
||||
|
||||
render_success(create_update_success_body)
|
||||
render_success(**create_update_success_body)
|
||||
end
|
||||
|
||||
api :DELETE, '/repp/v1/contacts/:contact_code'
|
||||
|
|
|
@ -11,9 +11,7 @@ module Domains
|
|||
renewed_expire_time = prepare_renewed_expire_time
|
||||
in_transaction_with_retries do
|
||||
check_balance
|
||||
success = domain.renew(renewed_expire_time: renewed_expire_time,
|
||||
period: period,
|
||||
unit: unit)
|
||||
success = domain.renew(renewed_expire_time, period, unit)
|
||||
if success
|
||||
check_balance
|
||||
reduce_balance
|
||||
|
|
|
@ -12,9 +12,9 @@ class DomainExpireEmailJob < ApplicationJob
|
|||
}
|
||||
|
||||
if domain.force_delete_scheduled?
|
||||
DomainExpireMailer.expired_soft(attrs).deliver_now
|
||||
DomainExpireMailer.expired_soft(**attrs).deliver_now
|
||||
else
|
||||
DomainExpireMailer.expired(attrs).deliver_now
|
||||
DomainExpireMailer.expired(**attrs).deliver_now
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -121,7 +121,7 @@ module EppErrors
|
|||
err = { code: code, msg: t }
|
||||
val = check_for_status(code, obj, val)
|
||||
err[:value] = { val: val, obj: obj } if val.present?
|
||||
self.errors.add(:epp_errors, err)
|
||||
self.errors.add(:epp_errors, **err)
|
||||
end
|
||||
|
||||
def check_for_status(code, obj, val)
|
||||
|
|
|
@ -173,7 +173,7 @@ class Epp::Domain < Domain
|
|||
|
||||
### RENEW ###
|
||||
|
||||
def renew(renewed_expire_time:, period:, unit:)
|
||||
def renew(renewed_expire_time, period, unit)
|
||||
@is_renewal = true
|
||||
|
||||
add_renew_epp_errors unless renewable?
|
||||
|
|
|
@ -7,6 +7,6 @@ class DomainNameserverValidator < ActiveModel::EachValidator
|
|||
|
||||
return if values.size.between?(min, max)
|
||||
association = options[:association] || attribute
|
||||
record.errors.add(association, :out_of_range, { min: min, max: max })
|
||||
record.errors.add(association, :out_of_range, **{ min: min, max: max })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,6 +5,6 @@ class ObjectCountValidator < ActiveModel::EachValidator
|
|||
|
||||
return if values.size.between?(min, max)
|
||||
association = options[:association] || attribute
|
||||
record.errors.add(association, :out_of_range, { min: min, max: max })
|
||||
record.errors.add(association, :out_of_range, **{ min: min, max: max })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module I18n
|
|||
|
||||
def localize(object, options = {})
|
||||
options.merge!({ default: '-' })
|
||||
object.present? ? original_localize(object, options) : ''
|
||||
object.present? ? original_localize(object, **options) : ''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class AdminAreaBankStatementTest < ApplicationSystemTestCase
|
|||
|
||||
def test_update_bank_statement
|
||||
visit admin_bank_statement_path(id: @invoice.id)
|
||||
|
||||
|
||||
click_link_or_button 'Add'
|
||||
|
||||
fill_in 'Description', with: 'Invoice with id 123'
|
||||
|
@ -55,7 +55,7 @@ class AdminAreaBankStatementTest < ApplicationSystemTestCase
|
|||
|
||||
def test_can_bind_statement_transactions
|
||||
registrar = registrars(:bestnames)
|
||||
registrar.issue_prepayment_invoice(amount: 500)
|
||||
registrar.issue_prepayment_invoice(500)
|
||||
invoice = registrar.invoices.last
|
||||
|
||||
create_bank_statement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue