rake_git_crypt 0.1.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +147 -0
- data/LICENSE.txt +21 -0
- data/README.md +71 -0
- data/Rakefile +143 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/rake_git_crypt/task_sets.rb +1 -0
- data/lib/rake_git_crypt/tasks/init.rb +18 -0
- data/lib/rake_git_crypt/tasks.rb +8 -0
- data/lib/rake_git_crypt/version.rb +5 -0
- data/lib/rake_git_crypt.rb +11 -0
- data/rake_git_crypt.gemspec +59 -0
- metadata +296 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f3511deca635ea9983d386eec2c6dc03cf61c45739ef9c7ae3fbaabebc5740b5
|
4
|
+
data.tar.gz: 18bc1e62cd8df91a3926c897c5988b3812436447a1e0d0d74bde443ad5aec54f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3cfcdf0f6c212588359345cbe11a605dbf319f77eecf8e919c409857d605a0c11973b8ce6d16216d0ec46f1904c0088731deb7791ca54c715e065b9ba9f28e1e
|
7
|
+
data.tar.gz: 30664d8b232bc92a29d4791df84eb3ccf3e81b15b07cfc65b21982851e584c96ba8f644a55260fb46cee44d733e14e0cd2c1adf40998af9d2f3f4ffd91214e4a
|
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],
|
71
|
+
version 1.4, 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
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rake_git_crypt (0.1.0.pre.1)
|
5
|
+
colored2 (~> 3.1)
|
6
|
+
rake_factory (~> 0.23)
|
7
|
+
ruby_git_crypt (= 0.1.0.pre.2)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (7.0.4)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 1.6, < 2)
|
15
|
+
minitest (>= 5.1)
|
16
|
+
tzinfo (~> 2.0)
|
17
|
+
addressable (2.8.1)
|
18
|
+
public_suffix (>= 2.0.2, < 6.0)
|
19
|
+
ast (2.4.2)
|
20
|
+
colored2 (3.1.2)
|
21
|
+
concurrent-ruby (1.1.10)
|
22
|
+
diff-lcs (1.5.0)
|
23
|
+
docile (1.4.0)
|
24
|
+
excon (0.96.0)
|
25
|
+
faraday (2.7.2)
|
26
|
+
faraday-net_http (>= 2.0, < 3.1)
|
27
|
+
ruby2_keywords (>= 0.0.4)
|
28
|
+
faraday-net_http (3.0.2)
|
29
|
+
gem-release (2.2.2)
|
30
|
+
hamster (3.0.0)
|
31
|
+
concurrent-ruby (~> 1.0)
|
32
|
+
i18n (1.12.0)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
|
+
immutable-struct (2.4.1)
|
35
|
+
json (2.6.3)
|
36
|
+
lino (3.1.0)
|
37
|
+
hamster (~> 3.0)
|
38
|
+
open4 (~> 1.3)
|
39
|
+
memfs (1.0.0)
|
40
|
+
minitest (5.17.0)
|
41
|
+
octokit (6.0.1)
|
42
|
+
faraday (>= 1, < 3)
|
43
|
+
sawyer (~> 0.9)
|
44
|
+
open4 (1.3.4)
|
45
|
+
parallel (1.22.1)
|
46
|
+
parser (3.2.0.0)
|
47
|
+
ast (~> 2.4.1)
|
48
|
+
public_suffix (5.0.1)
|
49
|
+
rainbow (3.1.1)
|
50
|
+
rake (13.0.6)
|
51
|
+
rake_circle_ci (0.11.0)
|
52
|
+
colored2 (~> 3.1)
|
53
|
+
excon (~> 0.72)
|
54
|
+
rake_factory (~> 0.23)
|
55
|
+
sshkey (~> 2.0)
|
56
|
+
rake_factory (0.31.0)
|
57
|
+
activesupport (>= 4)
|
58
|
+
rake (~> 13.0)
|
59
|
+
rake_github (0.11.0)
|
60
|
+
colored2 (~> 3.1)
|
61
|
+
octokit (>= 4.16, < 7.0)
|
62
|
+
rake_factory (~> 0.23)
|
63
|
+
sshkey (~> 2.0)
|
64
|
+
rake_gpg (0.18.0)
|
65
|
+
rake_factory (~> 0.23)
|
66
|
+
ruby_gpg2 (~> 0.6)
|
67
|
+
rake_ssh (0.8.0)
|
68
|
+
colored2 (~> 3.1)
|
69
|
+
rake_factory (~> 0.23)
|
70
|
+
sshkey (~> 2.0)
|
71
|
+
regexp_parser (2.6.1)
|
72
|
+
rexml (3.2.5)
|
73
|
+
rspec (3.12.0)
|
74
|
+
rspec-core (~> 3.12.0)
|
75
|
+
rspec-expectations (~> 3.12.0)
|
76
|
+
rspec-mocks (~> 3.12.0)
|
77
|
+
rspec-core (3.12.0)
|
78
|
+
rspec-support (~> 3.12.0)
|
79
|
+
rspec-expectations (3.12.2)
|
80
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
81
|
+
rspec-support (~> 3.12.0)
|
82
|
+
rspec-mocks (3.12.2)
|
83
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
+
rspec-support (~> 3.12.0)
|
85
|
+
rspec-support (3.12.0)
|
86
|
+
rubocop (1.42.0)
|
87
|
+
json (~> 2.3)
|
88
|
+
parallel (~> 1.10)
|
89
|
+
parser (>= 3.1.2.1)
|
90
|
+
rainbow (>= 2.2.2, < 4.0)
|
91
|
+
regexp_parser (>= 1.8, < 3.0)
|
92
|
+
rexml (>= 3.2.5, < 4.0)
|
93
|
+
rubocop-ast (>= 1.24.1, < 2.0)
|
94
|
+
ruby-progressbar (~> 1.7)
|
95
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
96
|
+
rubocop-ast (1.24.1)
|
97
|
+
parser (>= 3.1.1.0)
|
98
|
+
rubocop-rake (0.6.0)
|
99
|
+
rubocop (~> 1.0)
|
100
|
+
rubocop-rspec (2.16.0)
|
101
|
+
rubocop (~> 1.33)
|
102
|
+
ruby-progressbar (1.11.0)
|
103
|
+
ruby2_keywords (0.0.5)
|
104
|
+
ruby_git_crypt (0.1.0.pre.2)
|
105
|
+
immutable-struct (~> 2.4)
|
106
|
+
lino (~> 3.0)
|
107
|
+
ruby_gpg2 (0.10.0)
|
108
|
+
lino (~> 3.0)
|
109
|
+
sawyer (0.9.2)
|
110
|
+
addressable (>= 2.3.5)
|
111
|
+
faraday (>= 0.17.3, < 3)
|
112
|
+
simplecov (0.22.0)
|
113
|
+
docile (~> 1.1)
|
114
|
+
simplecov-html (~> 0.11)
|
115
|
+
simplecov_json_formatter (~> 0.1)
|
116
|
+
simplecov-html (0.12.3)
|
117
|
+
simplecov_json_formatter (0.1.4)
|
118
|
+
sshkey (2.0.0)
|
119
|
+
tzinfo (2.0.5)
|
120
|
+
concurrent-ruby (~> 1.0)
|
121
|
+
unicode-display_width (2.4.2)
|
122
|
+
|
123
|
+
PLATFORMS
|
124
|
+
arm64-darwin-21
|
125
|
+
x86_64-darwin-19
|
126
|
+
x86_64-darwin-21
|
127
|
+
x86_64-linux
|
128
|
+
|
129
|
+
DEPENDENCIES
|
130
|
+
activesupport
|
131
|
+
bundler
|
132
|
+
gem-release
|
133
|
+
memfs
|
134
|
+
rake
|
135
|
+
rake_circle_ci
|
136
|
+
rake_git_crypt!
|
137
|
+
rake_github
|
138
|
+
rake_gpg
|
139
|
+
rake_ssh
|
140
|
+
rspec
|
141
|
+
rubocop
|
142
|
+
rubocop-rake
|
143
|
+
rubocop-rspec
|
144
|
+
simplecov
|
145
|
+
|
146
|
+
BUNDLED WITH
|
147
|
+
2.4.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2023 InfraBlocks Maintainers
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# RakeGitCrypt
|
2
|
+
|
3
|
+
Rake tasks for interacting with git-crypt.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'rake_git_crypt'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install rake_git_crypt
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write docs.
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
28
|
+
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
29
|
+
prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
32
|
+
release a new version, update the version number in `version.rb`, and then run
|
33
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
34
|
+
git commits and tags, and push the `.gem` file to
|
35
|
+
[rubygems.org](https://rubygems.org).
|
36
|
+
|
37
|
+
### Managing CircleCI keys
|
38
|
+
|
39
|
+
To encrypt a GPG key for use by CircleCI:
|
40
|
+
|
41
|
+
```bash
|
42
|
+
openssl aes-256-cbc \
|
43
|
+
-e \
|
44
|
+
-md sha1 \
|
45
|
+
-in ./config/secrets/ci/gpg.private \
|
46
|
+
-out ./.circleci/gpg.private.enc \
|
47
|
+
-k "<passphrase>"
|
48
|
+
```
|
49
|
+
|
50
|
+
To check decryption is working correctly:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
openssl aes-256-cbc \
|
54
|
+
-d \
|
55
|
+
-md sha1 \
|
56
|
+
-in ./.circleci/gpg.private.enc \
|
57
|
+
-k "<passphrase>"
|
58
|
+
```
|
59
|
+
|
60
|
+
## Contributing
|
61
|
+
|
62
|
+
Bug reports and pull requests are welcome on GitHub at
|
63
|
+
https://github.com/infrablocks/rake_git_crypt. This project is intended to be a
|
64
|
+
safe, welcoming space for collaboration, and contributors are expected to
|
65
|
+
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
|
66
|
+
conduct.
|
67
|
+
|
68
|
+
## License
|
69
|
+
|
70
|
+
The gem is available as open source under the terms of the
|
71
|
+
[MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
require 'rake_circle_ci'
|
5
|
+
require 'rake_github'
|
6
|
+
require 'rake_ssh'
|
7
|
+
require 'rake_gpg'
|
8
|
+
require 'securerandom'
|
9
|
+
require 'rspec/core/rake_task'
|
10
|
+
require 'rubocop/rake_task'
|
11
|
+
|
12
|
+
task default: %i[
|
13
|
+
library:fix
|
14
|
+
test:unit
|
15
|
+
]
|
16
|
+
|
17
|
+
namespace :encryption do
|
18
|
+
namespace :directory do
|
19
|
+
desc 'Ensure CI secrets directory exists.'
|
20
|
+
task :ensure do
|
21
|
+
FileUtils.mkdir_p('config/secrets/ci')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
namespace :passphrase do
|
26
|
+
desc 'Generate encryption passphrase used by CI.'
|
27
|
+
task generate: ['directory:ensure'] do
|
28
|
+
File.write('config/secrets/ci/encryption.passphrase',
|
29
|
+
SecureRandom.base64(36))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
namespace :keys do
|
35
|
+
namespace :deploy do
|
36
|
+
RakeSSH.define_key_tasks(
|
37
|
+
path: 'config/secrets/ci/',
|
38
|
+
comment: 'maintainers@infrablocks.io'
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
namespace :gpg do
|
43
|
+
RakeGPG.define_generate_key_task(
|
44
|
+
output_directory: 'config/secrets/ci',
|
45
|
+
name_prefix: 'gpg',
|
46
|
+
owner_name: 'InfraBlocks Maintainers',
|
47
|
+
owner_email: 'maintainers@infrablocks.io',
|
48
|
+
owner_comment: 'rake_git_crypt CI Key'
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
namespace :secrets do
|
54
|
+
desc 'Regenerate all generatable secrets.'
|
55
|
+
task regenerate: %w[
|
56
|
+
encryption:passphrase:generate
|
57
|
+
keys:deploy:generate
|
58
|
+
keys:gpg:generate
|
59
|
+
]
|
60
|
+
end
|
61
|
+
|
62
|
+
RuboCop::RakeTask.new
|
63
|
+
|
64
|
+
namespace :library do
|
65
|
+
desc 'Run all checks of the library'
|
66
|
+
task check: [:rubocop]
|
67
|
+
|
68
|
+
desc 'Attempt to automatically fix issues with the library'
|
69
|
+
task fix: [:'rubocop:autocorrect_all']
|
70
|
+
end
|
71
|
+
|
72
|
+
namespace :test do
|
73
|
+
RSpec::Core::RakeTask.new(:unit)
|
74
|
+
end
|
75
|
+
|
76
|
+
RakeCircleCI.define_project_tasks(
|
77
|
+
namespace: :circle_ci,
|
78
|
+
project_slug: 'github/infrablocks/rake_git_crypt'
|
79
|
+
) do |t|
|
80
|
+
circle_ci_config =
|
81
|
+
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
82
|
+
|
83
|
+
t.api_token = circle_ci_config['circle_ci_api_token']
|
84
|
+
t.environment_variables = {
|
85
|
+
ENCRYPTION_PASSPHRASE:
|
86
|
+
File.read('config/secrets/ci/encryption.passphrase')
|
87
|
+
.chomp
|
88
|
+
}
|
89
|
+
t.checkout_keys = []
|
90
|
+
t.ssh_keys = [
|
91
|
+
{
|
92
|
+
hostname: 'github.com',
|
93
|
+
private_key: File.read('config/secrets/ci/ssh.private')
|
94
|
+
}
|
95
|
+
]
|
96
|
+
end
|
97
|
+
|
98
|
+
RakeGithub.define_repository_tasks(
|
99
|
+
namespace: :github,
|
100
|
+
repository: 'infrablocks/rake_git_crypt'
|
101
|
+
) do |t, args|
|
102
|
+
github_config =
|
103
|
+
YAML.load_file('config/secrets/github/config.yaml')
|
104
|
+
|
105
|
+
t.access_token = github_config['github_personal_access_token']
|
106
|
+
t.deploy_keys = [
|
107
|
+
{
|
108
|
+
title: 'CircleCI',
|
109
|
+
public_key: File.read('config/secrets/ci/ssh.public')
|
110
|
+
}
|
111
|
+
]
|
112
|
+
t.branch_name = args.branch_name
|
113
|
+
t.commit_message = args.commit_message
|
114
|
+
end
|
115
|
+
|
116
|
+
namespace :pipeline do
|
117
|
+
desc 'Prepare CircleCI Pipeline'
|
118
|
+
task prepare: %i[
|
119
|
+
circle_ci:env_vars:ensure
|
120
|
+
circle_ci:checkout_keys:ensure
|
121
|
+
circle_ci:ssh_keys:ensure
|
122
|
+
github:deploy_keys:ensure
|
123
|
+
]
|
124
|
+
end
|
125
|
+
|
126
|
+
namespace :version do
|
127
|
+
desc 'Bump version for specified type (pre, major, minor, patch)'
|
128
|
+
task :bump, [:type] do |_, args|
|
129
|
+
bump_version_for(args.type)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
desc 'Release gem'
|
134
|
+
task :release do
|
135
|
+
sh 'gem release --tag --push'
|
136
|
+
end
|
137
|
+
|
138
|
+
def bump_version_for(version_type)
|
139
|
+
sh "gem bump --version #{version_type} " \
|
140
|
+
'&& bundle install ' \
|
141
|
+
'&& export LAST_MESSAGE="$(git log -1 --pretty=%B)" ' \
|
142
|
+
'&& git commit -a --amend -m "${LAST_MESSAGE} [ci skip]"'
|
143
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'rake_git_crypt'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# frozen_string_literal: true
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake_factory'
|
4
|
+
require 'ruby_git_crypt'
|
5
|
+
|
6
|
+
module RakeGitCrypt
|
7
|
+
module Tasks
|
8
|
+
class Init < RakeFactory::Task
|
9
|
+
default_name :init
|
10
|
+
default_description 'Initialise git-crypt.'
|
11
|
+
|
12
|
+
action do |_task|
|
13
|
+
puts('Initialising git-crypt...')
|
14
|
+
RubyGitCrypt.init
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake_git_crypt/tasks'
|
4
|
+
require 'rake_git_crypt/task_sets'
|
5
|
+
require 'rake_git_crypt/version'
|
6
|
+
|
7
|
+
module RakeGitCrypt
|
8
|
+
def self.define_init_task(opts = {}, &block)
|
9
|
+
RakeGitCrypt::Tasks::Init.define(opts, &block)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'rake_git_crypt/version'
|
6
|
+
|
7
|
+
files = %w[
|
8
|
+
bin
|
9
|
+
lib
|
10
|
+
CODE_OF_CONDUCT.md
|
11
|
+
rake_git_crypt.gemspec
|
12
|
+
Gemfile
|
13
|
+
LICENSE.txt
|
14
|
+
Rakefile
|
15
|
+
README.md
|
16
|
+
]
|
17
|
+
|
18
|
+
Gem::Specification.new do |spec|
|
19
|
+
spec.name = 'rake_git_crypt'
|
20
|
+
spec.version = RakeGitCrypt::VERSION
|
21
|
+
spec.authors = ['InfraBlocks Maintainers']
|
22
|
+
spec.email = ['maintainers@infrablocks.io']
|
23
|
+
|
24
|
+
spec.summary = 'Rake tasks for interacting with git-crypt.'
|
25
|
+
spec.description =
|
26
|
+
'Allows initialising, locking, unlocking and managing users for git-crypt.'
|
27
|
+
spec.homepage = 'https://github.com/infrablocks/rake_git_crypt'
|
28
|
+
spec.license = 'MIT'
|
29
|
+
|
30
|
+
spec.files = `git ls-files -z`.split("\x0").select do |f|
|
31
|
+
f.match(/^(#{files.map { |g| Regexp.escape(g) }.join('|')})/)
|
32
|
+
end
|
33
|
+
spec.bindir = 'exe'
|
34
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
+
spec.require_paths = ['lib']
|
36
|
+
|
37
|
+
spec.required_ruby_version = '>= 2.7'
|
38
|
+
|
39
|
+
spec.add_dependency 'colored2', '~> 3.1'
|
40
|
+
spec.add_dependency 'rake_factory', '~> 0.23'
|
41
|
+
spec.add_dependency 'ruby_git_crypt', '0.1.0.pre.2'
|
42
|
+
|
43
|
+
spec.add_development_dependency 'activesupport'
|
44
|
+
spec.add_development_dependency 'bundler'
|
45
|
+
spec.add_development_dependency 'gem-release'
|
46
|
+
spec.add_development_dependency 'memfs'
|
47
|
+
spec.add_development_dependency 'rake'
|
48
|
+
spec.add_development_dependency 'rake_circle_ci'
|
49
|
+
spec.add_development_dependency 'rake_github'
|
50
|
+
spec.add_development_dependency 'rake_gpg'
|
51
|
+
spec.add_development_dependency 'rake_ssh'
|
52
|
+
spec.add_development_dependency 'rspec'
|
53
|
+
spec.add_development_dependency 'rubocop'
|
54
|
+
spec.add_development_dependency 'rubocop-rake'
|
55
|
+
spec.add_development_dependency 'rubocop-rspec'
|
56
|
+
spec.add_development_dependency 'simplecov'
|
57
|
+
|
58
|
+
spec.metadata['rubygems_mfa_required'] = 'false'
|
59
|
+
end
|
metadata
ADDED
@@ -0,0 +1,296 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rake_git_crypt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0.pre.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- InfraBlocks Maintainers
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-01-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: colored2
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake_factory
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.23'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.23'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ruby_git_crypt
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.0.pre.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.0.pre.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: gem-release
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: memfs
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake_circle_ci
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake_github
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rake_gpg
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rake_ssh
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rspec
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rubocop
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rubocop-rake
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rubocop-rspec
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: simplecov
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
description: Allows initialising, locking, unlocking and managing users for git-crypt.
|
252
|
+
email:
|
253
|
+
- maintainers@infrablocks.io
|
254
|
+
executables: []
|
255
|
+
extensions: []
|
256
|
+
extra_rdoc_files: []
|
257
|
+
files:
|
258
|
+
- CODE_OF_CONDUCT.md
|
259
|
+
- Gemfile
|
260
|
+
- Gemfile.lock
|
261
|
+
- LICENSE.txt
|
262
|
+
- README.md
|
263
|
+
- Rakefile
|
264
|
+
- bin/console
|
265
|
+
- bin/setup
|
266
|
+
- lib/rake_git_crypt.rb
|
267
|
+
- lib/rake_git_crypt/task_sets.rb
|
268
|
+
- lib/rake_git_crypt/tasks.rb
|
269
|
+
- lib/rake_git_crypt/tasks/init.rb
|
270
|
+
- lib/rake_git_crypt/version.rb
|
271
|
+
- rake_git_crypt.gemspec
|
272
|
+
homepage: https://github.com/infrablocks/rake_git_crypt
|
273
|
+
licenses:
|
274
|
+
- MIT
|
275
|
+
metadata:
|
276
|
+
rubygems_mfa_required: 'false'
|
277
|
+
post_install_message:
|
278
|
+
rdoc_options: []
|
279
|
+
require_paths:
|
280
|
+
- lib
|
281
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '2.7'
|
286
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
|
+
requirements:
|
288
|
+
- - ">"
|
289
|
+
- !ruby/object:Gem::Version
|
290
|
+
version: 1.3.1
|
291
|
+
requirements: []
|
292
|
+
rubygems_version: 3.1.6
|
293
|
+
signing_key:
|
294
|
+
specification_version: 4
|
295
|
+
summary: Rake tasks for interacting with git-crypt.
|
296
|
+
test_files: []
|