Skip to content

Commit fb2515a

Browse files
chore: configure new SDK language
1 parent bb0bbc4 commit fb2515a

File tree

226 files changed

+17732
-1
lines changed

Some content is hidden

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

226 files changed

+17732
-1
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
14+
15+
jobs:
16+
lint:
17+
timeout-minutes: 10
18+
name: lint
19+
runs-on: ${{ github.repository == 'stainless-sdks/scrapegraphai-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
bundler-cache: false
28+
- run: |-
29+
bundle install
30+
31+
- name: Run lints
32+
run: ./scripts/lint
33+
test:
34+
timeout-minutes: 10
35+
name: test
36+
runs-on: ${{ github.repository == 'stainless-sdks/scrapegraphai-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
37+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Set up Ruby
41+
uses: ruby/setup-ruby@v1
42+
with:
43+
bundler-cache: false
44+
- run: |-
45+
bundle install
46+
47+
- name: Run tests
48+
run: ./scripts/test

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.gem
2+
.idea/
3+
.ignore
4+
.prism.log
5+
.ruby-lsp/
6+
.yardoc/
7+
bin/tapioca
8+
Brewfile.lock.json
9+
doc/
10+
sorbet/tapioca/*

.rubocop.yml

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
---
2+
# Explicitly disable pending cops for now. This is the default behaviour but
3+
# this avoids a large warning every time we run it.
4+
# Stop RuboCop nagging about rubocop-rake.
5+
# Ensure that RuboCop validates according to the lowest version of Ruby that we support.
6+
AllCops:
7+
Exclude:
8+
- "bin/*"
9+
NewCops: enable
10+
SuggestExtensions: false
11+
TargetRubyVersion: 3.2.0
12+
13+
# Whether MFA is required or not should be left to the token configuration.
14+
Gemspec/RequireMFA:
15+
Enabled: false
16+
17+
# Don't require this extra line break, it can be excessive.
18+
Layout/EmptyLineAfterGuardClause:
19+
Enabled: false
20+
21+
# Don't leave complex assignment values hanging off to the right.
22+
Layout/EndAlignment:
23+
EnforcedStyleAlignWith: variable
24+
25+
Layout/FirstArrayElementLineBreak:
26+
Enabled: true
27+
28+
Layout/FirstHashElementLineBreak:
29+
Enabled: true
30+
31+
Layout/FirstMethodArgumentLineBreak:
32+
Enabled: true
33+
34+
Layout/FirstMethodParameterLineBreak:
35+
Enabled: true
36+
37+
# Set a reasonable line length; rely on other cops to correct long lines.
38+
Layout/LineLength:
39+
AllowedPatterns:
40+
- "^\\s*#.*$"
41+
- ^require(_relative)?
42+
- "Scrapegraphai::Internal::Type::BaseModel$"
43+
- "^\\s*[A-Z0-9_]+ = :"
44+
- "Scrapegraphai::(Models|Resources|Test)::"
45+
Max: 110
46+
47+
Layout/MultilineArrayLineBreaks:
48+
Enabled: true
49+
50+
# Start the assignment on the same line variable is mentioned.
51+
Layout/MultilineAssignmentLayout:
52+
EnforcedStyle: same_line
53+
54+
Layout/MultilineHashKeyLineBreaks:
55+
Enabled: true
56+
57+
Layout/MultilineMethodArgumentLineBreaks:
58+
Enabled: true
59+
60+
Layout/MultilineMethodParameterLineBreaks:
61+
Enabled: true
62+
63+
# Prefer compact hash literals.
64+
Layout/SpaceInsideHashLiteralBraces:
65+
EnforcedStyle: no_space
66+
Exclude:
67+
- "**/*.rbi"
68+
69+
Lint/BooleanSymbol:
70+
Enabled: false
71+
72+
# This option occasionally mangles identifier names
73+
Lint/DeprecatedConstants:
74+
Exclude:
75+
- "**/*.rbi"
76+
77+
# We use pattern assertion in tests to ensure correctness.
78+
Lint/DuplicateMatchPattern:
79+
Exclude:
80+
- "test/**/*"
81+
82+
# Fairly useful in tests for pattern assertions.
83+
Lint/EmptyInPattern:
84+
Exclude:
85+
- "test/**/*"
86+
87+
Lint/MissingCopEnableDirective:
88+
Exclude:
89+
- "examples/**/*.rb"
90+
91+
Lint/MissingSuper:
92+
Exclude:
93+
- "**/*.rbi"
94+
95+
Lint/SymbolConversion:
96+
Exclude:
97+
- "**/*.rbi"
98+
99+
# Disabled for safety reasons, this option changes code semantics.
100+
Lint/UnusedMethodArgument:
101+
AutoCorrect: false
102+
103+
# This option is prone to causing accidental bugs.
104+
Lint/UselessAssignment:
105+
AutoCorrect: false
106+
Exclude:
107+
- "examples/**/*.rb"
108+
109+
Metrics/AbcSize:
110+
Enabled: false
111+
112+
Metrics/BlockLength:
113+
AllowedPatterns:
114+
- assert_pattern
115+
- type_alias
116+
- define_sorbet_constant!
117+
Exclude:
118+
- "**/*.rbi"
119+
120+
Metrics/ClassLength:
121+
Enabled: false
122+
123+
Metrics/CyclomaticComplexity:
124+
Enabled: false
125+
126+
Metrics/MethodLength:
127+
Enabled: false
128+
129+
Metrics/ModuleLength:
130+
Enabled: false
131+
132+
Metrics/ParameterLists:
133+
Enabled: false
134+
135+
Metrics/PerceivedComplexity:
136+
Enabled: false
137+
138+
Naming/AccessorMethodName:
139+
Enabled: false
140+
141+
# Need to preserve block identifier for documentation.
142+
Naming/BlockForwarding:
143+
Enabled: false
144+
145+
# Underscores are generally useful for disambiguation.
146+
Naming/ClassAndModuleCamelCase:
147+
Enabled: false
148+
149+
Naming/MethodParameterName:
150+
Enabled: false
151+
152+
Naming/PredicateName:
153+
Exclude:
154+
- "**/*.rbi"
155+
156+
Naming/VariableNumber:
157+
Enabled: false
158+
159+
# Nothing wrong with inline private methods.
160+
Style/AccessModifierDeclarations:
161+
Enabled: false
162+
163+
Style/AccessorGrouping:
164+
Exclude:
165+
- "**/*.rbi"
166+
167+
# Behaviour of alias_method is more predictable.
168+
Style/Alias:
169+
EnforcedStyle: prefer_alias_method
170+
171+
# And/or have confusing precedence, avoid them.
172+
Style/AndOr:
173+
EnforcedStyle: always
174+
175+
Style/ArgumentsForwarding:
176+
Enabled: false
177+
178+
Style/BisectedAttrAccessor:
179+
Exclude:
180+
- "**/*.rbi"
181+
182+
# We prefer nested modules in lib/, but are currently using compact style for tests.
183+
Style/ClassAndModuleChildren:
184+
Exclude:
185+
- "test/**/*"
186+
187+
Style/CommentAnnotation:
188+
Enabled: false
189+
190+
# We should go back and add these docs, but ignore for now.
191+
Style/Documentation:
192+
Enabled: false
193+
194+
# Allow explicit empty elses, for clarity.
195+
Style/EmptyElse:
196+
Enabled: false
197+
198+
Style/EmptyMethod:
199+
Exclude:
200+
- "**/*.rbi"
201+
202+
# We commonly use ENV['KEY'], it's OK.
203+
Style/FetchEnvVar:
204+
Enabled: false
205+
206+
# Just to be safe, ensure nobody is mutating our internal strings.
207+
Style/FrozenStringLiteralComment:
208+
EnforcedStyle: always
209+
Exclude:
210+
- "**/*.rbi"
211+
212+
# Nothing wrong with clear if statements.
213+
Style/IfUnlessModifier:
214+
Enabled: false
215+
216+
# Rubocop is pretty bad about mangling single line lambdas.
217+
Style/Lambda:
218+
Enabled: false
219+
220+
# Prefer consistency in method calling syntax.
221+
Style/MethodCallWithArgsParentheses:
222+
AllowedMethods:
223+
- raise
224+
Enabled: true
225+
Exclude:
226+
- "**/*.gemspec"
227+
228+
Style/MultilineBlockChain:
229+
Enabled: false
230+
231+
# Perfectly fine.
232+
Style/MultipleComparison:
233+
Enabled: false
234+
235+
Style/MutableConstant:
236+
Exclude:
237+
- "**/*.rbi"
238+
239+
# Not all parameters should be named.
240+
Style/NumberedParameters:
241+
Enabled: false
242+
243+
Style/NumberedParametersLimit:
244+
Max: 2
245+
246+
# Reasonable to use brackets for errors with long messages.
247+
Style/RaiseArgs:
248+
Enabled: false
249+
250+
# Be explicit about `RuntimeError`s.
251+
Style/RedundantException:
252+
Enabled: false
253+
254+
Style/RedundantInitialize:
255+
Exclude:
256+
- "**/*.rbi"
257+
258+
Style/RedundantParentheses:
259+
Exclude:
260+
- "**/*.rbi"
261+
262+
# Prefer slashes for regex literals.
263+
Style/RegexpLiteral:
264+
EnforcedStyle: slashes
265+
266+
# Allow explicit ifs, especially for imperative use.
267+
Style/SafeNavigation:
268+
Enabled: false
269+
270+
Style/SignalException:
271+
Exclude:
272+
- Rakefile
273+
- "**/*.rake"
274+
275+
# We use these sparingly, where we anticipate future branches for the
276+
# inner conditional.
277+
Style/SoleNestedConditional:
278+
Enabled: false
279+
280+
# Prefer double quotes so that interpolation can be easily added.
281+
Style/StringLiterals:
282+
EnforcedStyle: double_quotes
283+
284+
# Prefer explicit symbols for clarity; you can search for `:the_symbol`.
285+
Style/SymbolArray:
286+
EnforcedStyle: brackets
287+
288+
# This option makes examples harder to read for ruby novices.
289+
Style/SymbolProc:
290+
Exclude:
291+
- "examples/**/*.rb"

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.0

.solargraph.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
max_files: 0
3+
include:
4+
- '*.gemspec'
5+
- 'Rakefile'
6+
- 'examples/**/*.rb'
7+
- 'lib/**/*.rb'
8+
- 'test/scrapegraphai/resource_namespaces.rb'
9+
- 'test/scrapegraphai/test_helper.rb'
10+
exclude:
11+
- 'rbi/**/*'

.stats.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configured_endpoints: 15
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scrapegraphai%2Fscrapegraphai-969ebada41127057e4cda129b2e7206224743b5c7fd33aa8ae062ff71b775ac9.yml
3+
openapi_spec_hash: 2b2c2c684e6f6885398efca5f2b1f854
4+
config_hash: 9bd6398227678afd3b0dcacc6937537c

.yardopts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--type-name-tag generic:Generic
2+
--default-return void
3+
--markup markdown
4+
--markup-provider redcarpet
5+
--exclude /rbi
6+
--exclude /sig

0 commit comments

Comments
 (0)