Skip to content

Commit ddb99bb

Browse files
authored
Merge pull request #27 from gi/release/2.0.0
Version 2.0 * Updated engine to [Handlebars::Engine](https://github.com/gi/handlebars-ruby). * Updated build/deploy to GitHub Actions: - test against macos-latest and ubuntu-latest - test against tilt 1.x and 2.x - test against ruby 2.6, 2.7, 3.0, and 3.1 - test coverage - lint * Updated specs/tests to [RSpec](https://rspec.info/). * Updated readme/documentation.
2 parents edd3908 + c237642 commit ddb99bb

Some content is hidden

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

66 files changed

+1748
-508
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig: https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
10+
insert_final_newline = true
11+
tab_width = 2
12+
trim_trailing_whitespace = true

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- develop
11+
- main
12+
13+
jobs:
14+
coverage:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
- name: Install
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: ruby-3
23+
bundler-cache: true
24+
- name: Test
25+
run: bin/test
26+
- name: Upload
27+
uses: paambaati/codeclimate-action@v3.0.0
28+
env:
29+
CC_TEST_REPORTER_ID: fa0a43df2e210318c8da0958f9f100ab1b278c04f57f923affad8bd9fba23901
30+
with:
31+
coverageLocations: ${{ github.workspace }}/spec/reports/coverage/coverage.xml:cobertura
32+
33+
lint:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
- name: Install
39+
uses: ruby/setup-ruby@v1
40+
with:
41+
ruby-version: ruby-3
42+
bundler-cache: true
43+
- name: Lint
44+
run: bin/lint
45+
46+
test:
47+
strategy:
48+
matrix:
49+
appraisal:
50+
- tilt_1
51+
- tilt_2
52+
os:
53+
- macos-latest
54+
- ubuntu-latest
55+
ruby:
56+
- ruby-2.6
57+
- ruby-2.7
58+
- ruby-3.0
59+
- ruby-3.1
60+
# - jruby
61+
# - truffleruby
62+
env:
63+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.appraisal }}.gemfile
64+
runs-on: ${{ matrix.os }}
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v2
68+
- name: Install
69+
uses: ruby/setup-ruby@v1
70+
with:
71+
ruby-version: ${{ matrix.ruby }}
72+
bundler-cache: true
73+
- name: Test
74+
run: bin/test
75+
env:
76+
COVERAGE: false

.github/workflows/publish.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
github:
14+
name: GitHub
15+
needs: tag
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
- name: Install
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: ruby-3
24+
bundler-cache: true
25+
- name: Publish to GitHub
26+
env:
27+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
28+
RUBYGEMS_HOST: https://rubygems.pkg.github.com/${{github.repository_owner}}
29+
run: bin/release
30+
rubygems:
31+
name: RubyGems
32+
needs: tag
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
- name: Install
38+
uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: ruby-3
41+
bundler-cache: true
42+
- name: Publish to RubyGems
43+
env:
44+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_TOKEN}}"
45+
run: bin/release
46+
tag:
47+
name: Git Tag
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
- name: Install
53+
uses: ruby/setup-ruby@v1
54+
with:
55+
ruby-version: ruby-3
56+
bundler-cache: true
57+
- name: Tag
58+
run: bin/tag

.gitignore

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1+
/[._]*/
2+
!/.github/
3+
/doc/
4+
/pkg/
5+
/spec/reports/
6+
/test/reports/
7+
/tmp/
8+
/vendor/
9+
*.a
10+
*.bundle
111
*.gem
12+
*.lock
13+
*.o
214
*.rbc
3-
.bundle
4-
.config
5-
.yardoc
6-
Gemfile.lock
7-
InstalledFiles
8-
_yardoc
9-
coverage
10-
doc/
11-
lib/bundler/man
12-
pkg
13-
rdoc
14-
spec/reports
15-
test/tmp
16-
test/version_tmp
17-
tmp
15+
*.so
16+
mkmf.log

.rspec

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

