Skip to content

Commit 878a5c8

Browse files
committed
init
0 parents  commit 878a5c8

23 files changed

+967
-0
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish Gem
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Release Gem
13+
uses: cadwallion/publish-rubygems-action@master
14+
env:
15+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
16+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
17+
RELEASE_COMMAND: ./bin/publish

.github/workflows/ruby.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Ruby
9+
10+
on:
11+
push:
12+
branches: [ "main" ]
13+
pull_request:
14+
branches: [ "main" ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
ruby-version: ['2.6', '2.7', '3.0']
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Set up Ruby
30+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
32+
# uses: ruby/setup-ruby@v1
33+
uses: ruby/setup-ruby@2b019609e2b0f1ea1a2bc8ca11cb82ab46ada124
34+
with:
35+
ruby-version: ${{ matrix.ruby-version }}
36+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37+
- name: Run tests
38+
run: bundle exec rspec spec
39+
40+
lint:
41+
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v3
46+
- name: Install Ruby and gems
47+
uses: ruby/setup-ruby@8f312efe1262fb463d906e9bf040319394c18d3e # v1.92
48+
with:
49+
bundler-cache: true
50+
# Add or replace any other lints here
51+
- name: Lint Ruby files
52+
run: bundle exec rubocop

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
*.gem
2+
*.rbc
3+
*.DS_Store
4+
/.config
5+
/coverage/
6+
/InstalledFiles
7+
/pkg/
8+
/spec/reports/
9+
/spec/examples.txt
10+
/test/tmp/
11+
/test/version_tmp/
12+
/tmp/
13+
14+
# Used by dotenv library to load environment variables.
15+
# .env
16+
17+
# Ignore Byebug command history file.
18+
.byebug_history
19+
20+
## Specific to RubyMotion (use of CocoaPods):
21+
#
22+
# We recommend against adding the Pods directory to your .gitignore. However
23+
# you should judge for yourself, the pros and cons are mentioned at:
24+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
25+
#
26+
# vendor/Pods/
27+
28+
## Documentation cache and generated files:
29+
/.yardoc/
30+
/_yardoc/
31+
/doc/
32+
/rdoc/
33+
34+
## Environment normalization:
35+
/.bundle/
36+
/vendor/bundle
37+
/lib/bundler/man/
38+
39+
# for a library or gem, you might want to ignore these files since the code is
40+
# intended to run in multiple environments; otherwise, check them in:
41+
# Gemfile.lock
42+
# .ruby-version
43+
# .ruby-gemset
44+
45+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
46+
.rvmrc
47+
48+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
49+
# .rubocop-https?--*

.rubocop.yml

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
AllCops:
2+
TargetRubyVersion: 2.6.8
3+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
4+
# to ignore them, so only the ones explicitly set in this file are enabled.
5+
DisabledByDefault: true
6+
Exclude:
7+
- '**/templates/**/*'
8+
- '**/vendor/**/*'
9+
- 'actionpack/lib/action_dispatch/journey/parser.rb'
10+
11+
# Prefer &&/|| over and/or.
12+
Style/AndOr:
13+
Enabled: true
14+
15+
# Align `when` with `case`.
16+
Layout/CaseIndentation:
17+
Enabled: true
18+
19+
# Align comments with method definitions.
20+
Layout/CommentIndentation:
21+
Enabled: true
22+
23+
Layout/ElseAlignment:
24+
Enabled: true
25+
26+
Layout/EmptyLineAfterMagicComment:
27+
Enabled: true
28+
29+
# In a regular class definition, no empty lines around the body.
30+
Layout/EmptyLinesAroundClassBody:
31+
Enabled: true
32+
33+
# In a regular method definition, no empty lines around the body.
34+
Layout/EmptyLinesAroundMethodBody:
35+
Enabled: true
36+
37+
# In a regular module definition, no empty lines around the body.
38+
Layout/EmptyLinesAroundModuleBody:
39+
Enabled: true
40+
41+
Layout/FirstParameterIndentation:
42+
Enabled: true
43+
44+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
45+
Style/HashSyntax:
46+
Enabled: true
47+
48+
# Method definitions after `private` or `protected` isolated calls need one
49+
# extra level of indentation.
50+
Layout/IndentationConsistency:
51+
Enabled: true
52+
EnforcedStyle: indented_internal_methods
53+
54+
# Two spaces, no tabs (for indentation).
55+
Layout/IndentationWidth:
56+
Enabled: true
57+
58+
Layout/LeadingCommentSpace:
59+
Enabled: true
60+
61+
Layout/SpaceAfterColon:
62+
Enabled: true
63+
64+
Layout/SpaceAfterComma:
65+
Enabled: true
66+
67+
Layout/SpaceAroundEqualsInParameterDefault:
68+
Enabled: true
69+
70+
Layout/SpaceAroundKeyword:
71+
Enabled: true
72+
73+
Layout/SpaceAroundOperators:
74+
Enabled: true
75+
76+
Layout/SpaceBeforeComma:
77+
Enabled: true
78+
79+
Layout/SpaceBeforeFirstArg:
80+
Enabled: true
81+
82+
Style/DefWithParentheses:
83+
Enabled: true
84+
85+
# Defining a method with parameters needs parentheses.
86+
Style/MethodDefParentheses:
87+
Enabled: true
88+
89+
Style/FrozenStringLiteralComment:
90+
Enabled: true
91+
EnforcedStyle: always
92+
Exclude:
93+
- 'actionview/test/**/*.builder'
94+
- 'actionview/test/**/*.ruby'
95+
- 'actionpack/test/**/*.builder'
96+
- 'actionpack/test/**/*.ruby'
97+
- 'activestorage/db/migrate/**/*.rb'
98+
99+
# Use `foo {}` not `foo{}`.
100+
Layout/SpaceBeforeBlockBraces:
101+
Enabled: true
102+
103+
# Use `foo { bar }` not `foo {bar}`.
104+
Layout/SpaceInsideBlockBraces:
105+
Enabled: true
106+
107+
# Use `{ a: 1 }` not `{a:1}`.
108+
Layout/SpaceInsideHashLiteralBraces:
109+
Enabled: true
110+
111+
Layout/SpaceInsideParens:
112+
Enabled: true
113+
114+
# Check quotes usage according to lint rule below.
115+
Style/StringLiterals:
116+
Enabled: true
117+
EnforcedStyle: double_quotes
118+
119+
# Detect hard tabs, no hard tabs.
120+
Layout/IndentationStyle:
121+
Enabled: true
122+
123+
# Blank lines should not have any spaces.
124+
Layout/TrailingEmptyLines:
125+
Enabled: true
126+
127+
# No trailing whitespace.
128+
Layout/TrailingWhitespace:
129+
Enabled: true
130+
131+
Layout/ExtraSpacing:
132+
AllowForAlignment: true
133+
ForceEqualSignAlignment: true
134+
Enabled: true
135+
136+
# Use quotes for string literals when they are enough.
137+
Style/RedundantPercentQ:
138+
Enabled: true
139+
140+
# Align `end` with the matching keyword or starting expression except for
141+
# assignments, where it should be aligned with the LHS.
142+
Layout/EndAlignment:
143+
Enabled: true
144+
EnforcedStyleAlignWith: variable
145+
AutoCorrect: true
146+
147+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
148+
Lint/RequireParentheses:
149+
Enabled: true
150+
151+
Style/RedundantReturn:
152+
Enabled: true
153+
AllowMultipleReturnValues: true
154+
155+
Style/Semicolon:
156+
Enabled: true
157+
AllowAsExpressionSeparator: true
158+
159+
# Prefer Foo.method over Foo::method
160+
Style/ColonMethodCall:
161+
Enabled: true

.ruby-version

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

Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec
6+
7+
group :test do
8+
gem "rspec", "~> 3.11"
9+
end

Gemfile.lock

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
PATH
2+
remote: .
3+
specs:
4+
embed_workflow (0.0.1)
5+
6+
GEM
7+
remote: https://rubygems.org/
8+
specs:
9+
ast (2.4.2)
10+
diff-lcs (1.5.0)
11+
parallel (1.20.1)
12+
parser (3.0.2.0)
13+
ast (~> 2.4.1)
14+
rainbow (3.0.0)
15+
rake (13.0.6)
16+
regexp_parser (2.1.1)
17+
rexml (3.2.5)
18+
rspec (3.11.0)
19+
rspec-core (~> 3.11.0)
20+
rspec-expectations (~> 3.11.0)
21+
rspec-mocks (~> 3.11.0)
22+
rspec-core (3.11.0)
23+
rspec-support (~> 3.11.0)
24+
rspec-expectations (3.11.0)
25+
diff-lcs (>= 1.2.0, < 2.0)
26+
rspec-support (~> 3.11.0)
27+
rspec-mocks (3.11.1)
28+
diff-lcs (>= 1.2.0, < 2.0)
29+
rspec-support (~> 3.11.0)
30+
rspec-support (3.11.0)
31+
rubocop (1.18.4)
32+
parallel (~> 1.10)
33+
parser (>= 3.0.0.0)
34+
rainbow (>= 2.2.2, < 4.0)
35+
regexp_parser (>= 1.8, < 3.0)
36+
rexml
37+
rubocop-ast (>= 1.8.0, < 2.0)
38+
ruby-progressbar (~> 1.7)
39+
unicode-display_width (>= 1.4.0, < 3.0)
40+
rubocop-ast (1.10.0)
41+
parser (>= 3.0.1.1)
42+
rubocop-performance (1.11.4)
43+
rubocop (>= 1.7.0, < 2.0)
44+
rubocop-ast (>= 0.4.0)
45+
ruby-progressbar (1.11.0)
46+
standard (1.1.7)
47+
rubocop (= 1.18.4)
48+
rubocop-performance (= 1.11.4)
49+
unicode-display_width (2.0.0)
50+
51+
PLATFORMS
52+
ruby
53+
x86_64-darwin-19
54+
55+
DEPENDENCIES
56+
bundler (>= 2.0.1)
57+
embed_workflow!
58+
rake
59+
rspec (~> 3.11)
60+
standard
61+
62+
BUNDLED WITH
63+
2.2.26

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Embed Workflow.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)