secrets_cli 1.5.0 → 1.6.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/README.md +15 -3
- data/lib/secrets_cli/vault/pull.rb +6 -1
- data/lib/secrets_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8864c1b4454dfc4f453aef217c0709be35697347
|
4
|
+
data.tar.gz: 52dac7597cd7ee33afc8ea6b8f5676cd48f7e2b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e16b34330c0f5bd1baff5672536d91a300fab81fb1cb2dba66d5247de5c16a7090bca9156d4f05838d718998116ef9cebb93712b4fc92d3adb9bdb8e6eeed18
|
7
|
+
data.tar.gz: 9f8bc89e94bb21bebc35cba307b4383d38a779cb9cf85769b8e3572b765c48cbadfd321d47441ed393d805764a0c6991e4071ef593044f9a523c15e4c21640fd
|
data/README.md
CHANGED
@@ -76,13 +76,21 @@ Environment is `development` by default, but it can be overwriten by passing `--
|
|
76
76
|
|
77
77
|
$ secrets read
|
78
78
|
|
79
|
-
This will
|
79
|
+
This will read development secrets from the vault.
|
80
|
+
|
81
|
+
To read secrets from a different environment, use the `-e` flag:
|
82
|
+
|
83
|
+
$ secrets read -e production
|
80
84
|
|
81
85
|
### Pull
|
82
86
|
|
83
87
|
$ secrets pull
|
84
88
|
|
85
|
-
This will pull from vault and write to your secrets file.
|
89
|
+
This will pull from vault and write to your secrets file. The deafult file it will pull is the development one.
|
90
|
+
|
91
|
+
To pull from a different environment, also supply the `-e` flag and the `-f` flag for the file path:
|
92
|
+
|
93
|
+
$ secrets pull -e production -f config/application.production.yml
|
86
94
|
|
87
95
|
### Push
|
88
96
|
|
@@ -90,6 +98,10 @@ This will pull from vault and write to your secrets file.
|
|
90
98
|
|
91
99
|
This will push from your secrets file to vault.
|
92
100
|
|
101
|
+
The same flags apply for pushing as for pulling:
|
102
|
+
|
103
|
+
$ secrets push -e production -f config/application.production.yml
|
104
|
+
|
93
105
|
## Development
|
94
106
|
|
95
107
|
After checking out the storage_key, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -98,7 +110,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
98
110
|
|
99
111
|
## Contributing
|
100
112
|
|
101
|
-
Bug
|
113
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/infinum/secrets_cli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
102
114
|
|
103
115
|
|
104
116
|
## License
|
@@ -29,7 +29,12 @@ module SecretsCli
|
|
29
29
|
|
30
30
|
def write(secrets)
|
31
31
|
print_verbose("Writing to #{secrets_file}")
|
32
|
-
File.open(
|
32
|
+
File.open(secrets_path, 'w') { |file| file.write(secrets) }
|
33
|
+
File.chmod(0600, secrets_path)
|
34
|
+
end
|
35
|
+
|
36
|
+
def secrets_path
|
37
|
+
@secrets_path ||= File.join(secrets_dir, secrets_file)
|
33
38
|
end
|
34
39
|
end
|
35
40
|
end
|
data/lib/secrets_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secrets_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|