Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Jan 17, 2024
1 parent 715fff6 commit 9928a91
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<img alt="logo" src="https://www.objectionary.com/cactus.svg" height="100px" />

[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
[![DevOps By Rultor.com](https://www.rultor.com/b/h1alexbel/ghquota)](https://www.rultor.com/p/h1alexbel/ghquota)
[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)
<br>

[![mvn](https://github.com/h1alexbel/ghquota/actions/workflows/mvn.yml/badge.svg)](https://github.com/h1alexbel/ghquota/actions/workflows/mvn.yml)
[![maven central](http://maven-badges.herokuapp.com/maven-central/io.github.h1alexbel/ghquota/badge.svg)](https://search.maven.org/artifact/io.github.h1alexbel/ghquota)
[![javadoc](https://javadoc.io/badge2/io.github.h1alexbel/ghquota/javadoc.svg)](https://javadoc.io/doc/io.github.h1alexbel/ghquota)

[![Hits-of-Code](https://hitsofcode.com/github/h1alexbel/cdit)](https://hitsofcode.com/view/github/h1alexbel/ghquota)
[![Lines-of-Code](https://tokei.rs/b1/github/h1alexbel/cdit)](https://github.com/h1alexbel/ghquota)
[![PDD status](http://www.0pdd.com/svg?name=h1alexbel/cdit)](http://www.0pdd.com/p?name=h1alexbel/ghquota)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/h1alexbel/ghquota/blob/master/LICENSE.txt)

JUnit extension that won't run your tests if request quota in GitHub is exceeded.

**How to use**. All you need is this (get the latest version [here](https://search.maven.org/artifact/io.github.h1alexbel/ghquota)):

Maven:
```xml
<dependency>
<groupId>io.github.h1alexbel</groupId>
<artifactId>ghquota</artifactId>
<scope>test</scope>
</dependency>
```

Gradle:
```groovy
dependencies {
testCompile 'io.github.h1alexbel:ghquota:<version>'
}
```

```java
@Test
@ExtendWith(Quota.class)
void readsContentInRealGitHub() {
...
}
```

We don't want this unit test to be executed when no GitHub Quota API is exceeded.
The Quota execution condition will prevent JUnit5 from executing the test when you are out of requests.

## How to Contribute

It's a Java project.
You will need to install Maven 3.8.7+ Java 17+.

Fork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
We will review your changes and apply them to the `master` branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:

```bash
$ mvn clean install
```
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SOFTWARE.
<version>1.0-SNAPSHOT</version>
<name>ghquota</name>
<description>
?
JUnit extension that won't run your tests if request quota in GitHub is exceeded
</description>
<inceptionYear>2024</inceptionYear>
<url>https://github.com/h1alexbel/ghquota</url>
Expand Down

1 comment on commit 9928a91

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 9928a91 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20240117-14-sktxn9/Z2l0QGdpdGh1Yi5jb206aDFhbGV4YmVsL2docXVvdGEuZ2l0 && pdd -v -f /tmp/20240117-1727152-305j2l [1]: + set -e + set -o pipefail + cd /tmp/0pdd20240117-14-sktxn9/Z2l0QGdpdGh1Yi5jb206aDFhbGV4YmVsL2docXVvdGEuZ2l0 + pdd -v -f...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20240117-14-sktxn9/Z2l0QGdpdGh1Yi5jb206aDFhbGV4YmVsL2docXVvdGEuZ2l0 && pdd -v -f /tmp/20240117-1727152-305j2l [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20240117-14-sktxn9/Z2l0QGdpdGh1Yi5jb206aDFhbGV4YmVsL2docXVvdGEuZ2l0
+ pdd -v -f /tmp/20240117-1727152-305j2l

Found 7 lines in /tmp/0pdd20240117-14-sktxn9/Z2l0QGdpdGh1Yi5jb206aDFhbGV4YmVsL2docXVvdGEuZ2l0/.pdd
My version is 0.23.2
Ruby version is 3.1.4 at x86_64-linux
Reading from root dir .
Excluding target/**
Excluding xargs/**
/tmp/0pdd20240117-14-sktxn9/Z2l0QGdpdGh1Yi5jb206aDFhbGV4YmVsL2docXVvdGEuZ2l0/renovate.json is a binary file (114 bytes)
Reading .0pdd.yml ...
Reading .gitattributes ...
Reading .github/workflows/codecov.yml ...
Reading .github/workflows/mvn.yml ...
Reading .github/workflows/pdd.yml ...
Reading .github/workflows/xcop.yml ...
Reading .gitignore ...
Reading .pdd ...
Reading .rultor.yml ...
Reading LICENSE.txt ...
Reading README.md ...
Reading pom.xml ...
Puzzle 1-32fb7ea5 0/DEV at pom.xml
Reading src/main/java/io/github/h1alexbel/ghquota/Quota.java ...
Reading src/main/java/io/github/h1alexbel/ghquota/package-info.java ...
Reading src/verifier/verifications.xml ...
ERROR: Puzzle pom.xml:133-133 has a very short description of just 6 words while a minimum of 20 is required
ERROR: Puzzle pom.xml:133-133 has an estimate of 0 minutes, which is lower than 15 minutes
ERROR: ERROR: 2 errors, see log above
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:73:in `rescue in block in xml'
/app/objects/git_repo.rb:70:in `block in xml'
/app/vendor/ruby-3.1.4/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/app/objects/git_repo.rb:69:in `xml'
/app/objects/puzzles.rb:41:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:531:in `process_request'
/app/0pdd.rb:367:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `block in compile!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1037:in `route_eval'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1068:in `block in process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1017:in `block in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `each'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1138:in `block in dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1133:in `dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/deflater.rb:44:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/xss_header.rb:20:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/path_traversal.rb:18:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/json_csrf.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/frame_options.rb:33:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:261:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:254:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:219:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:2018:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1792:in `synchronize'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

Please sign in to comment.