mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
Merge branch 'master' into registry-475
This commit is contained in:
commit
ffd9f28aee
11 changed files with 72 additions and 16 deletions
|
@ -1,6 +1,14 @@
|
|||
02.05.2017
|
||||
* Set default period value of domain create and renew operations to 1 year in the Registrar portal [#495](https://github.com/internetee/registry/issues/495)
|
||||
|
||||
01.05.2017
|
||||
* Support for short and long regsitration periods - from 3m to 10y [#475](https://github.com/internetee/registry/issues/475)
|
||||
* Improved race condition handling on domain renew [#430](https://github.com/internetee/registry/issues/430)
|
||||
|
||||
05.04.2017
|
||||
* Fixed validation error on valid legaldocs in the portal for registrars [#432](https://github.com/internetee/registry/issues/432)
|
||||
* Updated Ruby, nokogiri and variouse other dependent gems to fix security issues
|
||||
* Template selection for setting ForceDelete status in admin interface and new template for deceased registrant [#268](https://github.com/internetee/registry/issues/268)
|
||||
|
||||
14.03.2017
|
||||
* Improved phone number validation [#386](https://github.com/internetee/registry/issues/386)
|
||||
|
|
11
Gemfile
11
Gemfile
|
@ -128,13 +128,12 @@ group :development do
|
|||
end
|
||||
|
||||
group :development, :test do
|
||||
# test stack
|
||||
gem 'capybara', '2.4.4'
|
||||
gem 'rspec-rails', '3.5.2'
|
||||
gem 'capybara'
|
||||
gem 'rspec-rails', '~> 3.5'
|
||||
gem 'fabrication', '2.13.2' # Replacement for fixtures
|
||||
gem 'phantomjs-binaries', '1.9.2.4'
|
||||
gem 'phantomjs', '1.9.8.0'
|
||||
gem 'poltergeist', '1.6.0' # We are using PhantomJS instead
|
||||
gem 'phantomjs-binaries'
|
||||
gem 'phantomjs'
|
||||
gem 'poltergeist'
|
||||
gem 'launchy', '2.4.3' # for opening browser automatically
|
||||
|
||||
# debug
|
||||
|
|
18
Gemfile.lock
18
Gemfile.lock
|
@ -132,7 +132,8 @@ GEM
|
|||
bundler (~> 1.2)
|
||||
thor (~> 0.18)
|
||||
cancancan (1.11.0)
|
||||
capybara (2.4.4)
|
||||
capybara (2.14.0)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
|
@ -336,12 +337,11 @@ GEM
|
|||
pdfkit (0.6.2)
|
||||
pg (0.19.0)
|
||||
phantomjs (1.9.8.0)
|
||||
phantomjs-binaries (1.9.2.4)
|
||||
phantomjs-binaries (2.1.1.1)
|
||||
sys-uname (= 0.9.0)
|
||||
poltergeist (1.6.0)
|
||||
poltergeist (1.14.0)
|
||||
capybara (~> 2.1)
|
||||
cliver (~> 0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
websocket-driver (>= 0.2.0)
|
||||
polyamorous (1.3.1)
|
||||
activerecord (>= 3.0)
|
||||
|
@ -564,7 +564,7 @@ DEPENDENCIES
|
|||
bullet (= 4.14.7)
|
||||
bundler-audit
|
||||
cancancan (= 1.11.0)
|
||||
capybara (= 2.4.4)
|
||||
capybara
|
||||
codeclimate-test-reporter (~> 1.0.0)
|
||||
coderay (= 1.1.0)
|
||||
coffee-rails (= 4.1.0)
|
||||
|
@ -605,9 +605,9 @@ DEPENDENCIES
|
|||
paper_trail!
|
||||
pdfkit (= 0.6.2)
|
||||
pg (= 0.19.0)
|
||||
phantomjs (= 1.9.8.0)
|
||||
phantomjs-binaries (= 1.9.2.4)
|
||||
poltergeist (= 1.6.0)
|
||||
phantomjs
|
||||
phantomjs-binaries
|
||||
poltergeist
|
||||
pry (= 0.10.1)
|
||||
puma
|
||||
que (= 0.10.0)
|
||||
|
@ -618,7 +618,7 @@ DEPENDENCIES
|
|||
rails-settings-cached (= 0.4.1)
|
||||
ransack (= 1.5.1)
|
||||
rest-client
|
||||
rspec-rails (= 3.5.2)
|
||||
rspec-rails (~> 3.5)
|
||||
rubocop (= 0.48.1)
|
||||
rubycritic (= 3.2.0)
|
||||
sass-rails (= 5.0.6)
|
||||
|
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
@ -85,6 +85,7 @@ class Registrar
|
|||
def new
|
||||
authorize! :create, Depp::Domain
|
||||
@domain_params = Depp::Domain.default_params
|
||||
@domain_params[:period] = Depp::Domain.default_period
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -140,6 +141,7 @@ class Registrar
|
|||
@data = @domain.renew(params)
|
||||
render 'renew_index' and return unless response_ok?
|
||||
else
|
||||
params[:period] = Depp::Domain.default_period
|
||||
render 'renew_index'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -145,6 +145,10 @@ module Depp
|
|||
end
|
||||
|
||||
class << self
|
||||
def default_period
|
||||
'1y'
|
||||
end
|
||||
|
||||
def default_params
|
||||
ret = {}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class SortedCountry
|
|||
|
||||
def all_sorted_truncated
|
||||
@all_sorted_truncated ||=
|
||||
all_sorted.map { |country| [truncate(name, length: 26), country.alpha2] }
|
||||
all_sorted.map { |country| [country.name.truncate(26), country.alpha2] }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
14
spec/features/registrar/domains/new_spec.rb
Normal file
14
spec/features/registrar/domains/new_spec.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'New domain in registrar area', settings: false do
|
||||
background do
|
||||
sign_in_to_registrar_area
|
||||
end
|
||||
|
||||
it 'has default period' do
|
||||
visit registrar_domains_path
|
||||
click_link_or_button t('new')
|
||||
|
||||
expect(page).to have_field('domain_period', with: Depp::Domain.default_period)
|
||||
end
|
||||
end
|
18
spec/features/registrar/domains/renew_spec.rb
Normal file
18
spec/features/registrar/domains/renew_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.feature 'Renew domain in registrar area' do
|
||||
given!(:registrar) { create(:registrar) }
|
||||
given!(:user) { create(:api_user, registrar: registrar) }
|
||||
given!(:domain) { create(:domain, registrar: registrar) }
|
||||
|
||||
background do
|
||||
sign_in_to_registrar_area(user: user)
|
||||
end
|
||||
|
||||
it 'has default period' do
|
||||
visit registrar_domains_path
|
||||
click_link_or_button t('renew')
|
||||
|
||||
expect(page).to have_field('period', with: Depp::Domain.default_period)
|
||||
end
|
||||
end
|
9
spec/models/depp/domain_spec.rb
Normal file
9
spec/models/depp/domain_spec.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Depp::Domain do
|
||||
describe '::default_period', db: false, settings: false do
|
||||
it 'returns default period' do
|
||||
expect(described_class.default_period).to eq('1y')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,4 +1,6 @@
|
|||
require 'webmock/rspec'
|
||||
WebMock.disable_net_connect!(allow_localhost: true)
|
||||
|
||||
if ENV['TRAVIS']
|
||||
require 'simplecov'
|
||||
SimpleCov.start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue