octopoller 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of octopoller might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2d329c634d1580c6607d3c7e3f3f57b4fa12adebe9367ed0b1b9026cdf55489
4
- data.tar.gz: 6fe4982332d3c992ea896eb5cb3a096be80daaead02312b6e106af4ea9a94dc4
3
+ metadata.gz: 395def9659b719a7458b7f498e35f02e52e4e898e4c2ab966f277c3f864bc0d5
4
+ data.tar.gz: 6b3f90aeed014843ae63e763d9cc902779343638027a13a1bd7a2a612a3decca
5
5
  SHA512:
6
- metadata.gz: 63392670ae4a567fcebb30974a0e5a981b379a863510d9f16ce215c99ba2474fa9bb2acb0f8e96afa9452763d5fe24c3541b33e9ab4ee467381bb2e8841d9b5d
7
- data.tar.gz: 5c28f7a4bcebb5c215518a489d940103d3f1b68d42687569123f0ff4e8f5f3b535aa3e696f38c02938bbdf18c66498fad9cd25543e022137c123c3c89db9e8c6
6
+ metadata.gz: 5f65c542e58c21cb83c61baab6ba1d4d0b0ad580a3d8654e90974d6db56af4924f869fd7b6a8137938f58602671dab3628f16d9f421d861e1ca189ba4ca89c6e
7
+ data.tar.gz: 0fc00e03a3f190db1bf98e80c2a7ff55978d83068614a8330774048d0a755e794ae1ab421fa5f2ab11f441256dadaff4f6d0f389ea89199e98f0da01bde45adf
@@ -0,0 +1,3 @@
1
+ # Code Owners
2
+
3
+ * @octokit/octopoller
@@ -0,0 +1,20 @@
1
+ name: Ruby
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v1
12
+ - name: Set up Ruby 2.6
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.6.x
16
+ - name: Build and test with Rake
17
+ run: |
18
+ gem install bundler:2.2.33
19
+ bundle install --jobs 4 --retry 3
20
+ bundle exec rake
data/.gitignore CHANGED
@@ -11,4 +11,7 @@
11
11
  .rspec_status
12
12
 
13
13
  # macOS
14
- .DS_Store
14
+ .DS_Store
15
+
16
+ # ruby gem builds
17
+ *.gem
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ 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.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ 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.
28
+
29
+ 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.
30
+
31
+ ## Scope
32
+
33
+ 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.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at benemdon@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems 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.
38
+
39
+ 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.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile.lock CHANGED
@@ -1,35 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octopoller (0.1.0)
4
+ octopoller (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
10
- rake (10.5.0)
11
- rspec (3.8.0)
12
- rspec-core (~> 3.8.0)
13
- rspec-expectations (~> 3.8.0)
14
- rspec-mocks (~> 3.8.0)
15
- rspec-core (3.8.0)
16
- rspec-support (~> 3.8.0)
17
- rspec-expectations (3.8.0)
9
+ diff-lcs (1.5.0)
10
+ rake (13.0.6)
11
+ rspec (3.11.0)
12
+ rspec-core (~> 3.11.0)
13
+ rspec-expectations (~> 3.11.0)
14
+ rspec-mocks (~> 3.11.0)
15
+ rspec-core (3.11.0)
16
+ rspec-support (~> 3.11.0)
17
+ rspec-expectations (3.11.0)
18
18
  diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.8.0)
20
- rspec-mocks (3.8.0)
19
+ rspec-support (~> 3.11.0)
20
+ rspec-mocks (3.11.1)
21
21
  diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.8.0)
23
- rspec-support (3.8.0)
22
+ rspec-support (~> 3.11.0)
23
+ rspec-support (3.11.0)
24
24
 
25
25
  PLATFORMS
26
26
  ruby
27
27
 
28
28
  DEPENDENCIES
29
- bundler (~> 1.16)
29
+ bundler (~> 2.2.33)
30
30
  octopoller!
31
- rake (~> 10.0)
31
+ rake (~> 13.0)
32
32
  rspec (~> 3.2)
33
33
 
34
34
  BUNDLED WITH
35
- 1.16.2
35
+ 2.2.33
@@ -0,0 +1,2 @@
1
+ ## What
2
+ _What change does your pull request propose? ✨_
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # Octopoller 🦑
2
+ <a href="https://classroom.github.com"><img src="https://raw.githubusercontent.com/education/classroom/7c8577c29cf354965559503c009bcf4d29b85c2f/app/assets/images/wordmark%402x.png" height="15px"></a> battle tested.
3
+
2
4
  Octopoller is a micro gem for polling and retrying, perfect for making repeating requests.
3
5
 
4
6
  ```ruby
5
7
  Octopoller.poll(timeout: 15.seconds) do
6
8
  begin
7
- client.make_that_request # ex. request a long running job's status
9
+ client.request_progress # ex. request a long running job's status
8
10
  rescue Error
9
11
  :re_poll
10
12
  end
@@ -13,6 +15,9 @@ end
13
15
  # => { "status" => 200, "body" => "🦑" }
14
16
  ```
