targit 2.4.7 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +46 -0
- data/CHANGELOG.md +6 -2
- data/README.md +1 -3
- data/lib/targit/asset.rb +7 -1
- data/lib/targit/client.rb +0 -2
- data/lib/targit/version.rb +1 -1
- data/targit.gemspec +1 -3
- metadata +9 -48
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43a9398d2a1d8949402f0e4fb8499f83ad69915a9928f4748304059a5588862f
|
|
4
|
+
data.tar.gz: 361477e83b7c15606186e80d026c8af08a8f0766ec96e9dddfc1ea7d58adae4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27c03555b54bc06ec95441753c4810a6c246b0d679ff71e2b13e6dc9d9a9f2b6aabd137e43d554eff24b771d64362667f73dde41891ddd62a04f3ac356f565e3
|
|
7
|
+
data.tar.gz: 43b4121246f166add223bede44c2bfb29c2f3e32c66acbcfc0d50d2fd34d6f13bc0c886a4ccf7183981fc6e51318d6ffd6327e7f1c9968a4868d68892eb18d61
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
name: Build
|
|
8
|
+
runs-on: ubuntu-22.04
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
with:
|
|
15
|
+
submodules: recursive
|
|
16
|
+
- uses: ruby/setup-ruby@v1
|
|
17
|
+
with:
|
|
18
|
+
ruby-version: '3.1'
|
|
19
|
+
bundler-cache: true
|
|
20
|
+
- name: Build
|
|
21
|
+
run: bundle exec rake
|
|
22
|
+
- name: Release
|
|
23
|
+
if: github.ref_type == 'tag'
|
|
24
|
+
run: bundle exec rake release
|
|
25
|
+
env:
|
|
26
|
+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
|
27
|
+
- name: Post to a Slack channel
|
|
28
|
+
if: ${{ failure() }}
|
|
29
|
+
uses: slackapi/slack-github-action@v1.18.0
|
|
30
|
+
env:
|
|
31
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
32
|
+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
|
33
|
+
with:
|
|
34
|
+
payload: |
|
|
35
|
+
{
|
|
36
|
+
"text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
|
37
|
+
"blocks": [
|
|
38
|
+
{
|
|
39
|
+
"type": "section",
|
|
40
|
+
"text": {
|
|
41
|
+
"type": "mrkdwn",
|
|
42
|
+
"text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
# 2.4.
|
|
1
|
+
# 2.4.8 / 2022-05-05
|
|
2
|
+
|
|
3
|
+
* [BUGFIX] Undo dumb http lib changes
|
|
4
|
+
|
|
5
|
+
# 2.4.7 / 2022-05-05
|
|
2
6
|
|
|
3
7
|
* [BUGFIX] Switch to even smarter http library
|
|
4
8
|
|
|
5
|
-
# 2.4.6/ 2022-05-05
|
|
9
|
+
# 2.4.6 / 2022-05-05
|
|
6
10
|
|
|
7
11
|
* [BUGFIX] Switch to even smarter http library
|
|
8
12
|
|
data/README.md
CHANGED
|
@@ -2,9 +2,7 @@ targit
|
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
4
|
[](https://rubygems.org/gems/targit)
|
|
5
|
-
[](https://codecov.io/github/akerl/targit)
|
|
7
|
-
[](https://www.codacy.com/app/akerl/targit)
|
|
5
|
+
[](https://github.com/akerl/targit/actions)
|
|
8
6
|
[](https://tldrlegal.com/license/mit-license)
|
|
9
7
|
|
|
10
8
|
Manages GitHub release assets for pushing binaries and other large files
|
data/lib/targit/asset.rb
CHANGED
|
@@ -19,11 +19,17 @@ module Targit
|
|
|
19
19
|
@name = @options[:name] || File.basename(@asset)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
def upload!
|
|
22
|
+
def upload!(retries = 2) # rubocop:disable Metrics/AbcSize
|
|
23
23
|
delete! if @options[:force]
|
|
24
24
|
raise('Release asset already exists') if already_exists?
|
|
25
25
|
asset = client.upload_asset @release.data[:url], @asset, @upload_options
|
|
26
|
+
sleep 1
|
|
26
27
|
client.release_asset asset[:url]
|
|
28
|
+
rescue Errno::ECONNRESET
|
|
29
|
+
raise if retries.zero?
|
|
30
|
+
puts "Retrying upload for #{@asset}"
|
|
31
|
+
sleep 5
|
|
32
|
+
upload!(retries - 1)
|
|
27
33
|
end
|
|
28
34
|
|
|
29
35
|
def already_exists?
|
data/lib/targit/client.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
require 'octokit'
|
|
2
2
|
require 'octoauth'
|
|
3
|
-
require 'faraday/http'
|
|
4
3
|
|
|
5
4
|
module Targit
|
|
6
5
|
##
|
|
@@ -27,7 +26,6 @@ module Targit
|
|
|
27
26
|
@middleware ||= Faraday::RackBuilder.new do |builder|
|
|
28
27
|
builder.use Octokit::Response::RaiseError
|
|
29
28
|
builder.request :multipart
|
|
30
|
-
builder.adapter :http
|
|
31
29
|
end
|
|
32
30
|
end
|
|
33
31
|
|
data/lib/targit/version.rb
CHANGED
data/targit.gemspec
CHANGED
|
@@ -16,16 +16,14 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
s.license = 'MIT'
|
|
17
17
|
|
|
18
18
|
s.files = `git ls-files`.split
|
|
19
|
-
s.test_files = `git ls-files spec/*`.split
|
|
20
19
|
s.executables = ['targit']
|
|
21
20
|
|
|
22
|
-
s.add_dependency 'faraday-http', '~> 1.1.0'
|
|
23
21
|
s.add_dependency 'mercenary', '~> 0.4.0'
|
|
24
22
|
s.add_dependency 'mime-types', '~> 3.4.1'
|
|
25
23
|
s.add_dependency 'octoauth', '~> 1.9.0'
|
|
26
24
|
s.add_dependency 'octokit', '~> 4.22.0'
|
|
27
25
|
|
|
28
|
-
s.add_development_dependency 'goodcop', '~> 0.9.
|
|
26
|
+
s.add_development_dependency 'goodcop', '~> 0.9.7'
|
|
29
27
|
s.add_development_dependency 'vcr', '~> 5.0.0'
|
|
30
28
|
s.add_development_dependency 'webmock', '~> 3.8.0'
|
|
31
29
|
|
metadata
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: targit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Les Aker
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-10-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: faraday-http
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.1.0
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: 1.1.0
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: mercenary
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -86,14 +72,14 @@ dependencies:
|
|
|
86
72
|
requirements:
|
|
87
73
|
- - "~>"
|
|
88
74
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.9.
|
|
75
|
+
version: 0.9.7
|
|
90
76
|
type: :development
|
|
91
77
|
prerelease: false
|
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
79
|
requirements:
|
|
94
80
|
- - "~>"
|
|
95
81
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.9.
|
|
82
|
+
version: 0.9.7
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
84
|
name: vcr
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -129,6 +115,7 @@ executables:
|
|
|
129
115
|
extensions: []
|
|
130
116
|
extra_rdoc_files: []
|
|
131
117
|
files:
|
|
118
|
+
- ".github/workflows/build.yml"
|
|
132
119
|
- ".gitignore"
|
|
133
120
|
- ".rspec"
|
|
134
121
|
- ".rubocop.yml"
|
|
@@ -175,7 +162,7 @@ licenses:
|
|
|
175
162
|
- MIT
|
|
176
163
|
metadata:
|
|
177
164
|
rubygems_mfa_required: 'true'
|
|
178
|
-
post_install_message:
|
|
165
|
+
post_install_message:
|
|
179
166
|
rdoc_options: []
|
|
180
167
|
require_paths:
|
|
181
168
|
- lib
|
|
@@ -191,33 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
191
178
|
version: '0'
|
|
192
179
|
requirements: []
|
|
193
180
|
rubygems_version: 3.3.7
|
|
194
|
-
signing_key:
|
|
181
|
+
signing_key:
|
|
195
182
|
specification_version: 4
|
|
196
183
|
summary: Tool for adding GitHub release assets
|
|
197
|
-
test_files:
|
|
198
|
-
- spec/examples/alpha
|
|
199
|
-
- spec/examples/beta
|
|
200
|
-
- spec/fixtures/cassettes/asset_autocreate_release.yml
|
|
201
|
-
- spec/fixtures/cassettes/asset_existence_check_fail.yml
|
|
202
|
-
- spec/fixtures/cassettes/asset_existence_check_pass.yml
|
|
203
|
-
- spec/fixtures/cassettes/asset_metadata_absent.yml
|
|
204
|
-
- spec/fixtures/cassettes/asset_metadata_present.yml
|
|
205
|
-
- spec/fixtures/cassettes/asset_url_absent.yml
|
|
206
|
-
- spec/fixtures/cassettes/asset_url_present.yml
|
|
207
|
-
- spec/fixtures/cassettes/asset_without_release.yml
|
|
208
|
-
- spec/fixtures/cassettes/block_existing_asset.yml
|
|
209
|
-
- spec/fixtures/cassettes/create_named_release.yml
|
|
210
|
-
- spec/fixtures/cassettes/create_new_asset.yml
|
|
211
|
-
- spec/fixtures/cassettes/create_new_release.yml
|
|
212
|
-
- spec/fixtures/cassettes/current_asset.yml
|
|
213
|
-
- spec/fixtures/cassettes/current_io_asset.yml
|
|
214
|
-
- spec/fixtures/cassettes/current_releases.yml
|
|
215
|
-
- spec/fixtures/cassettes/delete_asset.yml
|
|
216
|
-
- spec/fixtures/cassettes/no_release_found.yml
|
|
217
|
-
- spec/fixtures/cassettes/release_object.yml
|
|
218
|
-
- spec/fixtures/cassettes/replace_existing_asset.yml
|
|
219
|
-
- spec/spec_helper.rb
|
|
220
|
-
- spec/targit/asset_spec.rb
|
|
221
|
-
- spec/targit/release_spec.rb
|
|
222
|
-
- spec/targit/version_spec.rb
|
|
223
|
-
- spec/targit_spec.rb
|
|
184
|
+
test_files: []
|