Skip to content

Commit ded1a70

Browse files
authored
Merge pull request #101 from nimblehq/release/2.5.0
2 parents 06f42c6 + 3f8c20f commit ded1a70

48 files changed

Lines changed: 2416 additions & 45 deletions

Some content is hidden

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

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": [
3-
"@nimblehq/eslint-config-nimble"
3+
"@nimblehq/eslint-config-nimble",
4+
"plugin:yml/recommended"
45
],
56
"globals": {
67
"I18n": true

.github/workflows/danger.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
name: Run Danger
1212
runs-on: ubuntu-latest
1313
steps:
14-
1514
- name: Checkout
1615
uses: actions/checkout@v3
1716
with:

.github/workflows/lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint
2+
3+
on: pull_request
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
docs_lint:
11+
name: Run lint for API docs
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Set up node and restore cached dependencies
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: "18.x"
21+
cache: yarn
22+
cache-dependency-path: yarn.lock
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Generate API docs
28+
run: yarn build:docs
29+
30+
- name: Run API docs linters
31+
run: yarn lint:docs:public

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Test
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- develop
8+
- main
49

510
concurrency:
611
group: ${{ github.workflow }}-${{ github.ref }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ yarn-debug.log*
4949

5050
/app/assets/builds/*
5151
!/app/assets/builds/.keep
52+
53+
# Add OpenAPI public file
54+
/public/openapi.yml

.spectral.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extends: ["spectral:oas"]
2+
3+
rules:
4+
oas3-unused-component: false
5+
operation-operationId: false
6+
info-contact: false

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ RUN rm -rf tmp/docker
103103

104104
# Compile assets
105105
RUN bundle exec rails i18n:js:export && \
106-
bundle exec rails assets:precompile
106+
bundle exec rails assets:precompile && \
107+
yarn run build:docs
107108

108109
EXPOSE $PORT
109110

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ GEM
244244
net-protocol
245245
nio4r (2.5.9)
246246
no_proxy_fix (0.1.2)
247+
nokogiri (1.14.2-arm64-darwin)
248+
racc (~> 1.4)
247249
nokogiri (1.14.2-x86_64-darwin)
248250
racc (~> 1.4)
249251
nokogiri (1.14.2-x86_64-linux)
@@ -448,6 +450,7 @@ GEM
448450
zeitwerk (2.6.7)
449451

450452
PLATFORMS
453+
arm64-darwin-22
451454
x86_64-darwin-22
452455
x86_64-linux
453456

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env/start:
1212

1313
env/setup:
1414
make env/start
15+
make doc/generate
1516
rails db:setup
1617
rails i18n:js:export
1718

@@ -21,6 +22,9 @@ env/stop:
2122
env/teardown:
2223
./bin/envteardown.sh
2324

25+
doc/generate:
26+
yarn run build:docs
27+
2428
dev:
2529
make env/start
2630
./bin/dev.sh
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
module API
4+
module Docs
5+
class OpenapiController < ApplicationController
6+
def show
7+
render :show
8+
end
9+
end
10+
end
11+
end

0 commit comments

Comments
 (0)