Skip to content

Commit bb98152

Browse files
committed
Initial commit
0 parents  commit bb98152

File tree

20 files changed

+649
-0
lines changed

20 files changed

+649
-0
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Ruby
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
name: Ruby ${{ matrix.ruby }}
14+
strategy:
15+
matrix:
16+
ruby:
17+
- '3.0.0' # using 3.0.0 instead of latest patch as 3.0.0 is the minimum specified in the gemspec
18+
- '3.1.6'
19+
- '3.2.2'
20+
- '3.3.6'
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: ${{ matrix.ruby }}
28+
bundler-cache: true
29+
- name: Run the default task
30+
run: bin/rake

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Push Gem
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
rubygems:
10+
runs-on: ubuntu-latest
11+
12+
environment: rubygems
13+
14+
permissions:
15+
id-token: write
16+
17+
steps:
18+
# Set up
19+
- uses: actions/checkout@v4
20+
- name: Set up Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.2.2'
24+
- name: Install gems
25+
run: bundle install
26+
- name: Set version
27+
run: sed -i "s/VERSION = \"0.0.0\"/VERSION = \"${{ github.ref_name }}\"/" lib/code0/zero_track/version.rb && bundle
28+
29+
# Release
30+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
31+
- name: Publish gem
32+
run: bundle exec rake release:rubygem_push
33+
- name: Wait for release
34+
run: gem exec rubygems-await pkg/*.gem

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/.bundle/
2+
/doc/
3+
/log/*.log
4+
/pkg/
5+
/tmp/
6+
7+
# rspec failure tracking
8+
.rspec_status
9+
10+
*.iml
11+
.idea
12+
.vscode
13+
*.suo
14+
*.ntvs*
15+
*.njsproj
16+
*.sln
17+
*.sw?

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require spec_helper

.rubocop.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
require:
2+
- rubocop-rspec
3+
- rubocop-rspec_rails
4+
5+
plugins:
6+
- rubocop-rake
7+
- rubocop-rails
8+
9+
AllCops:
10+
TargetRubyVersion: 3.0.0
11+
NewCops: enable
12+
13+
Gemspec/DevelopmentDependencies:
14+
EnforcedStyle: gemspec
15+
16+
Lint/AmbiguousBlockAssociation:
17+
AllowedMethods: [change]
18+
19+
Metrics:
20+
Enabled: false
21+
22+
Naming/BlockForwarding:
23+
Enabled: false
24+
25+
Naming/MethodParameterName:
26+
Enabled: false
27+
28+
# Recreated in Sagittarius/Migration/CreateTableWithTimestamps to account for timezones
29+
Rails/CreateTableWithTimestamps:
30+
Enabled: false
31+
32+
# Prefer foreign keys on database layer
33+
Rails/HasManyOrHasOneDependent:
34+
Enabled: false
35+
36+
# Disabled for now, I18N will follow later
37+
Rails/I18nLocaleTexts:
38+
Enabled: false
39+
40+
RSpec/ExampleLength:
41+
Enabled: false
42+
43+
RSpec/ExpectChange:
44+
EnforcedStyle: block
45+
46+
RSpec/ImplicitSubject:
47+
EnforcedStyle: require_implicit
48+
49+
# aggregate_failures is defined with derived metadata for every spec
50+
RSpec/MultipleExpectations:
51+
Enabled: false
52+
53+
RSpec/MultipleMemoizedHelpers:
54+
Enabled: false
55+
56+
RSpec/NestedGroups:
57+
Enabled: false
58+
59+
Style/ArgumentsForwarding:
60+
Enabled: false
61+
62+
Style/Documentation:
63+
Enabled: false
64+
65+
Style/HashSyntax:
66+
EnforcedShorthandSyntax: never
67+
68+
Style/TrailingCommaInHashLiteral:
69+
EnforcedStyleForMultiline: comma

.tool-versions

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

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Specify your gem's dependencies in code0-zero_track.gemspec.
6+
gemspec

0 commit comments

Comments
 (0)