Skip to content

Commit db08dbc

Browse files
authored
Merge pull request #1 from tecracer-chef/refactor/gem-structure
Add support for instance ID and better checks
2 parents b934267 + cc2f073 commit db08dbc

20 files changed

+488
-71
lines changed

.editorconfig

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

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: If something isn't working as expected 🤔.
4+
labels: "bug"
5+
---
6+
7+
### Cookbook version
8+
[Version of the cookbook where you are encountering the issue]
9+
10+
### Chef-client version
11+
[Version of chef-client in your environment]
12+
13+
### Platform Details
14+
[Operating system distribution and release version. Cloud provider if running in the cloud]
15+
16+
### Scenario:
17+
[What you are trying to achieve and you can't?]
18+
19+
### Steps to Reproduce:
20+
[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]
21+
22+
### Expected Result:
23+
[What are you expecting to happen as the consequence of above reproduction steps?]
24+
25+
### Actual Result:
26+
[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]
27+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: 🚀 Enhancement Request
3+
about: I have a suggestion (and may want to implement it 🙂)!
4+
labels: "new feature"
5+
---
6+
7+
### Describe the Enhancement:
8+
<!--- What you are trying to achieve that you can't? -->
9+
10+
### Describe the Need:
11+
<!--- What kind of user do you believe would utilize this enhancement, and how many users might want this functionality -->
12+
13+
### Current Alternative
14+
<!--- Is there a current alternative that you can utilize to workaround the lack of this enhancement -->
15+
16+
### Can We Help You Implement This?:
17+
<!--- The best way to ensure your enhancement is built is to help implement the enhancement yourself. If you're interested in helping out we'd love to give you a hand to make this possible. Let us know if there's something you need. -->
18+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Description
2+
3+
[Describe what this change achieves]
4+
5+
### Issues Resolved
6+
7+
[List any existing issues this PR resolves]
8+
9+
### Check List
10+
11+
- [ ] All tests pass.
12+
- [ ] New functionality includes testing.
13+
- [ ] New functionality has been documented in the README if applicable
14+

.github/workflows/gempush.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Ruby Gem
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v*.*.*'
8+
9+
jobs:
10+
build:
11+
name: Build + Publish
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Ruby 2.6
17+
uses: actions/setup-ruby@v1
18+
with:
19+
ruby-version: 2.6.x
20+
21+
- name: Install necessary gems
22+
run: |
23+
gem install rotp -v 5.1.0 --no-document
24+
25+
- name: prepare credentials
26+
run: |
27+
mkdir -p $HOME/.gem
28+
touch $HOME/.gem/credentials
29+
chmod 0600 $HOME/.gem/credentials
30+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
31+
env:
32+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
33+
34+
- name: build gem
35+
run: |
36+
gem build *.gemspec
37+
38+
- name: generateotp
39+
run: echo "::set-env name=OTPTOKEN::$(rotp --secret ${GEM_HOST_OTP_SECRET})"
40+
env:
41+
GEM_HOST_OTP_SECRET: ${{secrets.RUBYGEMS_OTP_SECRET}}
42+
43+
- name: publish
44+
run: |
45+
gem push *.gem --otp ${{ env.OTPTOKEN }}
46+

.github/workflows/linting.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Linting
3+
4+
on: push
5+
6+
jobs:
7+
lint:
8+
name: Lint code
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Ruby 2.6
14+
uses: actions/setup-ruby@v1
15+
with:
16+
ruby-version: 2.6.x
17+
18+
- name: Install necessary gems
19+
run: bundle install --with=development
20+
21+
- name: Run Code Linting
22+
run: rake lint
23+
24+
- name: Run Markdown Linting
25+
run: rake lint:markdown

.mdlrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules "~MD013"

.overcommit.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
quiet: true
3+
verify_signatures: false
4+
CommitMsg:
5+
HardTabs:
6+
enabled: true
7+
PreCommit:
8+
RakeTarget:
9+
enabled: true
10+
targets:
11+
- lint
12+
BundleAudit:
13+
enabled: true
14+
BundleCheck:
15+
enabled: true
16+
BundleOutdated:
17+
enabled: true
18+
ExecutePermissions:
19+
enabled: true
20+
exclude:
21+
- bin/*
22+
HardTabs:
23+
enabled: true
24+
JsonSyntax:
25+
enabled: true
26+
LineEndings:
27+
enabled: true
28+
eol: "\n"
29+
Mdl:
30+
enabled: true
31+
include:
32+
- "*.md"
33+
Rspec:
34+
enabled: false
35+
required_executable: 'rspec'
36+
TrailingWhitespace:
37+
enabled: true
38+
YamlLint:
39+
enabled: true
40+
YamlSyntax:
41+
enabled: true

.rubocop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
AllCops:
3+
TargetRubyVersion: 2.6
4+
NewCops: enable
5+
Exclude:
6+
- 'Rakefile'
7+
- 'tasks/**/*'

0 commit comments

Comments
 (0)