Skip to content

Commit

Permalink
Merge branch 'master' into THREESCALE-3927-update-to-openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Mar 31, 2023
2 parents b858333 + 1fd7aa5 commit eb07699
Show file tree
Hide file tree
Showing 423 changed files with 4,092 additions and 19,509 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ config/amazon_s3.yml
config/database.yml
config/redis.yml
config/backend_redis.yml
config/cubert.yml
config/tinny_tim.yml
config/*.sphinx.conf
public/assets
Expand Down
9 changes: 6 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
}
},
"env": {
"browser": true,
"jest": true
"browser": true
},
"extends": [
"eslint:recommended",
Expand All @@ -37,6 +36,9 @@
"no-multiple-empty-lines": ["error", { "max": 1 }],
"jsx-quotes": ["error", "prefer-double"],
"array-bracket-spacing": ["error", "never"],
"lines-around-comment": ["error", {
"allowBlockStart": true
}],
// "eslint array-bracket-newline": ["error", { "multiline": true }], // TODO: requires eslint 8

// Override plugin:@typescript-eslint/all
Expand All @@ -50,9 +52,10 @@
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/parameter-properties": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/lines-around-comment": "off", // Disabled in favor of lines-around-comment

// Override plugin:@typescript-eslint/recommended
"@typescript-eslint/semi": ["error", "never"],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
- uses: actions/stale@v8
with:
stale-pr-message: 'This PR is stale because it has not received activity for more than 14 days. Remove stale label or comment or this will be closed in 7 days.'
days-before-stale: 14
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ C:\\nppdf32Log\\debuglog.txt
/config/cassandra.yml
/config/core.yml
/config/cors.yml
/config/cubert.yml
/config/currencies.yml
/config/database.yml
/config/domain_substitution.yml
/config/features.yml
/config/initializers/before_filter_debug.rb
/config/master.key
/config/mixpanel.yml
/config/redis.yml
/config/oauth2.yml
/config/paperclip.yml
Expand All @@ -79,7 +77,6 @@ C:\\nppdf32Log\\debuglog.txt
/config/smtp.yml
/config/tinny_tim.yml
/config/unicorn.rb
/config/web_analytics.yml
/config/web_hooks.yml
/config/zync.yml
/db/*.sql
Expand Down Expand Up @@ -137,8 +134,6 @@ Gemfile.local
# IDE local settings
.vscode

config/cable.yml

# Yarn
.yarn/cache
.yarn/unplugged
Expand Down
1 change: 0 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@ Style/RedundantParentheses:
- 'app/helpers/code_helper.rb'
- 'app/lib/authenticated_system.rb'
- 'app/lib/authentication/by_cookie_token.rb'
- 'lib/tasks/populate_cubert.rake'

# Offense count: 9
# Cop supports --auto-correct.
Expand Down
13 changes: 9 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ source 'https://rubygems.org'
# to not use insecure git protocol
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gem 'rack', '~> 2.1.4'
gem 'rack', '~> 2.2.6'

gem 'aws-sdk-rails', '~> 3'
gem 'aws-sdk-s3', '~> 1'

gem 'dotenv-rails', '~> 2.7'
gem 'rails', '~> 5.2.7'
gem 'rails', '~> 5.2.8'
gem 'globalid', '~> 1.0.1' # remove line after we stop supporting Ruby 2.4

# Locking mail to 2.7.x, as 2.8 has a regression related to `enable_starttls_auto` setting:
# https://github.com/mikel/mail/blob/2-8-stable/CHANGELOG.rdoc#version-281-unreleased-
# Also, upgrading makes this test fail: SendUserInvitationWorkerTest#test_handles_errors
gem 'mail', '~> 2.7.1'

# Needed for XML serialization of ActiveRecord::Base
gem "activejob-uniqueness", github: "3scale/activejob-uniqueness", branch: "main"
gem 'activemodel-serializers-xml'
Expand Down Expand Up @@ -86,7 +91,7 @@ gem 'dalli', '~> 2.7' # remove version once we stop supporting ruby 2.4
gem 'faraday', '~> 0.15.3'
gem 'faraday_middleware', '~> 0.13.1'
gem 'mimemagic', '~> 0.3.10'
gem 'nokogiri', '~> 1.10.10'
gem 'nokogiri', '~> 1.13.10'
gem 'secure_headers', '~> 6.3.0'

gem 'acts-as-taggable-on', '~> 8.0'
Expand Down Expand Up @@ -253,7 +258,7 @@ end
gem 'webpacker', '5.4.4'

gem 'developer_portal', path: 'lib/developer_portal'
gem 'unicorn', require: false, group: %i[production preview]
gem 'unicorn', require: false, group: %i[production]

# NOTE: Use ENV['DB'] only to install oracle dependencies
group :oracle do
Expand Down
93 changes: 48 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,55 +88,55 @@ GEM
activesupport (>= 3.2.19)
Ascii85 (1.1.0)
RedCloth (4.3.2)
actioncable (5.2.8)
actionpack (= 5.2.8)
actioncable (5.2.8.1)
actionpack (= 5.2.8.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.8)
actionpack (= 5.2.8)
actionview (= 5.2.8)
activejob (= 5.2.8)
actionmailer (5.2.8.1)
actionpack (= 5.2.8.1)
actionview (= 5.2.8.1)
activejob (= 5.2.8.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.8)
actionview (= 5.2.8)
activesupport (= 5.2.8)
actionpack (5.2.8.1)
actionview (= 5.2.8.1)
activesupport (= 5.2.8.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.8)
activesupport (= 5.2.8)
actionview (5.2.8.1)
activesupport (= 5.2.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.8)
activesupport (= 5.2.8)
activejob (5.2.8.1)
activesupport (= 5.2.8.1)
globalid (>= 0.3.6)
activemerchant (1.107.4)
activesupport (>= 4.2)
builder (>= 2.1.2, < 4.0.0)
i18n (>= 0.6.9)
nokogiri (~> 1.4)
activemodel (5.2.8)
activesupport (= 5.2.8)
activemodel (5.2.8.1)
activesupport (= 5.2.8.1)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (5.2.8)
activemodel (= 5.2.8)
activesupport (= 5.2.8)
activerecord (5.2.8.1)
activemodel (= 5.2.8.1)
activesupport (= 5.2.8.1)
arel (>= 9.0)
activerecord-oracle_enhanced-adapter (5.2.8)
activerecord (~> 5.2.0)
ruby-plsql (>= 0.6.0)
activestorage (5.2.8)
actionpack (= 5.2.8)
activerecord (= 5.2.8)
activestorage (5.2.8.1)
actionpack (= 5.2.8.1)
activerecord (= 5.2.8.1)
marcel (~> 1.0.0)
activesupport (5.2.8)
activesupport (5.2.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand Down Expand Up @@ -460,7 +460,7 @@ GEM
nokogiri (~> 1)
rake
mini_mime (1.1.2)
mini_portile2 (2.4.0)
mini_portile2 (2.8.1)
minitest (5.10.3)
minitest-ci (3.4.0)
minitest (>= 5.0.6)
Expand All @@ -485,8 +485,9 @@ GEM
connection_pool (~> 2.2)
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
non-stupid-digest-assets (1.0.9)
sprockets (>= 2.0)
ntlm-http (0.1.1)
Expand Down Expand Up @@ -550,7 +551,8 @@ GEM
pry (~> 0.13)
public_suffix (4.0.7)
raabro (1.4.0)
rack (2.1.4.3)
racc (1.6.2)
rack (2.2.6.4)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-no_animations (1.0.3)
Expand All @@ -561,23 +563,23 @@ GEM
rack
rack-proxy (0.7.4)
rack
rack-test (2.0.2)
rack-test (2.1.0)
rack (>= 1.3)
rack-utf8_sanitizer (1.6.0)
rack (>= 1.0, < 3.0)
rack-x_served_by (0.1.1)
rails (5.2.8)
actioncable (= 5.2.8)
actionmailer (= 5.2.8)
actionpack (= 5.2.8)
actionview (= 5.2.8)
activejob (= 5.2.8)
activemodel (= 5.2.8)
activerecord (= 5.2.8)
activestorage (= 5.2.8)
activesupport (= 5.2.8)
rails (5.2.8.1)
actioncable (= 5.2.8.1)
actionmailer (= 5.2.8.1)
actionpack (= 5.2.8.1)
actionview (= 5.2.8.1)
activejob (= 5.2.8.1)
activemodel (= 5.2.8.1)
activerecord (= 5.2.8.1)
activestorage (= 5.2.8.1)
activesupport (= 5.2.8.1)
bundler (>= 1.3.0)
railties (= 5.2.8)
railties (= 5.2.8.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
Expand All @@ -586,7 +588,7 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rails-observers (0.1.5)
activemodel (>= 4.0)
Expand All @@ -600,9 +602,9 @@ GEM
activemodel (>= 3.0)
activesupport (>= 3.0)
ruby_event_store (~> 0.9.0)
railties (5.2.8)
actionpack (= 5.2.8)
activesupport (= 5.2.8)
railties (5.2.8.1)
actionpack (= 5.2.8.1)
activesupport (= 5.2.8.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
Expand Down Expand Up @@ -967,6 +969,7 @@ DEPENDENCIES
letter_opener
license_finder (~> 7.1.0)
listen
mail (~> 2.7.1)
mail_view (~> 2.0.4)
mechanize
mimemagic (~> 0.3.10)
Expand All @@ -977,7 +980,7 @@ DEPENDENCIES
mocha (~> 1.1.0)
mysql2 (~> 0.5.3)
n_plus_one_control
nokogiri (~> 1.10.10)
nokogiri (~> 1.13.10)
non-stupid-digest-assets (~> 1.0)
oauth2 (~> 1.4)
open_id_authentication
Expand All @@ -993,12 +996,12 @@ DEPENDENCIES
pry-rails
pry-shell
pry-stack_explorer
rack (~> 2.1.4)
rack (~> 2.2.6)
rack-cors
rack-no_animations (~> 1.0.3)
rack-utf8_sanitizer
rack-x_served_by (~> 0.1.1)
rails (~> 5.2.7)
rails (~> 5.2.8)
rails-controller-testing
rails-observers
rails_event_store (~> 0.9.0)
Expand Down
25 changes: 0 additions & 25 deletions app/assets/stylesheets/provider/_services.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
z-index: 100;
}

@mixin overview-widget-accordion {
.title-toggle {
cursor: pointer;

&:before {
content: '';
}
}

}

@mixin overview-widget {

.title {
Expand Down Expand Up @@ -106,7 +95,6 @@

.service-widget {
@extend .overview-widget;
@include overview-widget-accordion;

section {
margin-top: line-height-times(1);
Expand Down Expand Up @@ -178,16 +166,3 @@ table.data.notification-settings {
visibility: hidden;
}
}

.is-closed {
height: line-height-times(7/2);
overflow: hidden;

.content-service {
visibility: hidden;
}

.title-toggle:before {
content: '';
}
}
10 changes: 8 additions & 2 deletions app/controllers/admin/api/cms/base_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class Admin::Api::CMS::BaseController < Admin::Api::BaseController
# frozen_string_literal: true

class Admin::Api::CMS::BaseController < Admin::Api::BaseController
before_action :ensure_json_request
before_action :deny_on_premises_for_master
self.access_token_scopes = %i[cms account_management]

Expand All @@ -15,10 +17,14 @@ def per_page
DEFAULT_PER_PAGE
end
end

def ensure_json_request
raise ActionController::UnknownFormat unless request.format.json?
end
end

## Defining common parameters

##~ @parameter_access_token = { :name => "access_token", :description => "Your access token", :dataType => "string", :required => true, :paramType => "query", :allowMultiple => false}
##~ @parameter_page = {:name => "page", :description => "Current page of the list", :dataType => "int", :paramType => "query", :default => 1}
##~ @parameter_per_page = {:name => "per_page", :description => "Total number of records per one page (maximum 100)", :dataType => "int", :paramType => "query", :default => 20}
##~ @parameter_per_page = {:name => "per_page", :description => "Total number of records per one page (maximum 100)", :dataType => "int", :paramType => "query", :default => 20}
Loading

0 comments on commit eb07699

Please sign in to comment.