Skip to content

Commit

Permalink
Merge develop into testing (#710)
Browse files Browse the repository at this point in the history
* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-ACTIONCABLE-20338

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* Update .travis.yml

Fix for the travis issue caused by drop of support for postgres appt package.

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* updated controller with registry check

* fix rubocop

* Added to org manag controller registry update

* Updated registry

Removed from controller registry update

* GMBP-213: Add Dockerfile (Dev) (#659)

* Dockerise app ready for migration

* Add apt-get upgrade

* Add &&

* Use the slim version of the base image

* Fix Dockerfile

* Fix Dockerfile

* Try ubuntu:23.10, remove nodejs

* Back to ubuntu 22.04

* Add user

* Fix adding user rails

* Fix user and group

* Update Gemfile

* Update Dockerfile

* Switch to multi-stage build

* Remove zlib1g from runtime

* Move make jobs to right place

* Switch to Alpine base, compile sqlite gem

* Add comment about alpine and musl

* Update comments

* Use official ruby alpine image

* Fix deprecation warning

* Change branch to tag

* Update test.rb

* Update .ruby-version

* Update Gemfile

---------

Co-authored-by: mo-zag <mo-zag@users.noreply.github.com>
Co-authored-by: Andrew Hemming <drewhemm@users.noreply.github.com>
Co-authored-by: Andrew Hemming <andrew.hemming@redrockconsulting.co.uk>

* Updated for cloud-watch (#688)

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities (#666)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: mo-zag <mo-zag@users.noreply.github.com>

* [Snyk] Security upgrade rails from 7.1.2 to 7.1.3 (#672)

* fix: Gemfile & Gemfile.lock to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-RUBY-RACK-1061917

* Update Gemfile.lock

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: mohammed Aziz <mo_zag@yahoo.co.uk>

* Spotlight API and Registry Update integration merge into develop branch (#697)

* Updated manifest and travis

Updated manifest and travis to map to testing env

* Update .travis.yml

* Update user.rb

* vault-temp-fix-to-cf_vault.rb

* Remove vault fix

* Update auth.rb

* Update manage_organisations_controller_spec.rb

* Update remove_organisations_additional_identifier_controller_spec.rb

* Update update_organisations_controller_spec.rb

* GMBP-213: Add Dockerfile (Staging/Test) (#674)

* Updated for cloud-watch

* Updated contact service for registry update

* Some logging in contact service is down or not saved data

* push to Cloud-watch logs  Testing (#682)

* Cloudwatch logs

* fix logs

Update to remove depandacy of ENV var.

* Updated logging

* removed RAILS_LOG_TO_STDOUT dependancy

* Update aws_ssm.rb

* Update aws_ssm.rb

* Updated RAILS_LOG_TO_STDOUT

* Update aws_ssm.rb

* Create rollbar.rb

* Revert "Update aws_ssm.rb"

This reverts commit d48bcaf.

* SF update

* Removed contact api debug helpers.

* Update contact_service.rb

Stop pushing to Rollbar if 404 error

* Update contact_service.rb

* Update registry_update_controller.rb

* Removed registry checker.

* Update search_api.rb

* Revert "Update search_api.rb"

This reverts commit 9e5bdf4.

* Updated Registry checker

* test callback for spotlight

* New spotlight api integration.

* Removed registry update from two controllers

Can be put back when ready.

* Updated code for rubocop issues

* Update user.rb

Removed logger info

---------

Co-authored-by: ccsnareshkumar <66829713+ccsnareshkumar@users.noreply.github.com>
Co-authored-by: Tom <thomas.berey@crowncommercial.gov.uk>
Co-authored-by: Iulia R Ionita <iulia.ionita@crowncommercial.gov.uk>
Co-authored-by: Tom Berey <tomberey1@gmail.com>
Co-authored-by: ccsnareshk <90035996+ccsnareshk@users.noreply.github.com>
Co-authored-by: Andrew Hemming <drewhemm@users.noreply.github.com>

* Update spotlight/search.rb (#698)

* Update spotlight/search.rb

Adds a conditional check to the spotlight API search to ensure only active organisations are returned when searching.

* Update US-DUN-404123456.json

Add missing field to stubs, for tests to pass. Also matches the external data.

* Update US-DUN-34578904.json

* Update US-DUN-444444440.json

* Update US-DUN-505123456.json

* Update US-DUN-606123456.json

* Update US-DUN-707123456.json

* Update US-DUN-808123456.json

* Update US-DUN-901123456.json

* Update US-DUN-909123456.json

* Update US-DUN-011122333.json

* Update US-DUN-101123456.json

* Update US-DUN-111111111.json

* Update US-DUN-111123456.json

* Update US-DUN-220123456.json

* Update US-DUN-222123456.json

* Update US-DUN-222223456.json

* Update US-DUN-303123456.json

* Update search_api_additional_identifiers.rb (#699)

* Debug spotlight issues (#700)

* Update search_api_additional_identifiers.rb

* Update search_api_additional_identifiers.rb

* Update search.rb (#701)

* Update search.rb (#702)

* Fixing spotlight parameter issue and remove logging (#703)

* Update search_api_additional_identifiers.rb

* Update search.rb

* Update search.rb (#704)

* Update search.rb

* spotlight-add-extra-logging-for-debug (#705)

spotlight-add-extra-logging-for-debug

* Update search.rb (#706)

remove extra logging.
rename param to what it should be.

* Update search.rb (#707)

* Fix Spotlight Issues & Remove Debug Logging (#708)

Fixes remaining Spotlight issues, by accounting for where the external API returns a 200, even though the DnB API itself returns a negative response of 400 Bad Request, with no record/data.

Removes any added logging that was used for debugging the above issues.

* Update spotlight/search.rb

Adjust the conditional requirements for returning a negative 404 response, based on external API messaging.

* Update companies_house/search.rb (#709)

Remove additional Identifier checking for DUNs, after the Primary Companies House Identifier has been found, (since Spotlight does not yet support this).

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: mohammed Aziz <mo_zag@yahoo.co.uk>
Co-authored-by: mo-zag <mo-zag@users.noreply.github.com>
Co-authored-by: georges1996 <40758489+georges1996@users.noreply.github.com>
Co-authored-by: Andrew Hemming <drewhemm@users.noreply.github.com>
Co-authored-by: Andrew Hemming <andrew.hemming@redrockconsulting.co.uk>
Co-authored-by: cosborneCCS <57792536+cosborneCCS@users.noreply.github.com>
Co-authored-by: ccs-wattsa <andrew.watts@crowncommercial.gov.uk>
Co-authored-by: ccsnareshkumar <66829713+ccsnareshkumar@users.noreply.github.com>
Co-authored-by: Iulia R Ionita <iulia.ionita@crowncommercial.gov.uk>
Co-authored-by: ccsnareshk <90035996+ccsnareshk@users.noreply.github.com>
  • Loading branch information
12 people committed Apr 24, 2024
1 parent 3c03ed8 commit bbd7920
Show file tree
Hide file tree
Showing 47 changed files with 1,092 additions and 127 deletions.
10 changes: 9 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ SALESFORCE_PASSWORD= 6238g3b28323gg3g
SALESFORCE_SECURITY_TOKEN=nsdn34982328or34go83goy23g723v
SALESFORCE_CLIENT_ID=jdoifiowehfwibewiufwer3hiu349y4o83gh8o4g8ob34o4gg39o23g48o23o8go88g34o8
SALESFORCE_CLIENT_SECRET=bsiuf98328hro3h8or3go8rg8p238o23hiu3r8o23ho832griuiuhdoweh98ho2hh32
CLIENT_ID=wndiowdio2ueh3298hr3
CLIENT_ID=wndiowdio2ueh3298hr3

SPOTLIGHT_AUTH_URL= https://biwbdqwbdiwebiu.com
SPOTLIGHT_USERNAME= test@testcommercial.gov.uk
SPOTLIGHT_PASSWORD= 6238g3b28323gg3g
SPOTLIGHT_SECURITY_TOKEN=nsdn34982328or34go83goy23g723v
SPOTLIGHT_CLIENT_ID=jdoifiowehfwibewiufwer3hiu349y4o83gh8o4g8ob34o4gg39o23g48o23o8go88g34o8
SPOTLIGHT_CLIENT_SECRET=bsiuf98328hro3h8or3go8rg8p238o23hiu3r8o23ho832griuiuhdoweh98ho2hh32
# CLIENT_ID=wndiowdio2ueh3298hr3
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ coverage/*
vendor/bundle/
CF/*.manifest.yml

public/export
public/export
spec/stub_response/spotlight/.vscode/settings.json
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: bionic
dist: jammy
language: ruby
rvm:
— 3.2.2
Expand All @@ -15,16 +15,17 @@ env:
services:
- postgresql
addons:
postgresql: '11'
postgresql: '14'
install: bundle install --jobs=3 --retry=3
before_script:
- sudo apt-get -qq update
- sudo apt-get install -y postgresql-11-postgis-2.5
- sudo apt-get install -y postgresql-client
- psql -U postgres -c 'create database cii_test'
- psql -U postgres -d cii_test -c 'create extension postgis'
# - psql -U postgres -d cii_test -c 'create extension postgis'
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- bundle exec bin/rails db:migrate RAILS_ENV=test
script:
- bundle exec rake db:setup
- bundle exec rake
Expand Down
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.2.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.0.8'
gem 'rails', '~> 7.1.3'
# Use sqlite3 as the database for Active Record. When using Alpine, needs to be compiled from source using the musl C compiler.
gem 'sqlite3', '~> 1.6', git: 'https://github.com/sparklemotion/sqlite3-ruby.git', tag: 'v1.6.5'
# Use Puma as the app server
Expand Down Expand Up @@ -51,15 +51,15 @@ group :development, :test do
# gem 'spring-watcher-listen', '~> 2.0.0'
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'dotenv-rails', '>= 2.7.6'
gem 'i18n-tasks', '>= 1.0.11'
gem 'rspec-rails', '>= 5.1.2'
gem 'i18n-tasks', '>= 1.0.13'
gem 'rspec-rails', '>= 6.0.4'
gem 'rubocop', '>= 1.12.0'
gem 'rubocop-performance', '>= 1.10.2'
gem 'rubocop-rails', '>= 2.21.0'
gem 'rubocop-rails', '>= 2.21.1'
gem 'rubocop-rspec', '>= 2.2.0' # or gem 'rubocop-minitest'
gem 'brakeman'
gem 'pry-rails'
gem 'factory_bot_rails', '>= 6.2.0'
gem 'factory_bot_rails', '>= 6.4.3'
gem 'simplecov', require: false
end

Expand Down
Loading

0 comments on commit bbd7920

Please sign in to comment.