Skip to content

Commit c3ef17a

Browse files
authored
[BC-16715] basic gem structure
2 parents 8b601b3 + 93e1845 commit c3ef17a

File tree

18 files changed

+275
-52
lines changed

18 files changed

+275
-52
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
4+
5+
# Checklist:
6+
7+
- [ ] I have made corresponding changes to the documentation
8+
- [ ] I have added tests that prove my fix is effective or that my feature works
9+
- [ ] I have added entries to `CHANGELOG.md` and marked it Added/Changed/Removed
10+
- [ ] I have not incremented `version.rb`

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ruby: ['2.5', '2.6', '2.7']
11+
name: Test ruby v${{ matrix.ruby }} support
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Set up Ruby ${{ matrix.ruby }}
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: ${{ matrix.ruby }}
18+
- name: Build with dependencies
19+
run: |
20+
gem install bundler -v 2.1
21+
bundle install
22+
- name: Test with rspec
23+
run: |
24+
bundle exec rspec spec/
25+
- name: Lint with rubocop
26+
run: |
27+
bundle exec rubocop

.gitignore

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,10 @@
1-
*.gem
2-
*.rbc
3-
/.config
4-
/coverage/
5-
/InstalledFiles
1+
/.bundle/
2+
/doc/
63
/pkg/
74
/spec/reports/
8-
/spec/examples.txt
9-
/test/tmp/
10-
/test/version_tmp/
115
/tmp/
6+
.DS_Store
127

13-
# Used by dotenv library to load environment variables.
14-
# .env
15-
16-
# Ignore Byebug command history file.
17-
.byebug_history
18-
19-
## Specific to RubyMotion:
20-
.dat*
21-
.repl_history
22-
build/
23-
*.bridgesupport
24-
build-iPhoneOS/
25-
build-iPhoneSimulator/
26-
27-
## Specific to RubyMotion (use of CocoaPods):
28-
#
29-
# We recommend against adding the Pods directory to your .gitignore. However
30-
# you should judge for yourself, the pros and cons are mentioned at:
31-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32-
#
33-
# vendor/Pods/
34-
35-
## Documentation cache and generated files:
36-
/.yardoc/
37-
/_yardoc/
38-
/doc/
39-
/rdoc/
40-
41-
## Environment normalization:
42-
/.bundle/
43-
/vendor/bundle
44-
/lib/bundler/man/
45-
46-
# for a library or gem, you might want to ignore these files since the code is
47-
# intended to run in multiple environments; otherwise, check them in:
48-
# Gemfile.lock
49-
# .ruby-version
50-
# .ruby-gemset
51-
52-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53-
.rvmrc
54-
55-
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
56-
# .rubocop-https?--*
8+
# Gemfile.lock should not be under version control
9+
# https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
10+
Gemfile.lock

.rspec

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

.rubocop.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
AllCops:
2+
TargetRubyVersion: 2.5
3+
4+
Style/Documentation:
5+
Enabled: false
6+
7+
Style/FrozenStringLiteralComment:
8+
Enabled: false
9+
10+
Metrics/LineLength:
11+
Max: 120
12+
IgnoreCopDirectives: true
13+
14+
Metrics/BlockLength:
15+
ExcludedMethods:
16+
- configure
17+
- context
18+
- define
19+
- describe
20+
- draw
21+
- factory
22+
- feature
23+
- guard
24+
- included
25+
- it
26+
- let
27+
- let!
28+
- scenario
29+
- setup
30+
- shared_context
31+
- shared_examples
32+
- shared_examples_for
33+
- transaction
34+

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
language: ruby
3+
cache: bundler
4+
rvm:
5+
- 2.7.2
6+
before_install: gem install bundler -v 2.1.4

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/)
5+
6+
## [Unreleased]
7+
### Added
8+
9+
### Changed
10+
11+
### Removed

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [https://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: https://contributor-covenant.org
74+
[version]: https://contributor-covenant.org/version/1/4/

Gemfile

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

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2021 Federico Tagliabue
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
13+
all 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
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)