Skip to content

Commit

Permalink
Merge pull request #2 from Cado-Labs/gem-without-zeitwerk
Browse files Browse the repository at this point in the history
Main logic for gem JCW
  • Loading branch information
AS-AlStar committed Sep 1, 2021
2 parents e94579e + fe93f91 commit cdf59e6
Show file tree
Hide file tree
Showing 28 changed files with 1,044 additions and 24 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test

on: [push, pull_request]

env:
COVER: true

jobs:
full-check:
runs-on: ubuntu-latest

# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'Cado-Labs/jcw'

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.1
bundler-cache: true
- name: Run Linter
run: bundle exec rubocop
- name: Run specs
run: bundle exec rspec
- name: Audit
run: bundle exec bundle-audit
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
specs:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}

env:
COVER: false

# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'Cado-Labs/jcw'

strategy:
fail-fast: false
matrix:
ruby: [2.7, 2.7.4, 3.0.0, 3.0.1, 3.0.2]
experimental: [false]
include:
- ruby: head
experimental: true

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run specs
run: bundle exec rspec
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
/log
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format progress
--color
--require spec_helper
16 changes: 16 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
inherit_gem:
rubocop-config-umbrellio: lib/rubocop.yml

AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.7

RSpec/EmptyLineAfterHook:
Enabled: false

Naming/RescuedExceptionsVariableName:
Enabled: false

Style/HashConversion:
Exclude:
- spec/**/*_spec.rb
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers 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, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at aleksandr.sta@okwork.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec
196 changes: 196 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
PATH
remote: .
specs:
jcw (0.1.0)
activesupport (>= 5.0)
httprb-opentracing (~> 0.4.0)
jaeger-client (~> 1.1.0)
rack-tracer (~> 0.9.0)

GEM
remote: https://rubygems.org/
specs:
actionpack (6.1.4.1)
actionview (= 6.1.4.1)
activesupport (= 6.1.4.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (6.1.4.1)
activesupport (= 6.1.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
builder (3.2.4)
bundler-audit (0.8.0)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
coderay (1.1.3)
concurrent-ruby (1.1.9)
crass (1.0.6)
diff-lcs (1.4.4)
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
erubi (1.10.0)
ffi (1.15.3)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
http (5.0.1)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 2.2)
llhttp-ffi (~> 0.3.0)
http-cookie (1.0.4)
domain_name (~> 0.5)
http-form_data (2.3.0)
http-parser (1.2.3)
ffi-compiler (>= 1.0, < 2.0)
httprb-opentracing (0.4.0)
opentracing (~> 0.5.0)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jaeger-client (1.1.0)
opentracing (~> 0.3)
thrift
llhttp-ffi (0.3.1)
ffi-compiler (~> 1.0)
rake (~> 13.0)
loofah (2.12.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (1.0.0)
mini_portile2 (2.6.1)
minitest (5.14.4)
nokogiri (1.12.3)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
nokogiri (1.12.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.12.3-x86_64-linux)
racc (~> 1.4)
opentracing (0.5.0)
parallel (1.20.1)
parser (3.0.2.0)
ast (~> 2.4.1)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
racc (1.5.2)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-tracer (0.9.0)
opentracing (~> 0.4)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
method_source
rake (>= 0.13)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.6)
regexp_parser (2.1.1)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rubocop (1.17.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.7.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.11.0)
parser (>= 3.0.1.1)
rubocop-config-umbrellio (1.17.0.53)
rubocop (= 1.17.0)
rubocop-performance (= 1.10.0)
rubocop-rails (= 2.9.1)
rubocop-rake (= 0.5.1)
rubocop-rspec (= 2.2.0)
rubocop-sequel (= 0.2.0)
rubocop-performance (1.10.0)
rubocop (>= 0.90.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.9.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-rake (0.5.1)
rubocop
rubocop-rspec (2.2.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
rubocop-sequel (0.2.0)
rubocop (~> 1.0)
ruby-progressbar (1.11.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.3)
thor (1.1.0)
thrift (0.14.2)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (2.0.0)
zeitwerk (2.4.2)

PLATFORMS
ruby
x86_64-darwin-18
x86_64-linux

DEPENDENCIES
bundler
bundler-audit
http
http-parser
jcw!
pry
railties
rake
rspec
rubocop-config-umbrellio
simplecov
simplecov-lcov

BUNDLED WITH
2.2.15
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021
Copyright (c) 2021 Aleksandr Starovojtov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit cdf59e6

Please sign in to comment.