rake_github 0.6.0.pre.2 → 0.8.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile.lock +38 -24
- data/lib/rake_github/tasks.rb +1 -0
- data/lib/rake_github/tasks/deploy_keys/destroy.rb +2 -2
- data/lib/rake_github/tasks/deploy_keys/ensure.rb +2 -2
- data/lib/rake_github/tasks/deploy_keys/provision.rb +2 -2
- data/lib/rake_github/tasks/releases.rb +1 -0
- data/lib/rake_github/tasks/releases/create.rb +59 -0
- data/lib/rake_github/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54aa46d54fad060c18e0812362c4a005cf0f4f1c3695648bab810d5df7dedc48
|
4
|
+
data.tar.gz: 99f4c2c9400157ce6ff3782c1629f78957bd67354031fec29c1ae6c47ff1e10b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '095922e501b9eeafb7756f36ffdaae6fd521f6b2f011e77bdbad48053ac2513101bd4df03d9bafa135bf136a6f87eed0c2801fdc30b17d2c35bbff4b8a095c0d'
|
7
|
+
data.tar.gz: 36c3d6418ce2d68002c4e6f054e6cd2c7bc6ddeee392c97402c663fb75b598ead1d64c7d5bd38faedb0056608f4f47bc476bfbe04e2e925449c7e0252fbdd36d
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at maintainers@infrablocks.io. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rake_github (0.
|
4
|
+
rake_github (0.8.0.pre.3)
|
5
5
|
colored2 (~> 3.1)
|
6
6
|
octokit (~> 4.16)
|
7
7
|
rake_factory (~> 0.23)
|
@@ -10,40 +10,54 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (5.2.
|
13
|
+
activesupport (5.2.6)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 0.7, < 2)
|
16
16
|
minitest (~> 5.1)
|
17
17
|
tzinfo (~> 1.1)
|
18
|
-
addressable (2.
|
18
|
+
addressable (2.8.0)
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
20
20
|
colored2 (3.1.2)
|
21
|
-
concurrent-ruby (1.1.
|
21
|
+
concurrent-ruby (1.1.9)
|
22
22
|
diff-lcs (1.4.4)
|
23
|
-
docile (1.
|
24
|
-
excon (0.
|
25
|
-
faraday (1.
|
23
|
+
docile (1.4.0)
|
24
|
+
excon (0.85.0)
|
25
|
+
faraday (1.7.0)
|
26
|
+
faraday-em_http (~> 1.0)
|
27
|
+
faraday-em_synchrony (~> 1.0)
|
28
|
+
faraday-excon (~> 1.1)
|
29
|
+
faraday-httpclient (~> 1.0.1)
|
26
30
|
faraday-net_http (~> 1.0)
|
31
|
+
faraday-net_http_persistent (~> 1.1)
|
32
|
+
faraday-patron (~> 1.0)
|
33
|
+
faraday-rack (~> 1.0)
|
27
34
|
multipart-post (>= 1.2, < 3)
|
28
|
-
ruby2_keywords
|
29
|
-
faraday-
|
30
|
-
|
35
|
+
ruby2_keywords (>= 0.0.4)
|
36
|
+
faraday-em_http (1.0.0)
|
37
|
+
faraday-em_synchrony (1.0.0)
|
38
|
+
faraday-excon (1.1.0)
|
39
|
+
faraday-httpclient (1.0.1)
|
40
|
+
faraday-net_http (1.0.1)
|
41
|
+
faraday-net_http_persistent (1.2.0)
|
42
|
+
faraday-patron (1.0.0)
|
43
|
+
faraday-rack (1.0.0)
|
44
|
+
gem-release (2.2.2)
|
31
45
|
hamster (3.0.0)
|
32
46
|
concurrent-ruby (~> 1.0)
|
33
|
-
i18n (1.8.
|
47
|
+
i18n (1.8.10)
|
34
48
|
concurrent-ruby (~> 1.0)
|
35
|
-
lino (
|
49
|
+
lino (3.0.0)
|
36
50
|
hamster (~> 3.0)
|
37
51
|
open4 (~> 1.3)
|
38
52
|
memfs (1.0.0)
|
39
|
-
minitest (5.14.
|
53
|
+
minitest (5.14.4)
|
40
54
|
multipart-post (2.1.1)
|
41
|
-
octokit (4.
|
55
|
+
octokit (4.21.0)
|
42
56
|
faraday (>= 0.9)
|
43
57
|
sawyer (~> 0.8.0, >= 0.5.3)
|
44
58
|
open4 (1.3.4)
|
45
59
|
public_suffix (4.0.6)
|
46
|
-
rake (13.0.
|
60
|
+
rake (13.0.6)
|
47
61
|
rake_circle_ci (0.9.0)
|
48
62
|
colored2 (~> 3.1)
|
49
63
|
excon (~> 0.72)
|
@@ -52,10 +66,10 @@ GEM
|
|
52
66
|
rake_factory (0.29.0)
|
53
67
|
activesupport (>= 4)
|
54
68
|
rake (~> 13.0)
|
55
|
-
rake_gpg (0.
|
69
|
+
rake_gpg (0.16.0)
|
56
70
|
rake_factory (>= 0.23, < 1)
|
57
71
|
ruby_gpg2 (>= 0.6, < 1)
|
58
|
-
rake_ssh (0.
|
72
|
+
rake_ssh (0.6.0)
|
59
73
|
colored2 (~> 3.1)
|
60
74
|
rake_factory (~> 0.23)
|
61
75
|
sshkey (~> 2.0)
|
@@ -68,22 +82,22 @@ GEM
|
|
68
82
|
rspec-expectations (3.10.1)
|
69
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
84
|
rspec-support (~> 3.10.0)
|
71
|
-
rspec-mocks (3.10.
|
85
|
+
rspec-mocks (3.10.2)
|
72
86
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
87
|
rspec-support (~> 3.10.0)
|
74
|
-
rspec-support (3.10.
|
75
|
-
ruby2_keywords (0.0.
|
76
|
-
ruby_gpg2 (0.
|
88
|
+
rspec-support (3.10.2)
|
89
|
+
ruby2_keywords (0.0.5)
|
90
|
+
ruby_gpg2 (0.8.0)
|
77
91
|
lino (>= 1.5)
|
78
92
|
sawyer (0.8.2)
|
79
93
|
addressable (>= 2.3.5)
|
80
94
|
faraday (> 0.8, < 2.0)
|
81
|
-
simplecov (0.
|
95
|
+
simplecov (0.21.2)
|
82
96
|
docile (~> 1.1)
|
83
97
|
simplecov-html (~> 0.11)
|
84
98
|
simplecov_json_formatter (~> 0.1)
|
85
99
|
simplecov-html (0.12.3)
|
86
|
-
simplecov_json_formatter (0.1.
|
100
|
+
simplecov_json_formatter (0.1.3)
|
87
101
|
sshkey (2.0.0)
|
88
102
|
thread_safe (0.3.6)
|
89
103
|
tzinfo (1.2.9)
|
@@ -106,4 +120,4 @@ DEPENDENCIES
|
|
106
120
|
simplecov (~> 0.16)
|
107
121
|
|
108
122
|
BUNDLED WITH
|
109
|
-
2.2.
|
123
|
+
2.2.25
|
data/lib/rake_github/tasks.rb
CHANGED
@@ -6,9 +6,9 @@ module RakeGithub
|
|
6
6
|
module DeployKeys
|
7
7
|
class Destroy < RakeFactory::Task
|
8
8
|
default_name :destroy
|
9
|
-
default_description
|
9
|
+
default_description(RakeFactory::DynamicValue.new { |t|
|
10
10
|
"Destroys deploy keys from the #{t.repository} repository"
|
11
|
-
}
|
11
|
+
})
|
12
12
|
|
13
13
|
parameter :repository, required: true
|
14
14
|
parameter :access_token, required: true
|
@@ -5,10 +5,10 @@ module RakeGithub
|
|
5
5
|
module DeployKeys
|
6
6
|
class Ensure < RakeFactory::Task
|
7
7
|
default_name :ensure
|
8
|
-
default_description
|
8
|
+
default_description(RakeFactory::DynamicValue.new { |t|
|
9
9
|
"Ensure deploy keys are configured on the " +
|
10
10
|
"#{t.repository} repository"
|
11
|
-
}
|
11
|
+
})
|
12
12
|
|
13
13
|
parameter :repository, required: true
|
14
14
|
|
@@ -6,9 +6,9 @@ module RakeGithub
|
|
6
6
|
module DeployKeys
|
7
7
|
class Provision < RakeFactory::Task
|
8
8
|
default_name :provision
|
9
|
-
default_description
|
9
|
+
default_description(RakeFactory::DynamicValue.new { |t|
|
10
10
|
"Provision deploy keys to the #{t.repository} repository"
|
11
|
-
}
|
11
|
+
})
|
12
12
|
|
13
13
|
parameter :repository, required: true
|
14
14
|
parameter :access_token, required: true
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'releases/create'
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake_factory'
|
4
|
+
require 'octokit'
|
5
|
+
|
6
|
+
module RakeGithub
|
7
|
+
module Tasks
|
8
|
+
module Releases
|
9
|
+
class Create < RakeFactory::Task
|
10
|
+
default_description(RakeFactory::DynamicValue.new do |t|
|
11
|
+
"Creates a release on the #{t.repository} repository"
|
12
|
+
end)
|
13
|
+
|
14
|
+
parameter :repository, required: true
|
15
|
+
parameter :access_token, required: true
|
16
|
+
parameter :tag_name, required: true
|
17
|
+
parameter :target_commitish
|
18
|
+
parameter :release_name
|
19
|
+
parameter :body
|
20
|
+
parameter :draft, default: false
|
21
|
+
parameter :prerelease, default: false
|
22
|
+
parameter :discussion_category_name
|
23
|
+
parameter :assets, default: []
|
24
|
+
|
25
|
+
action do |t|
|
26
|
+
client = Octokit::Client.new(access_token: access_token)
|
27
|
+
|
28
|
+
puts 'Creating release' \
|
29
|
+
"#{t.release_name ? " '#{t.release_name}'" : ''} " \
|
30
|
+
"with tag '#{t.tag_name}' " \
|
31
|
+
"on '#{t.repository}' repository..."
|
32
|
+
release = client.create_release(
|
33
|
+
t.repository,
|
34
|
+
t.tag_name,
|
35
|
+
target_commitish: t.target_commitish,
|
36
|
+
release_name: t.release_name,
|
37
|
+
body: t.body,
|
38
|
+
draft: t.draft,
|
39
|
+
prerelease: t.prerelease,
|
40
|
+
discussion_category_name: t.discussion_category_name)
|
41
|
+
|
42
|
+
t.assets.each do |asset|
|
43
|
+
if asset.is_a?(String)
|
44
|
+
puts "Uploading asset '#{asset}' to release with tag '#{t.tag_name}'..."
|
45
|
+
client.upload_asset(release.url, asset)
|
46
|
+
else
|
47
|
+
puts(
|
48
|
+
"Uploading asset '#{asset[:path]}'" +
|
49
|
+
"#{asset[:name] ? " with name '#{asset[:name]}'" : ''} " +
|
50
|
+
"to release with tag '#{t.tag_name}'...")
|
51
|
+
client.upload_asset(
|
52
|
+
release.url, asset[:path], { name: asset[:name] })
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
data/lib/rake_github/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake_github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0.pre.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- InfraBlocks Maintainers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake_factory
|
@@ -222,11 +222,12 @@ dependencies:
|
|
222
222
|
version: '0.16'
|
223
223
|
description: Allows managing repository deploy keys.
|
224
224
|
email:
|
225
|
-
-
|
225
|
+
- maintainers@infrablocks.io
|
226
226
|
executables: []
|
227
227
|
extensions: []
|
228
228
|
extra_rdoc_files: []
|
229
229
|
files:
|
230
|
+
- CODE_OF_CONDUCT.md
|
230
231
|
- Gemfile
|
231
232
|
- Gemfile.lock
|
232
233
|
- LICENSE.txt
|
@@ -243,6 +244,8 @@ files:
|
|
243
244
|
- lib/rake_github/tasks/deploy_keys/destroy.rb
|
244
245
|
- lib/rake_github/tasks/deploy_keys/ensure.rb
|
245
246
|
- lib/rake_github/tasks/deploy_keys/provision.rb
|
247
|
+
- lib/rake_github/tasks/releases.rb
|
248
|
+
- lib/rake_github/tasks/releases/create.rb
|
246
249
|
- lib/rake_github/version.rb
|
247
250
|
homepage: https://github.com/infrablocks/rake_github
|
248
251
|
licenses:
|