15
17
 
18
+ ## About
19
+ Octopoller was originally created for the purpose of polling GitHub's [Source Imports API](https://developer.github.com/v3/migrations/source_imports/) for a repo's import status. It is now the backbone of [GitHub Classroom's](https://classroom.github.com) _import starter code_ process.
20
+
16
21
  ## Installation
17
22
 
18
23
  Add this line to your application's Gemfile:
@@ -31,7 +36,7 @@ $ gem install octopoller
31
36
  ```
32
37
  ## Usage
33
38
 
34
- Octopoller exposes a single function `poll`. Here is what what the API looks like:
39
+ Octopoller exposes a single function `poll`. Here is what the API looks like:
35
40
  ```ruby
36
41
  # Polls until success
37
42
  # Re-runs when the block returns `:re_poll`
@@ -105,7 +110,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
105
110
 
106
111
  ## Contributing
107
112
 
108
- Bug reports and pull requests are welcome on GitHub at https://github.com/BenEmdon/octopoller. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
113
+ Bug reports and pull requests are welcome on GitHub at https://github.com/octokit/octopoller.rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
109
114
 
110
115
  ## License
111
116
 
@@ -113,4 +118,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
113
118
 
114
119
  ## Code of Conduct
115
120
 
116
- 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/BenEmdon/octopoller/blob/master/CODE_OF_CONDUCT.md).
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).
data/RELEASE.md ADDED
@@ -0,0 +1,26 @@
1
+ # Releasing a new version of octopoller.rb
2
+
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
13
+
14
+ ## Prerequisites
15
+
16
+ In order to create a release, you will need to be an owner of the octopoller gem on Rubygems.
17
+
18
+ Verify with:
19
+ ```
20
+ gem owner octopoller
21
+ ```
22
+
23
+ An existing owner can add new owners with:
24
+ ```
25
+ gem owner octopoller --add EMAIL
26
+ ```
@@ -1,3 +1,3 @@
1
1
  module Octopoller
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/octopoller.rb CHANGED
@@ -28,7 +28,7 @@ module Octopoller
28
28
  sleep wait
29
29
  wait *= 2 if exponential_backoff
30
30
  end
31
- raise TimeoutError, "Polling timed out paitently"
31
+ raise TimeoutError, "Polling timed out patiently"
32
32
  else
33
33
  (retries + 1).times do
34
34
  block_value = yield
data/octopoller.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{A Ruby gem for polling and retrying actions}
13
13
  spec.description = %q{A micro gem for polling and retrying, perfect for making repeating requests}
14
- spec.homepage = "https://github.com/BenEmdon/octopoller"
14
+ spec.homepage = "https://github.com/octokit/octopoller.rb"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Specify which files should be added to the gem when it is released.
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  end
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.16"
25
- spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "bundler", "~> 2.2.33"
25
+ spec.add_development_dependency "rake", "~> 13.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.2"
27
27
  end
data/script/package ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # Usage: script/gem
3
+ # Updates the gemspec and builds a new gem in the pkg directory.
4
+
5
+ mkdir -p pkg
6
+ gem build *.gemspec
7
+ mv *.gem pkg
data/script/release ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+ # Usage: script/release
3
+ # Build the package, tag a commit, push it to origin, and then release the
4
+ # package publicly.
5
+
6
+ set -e
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
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BenEmdon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2022-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.16'
19
+ version: 2.2.33
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.16'
26
+ version: 2.2.33
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -59,23 +59,29 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".github/CODEOWNERS"
62
63
  - ".github/ISSUE_TEMPLATE/bug_report.md"
63
64
  - ".github/ISSUE_TEMPLATE/feature_request.md"
65
+ - ".github/workflows/ruby.yml"
64
66
  - ".gitignore"
65
67
  - ".rspec"
66
- - ".travis.yml"
67
68
  - CODE_OF_CONDUCT.md
69
+ - CONTRIBUTING.md
68
70
  - Gemfile
69
71
  - Gemfile.lock
70
72
  - LICENSE.txt
73
+ - PULL_REQUEST_TEMPLATE.md
71
74
  - README.md
75
+ - RELEASE.md
72
76
  - Rakefile
73
77
  - bin/console
74
78
  - bin/setup
75
79
  - lib/octopoller.rb
76
80
  - lib/octopoller/version.rb
77
81
  - octopoller.gemspec
78
- homepage: https://github.com/BenEmdon/octopoller
82
+ - script/package
83
+ - script/release
84
+ homepage: https://github.com/octokit/octopoller.rb
79
85
  licenses:
80
86
  - MIT
81
87
  metadata: {}
@@ -94,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
100
  - !ruby/object:Gem::Version
95
101
  version: '0'
96
102
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.7.6
103
+ rubygems_version: 3.2.9
99
104
  signing_key:
100
105
  specification_version: 4
101
106
  summary: A Ruby gem for polling and retrying actions
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.7
5
- before_install: gem install bundler -v 1.16.2