Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0b5ad6f
do not merge: Square Ruby SDK
fern-support Aug 18, 2025
80687f4
Current gen status + initial integration tests (#159)
fern-support Aug 18, 2025
0fd9ff8
Pull in base test infra files from demo (#160)
fern-support Aug 18, 2025
8a27a1f
manually fix circular references with forward declarations (#161)
fern-support Aug 18, 2025
bf89fee
Updating Rakefile
chrismallinson Aug 18, 2025
74eba23
:herb: Fern Regeneration -- August 18, 2025 (#164)
fern-api[bot] Aug 18, 2025
54114ab
Partially enable tests (#166)
fern-support Aug 18, 2025
c0a8cf5
SDK regeneration
fern-api[bot] Aug 18, 2025
ebc230c
SDK regeneration
fern-api[bot] Aug 18, 2025
39dc897
re-add .rubocop.yml
jsklan Aug 18, 2025
83ba972
SDK regeneration
fern-api[bot] Aug 18, 2025
eec28aa
Merge branch 'master' into fern-api/square-ruby-sdk-v44
jsklan Aug 18, 2025
4277ccd
Adding back rubocop.yml
fern-support Aug 18, 2025
e7741db
Minor updates to gemspec for version and gemfile for matching dev and…
fern-support Aug 18, 2025
62c3844
Adding Rubocop back to Rakefile for linting
fern-support Aug 18, 2025
aa5b406
Fixing broken part of rubocop
fern-support Aug 18, 2025
fc741ae
Adding CI for linting, testing and security checks
fern-support Aug 19, 2025
37bb9c6
SDK regeneration
fern-api[bot] Aug 19, 2025
9cd75a1
Enable catalog integration tests (#169)
fern-support Aug 19, 2025
8dd6ad7
Adding back CI file and adding CI file to .fernignore to stop acciden…
fern-support Aug 19, 2025
44b532f
Restructure Integration Tests (#170)
fern-support Aug 19, 2025
43d82a1
Manually Implement wrapped request example (#173)
fern-support Aug 19, 2025
fa99b25
Integration Test Polishing (#175)
fern-support Aug 19, 2025
87c551d
update endpoint call syntax (#176)
fern-support Aug 20, 2025
c6477bc
SDK regeneration
fern-api[bot] Aug 20, 2025
4823e18
fix cash drawers
jsklan Aug 21, 2025
757a25d
SDK regeneration
fern-api[bot] Aug 21, 2025
175dd14
SDK regeneration
fern-api[bot] Aug 21, 2025
a62476c
SDK regeneration
fern-api[bot] Aug 21, 2025
ebe59a4
SDK regeneration
fern-api[bot] Aug 21, 2025
15622f4
feat: enabling more integration tests (#177) (#178)
fern-support Aug 21, 2025
7c3de4b
README updates with a license change to match the repo in gemspec fil…
fern-support Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ Rakefile
.rubocop.yml
square.gemspec
.gitignore
test/
test/
.github/workflows
33 changes: 0 additions & 33 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/labeler.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/pull_request_template.md

This file was deleted.

130 changes: 130 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: CI

on:
push:
branches:
- main
pull_request:

# Cancel previous workflows on previous push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

# Global environment variables
env:
RUBY_VERSION: '3.3'
BUNDLER_VERSION: '2.7'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.2', '3.3', '3.4']
bundler-version: ${{ env.BUNDLER_VERSION }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-version: ${{ matrix.bundler-version }}
bundler-cache: true

- name: Install dependencies
run: |
bundle install

- name: Build gem
run: |
bundle exec rake build

- name: Run tests
run: |
bundle exec rake test

lint:
Comment on lines +21 to +50

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the problem, add a permissions block to the workflow file. The best way is to add it at the root level (top of the file, after name: and before jobs:), so it applies to all jobs unless overridden. For this workflow, the minimal required permission is likely contents: read, as most jobs only need to check out code and run tests/linting. If any job needs additional permissions (e.g., to create issues or pull requests, or to publish releases), those can be added at the job level. Since the gem publishing step is commented out, we do not need to grant write permissions for now. The change should be made at the top of .github/workflows/ci.yml, after the name: line.

Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: CI
 
 on:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: CI

on:
Copilot is powered by AI and may make mistakes. Always verify output.
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-version: ${{ env.BUNDLER_VERSION }}
bundler-cache: true

- name: Install dependencies
run: |
bundle install

- name: Run RuboCop with auto-correct
run: |
bundle exec rake rubocop:autocorrect

# TODO: Uncomment this when we have a way a fix for all RuboCop violations
# - name: Check for RuboCop violations
# run: |
# bundle exec rubocop --fail-level W

- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code

security:
Comment on lines +51 to +79

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the problem, add a permissions block at the top level of the workflow file, immediately after the name and before the on key. This will apply the least privilege principle to all jobs in the workflow, ensuring that the GITHUB_TOKEN only has read access to repository contents unless otherwise specified. The recommended minimal setting is permissions: { contents: read }. No changes to job steps or additional imports are required. This change is made at the root of .github/workflows/ci.yml.


Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: CI
 
 on:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: CI

on:
Copilot is powered by AI and may make mistakes. Always verify output.
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-version: ${{ env.BUNDLER_VERSION }}
bundler-cache: true

- name: Install dependencies
run: |
bundle install

- name: Run bundle audit
run: |
bundle exec bundle audit check --update

gem-publish:
Comment on lines +80 to +100

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the problem, you should add a permissions block to the workflow file, either at the root level (to apply to all jobs) or to each job individually. The best approach is to add it at the root level, specifying the minimal permissions required for the workflow to function. For most CI workflows that only need to read repository contents (e.g., for checkout and running tests), contents: read is sufficient. If any job requires additional permissions (e.g., to create pull requests or publish packages), you can override the permissions at the job level. In this case, none of the jobs appear to require write access, so adding permissions: contents: read at the root is the best fix. This should be added after the name and before the on block for clarity and convention.

Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: CI
 
 on:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: CI

on:
Copilot is powered by AI and may make mistakes. Always verify output.
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
needs: [test, lint, security]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-version: ${{ env.BUNDLER_VERSION }}
bundler-cache: true

- name: Install dependencies
run: |
bundle install

- name: Build gem
run: |
bundle exec rake build

# TODO: Uncomment this when we are ready to publish to RubyGems
# - name: Publish to RubyGems
# run: |
# gem push pkg/*.gem
# env:
# RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
Comment on lines +101 to +130

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the problem, add a permissions block at the top level of the workflow file, immediately after the name field and before the on field. This will apply the least-privilege permissions (contents: read) to all jobs in the workflow, unless a job explicitly overrides it. This change does not affect the existing functionality of the workflow, as none of the jobs require write access to repository contents or other resources. No additional methods, imports, or definitions are needed.


Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: CI
 
 on:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: CI

on:
Copilot is powered by AI and may make mistakes. Always verify output.
43 changes: 0 additions & 43 deletions .github/workflows/publish.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/ruby.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Gemfile.lock
pkg
*.gem
*.gem
CLAUDE.md
Loading
Loading