mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Merge pull request #1379 from internetee/remove-bullet-gem
Remove `bullet` gem
This commit is contained in:
commit
68645a938b
6 changed files with 7 additions and 28 deletions
2
Gemfile
2
Gemfile
|
@ -88,8 +88,6 @@ end
|
|||
|
||||
group :development, :test do
|
||||
gem 'pry', '0.10.1'
|
||||
|
||||
gem 'bullet', '4.14.7' # for finding database optimizations
|
||||
gem 'sdoc', '0.4.1' # bundle exec rake doc:rails generates the API under doc/api.
|
||||
gem 'railroady', '1.3.0' # to generate database diagrams
|
||||
gem 'autodoc'
|
||||
|
|
|
@ -119,9 +119,6 @@ GEM
|
|||
autoprefixer-rails (>= 5.2.1)
|
||||
sassc (>= 2.0.0)
|
||||
builder (3.2.3)
|
||||
bullet (4.14.7)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.9.0)
|
||||
cancancan (3.0.1)
|
||||
capybara (3.29.0)
|
||||
addressable
|
||||
|
@ -393,7 +390,6 @@ GEM
|
|||
unf_ext
|
||||
unf_ext (0.0.7.2)
|
||||
unicode_utils (1.4.0)
|
||||
uniform_notifier (1.9.0)
|
||||
uuidtools (2.1.5)
|
||||
validates_email_format_of (1.6.3)
|
||||
i18n
|
||||
|
@ -429,7 +425,6 @@ DEPENDENCIES
|
|||
airbrake
|
||||
autodoc
|
||||
bootstrap-sass (~> 3.4)
|
||||
bullet (= 4.14.7)
|
||||
cancancan
|
||||
capybara
|
||||
coderay (= 1.1.0)
|
||||
|
|
|
@ -115,8 +115,6 @@ module Epp
|
|||
|
||||
def delete
|
||||
authorize! :delete, @domain, @password
|
||||
# all includes for bullet
|
||||
@domain = Epp::Domain.where(id: @domain.id).includes(nameservers: :versions).first
|
||||
|
||||
handle_errors(@domain) and return unless @domain.can_be_deleted?
|
||||
|
||||
|
|
|
@ -23,12 +23,8 @@ class Epp::Domain < Domain
|
|||
active_admins = admin_domain_contacts.select { |x| !x.marked_for_destruction? }
|
||||
active_techs = tech_domain_contacts.select { |x| !x.marked_for_destruction? }
|
||||
|
||||
# bullet workaround
|
||||
ac = active_admins.map { |x| Contact.find(x.contact_id) }
|
||||
tc = active_techs.map { |x| Contact.find(x.contact_id) }
|
||||
|
||||
# validate registrant here as well
|
||||
([registrant] + ac + tc).each do |x|
|
||||
([registrant] + active_admins + active_techs).each do |x|
|
||||
unless x.valid?
|
||||
add_epp_error('2304', nil, nil, I18n.t(:contact_is_not_valid, value: x.code))
|
||||
ok = false
|
||||
|
@ -123,9 +119,8 @@ class Epp::Domain < Domain
|
|||
|
||||
def attach_default_contacts
|
||||
return if registrant.blank?
|
||||
regt = Registrant.find(registrant.id) # temp for bullet
|
||||
tech_contacts << regt if tech_domain_contacts.blank?
|
||||
admin_contacts << regt if admin_domain_contacts.blank? && !regt.org?
|
||||
tech_contacts << registrant if tech_domain_contacts.blank?
|
||||
admin_contacts << registrant if admin_domain_contacts.blank? && !registrant.org?
|
||||
end
|
||||
|
||||
def attrs_from(frame, current_user, action = nil)
|
||||
|
|
|
@ -32,16 +32,6 @@ Rails.application.configure do
|
|||
config.assets.raise_runtime_errors = true
|
||||
|
||||
config.action_view.raise_on_missing_translations = true
|
||||
|
||||
# for finding database optimization
|
||||
config.after_initialize do
|
||||
Bullet.enable = true
|
||||
Bullet.bullet_logger = true
|
||||
Bullet.console = true
|
||||
Bullet.rails_logger = true
|
||||
Bullet.add_footer = true
|
||||
Bullet.unused_eager_loading_enable = false
|
||||
end
|
||||
end
|
||||
|
||||
# In this mode, any jobs you queue will be run in the same thread, synchronously
|
||||
|
|
|
@ -5,7 +5,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
now = Time.zone.parse('2010-07-05')
|
||||
travel_to now
|
||||
name = "new.#{dns_zones(:one).origin}"
|
||||
registrant = contacts(:john).becomes(Registrant)
|
||||
contact = contacts(:john)
|
||||
registrant = contact.becomes(Registrant)
|
||||
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
|
@ -35,6 +36,8 @@ class EppDomainCreateBaseTest < EppTestCase
|
|||
domain = Domain.find_by(name: name)
|
||||
assert_equal name, domain.name
|
||||
assert_equal registrant, domain.registrant
|
||||
assert_equal [contact], domain.admin_contacts
|
||||
assert_equal [contact], domain.tech_contacts
|
||||
assert_not_empty domain.transfer_code
|
||||
|
||||
default_registration_period = 1.year + 1.day
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue