Skip to content

Commit

Permalink
Merge branch 'master' into remove-sysloglogger-gem
Browse files Browse the repository at this point in the history
# Conflicts:
#	Gemfile.lock
  • Loading branch information
Artur Beljajev committed Dec 3, 2018
2 parents 6c7aad4 + 99517ad commit 821c149
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_script:
- "chmod +x ./cc-test-reporter"
- "./cc-test-reporter before-build"
script:
- "bundle exec rails test"
- "bundle exec rails test test/*"
after_script:
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
services:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
03.12.2018
* Rails upgrade to 5.2.1.1 [#167](https://github.com/internetee/rest-whois/pull/167)
* Removed duplicate Json keys [#140](https://github.com/internetee/rest-whois/pull/140)
* Removed unused disclose Json key [#163](https://github.com/internetee/rest-whois/pull/163)

08.11.2018
* Ruby upgrade to 2.5.3 [#160](https://github.com/internetee/rest-whois/pull/160)
* Rack upgrade to 2.0.6 (cve-2018-16470, cve-2018-16471) [#206](https://github.com/internetee/rest-whois/pull/158)
Expand Down
84 changes: 42 additions & 42 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.1)
actionpack (= 5.2.1)
actioncable (5.2.1.1)
actionpack (= 5.2.1.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.1)
actionpack (= 5.2.1)
actionview (= 5.2.1)
activejob (= 5.2.1)
actionmailer (5.2.1.1)
actionpack (= 5.2.1.1)
actionview (= 5.2.1.1)
activejob (= 5.2.1.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.1)
actionview (= 5.2.1)
activesupport (= 5.2.1)
actionpack (5.2.1.1)
actionview (= 5.2.1.1)
activesupport (= 5.2.1.1)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.1)
activesupport (= 5.2.1)
actionview (5.2.1.1)
activesupport (= 5.2.1.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.1)
activesupport (= 5.2.1)
activejob (5.2.1.1)
activesupport (= 5.2.1.1)
globalid (>= 0.3.6)
activemodel (5.2.1)
activesupport (= 5.2.1)
activerecord (5.2.1)
activemodel (= 5.2.1)
activesupport (= 5.2.1)
activemodel (5.2.1.1)
activesupport (= 5.2.1.1)
activerecord (5.2.1.1)
activemodel (= 5.2.1.1)
activesupport (= 5.2.1.1)
arel (>= 9.0)
activestorage (5.2.1)
actionpack (= 5.2.1)
activerecord (= 5.2.1)
activestorage (5.2.1.1)
actionpack (= 5.2.1.1)
activerecord (= 5.2.1.1)
marcel (~> 0.3.1)
activesupport (5.2.1)
activesupport (5.2.1.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand All @@ -56,7 +56,7 @@ GEM
rack-test (>= 0.6.3)
xpath (~> 3.1)
coderay (1.1.2)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.3)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
Expand All @@ -69,7 +69,7 @@ GEM
globalid (0.4.1)
activesupport (>= 4.2.0)
hashdiff (0.3.7)
i18n (1.1.0)
i18n (1.1.1)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
Expand All @@ -83,11 +83,11 @@ GEM
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.2)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.0)
method_source (0.9.2)
mimemagic (0.3.2)
mina (0.3.8)
open4 (~> 1.3.4)
Expand All @@ -110,27 +110,27 @@ GEM
rack (2.0.6)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.1)
actioncable (= 5.2.1)
actionmailer (= 5.2.1)
actionpack (= 5.2.1)
actionview (= 5.2.1)
activejob (= 5.2.1)
activemodel (= 5.2.1)
activerecord (= 5.2.1)
activestorage (= 5.2.1)
activesupport (= 5.2.1)
rails (5.2.1.1)
actioncable (= 5.2.1.1)
actionmailer (= 5.2.1.1)
actionpack (= 5.2.1.1)
actionview (= 5.2.1.1)
activejob (= 5.2.1.1)
activemodel (= 5.2.1.1)
activerecord (= 5.2.1.1)
activestorage (= 5.2.1.1)
activesupport (= 5.2.1.1)
bundler (>= 1.3.0)
railties (= 5.2.1)
railties (= 5.2.1.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.1)
actionpack (= 5.2.1)
activesupport (= 5.2.1)
railties (5.2.1.1)
actionpack (= 5.2.1.1)
activesupport (= 5.2.1.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
Expand All @@ -156,7 +156,7 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.20.0)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
Expand Down
34 changes: 34 additions & 0 deletions config/storage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>

local:
service: Disk
root: <%= Rails.root.join("storage") %>

# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
# amazon:
# service: S3
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
# region: us-east-1
# bucket: your_own_bucket

# Remember not to checkin your GCS keyfile to a repository
# google:
# service: GCS
# project: your_project
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
# bucket: your_own_bucket

# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
# microsoft:
# service: AzureStorage
# storage_account_name: your_account_name
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
# container: your_container_name

# mirror:
# service: Mirror
# primary: local
# mirrors: [ amazon, google, microsoft ]
4 changes: 3 additions & 1 deletion test/fixtures/contact_request_mailer/confirmation_email.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ http://example.test/contact_requests/c57db228289d5cf6c4e109a0cbf9679856dd628a833
Link expires in 24 hours.

