credman 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +68 -11
- data/lib/credman/commands.rb +1 -1
- data/lib/credman/list.rb +8 -1
- data/lib/credman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6388da4cf0f1f8567e5a14e214e1ed7db9143307d836286050a91fbeeaf03f16
|
4
|
+
data.tar.gz: 3a8b0e4e839371279e819463c659898556f81d171ba980da006b459f4e7812f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 605cb0d66f1a5c7889325e80ae3de4f604ab6958a0c08ceef401f35db8b6378d949030d4f58502ce91fe699563a206ffb7dac418315732d544b0d2eecf3cb262
|
7
|
+
data.tar.gz: 9cd6975ad0f9a1ebdfa69fac1807a27217a0a0fce7c6ebf66ee07c804e4a38e18631c6a0def1732fc4d5d61a817fb65edd62f48a225f875400795ca6b2d2d209
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,28 +1,85 @@
|
|
1
|
-
#
|
1
|
+
# Credman
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Handy console command for developers to manage Rails credentials.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
10
8
|
|
11
9
|
```ruby
|
12
|
-
|
10
|
+
group :development do
|
11
|
+
gem 'credman'
|
12
|
+
end
|
13
13
|
```
|
14
14
|
|
15
|
-
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
List of all commands:
|
16
18
|
|
17
|
-
|
19
|
+
### credman help
|
20
|
+
```
|
21
|
+
bundle exec credman
|
22
|
+
or
|
23
|
+
bundle exec credman help
|
24
|
+
or
|
25
|
+
bundle exec credman usage
|
26
|
+
```
|
18
27
|
|
19
|
-
|
28
|
+
Details of any command:
|
20
29
|
|
21
|
-
|
30
|
+
```
|
31
|
+
bundle exec credman set -h
|
32
|
+
```
|
22
33
|
|
23
|
-
|
34
|
+
### credman list
|
35
|
+
List all your keys for all environments.
|
36
|
+
|
37
|
+
```
|
38
|
+
bundle exec credman list
|
39
|
+
```
|
40
|
+
|
41
|
+
### credman get
|
42
|
+
Getting a particular key's values.
|
43
|
+
|
44
|
+
```
|
45
|
+
bundle exec credman get google.maps.api_key github.private_key
|
46
|
+
```
|
47
|
+
|
48
|
+
### credman set
|
49
|
+
|
50
|
+
Add/change a value for a particular key. `-e` attribute is mandatory for this command.
|
51
|
+
|
52
|
+
|
53
|
+
```
|
54
|
+
bundle exec credman set new_service.super_key new_secret_value -e development,test,staging,production
|
55
|
+
```
|
56
|
+
|
57
|
+
### credman delete
|
58
|
+
|
59
|
+
Delete for keys. `-e` attribute is mandatory for this command.
|
60
|
+
|
61
|
+
```
|
62
|
+
bundle exec credman delete new_service.super_key new_service.another_key -e development,test,staging,production
|
63
|
+
```
|
64
|
+
|
65
|
+
### credman diff
|
66
|
+
|
67
|
+
Shows all keys changed compared with `heroku` branch by default. You can specify any branch from origin you want to. For example `bin/earl diff my_branch`
|
68
|
+
|
69
|
+
```
|
70
|
+
> bundle exec credman diff
|
71
|
+
development:
|
72
|
+
new_service.super_key: ADDED: "new_secret_value"
|
73
|
+
test:
|
74
|
+
new_service.super_key: ADDED: "new_secret_value"
|
75
|
+
staging:
|
76
|
+
new_service.super_key: ADDED: "new_secret_value"
|
77
|
+
production:
|
78
|
+
new_service.super_key: ADDED: "new_secret_value"
|
79
|
+
```
|
24
80
|
|
25
|
-
|
81
|
+
### credman conflicts
|
82
|
+
Run it if you have merge conflicts in `configs/credentials/*.yml.enc`. That interactive tool will help you resolve the conflict.
|
26
83
|
|
27
84
|
## Development
|
28
85
|
|
data/lib/credman/commands.rb
CHANGED
data/lib/credman/list.rb
CHANGED
@@ -5,7 +5,14 @@ module Credman
|
|
5
5
|
puts pastel.green("#{env}:")
|
6
6
|
|
7
7
|
config.each do |key, value|
|
8
|
-
|
8
|
+
if value.is_a?(Hash)
|
9
|
+
key_path = [key]
|
10
|
+
else
|
11
|
+
value = {key => value}
|
12
|
+
key_path = []
|
13
|
+
end
|
14
|
+
|
15
|
+
deep_print_key_and_value(value, key_path)
|
9
16
|
end
|
10
17
|
end
|
11
18
|
end
|
data/lib/credman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: credman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Andronov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|