Skip to content

Commit 4e383c9

Browse files
committed
Initialize Project
0 parents  commit 4e383c9

16 files changed

+397
-0
lines changed

.github/workflows/main.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
14+
strategy:
15+
matrix:
16+
ruby:
17+
- 3.0.3
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Ruby
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: ${{ matrix.ruby }}
25+
bundler-cache: true
26+
- name: Run the default task
27+
run: bundle exec rake

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
10+
# rspec failure tracking
11+
.rspec_status

.rspec

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require spec_helper

.rubocop.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# The behavior of RuboCop can be controlled via the .rubocop.yml
2+
# configuration file. It makes it possible to enable/disable
3+
# certain cops (checks) and to alter their behavior if they accept
4+
# any parameters. The file can be placed either in your home
5+
# directory or in some project directory.
6+
#
7+
# RuboCop will start looking for the configuration file in the directory
8+
# where the inspected file is and continue its way up to the root directory.
9+
#
10+
# See https://docs.rubocop.org/rubocop/configuration
11+
12+
AllCops:
13+
TargetRubyVersion: 2.5
14+
NewCops: enable
15+
16+
Metrics/BlockLength:
17+
Exclude:
18+
- spec/**/*_spec.rb

CODE_OF_CONDUCT.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or
22+
advances of any kind
23+
* Trolling, insulting or derogatory comments, and personal or political attacks
24+
* Public or private harassment
25+
* Publishing others' private information, such as a physical or email
26+
address, without their explicit permission
27+
* Other conduct which could reasonably be considered inappropriate in a
28+
professional setting
29+
30+
## Enforcement Responsibilities
31+
32+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33+
34+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35+
36+
## Scope
37+
38+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39+
40+
## Enforcement
41+
42+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
43+
44+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45+
46+
## Enforcement Guidelines
47+
48+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49+
50+
### 1. Correction
51+
52+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53+
54+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55+
56+
### 2. Warning
57+
58+
**Community Impact**: A violation through a single incident or series of actions.
59+
60+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61+
62+
### 3. Temporary Ban
63+
64+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65+
66+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67+
68+
### 4. Permanent Ban
69+
70+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71+
72+
**Consequence**: A permanent ban from any sort of public interaction within the community.
73+
74+
## Attribution
75+
76+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78+
79+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80+
81+
[homepage]: https://www.contributor-covenant.org
82+
83+
For answers to common questions about this code of conduct, see the FAQ at
84+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

Gemfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Specify your gem's dependencies in boxing.gemspec
6+
gemspec
7+
8+
gem 'rake', '~> 13.0'
9+
10+
gem 'rspec', '~> 3.0'
11+
12+
gem 'simplecov'
13+
14+
gem 'rubocop', '~> 1.22'
15+
gem 'rubocop-rake'
16+
gem 'rubocop-rspec'
17+
18+
gem 'bundler-audit'
19+
gem 'overcommit'