Best regards,
Estonian Internet Foundation
Estonian Internet Foundation


Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ Best regards,
John Smith

С уважением,
Eesti Interneti SA
Eesti Interneti SA

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ http://example.test/contact_requests/c57db228289d5cf6c4e109a0cbf9679856dd628a833
Link aegub 24 tunniga.

Lugupidamisega
Eesti Interneti SA
Eesti Interneti SA


Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ EIS не проверяет подлинность сообщения и не у
Hello there

С уважением,
Eesti Interneti SA
Eesti Interneti SA

30 changes: 0 additions & 30 deletions test/fixtures/whois_records.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ privately_owned:
changed: "2018-04-25T14:10:41+03:00"
delete: ~
disclaimer: "The information obtained through .ee WHOIS is subject to database protection according to the Estonian Copyright Act and international conventions. All rights are reserved to Estonian Internet Foundation. Search results may not be used for commercial,advertising, recompilation, repackaging, redistribution, reuse, obscuring or other similar activities. Downloading of information about domain names for the creation of your own database is not permitted. If any of the information from .ee WHOIS is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine."
disclosed:
-
- email
- test@test.com
-
- email
- test@test.com
-
- email
- test@test.com
dnssec_changed: ~
dnssec_keys: []
email: owner@privatedomain.test
Expand Down Expand Up @@ -150,16 +140,6 @@ legally_owned:
changed: "2018-04-25T14:10:41+03:00"
delete: ~
disclaimer: "The information obtained through .ee WHOIS is subject to database protection according to the Estonian Copyright Act and international conventions. All rights are reserved to Estonian Internet Foundation. Search results may not be used for commercial,advertising, recompilation, repackaging, redistribution, reuse, obscuring or other similar activities. Downloading of information about domain names for the creation of your own database is not permitted. If any of the information from .ee WHOIS is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine."
disclosed:
-
- email
- test@test.com
-
- email
- test@test.com
-
- email
- test@test.com
dnssec_changed: ~
dnssec_keys: []
email: owner@company-domain.test
Expand Down Expand Up @@ -214,16 +194,6 @@ with_duplicate_domain_contacts:
changed: "2018-04-25T14:10:41+03:00"
delete: ~
disclaimer: "The information obtained through .ee WHOIS is subject to database protection according to the Estonian Copyright Act and international conventions. All rights are reserved to Estonian Internet Foundation. Search results may not be used for commercial,advertising, recompilation, repackaging, redistribution, reuse, obscuring or other similar activities. Downloading of information about domain names for the creation of your own database is not permitted. If any of the information from .ee WHOIS is transferred to a third party, it must be done in its entirety. This server must not be used as a backend for a search engine."
disclosed:
-
- email
- test@test.com
-
- email
- test@test.com
-
- email
- test@test.com
dnssec_changed: ~
dnssec_keys: []
email: duplicate@domain.test
Expand Down
11 changes: 7 additions & 4 deletions test/mailers/contact_request_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_confirmation_email
assert_equal(['no-reply@internet.ee'], email.from)
assert_equal(['email@example.com'], email.to)
assert_equal('Email address confirmation', email.subject)
assert_equal(read_fixture('confirmation_email.erb').join, email.body.to_s.rstrip)
assert_equal(read_fixture('confirmation_email.erb').join, email.body.to_s.gsub(/\r/, ""))
end

def test_confirmation_email_can_be_localized
Expand All @@ -28,7 +28,8 @@ def test_confirmation_email_can_be_localized
assert_equal(['no-reply@internet.ee'], email.from)
assert_equal(['email@example.com'], email.to)
assert_equal('E-posti aadressi kinnituskiri', email.subject)
assert_equal(read_fixture('localized_confirmation_email.erb').join, email.body.to_s.rstrip)
assert_equal(read_fixture('localized_confirmation_email.erb').join,
email.body.to_s.gsub(/\r/, ""))

I18n.locale = I18n.default_locale
end
Expand All @@ -53,7 +54,8 @@ def test_contact_request_email
assert_equal(['admin@privatedomain.com', 'owner@private_domain.com'], email.to)
assert_equal(['email@example.com'], email.reply_to)
assert_equal('Email to domain owner and/or contact', email.subject)
assert_equal(read_fixture('contact_request_email.erb').join, email.body.to_s.rstrip)
assert_equal(read_fixture('contact_request_email.erb').join,
email.body.to_s.gsub(/\r/, ""))
end

def test_contact_request_email_strips_html_tags_from_body
Expand All @@ -71,7 +73,8 @@ def test_contact_request_email_strips_html_tags_from_body
assert_equal(['admin@privatedomain.com', 'owner@private_domain.com'], email.to)
assert_equal(['email@example.com'], email.reply_to)
assert_equal('Email to domain owner and/or contact', email.subject)
assert_equal(read_fixture('stripped_contact_request_email.erb').join, email.body.to_s.rstrip)
assert_equal(read_fixture('stripped_contact_request_email.erb').join,
email.body.to_s.gsub(/\r/, ""))
end

def test_character_limit_constants_defaults_to_2000
Expand Down

0 comments on commit 821c149

Please sign in to comment.