rake_github 0.7.0 → 0.8.0.pre.4

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: 7b311a0c266a142889b512a5c813d320f4aee5fae7da6ddda1b05f48aefb26f4
4
- data.tar.gz: 668e68c0fae17674369ca3a565d78eec0dab32a4703785dc6c04281104495680
3
+ metadata.gz: 5f9e68ce76ba7e4db4ca9401c8e45222e3f3cbec6e22d2d6a3186641bb57d57e
4
+ data.tar.gz: 65bc46e3dcd7ce866a0e43c03904e6f676814e794cab9f4eda36d81879b79f41
5
5
  SHA512:
6
- metadata.gz: 1c0bd4c63ae030188286c2ed213d7de2f8fa0610f2902db8151ef703a0e3c28b4cdd912f9077e16a8f6f5c83b1e3c67cb4db68a965563fa66ebba60f7421390d
7
- data.tar.gz: a05a8af4d8f38aaae958273d5179caedd1dcd8910757a4769b2d05fa19a38fa67d2279d20240e60072cf9130aedd98c416a616d0a0058bd2176d483f9eb1bf36
6
+ metadata.gz: '01568cc0b1f2c869990f5300f9c594d9e3ef195f50d55ca4fc74aa40f68c6e100ff845fcfb528a3f26651f04359d7cca86e0f88c57119e8b6bd1300845815fa4'
7
+ data.tar.gz: fe487c328503e17374f3a571f519c79bfd7f78908b068f82cb4dce9ec3b3977a9f6024c9f6c21674a8309cfe5472322564177dfe7dafd4818614dccf758f447e
@@ -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.7.0)
4
+ rake_github (0.8.0.pre.4)
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.4.4)
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.7.0)
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.7)
21
+ concurrent-ruby (1.1.9)
22
22
  diff-lcs (1.4.4)
23
- docile (1.3.4)
24
- excon (0.78.1)
25
- faraday (1.3.0)
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-net_http (1.0.0)
30
- gem-release (2.2.0)
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.6)
47
+ i18n (1.8.10)
34
48
  concurrent-ruby (~> 1.0)
35
- lino (1.7.0)
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.2)
53
+ minitest (5.14.4)
40
54
  multipart-post (2.1.1)
41
- octokit (4.20.0)
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.3)
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.12.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.4.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.1)
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.1)
75
- ruby2_keywords (0.0.2)
76
- ruby_gpg2 (0.6.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.20.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.2)
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.4
123
+ 2.2.25
data/lib/rake_github.rb CHANGED
@@ -10,4 +10,8 @@ module RakeGithub
10
10
  def self.define_repository_tasks(opts = {}, &block)
11
11
  RakeGithub::TaskSets::Repository.define(opts, &block)
12
12
  end
13
+
14
+ def self.define_release_task(opts = {}, &block)
15
+ RakeGithub::Tasks::Releases::Create.define(opts, &block)
16
+ end
13
17
  end
@@ -1 +1,2 @@
1
1
  require_relative 'tasks/deploy_keys'
2
+ require_relative 'tasks/releases'
@@ -6,9 +6,9 @@ module RakeGithub
6
6
  module DeployKeys
7
7
  class Destroy < RakeFactory::Task
8
8
  default_name :destroy
9
- default_description RakeFactory::DynamicValue.new { |t|
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 RakeFactory::DynamicValue.new { |t|
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 RakeFactory::DynamicValue.new { |t|
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
@@ -1,3 +1,3 @@
1
1
  module RakeGithub
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0.pre.4'
3
3
  end
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.7.0
4
+ version: 0.8.0.pre.4
5
5
  platform: ruby
6
6
  authors:
7
- - Toby Clemson
7
+ - InfraBlocks Maintainers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-02 00:00:00.000000000 Z
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
- - tobyclemson@gmail.com
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:
@@ -259,9 +262,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
262
  version: '2.6'
260
263
  required_rubygems_version: !ruby/object:Gem::Requirement
261
264
  requirements:
262
- - - ">="
265
+ - - ">"
263
266
  - !ruby/object:Gem::Version
264
- version: '0'
267
+ version: 1.3.1
265
268
  requirements: []
266
269
  rubygems_version: 3.0.1
267
270
  signing_key: