octopoller 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 395def9659b719a7458b7f498e35f02e52e4e898e4c2ab966f277c3f864bc0d5
4
- data.tar.gz: 6b3f90aeed014843ae63e763d9cc902779343638027a13a1bd7a2a612a3decca
3
+ metadata.gz: 7803ffccc51d051d2f3b5d0a7da4e8d7fea88eb9595e62308696c494944f7060
4
+ data.tar.gz: d155ec22668921f66bc68f47fdbea39f1c903a55930b4beb783d1008205a36fb
5
5
  SHA512:
6
- metadata.gz: 5f65c542e58c21cb83c61baab6ba1d4d0b0ad580a3d8654e90974d6db56af4924f869fd7b6a8137938f58602671dab3628f16d9f421d861e1ca189ba4ca89c6e
7
- data.tar.gz: 0fc00e03a3f190db1bf98e80c2a7ff55978d83068614a8330774048d0a755e794ae1ab421fa5f2ab11f441256dadaff4f6d0f389ea89199e98f0da01bde45adf
6
+ metadata.gz: fe21b8ace849f3ac2cffeb18654c656a661072d59bc79ff10b3566cd7d1dd02ff0d569b9cf4070762eb87142bcd79f933d4e07d049e9c41b1a336d03aa0043cf
7
+ data.tar.gz: e89c735142719ce6dcba23c4c631991825d57c8f2f6d50d88fa8941e712794812a648a2d7894522f7fc32fd157a460e72e38609b8401cb2455b2db9fbe7dc19e
@@ -0,0 +1,41 @@
1
+ name: Bug
2
+ description: File a bug report
3
+ title: "[BUG]: "
4
+ labels: ["Type: Bug", "Status: Triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to fill out this bug report!
10
+ - type: textarea
11
+ id: what-happened
12
+ attributes:
13
+ label: What happened?
14
+ description: What did you do? What happened? What did you expect to happen?
15
+ placeholder: Put your description of the bug here.
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: versions
20
+ attributes:
21
+ label: Versions
22
+ description: What versions of the relevant software are you running?
23
+ placeholder: Octokit.js v2.0.10, Node v16.18.0
24
+ validations:
25
+ required: true
26
+ - type: textarea
27
+ id: logs
28
+ attributes:
29
+ label: Relevant log output
30
+ description: |
31
+ Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
32
+ Please check your logs before submission to ensure sensitive information is redacted.
33
+ render: shell
34
+ - type: checkboxes
35
+ id: terms
36
+ attributes:
37
+ label: Code of Conduct
38
+ description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
39
+ options:
40
+ - label: I agree to follow this project's Code of Conduct
41
+ required: true
@@ -0,0 +1,49 @@
1
+ name: Documentation
2
+ description: Update or add documentation
3
+ title: "[DOCS]: "
4
+ labels: ["Type: Documentation", "Status: Triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to fill this out!
10
+ - type: textarea
11
+ id: describe-need
12
+ attributes:
13
+ label: Describe the need
14
+ description: What do you wish was different about our docs?
15
+ placeholder: Describe the need for documentation updates here.
16
+ validations:
17
+ required: true
18
+ - type: input
19
+ id: sdk_version
20
+ attributes:
21
+ label: SDK Version
22
+ description: Do these docs apply to a specific SDK version?
23
+ placeholder: Octokit.NET v4.0.1
24
+ validations:
25
+ required: false
26
+ - type: input
27
+ id: api_version
28
+ attributes:
29
+ label: API Version
30
+ description: Do these docs apply to a specific version of the GitHub REST API or GraphQL API?
31
+ placeholder: ex. v1.1.1
32
+ validations:
33
+ required: false
34
+ - type: textarea
35
+ id: logs
36
+ attributes:
37
+ label: Relevant log output
38
+ description: |
39
+ Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
40
+ Please check your logs before submission to ensure sensitive information is redacted.
41
+ render: shell
42
+ - type: checkboxes
43
+ id: terms
44
+ attributes:
45
+ label: Code of Conduct
46
+ description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
47
+ options:
48
+ - label: I agree to follow this project's Code of Conduct
49
+ required: true
@@ -0,0 +1,49 @@
1
+ name: Feature
2
+ description: Suggest an idea for a new feature or enhancement
3
+ title: "[FEAT]: "
4
+ labels: ["Type: Feature", "Status: Triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to fill this out!
10
+ - type: textarea
11
+ id: describe-need
12
+ attributes:
13
+ label: Describe the need
14
+ description: What do you want to happen? What problem are you trying to solve?
15
+ placeholder: Describe the need for the feature.
16
+ validations:
17
+ required: true
18
+ - type: input
19
+ id: sdk_version
20
+ attributes:
21
+ label: SDK Version
22
+ description: Does this feature suggestion apply to a specific SDK version?
23
+ placeholder: Octokit.rb v6.0.0
24
+ validations:
25
+ required: false
26
+ - type: input
27
+ id: api_version
28
+ attributes:
29
+ label: API Version
30
+ description: Does this feature suggestion apply to a specific version of the GitHub REST API or GraphQL API?
31
+ placeholder: ex. v1.1.1
32
+ validations:
33
+ required: false
34
+ - type: textarea
35
+ id: logs
36
+ attributes:
37
+ label: Relevant log output
38
+ description: |
39
+ Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
40
+ Please check your logs before submission to ensure sensitive information is redacted.
41
+ render: shell
42
+ - type: checkboxes
43
+ id: terms
44
+ attributes:
45
+ label: Code of Conduct
46
+ description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
47
+ options:
48
+ - label: I agree to follow this project's Code of Conduct
49
+ required: true
@@ -0,0 +1,49 @@
1
+ name: Maintenance
2
+ description: Dependencies, cleanup, refactoring, reworking of code
3
+ title: "[MAINT]: "
4
+ labels: ["Type: Maintenance", "Status: Triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to fill this out!
10
+ - type: textarea
11
+ id: describe-need
12
+ attributes:
13
+ label: Describe the need
14
+ description: What do you want to happen?
15
+ placeholder: Describe the maintenance need here.
16
+ validations:
17
+ required: true
18
+ - type: input
19
+ id: sdk_version
20
+ attributes:
21
+ label: SDK Version
22
+ description: Does this maintenance apply to a specific SDK version?
23
+ placeholder: terraform-provider-github v5.7.0
24
+ validations:
25
+ required: false
26
+ - type: input
27
+ id: api_version
28
+ attributes:
29
+ label: API Version
30
+ description: Does this maintenance apply to a specific version of the GitHub REST API or GraphQL API?
31
+ placeholder: ex. v1.1.1
32
+ validations:
33
+ required: false
34
+ - type: textarea
35
+ id: logs
36
+ attributes:
37
+ label: Relevant log output
38
+ description: |
39
+ Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
40
+ Please check your logs before submission to ensure sensitive information is redacted.
41
+ render: shell
42
+ - type: checkboxes
43
+ id: terms
44
+ attributes:
45
+ label: Code of Conduct
46
+ description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
47
+ options:
48
+ - label: I agree to follow this project's Code of Conduct
49
+ required: true
@@ -0,0 +1,30 @@
1
+ <!-- Please refer to our contributing docs for any questions on submitting a pull request -->
2
+ <!-- Issues are required for both bug fixes and features. -->
3
+ Resolves #ISSUE_NUMBER
4
+
5
+ ----
6
+
7
+ ### Before the change?
8
+ <!-- Please describe the current behavior that you are modifying. -->
9
+
10
+ *
11
+
12
+ ### After the change?
13
+ <!-- Please describe the behavior or changes that are being added by this PR. -->
14
+
15
+ *
16
+
17
+ ### Pull request checklist
18
+ - [ ] Tests for the changes have been added (for bug fixes / features)
19
+ - [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
20
+
21
+ ### Does this introduce a breaking change?
22
+ <!-- If this introduces a breaking change make sure to note it here any what the impact might be -->
23
+
24
+ Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/master/community/breaking_changes.md) to help!
25
+
26
+ - [ ] Yes
27
+ - [ ] No
28
+
29
+ ----
30
+
@@ -0,0 +1,20 @@
1
+ name: Add PRs and issues to Octokit org project
2
+
3
+ on:
4
+ issues:
5
+ types: [reopened, opened]
6
+ pull_request_target:
7
+ types: [reopened, opened]
8
+
9
+ jobs:
10
+ add-to-project:
11
+ name: Add issue to project
12
+ runs-on: ubuntu-latest
13
+ continue-on-error: true
14
+ steps:
15
+ - uses: actions/add-to-project@v0.4.0
16
+ with:
17
+ project-url: https://github.com/orgs/octokit/projects/10
18
+ github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}
19
+ labeled: "Status: Stale"
20
+ label-operator: NOT
@@ -0,0 +1,72 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ "main" ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ "main" ]
20
+ schedule:
21
+ - cron: '44 8 * * 4'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+
52
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
+ # queries: security-extended,security-and-quality
54
+
55
+
56
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
+ # If this step fails, then you should remove it and run the build manually (see below)
58
+ - name: Autobuild
59
+ uses: github/codeql-action/autobuild@v2
60
+
61
+ # ℹ️ Command-line programs to run using the OS shell.
62
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
+
64
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
65
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
+
67
+ # - run: |
68
+ # echo "Run, Build Application using script"
69
+ # ./location_of_script_within_repo/buildscript.sh
70
+
71
+ - name: Perform CodeQL Analysis
72
+ uses: github/codeql-action/analyze@v2
@@ -0,0 +1,28 @@
1
+ name: Issue/PR response
2
+ permissions:
3
+ issues: write
4
+ pull-requests: write
5
+ on:
6
+ issues:
7
+ types:
8
+ - opened
9
+ pull_request:
10
+ types:
11
+ - opened
12
+ jobs:
13
+ respond-to-issue:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Determine issue or PR number
17
+ id: extract
18
+ run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
19
+
20
+ - name: Respond to issue or PR
21
+ uses: peter-evans/create-or-update-comment@6534843181fc2aeb7f9f1cd3cd4a7b956cada2db
22
+ with:
23
+ issue-number: ${{ steps.extract.outputs.NUMBER }}
24
+ body: >
25
+ 👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday!
26
+ We have a [process in place](https://github.com/octokit/.github/blob/main/community/prioritization_response.md#overview) for prioritizing and responding to your input.
27
+ Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with `Status: Up for grabs`.
28
+ You & others like you are the reason all of this works! So thank you & happy coding! 🚀
@@ -8,11 +8,11 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
 
10
10
  steps:
11
- - uses: actions/checkout@v1
11
+ - uses: actions/checkout@v3
12
12
  - name: Set up Ruby 2.6
13
- uses: actions/setup-ruby@v1
13
+ uses: ruby/setup-ruby@v1
14
14
  with:
15
- ruby-version: 2.6.x
15
+ ruby-version: 2.6
16
16
  - name: Build and test with Rake
17
17
  run: |
18
18
  gem install bundler:2.2.33
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octopoller (0.2.0)
4
+ octopoller (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -43,6 +43,7 @@ Octopoller exposes a single function `poll`. Here is what the API looks like:
43
43
  #
44
44
  # wait - The time delay in seconds between polls (default is 1 second)
45
45
  # - When given the argument `:exponentially` the action will be retried with exponetial backoff
46
+ # - When given 0, false or nil, the action will be retried without wait
46
47
  # timeout - The maximum number of seconds the poller will execute
47
48
  # retries - The maximum number of times the action will be retried
48
49
  # yield - A block that will execute, and if `:re_poll` is returned it will re-run
@@ -70,7 +71,7 @@ Here's what using Octpoller is like for each of the use cases listed above:
70
71
  # => "🦑"
71
72
  # => "🦑"
72
73
  # ... (for 15 seconds)
73
- # Timed out patiently (Octopoller::TimeOutError)
74
+ # Timed out patiently (Octopoller::TimeoutError)
74
75
  ```
75
76
 
76
77
  * Poll with retries:
@@ -118,4 +119,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
118
119
 
119
120
  ## Code of Conduct
120
121
 
121
- Everyone interacting in the Octopoller project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/octokit/octopoller.rb/blob/master/CODE_OF_CONDUCT.md).
122
+ Everyone interacting in the Octopoller project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/octokit/octopoller.rb/blob/main/CODE_OF_CONDUCT.md).
data/RELEASE.md CHANGED
@@ -1,15 +1,18 @@
1
1
  # Releasing a new version of octopoller.rb
2
2
 
3
3
  1. Create a list of all the changes since the prior release
4
- 1. Compare the previous release to `master` using `https://github.com/octokit/octopoller.rb/compare/`v1.3.3.7...master` (assuming that the last release was `v1.3.3.7`)
5
- 1. Ensure there are no breaking changes _(if there are breaking changes you'll need to create a release branch without those changes or bump the major version)_
6
- 1. Update the version
7
- 1. Checkout `master`
8
- 1. Update the constant in `lib/octopoller/version.rb` (when `bundle` is executed the version in the `Gemfile.lock` will be updated)
9
- 1. Run `bin/setup` so that `Gemfile.lock` will be updated with the new version
10
- 1. Commit and push directly to `master`
11
- 1. Run the `script/release` script to cut a release
12
- 1. Draft a new release at <https://github.com/octokit/octopoller.rb/releases/new> containing the changelog from step 1
4
+ 1. Compare the previous release to `main` using `https://github.com/octokit/octopoller.rb/compare/`v1.3.3.7...main` (assuming that the last release was `v1.3.3.7`)
5
+ 2. Ensure there are no breaking changes _(if there are breaking changes you'll need to create a release branch without those changes or bump the major version)_
6
+ 3. Update the version
7
+ 1. Checkout `main`
8
+ 2. Update the constant in `lib/octopoller/version.rb` (when `bundle` is executed the version in the `Gemfile.lock` will be updated)
9
+ 3. Run `bin/setup` so that `Gemfile.lock` will be updated with the new version
10
+ 4. Commit and push directly to `main`
11
+ 5. (Optional) Run `script/release` with no parameters to execute a dry run of a release
12
+ 6. Run the `script/release -r` script to cut a release (this will also run `script/validate` to perform the permission check)
13
+ 7. Draft a new release at <https://github.com/octokit/octopoller.rb/releases/new> containing the changelog from step 1
14
+
15
+ ----
13
16
 
14
17
  ## Prerequisites
15
18
 
data/SECURITY.md ADDED
@@ -0,0 +1,13 @@
1
+ # Security Policy
2
+
3
+ Thanks for helping make GitHub Open Source Software safe for everyone.
4
+
5
+ GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [Octokit](https://github.com/octokit).
6
+
7
+ Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we want to make sure that your finding gets passed along to the maintainers of this project for remediation.
8
+
9
+
10
+ ## Reporting a Vulnerability
11
+
12
+ Since octopoller is part of [Octokit](https://github.com/octokit) (a GitHub organization) we ask that you follow the guidelines [here](https://github.com/github/.github/blob/master/SECURITY.md#reporting-security-issues) to report anything that you might've found.
13
+
@@ -1,3 +1,3 @@
1
1
  module Octopoller
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/octopoller.rb CHANGED
@@ -16,6 +16,8 @@ module Octopoller
16
16
  # raise - Raises an Octopoller::TimeoutError if the timeout is reached
17
17
  # raise - Raises an Octopoller::TooManyAttemptsError if the retries is reached
18
18
  def poll(wait: 1, timeout: nil, retries: nil)
19
+ wait = 0 if [nil, false].include?(wait)
20
+
19
21
  Octopoller.validate_arguments(wait, timeout, retries)
20
22
  exponential_backoff = (wait == :exponentially)
21
23
 
@@ -45,7 +47,7 @@ module Octopoller
45
47
  raise ArgumentError, "Must pass an argument to either `timeout` or `retries`"
46
48
  end
47
49
  exponential_backoff = wait == :exponentially
48
- raise ArgumentError, "Cannot wait backwards in time" unless exponential_backoff || wait.positive?
50
+ raise ArgumentError, "Cannot wait backwards in time" if !exponential_backoff && wait.negative?
49
51
  raise ArgumentError, "Timed out without even being able to try" if timeout&.negative?
50
52
  raise ArgumentError, "Cannot retry something a negative number of times" if retries&.negative?
51
53
  end
data/script/package CHANGED
@@ -4,4 +4,15 @@
4
4
 
5
5
  mkdir -p pkg
6
6
  gem build *.gemspec
7
- mv *.gem pkg
7
+
8
+ ./script/validate || rm *.gem
9
+
10
+ echo "*** Packing and moving the octopoller gem ***"
11
+ if [ -f *.gem ]; then
12
+ mv *.gem pkg
13
+ echo -e '☑ success'
14
+ else
15
+ echo -e '☒ failure'
16
+ exit 1
17
+ fi
18
+
data/script/release CHANGED
@@ -5,12 +5,49 @@
5
5
 
6
6
  set -e
7
7
 
8
- version="$(script/package | grep Version: | awk '{print $2}')"
9
- [ -n "$version" ] || exit 1
10
-
11
- echo $version
12
- git commit --allow-empty -a -m "Release $version"
13
- git tag "v$version"
14
- git push origin
15
- git push origin "v$version"
16
- gem push pkg/*-${version}.gem
8
+ usage() {
9
+ echo "Usage: $0 [-r] Tags and releases/publishes Octopoller" 1>&2; exit 1;
10
+ }
11
+
12
+ while [ $# -gt 0 ]
13
+ do
14
+ case $1 in
15
+ '-r')
16
+ r=true
17
+ ;;
18
+ '-h')
19
+ usage
20
+ ;;
21
+ *)
22
+ echo "No valid parameter passed in, performing a dry run...";
23
+ ;;
24
+ esac
25
+ shift
26
+ done
27
+
28
+ if [ -z "${r}" ]; then
29
+ ./script/package
30
+ echo "*** Dry run: octopoller was not tagged or released ***"
31
+ echo -e '☑ success'
32
+ else
33
+
34
+ # We execite the script separately to get logging and proper exit conditions
35
+ ./script/package
36
+
37
+ # We need to pull the version from the actual file that is about to be published
38
+ file=$(ls pkg/*.gem| head -1)
39
+ version=$(echo $file | sed -e 's/.*octopoller-\(.*\).gem.*/\1/')
40
+
41
+ [ -n "$version" ] || exit 1
42
+
43
+ echo "*** Tagging and publishing $version of octopoller ***"
44
+
45
+ git commit --allow-empty -a -m "Release $version"
46
+ git tag "v$version"
47
+ git push origin
48
+ git push origin "v$version"
49
+ gem push pkg/*-${version}.gem
50
+ echo -e '☑ success'
51
+ fi
52
+
53
+
data/script/validate ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env bash
2
+ # Usage: script/gem
3
+ # Validates the packed gem to determine if file permissions are correct.
4
+
5
+ <<'###SCRIPT_COMMENT'
6
+ Purpose:
7
+ (Given octopoller.rb is currently shipped "manually")
8
+
9
+ Because different environments behave differently, it is recommended that the integrity and file permissions of the files packed in the gem are verified.
10
+ This is to help prevent things like releasing world writeable files in the gem. The simple check below looks at each file contained in the packed gem and
11
+ verifies that the files are only owner writeable.
12
+
13
+ Requirements:
14
+ This script expects that script/package, script/release or 'gem build *.gemspec' have been run
15
+
16
+ ###SCRIPT_COMMENT
17
+
18
+
19
+ FILE=$(ls *.gem| head -1)
20
+
21
+ echo "*** Validating file permissions in the octopoller gem ***"
22
+
23
+ if [ ! -f "$FILE" ]; then
24
+ echo "$FILE does not exist. Please run script/package, script/release or 'gem build *.gemspec' to generate the gem to be validated"
25
+ echo -e '☒ failure'
26
+ exit 1
27
+ fi
28
+
29
+ tar -xf "${FILE}"
30
+
31
+ # naive check to quickly see if any files in the gem are set to the wrong permissions
32
+ for f in $(tar --numeric-owner -tvf data.tar.gz )
33
+ do
34
+ if [ $f == "-rw-rw-rw-" ]; then
35
+ echo "World writeable files (-rw-rw-rw- | 666) detected in the gem. Please repack and make sure that all files in the gem are owner read write ( -rw-r--r-- | 644 )"
36
+ echo -e '☒ failure'
37
+ rm -f checksums.yaml.gz data.tar.gz metadata.gz
38
+ exit 1
39
+ fi
40
+ done
41
+
42
+ # Check clean up
43
+ echo -e '☑ success'
44
+ rm -f checksums.yaml.gz data.tar.gz metadata.gz
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopoller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BenEmdon
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2023-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,8 +60,14 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".github/CODEOWNERS"
63
- - ".github/ISSUE_TEMPLATE/bug_report.md"
64
- - ".github/ISSUE_TEMPLATE/feature_request.md"
63
+ - ".github/ISSUE_TEMPLATE/bug.yml"
64
+ - ".github/ISSUE_TEMPLATE/documentation.yml"
65
+ - ".github/ISSUE_TEMPLATE/feature.yml"
66
+ - ".github/ISSUE_TEMPLATE/maintenance.yml"
67
+ - ".github/pull_request_template.md"
68
+ - ".github/workflows/add_to_octokit_project.yml"
69
+ - ".github/workflows/codeql-analysis.yml"
70
+ - ".github/workflows/immediate-response.yml"
65
71
  - ".github/workflows/ruby.yml"
66
72
  - ".gitignore"
67
73
  - ".rspec"
@@ -74,6 +80,7 @@ files:
74
80
  - README.md
75
81
  - RELEASE.md
76
82
  - Rakefile
83
+ - SECURITY.md
77
84
  - bin/console
78
85
  - bin/setup
79
86
  - lib/octopoller.rb
@@ -81,11 +88,12 @@ files:
81
88
  - octopoller.gemspec
82
89
  - script/package
83
90
  - script/release
91
+ - script/validate
84
92
  homepage: https://github.com/octokit/octopoller.rb
85
93
  licenses:
86
94
  - MIT
87
95
  metadata: {}
88
- post_install_message:
96
+ post_install_message:
89
97
  rdoc_options: []
90
98
  require_paths:
91
99
  - lib
@@ -100,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
108
  - !ruby/object:Gem::Version
101
109
  version: '0'
102
110
  requirements: []
103
- rubygems_version: 3.2.9
104
- signing_key:
111
+ rubygems_version: 3.4.20
112
+ signing_key:
105
113
  specification_version: 4
106
114
  summary: A Ruby gem for polling and retrying actions
107
115
  test_files: []
@@ -1,35 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
-
5
- ---
6
-
7
- **Describe the bug**
8
- A clear and concise description of what the bug is.
9
-
10
- **To Reproduce**
11
- Steps to reproduce the behavior:
12
- 1. Go to '...'
13
- 2. Click on '....'
14
- 3. Scroll down to '....'
15
- 4. See error
16
-
17
- **Expected behavior**
18
- A clear and concise description of what you expected to happen.
19
-
20
- **Screenshots**
21
- If applicable, add screenshots to help explain your problem.
22
-
23
- **Desktop (please complete the following information):**
24
- - OS: [e.g. iOS]
25
- - Browser [e.g. chrome, safari]
26
- - Version [e.g. 22]
27
-
28
- **Smartphone (please complete the following information):**
29
- - Device: [e.g. iPhone6]
30
- - OS: [e.g. iOS8.1]
31
- - Browser [e.g. stock browser, safari]
32
- - Version [e.g. 22]
33
-
34
- **Additional context**
35
- Add any other context about the problem here.
@@ -1,17 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
-
5
- ---
6
-
7
- **Is your feature request related to a problem? Please describe.**
8
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
-
10
- **Describe the solution you'd like**
11
- A clear and concise description of what you want to happen.
12
-
13
- **Describe alternatives you've considered**
14
- A clear and concise description of any alternative solutions or features you've considered.
15
-
16
- **Additional context**
17
- Add any other context or screenshots about the feature request here.