Skip to content

Commit

Permalink
Merge pull request #3 from StatusCakeDev/allow-resource-urls-to-be-up…
Browse files Browse the repository at this point in the history
…dated

feat: allow resource URLs to be updated
  • Loading branch information
tomasbasham authored Mar 20, 2023
2 parents 1cd2c9c + 8758a23 commit 317e5e1
Show file tree
Hide file tree
Showing 66 changed files with 204 additions and 123 deletions.
9 changes: 9 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": [
"@commitlint/config-conventional",
],
"rules": {
"body-max-line-length": [2, "always", 72],
"header-max-length": [02, "always", 50],
},
}
9 changes: 9 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
commit-message:
prefix: ci(deps)
26 changes: 26 additions & 0 deletions .github/workflows/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: policy
on:
pull_request:
push:
branches:
- gh-readonly-queue/**
jobs:
check-merge-commits:
if: github.event_name == 'pull_request'
name: Check merge commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
git config --global --add safe.directory /github/workspace
merge_commits=$(git rev-list --merges "origin/$GITHUB_BASE_REF".."origin/$GITHUB_HEAD_REF")
if [ -n "$merge_commits" ]; then
echo "Error: merge commits found in $GITHUB_BASE_REF..$GITHUB_HEAD_REF"
for merge_commit in $merge_commits; do
echo "$merge_commit"
done
exit 1
fi
4 changes: 3 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
name: publish
on:
release:
types:
- published
jobs:
publish:
name: Publish to RubyGems
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: style
on:
pull_request:
push:
branches:
- gh-readonly-queue/**
jobs:
commit-message-style:
if: github.event_name == 'pull_request'
name: Check commit message style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 19.x
- name: Install base config
run: npm install @commitlint/config-conventional
- name: Validate all commits
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD --verbose
7 changes: 5 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
---
name: test
on:
pull_request:
push:
branches:
- gh-readonly-queue/**
- master
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- "3.2"
- "3.1"
- "3.0"
- "2.7"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
statuscake-rb (1.0.1.pre.beta.1)
statuscake-rb (1.1.0.pre.beta.1)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
4 changes: 2 additions & 2 deletions lib/statuscake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
4 changes: 2 additions & 2 deletions lib/statuscake/api/contact_groups_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
4 changes: 2 additions & 2 deletions lib/statuscake/api/locations_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
4 changes: 2 additions & 2 deletions lib/statuscake/api/maintenance_windows_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
7 changes: 5 additions & 2 deletions lib/statuscake/api/pagespeed_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down Expand Up @@ -454,6 +454,7 @@ def list_pagespeed_tests_with_http_info(opts = {})
# @param test_id [String] Pagespeed check ID
# @param [Hash] opts the optional parameters
# @option opts [String] :name Name of the check
# @option opts [String] :website_url URL, FQDN, or IP address of the website under test
# @option opts [PagespeedTestCheckRate] :check_rate
# @option opts [Integer] :alert_bigger An alert will be sent if the size of the page is larger than this value (kb). A value of 0 prevents alerts being sent.
# @option opts [Integer] :alert_slower An alert will be sent if the load time of the page exceeds this value (ms). A value of 0 prevents alerts being sent
Expand All @@ -472,6 +473,7 @@ def update_pagespeed_test(test_id, opts = {})
# @param test_id [String] Pagespeed check ID
# @param [Hash] opts the optional parameters
# @option opts [String] :name Name of the check
# @option opts [String] :website_url URL, FQDN, or IP address of the website under test
# @option opts [PagespeedTestCheckRate] :check_rate
# @option opts [Integer] :alert_bigger An alert will be sent if the size of the page is larger than this value (kb). A value of 0 prevents alerts being sent.
# @option opts [Integer] :alert_slower An alert will be sent if the load time of the page exceeds this value (ms). A value of 0 prevents alerts being sent
Expand Down Expand Up @@ -519,6 +521,7 @@ def update_pagespeed_test_with_http_info(test_id, opts = {})
# form parameters
form_params = opts[:form_params] || {}
form_params['name'] = opts[:'name'] unless opts[:'name'].nil?
form_params['website_url'] = opts[:'website_url'] unless opts[:'website_url'].nil?
form_params['check_rate'] = opts[:'check_rate'] unless opts[:'check_rate'].nil?
form_params['alert_bigger'] = opts[:'alert_bigger'] unless opts[:'alert_bigger'].nil?
form_params['alert_slower'] = opts[:'alert_slower'] unless opts[:'alert_slower'].nil?
Expand Down
7 changes: 5 additions & 2 deletions lib/statuscake/api/ssl_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down Expand Up @@ -357,6 +357,7 @@ def list_ssl_tests_with_http_info(opts = {})
# Updates an SSL check with the given parameters.
# @param test_id [String] SSL check ID
# @param [Hash] opts the optional parameters
# @option opts [String] :website_url URL of the server under test. Must begin with https://
# @option opts [SSLTestCheckRate] :check_rate
# @option opts [Array<Integer>] :alert_at List representing when alerts should be sent (days). Must be exactly 3 numerical values
# @option opts [Boolean] :alert_broken Whether to enable alerts when SSL certificate issues are found
Expand All @@ -378,6 +379,7 @@ def update_ssl_test(test_id, opts = {})
# Updates an SSL check with the given parameters.
# @param test_id [String] SSL check ID
# @param [Hash] opts the optional parameters
# @option opts [String] :website_url URL of the server under test. Must begin with https://
# @option opts [SSLTestCheckRate] :check_rate
# @option opts [Array<Integer>] :alert_at List representing when alerts should be sent (days). Must be exactly 3 numerical values
# @option opts [Boolean] :alert_broken Whether to enable alerts when SSL certificate issues are found
Expand Down Expand Up @@ -416,6 +418,7 @@ def update_ssl_test_with_http_info(test_id, opts = {})

# form parameters
form_params = opts[:form_params] || {}
form_params['website_url'] = opts[:'website_url'] unless opts[:'website_url'].nil?
form_params['check_rate'] = opts[:'check_rate'] unless opts[:'check_rate'].nil?
form_params['alert_at'] = @api_client.build_collection_param(opts[:'alert_at'], :csv) unless opts[:'alert_at'].nil?
form_params['alert_broken'] = opts[:'alert_broken'] unless opts[:'alert_broken'].nil?
Expand Down
7 changes: 5 additions & 2 deletions lib/statuscake/api/uptime_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down Expand Up @@ -726,6 +726,7 @@ def list_uptime_tests_with_http_info(opts = {})
# @param test_id [String] Uptime check ID
# @param [Hash] opts the optional parameters
# @option opts [String] :name Name of the check
# @option opts [String] :website_url URL or IP address of the server under test
# @option opts [UptimeTestCheckRate] :check_rate
# @option opts [String] :basic_username Basic authentication username
# @option opts [String] :basic_password Basic authentication password
Expand Down Expand Up @@ -763,6 +764,7 @@ def update_uptime_test(test_id, opts = {})
# @param test_id [String] Uptime check ID
# @param [Hash] opts the optional parameters
# @option opts [String] :name Name of the check
# @option opts [String] :website_url URL or IP address of the server under test
# @option opts [UptimeTestCheckRate] :check_rate
# @option opts [String] :basic_username Basic authentication username
# @option opts [String] :basic_password Basic authentication password
Expand Down Expand Up @@ -845,6 +847,7 @@ def update_uptime_test_with_http_info(test_id, opts = {})
# form parameters
form_params = opts[:form_params] || {}
form_params['name'] = opts[:'name'] unless opts[:'name'].nil?
form_params['website_url'] = opts[:'website_url'] unless opts[:'website_url'].nil?
form_params['check_rate'] = opts[:'check_rate'] unless opts[:'check_rate'].nil?
form_params['basic_username'] = opts[:'basic_username'] unless opts[:'basic_username'].nil?
form_params['basic_password'] = opts[:'basic_password'] unless opts[:'basic_password'].nil?
Expand Down
4 changes: 2 additions & 2 deletions lib/statuscake/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
4 changes: 2 additions & 2 deletions lib/statuscake/api_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# StatusCake API
#
# Copyright (c) 2022
# Copyright (c) 2023
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
Expand All @@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# API version: 1.0.1
# API version: 1.1.0
# Contact: support@statuscake.com
#
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
Expand Down
Loading

0 comments on commit 317e5e1

Please sign in to comment.