Gemfile.lock

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
PATH
2+
remote: .
3+
specs:
4+
boxing (0.1.0)
5+
bundler (~> 2.0)
6+
thor (~> 1.0)
7+
8+
GEM
9+
remote: https://rubygems.org/
10+
specs:
11+
ast (2.4.2)
12+
bundler-audit (0.9.0.1)
13+
bundler (>= 1.2.0, < 3)
14+
thor (~> 1.0)
15+
childprocess (4.1.0)
16+
diff-lcs (1.4.4)
17+
docile (1.4.0)
18+
iniparse (1.5.0)
19+
overcommit (0.58.0)
20+
childprocess (>= 0.6.3, < 5)
21+
iniparse (~> 1.4)
22+
rexml (~> 3.2)
23+
parallel (1.21.0)
24+
parser (3.0.3.2)
25+
ast (~> 2.4.1)
26+
rainbow (3.0.0)
27+
rake (13.0.6)
28+
regexp_parser (2.2.0)
29+
rexml (3.2.5)
30+
rspec (3.10.0)
31+
rspec-core (~> 3.10.0)
32+
rspec-expectations (~> 3.10.0)
33+
rspec-mocks (~> 3.10.0)
34+
rspec-core (3.10.1)
35+
rspec-support (~> 3.10.0)
36+
rspec-expectations (3.10.1)
37+
diff-lcs (>= 1.2.0, < 2.0)
38+
rspec-support (~> 3.10.0)
39+
rspec-mocks (3.10.2)
40+
diff-lcs (>= 1.2.0, < 2.0)
41+
rspec-support (~> 3.10.0)
42+
rspec-support (3.10.3)
43+
rubocop (1.23.0)
44+
parallel (~> 1.10)
45+
parser (>= 3.0.0.0)
46+
rainbow (>= 2.2.2, < 4.0)
47+
regexp_parser (>= 1.8, < 3.0)
48+
rexml
49+
rubocop-ast (>= 1.12.0, < 2.0)
50+
ruby-progressbar (~> 1.7)
51+
unicode-display_width (>= 1.4.0, < 3.0)
52+
rubocop-ast (1.15.0)
53+
parser (>= 3.0.1.1)
54+
rubocop-rake (0.6.0)
55+
rubocop (~> 1.0)
56+
rubocop-rspec (2.6.0)
57+
rubocop (~> 1.19)
58+
ruby-progressbar (1.11.0)
59+
simplecov (0.21.2)
60+
docile (~> 1.1)
61+
simplecov-html (~> 0.11)
62+
simplecov_json_formatter (~> 0.1)
63+
simplecov-html (0.12.3)
64+
simplecov_json_formatter (0.1.3)
65+
thor (1.1.0)
66+
unicode-display_width (2.1.0)
67+
68+
PLATFORMS
69+
x86_64-darwin-20
70+
x86_64-darwin-21
71+
72+
DEPENDENCIES
73+
boxing!
74+
bundler-audit
75+
overcommit
76+
rake (~> 13.0)
77+
rspec (~> 3.0)
78+
rubocop (~> 1.22)
79+
rubocop-rake
80+
rubocop-rspec
81+
simplecov
82+
83+
BUNDLED WITH
84+
2.2.32

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Boxing
2+
3+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/boxing`. To experiment with that code, run `bin/console` for an interactive prompt.
4+
5+
TODO: Delete this and the text above, and describe your gem
6+
7+
## Installation
8+
9+
Add this line to your application's Gemfile:
10+
11+
```ruby
12+
gem 'boxing'
13+
```
14+
15+
And then execute:
16+
17+
$ bundle install
18+
19+
Or install it yourself as:
20+
21+
$ gem install boxing
22+
23+
## Usage
24+
25+
TODO: Write usage instructions here
26+
27+
## Development
28+
29+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30+
31+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32+
33+
## Contributing
34+
35+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/boxing. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/boxing/blob/main/CODE_OF_CONDUCT.md).
36+
37+
## Code of Conduct
38+
39+
Everyone interacting in the Boxing project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/boxing/blob/main/CODE_OF_CONDUCT.md).

Rakefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
require 'bundler/gem_tasks'
4+
require 'rspec/core/rake_task'
5+
6+
RSpec::Core::RakeTask.new(:spec)
7+
8+
task default: :spec

bin/console

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require 'bundler/setup'
5+
require 'boxing'
6+
7+
# You can add fixtures and/or initialization code here to make experimenting
8+
# with your gem easier. You can also use a different console, if you like.
9+
10+
# (If you use this, don't forget to add pry to your Gemfile!)
11+
# require "pry"
12+
# Pry.start
13+
14+
require 'irb'
15+
IRB.start(__FILE__)

bin/setup

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
set -vx
5+
6+
bundle install
7+
8+
# Do any other automated setup that you need to do here

boxing.gemspec

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# frozen_string_literal: true
2+
3+
require_relative 'lib/boxing/version'
4+
5+
Gem::Specification.new do |spec|
6+
spec.name = 'boxing'
7+
spec.version = Boxing::VERSION
8+
spec.authors = ['蒼時弦也']
9+
spec.email = ['[email protected]']
10+
11+
spec.summary = 'The zero-configuration Dockerfile generator for Ruby'
12+
spec.description = 'The zero-configuration Dockerfile generator for Ruby'
13+
spec.homepage = 'https://github.com/elct9620/boxing'
14+
spec.required_ruby_version = '>= 2.5.0'
15+
16+
spec.metadata['homepage_uri'] = spec.homepage
17+
spec.metadata['source_code_uri'] = 'https://github.com/elct9620/boxing'
18+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
19+
20+
# Specify which files should be added to the gem when it is released.
21+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
23+
`git ls-files -z`.split("\x0").reject do |f|
24+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25+
end
26+
end
27+
spec.bindir = 'exe'
28+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29+
spec.require_paths = ['lib']
30+
31+
# Uncomment to register a new dependency of your gem
32+
spec.add_dependency 'bundler', '~> 2.0'
33+
spec.add_dependency 'thor', '~> 1.0'
34+
35+
# For more information and examples about making a new gem, checkout our
36+
# guide at: https://bundler.io/guides/creating_gem.html
37+
spec.metadata = {
38+
'rubygems_mfa_required' => 'true'
39+
}
40+
end

lib/boxing.rb

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
require_relative 'boxing/version'
4+
5+
module Boxing
6+
class Error < StandardError; end
7+
# Your code goes here...
8+
end

lib/boxing/version.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
module Boxing
4+
VERSION = '0.1.0'
5+
end

spec/boxing_spec.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
RSpec.describe Boxing do
4+
it 'has a version number' do
5+
expect(Boxing::VERSION).not_to be nil
6+
end
7+
end

0 commit comments

Comments
 (0)