Skip to content

Commit c2db04d

Browse files
fern-supportjsklanchrismallinsonfern-api[bot]
authored
feat: introduce new major version of the Square Ruby SDK (#158)
* do not merge: Square Ruby SDK * Current gen status + initial integration tests (#159) * ignore claude * intiial test helpers file * strongly type obj creation in helpers.rb * add more test files * bulk convert tests with cursor * use typeful .new() factory methods * regenerate with ruby v2 * restore gemfile and rakefile to main * fix relative imports * square.rb file * find/replace 'module square' --> 'module Square' * replace square::Internal --> Square::Internal * replace ' Internal::' --> ' Square::Internal::' * simplify square.rb * add end statements to else blocks * fix incorrect end statements in request types * change square::internal::json::serializable from class to module * update requirements in helpers.rb * fix test helpers imports * fix missing end after else in clients * ensure request and response types extend model * more requests extend model * remove bad extensions * fix bad class end formatting * fix more bad class end formatting * fix enum files * migrate extends syntax * update type references to error enums * temp commit lib/squre.rb * change tab size to 2 * fix internal lowercase square * fix empty class end syntax * regen * fix else ends * update type mapping * revert type mapping change * manually update gemfile, rakefile, and rubocop file from demo sdk * remove generated code * regen sdk * remove square.rb file * update module file * remove ghost types * fix enum include to extend * disable tests --------- Co-authored-by: jsklan <[email protected]> * Pull in base test infra files from demo (#160) * pull in test helper infra from demo * pull in base catalog tests --------- Co-authored-by: jsklan <[email protected]> * manually fix circular references with forward declarations (#161) Co-authored-by: jsklan <[email protected]> * Updating Rakefile * 🌿 Fern Regeneration -- August 18, 2025 (#164) * update fernignore (#163) * update fernignore * remove ignores --------- Co-authored-by: jsklan <[email protected]> * SDK regeneration --------- Co-authored-by: Fern Support <[email protected]> Co-authored-by: jsklan <[email protected]> Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> * Partially enable tests (#166) * tmp * add ci test * update rakefile * update token name options --------- Co-authored-by: jsklan <[email protected]> * SDK regeneration * SDK regeneration * re-add .rubocop.yml * SDK regeneration * Adding back rubocop.yml * Minor updates to gemspec for version and gemfile for matching dev and runtime libraries * Adding Rubocop back to Rakefile for linting * Fixing broken part of rubocop * Adding CI for linting, testing and security checks * SDK regeneration * Enable catalog integration tests (#169) * enable catalog test * modify test setup * messy status * current state * fix typo in multipart request * simplify state * progress, some nested values converting * progress, some nested values converting * log in coerce * restore request * request succeeds * remove logging from client and raw client * test passes, response parsed * update catalog client * add verbose mode handling in integration test helper --------- Co-authored-by: jsklan <[email protected]> * Adding back CI file and adding CI file to .fernignore to stop accidental deletion * Restructure Integration Tests (#170) * restructure directory * migrate structure * migrate inventory test * fix client batch_upsert url * skip all tests * update verbose request logs * simplify endpoint calls * rake test passes, 63 tests skipped * update inventory client and test --------- Co-authored-by: jsklan <[email protected]> * Manually Implement wrapped request example (#173) * interim commit * utils * tests passing * polish --------- Co-authored-by: jsklan <[email protected]> * Integration Test Polishing (#175) * cash, catalog, customers groups * cleanup --------- Co-authored-by: jsklan <[email protected]> * update endpoint call syntax (#176) Co-authored-by: jsklan <[email protected]> * SDK regeneration * fix cash drawers * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * feat: enabling more integration tests (#177) (#178) * README updates with a license change to match the repo in gemspec file (#172) * README updates with a license change to match the repoin gemspec file * Removing duplicate block code start --------- Co-authored-by: jsklan <[email protected]> Co-authored-by: Chris Mallinson <[email protected]> Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 9e38763 commit c2db04d

File tree

2,967 files changed

+177936
-68514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,967 files changed

+177936
-68514
lines changed

.fernignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ Rakefile
55
.rubocop.yml
66
square.gemspec
77
.gitignore
8-
test/
8+
test/
9+
.github/workflows

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/labeler.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
# Cancel previous workflows on previous push
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
12+
cancel-in-progress: true
13+
14+
# Global environment variables
15+
env:
16+
RUBY_VERSION: '3.3'
17+
BUNDLER_VERSION: '2.7'
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
ruby-version: ['3.2', '3.3', '3.4']
25+
bundler-version: ${{ env.BUNDLER_VERSION }}
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Ruby
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: ${{ matrix.ruby-version }}
35+
bundler-version: ${{ matrix.bundler-version }}
36+
bundler-cache: true
37+
38+
- name: Install dependencies
39+
run: |
40+
bundle install
41+
42+
- name: Build gem
43+
run: |
44+
bundle exec rake build
45+
46+
- name: Run tests
47+
run: |
48+
bundle exec rake test
49+
50+
lint:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Set up Ruby
57+
uses: ruby/setup-ruby@v1
58+
with:
59+
ruby-version: ${{ env.RUBY_VERSION }}
60+
bundler-version: ${{ env.BUNDLER_VERSION }}
61+
bundler-cache: true
62+
63+
- name: Install dependencies
64+
run: |
65+
bundle install
66+
67+
- name: Run RuboCop with auto-correct
68+
run: |
69+
bundle exec rake rubocop:autocorrect
70+
71+
# TODO: Uncomment this when we have a way a fix for all RuboCop violations
72+
# - name: Check for RuboCop violations
73+
# run: |
74+
# bundle exec rubocop --fail-level W
75+
76+
- name: Ensure no changes to git-tracked files
77+
run: git --no-pager diff --exit-code
78+
79+
security:
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Checkout repository
83+
uses: actions/checkout@v4
84+
85+
- name: Set up Ruby
86+
uses: ruby/setup-ruby@v1
87+
with:
88+
ruby-version: ${{ env.RUBY_VERSION }}
89+
bundler-version: ${{ env.BUNDLER_VERSION }}
90+
bundler-cache: true
91+
92+
- name: Install dependencies
93+
run: |
94+
bundle install
95+
96+
- name: Run bundle audit
97+
run: |
98+
bundle exec bundle audit check --update
99+
100+
gem-publish:
101+
runs-on: ubuntu-latest
102+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
103+
needs: [test, lint, security]
104+
steps:
105+
- name: Checkout repository
106+
uses: actions/checkout@v4
107+
with:
108+
fetch-depth: 0
109+
110+
- name: Set up Ruby
111+
uses: ruby/setup-ruby@v1
112+
with:
113+
ruby-version: ${{ env.RUBY_VERSION }}
114+
bundler-version: ${{ env.BUNDLER_VERSION }}
115+
bundler-cache: true
116+
117+
- name: Install dependencies
118+
run: |
119+
bundle install
120+
121+
- name: Build gem
122+
run: |
123+
bundle exec rake build
124+
125+
# TODO: Uncomment this when we are ready to publish to RubyGems
126+
# - name: Publish to RubyGems
127+
# run: |
128+
# gem push pkg/*.gem
129+
# env:
130+
# RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}

.github/workflows/publish.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/ruby.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Gemfile.lock
22
pkg
3-
*.gem
3+
*.gem
4+
CLAUDE.md

0 commit comments

Comments
 (0)