.rubocop.yml

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
require:
2+
- rubocop-performance
3+
- rubocop-rake
4+
- rubocop-rspec
5+
6+
AllCops:
7+
TargetRubyVersion: 2.6
8+
Exclude:
9+
- bin/**/*
10+
- vendor/**/*
11+
NewCops: enable
12+
13+
Gemspec/RequireMFA:
14+
Enabled: false
15+
16+
Layout/ArgumentAlignment:
17+
EnforcedStyle: with_fixed_indentation
18+
19+
Layout/BlockAlignment:
20+
EnforcedStyleAlignWith: start_of_block
21+
22+
Layout/CaseIndentation:
23+
# Disabled because IndentOneStep can't be configured for one-liner cases.
24+
# See: https://github.com/rubocop-hq/rubocop/issues/6447
25+
Enabled: false
26+
27+
Layout/ClassStructure:
28+
Enabled: true
29+
30+
Layout/EndAlignment:
31+
EnforcedStyleAlignWith: variable
32+
33+
Layout/ExtraSpacing:
34+
AllowForAlignment: false
35+
AllowBeforeTrailingComments: false
36+
ForceEqualSignAlignment: false
37+
38+
Layout/FirstArgumentIndentation:
39+
EnforcedStyle: consistent
40+
41+
Layout/FirstArrayElementIndentation:
42+
EnforcedStyle: consistent
43+
44+
Layout/FirstArrayElementLineBreak:
45+
Enabled: true
46+
47+
Layout/FirstHashElementIndentation:
48+
EnforcedStyle: consistent
49+
50+
Layout/FirstHashElementLineBreak:
51+
Enabled: true
52+
53+
Layout/FirstMethodArgumentLineBreak:
54+
Enabled: false
55+
56+
Layout/FirstMethodParameterLineBreak:
57+
Enabled: true
58+
59+
Layout/HeredocArgumentClosingParenthesis:
60+
Enabled: true
61+
62+
Layout/LineLength:
63+
Max: 80
64+
65+
Layout/MultilineArrayLineBreaks:
66+
Enabled: true
67+
68+
Layout/MultilineHashKeyLineBreaks:
69+
Enabled: true
70+
71+
Layout/MultilineMethodArgumentLineBreaks:
72+
Enabled: true
73+
74+
# Layout/MultilineMethodCallBraceLayout:
75+
# EnforcedStyle: new_line
76+
77+
Layout/MultilineMethodCallIndentation:
78+
EnforcedStyle: indented
79+
80+
Layout/MultilineMethodDefinitionBraceLayout:
81+
EnforcedStyle: new_line
82+
83+
Layout/MultilineOperationIndentation:
84+
EnforcedStyle: indented
85+
86+
Layout/ParameterAlignment:
87+
EnforcedStyle: with_fixed_indentation
88+
89+
Lint/DuplicateBranch:
90+
Enabled: true
91+
92+
Lint/DuplicateRegexpCharacterClassElement:
93+
Enabled: true
94+
95+
Lint/EmptyBlock:
96+
Enabled: true
97+
AllowComments: true
98+
99+
Lint/EmptyClass:
100+
Enabled: true
101+
AllowComments: true
102+
103+
Lint/HeredocMethodCallPosition:
104+
Enabled: true
105+
106+
Lint/NoReturnInBeginEndBlocks:
107+
Enabled: true
108+
109+
Metrics/BlockLength:
110+
CountAsOne:
111+
- array
112+
- hash
113+
- heredoc
114+
Exclude:
115+
- "*.gemspec"
116+
- spec/**/*_spec.rb
117+
- test/**/*_test.rb
118+
119+
Metrics/ClassLength:
120+
CountAsOne:
121+
- array
122+
- hash
123+
- heredoc
124+
Max: 120
125+
126+
Metrics/MethodLength:
127+
CountAsOne:
128+
- array
129+
- hash
130+
- heredoc
131+
Max: 20
132+
133+
Metrics/ModuleLength:
134+
CountAsOne:
135+
- array
136+
- hash
137+
- heredoc
138+
139+
Metrics/ParameterLists:
140+
Max: 10
141+
142+
Naming/FileName:
143+
Exclude:
144+
- lib/tilt-handlebars.rb
145+
146+
RSpec/ExampleLength:
147+
CountAsOne:
148+
- array
149+
- hash
150+
- heredoc
151+
152+
RSpec/MultipleMemoizedHelpers:
153+
Max: 20
154+
155+
RSpec/NestedGroups:
156+
Max: 8
157+
158+
Style/BlockDelimiters:
159+
EnforcedStyle: semantic
160+
AllowBracesOnProceduralOneLiners: true
161+
162+
Style/Documentation:
163+
Enabled: false
164+
165+
Style/FrozenStringLiteralComment:
166+
Exclude:
167+
- "**/*.gemfile"
168+
169+
Style/StringLiterals:
170+
EnforcedStyle: double_quotes
171+
ConsistentQuotesInMultiline: true
172+
173+
Style/StringLiteralsInInterpolation:
174+
EnforcedStyle: double_quotes
175+
176+
Style/SymbolArray:
177+
EnforcedStyle: brackets
178+
179+
Style/TrailingCommaInArguments:
180+
EnforcedStyleForMultiline: comma
181+
182+
Style/TrailingCommaInArrayLiteral:
183+
EnforcedStyleForMultiline: comma
184+
185+
Style/TrailingCommaInHashLiteral:
186+
EnforcedStyleForMultiline: comma
187+
188+
Style/WordArray:
189+
EnforcedStyle: brackets

.travis.yml

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

Appraisals

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+
appraise "tilt-1" do
4+
gem "tilt", "~> 1"
5+
end
6+
7+
appraise "tilt-2" do
8+
gem "tilt", "~> 2"
9+
end

0 commit comments

Comments
 (0)