secret_env 0.5.0 → 0.6.0

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
  SHA1:
3
- metadata.gz: da53d177eb5d09cf20c548bdb1e6133f3b3b9bd5
4
- data.tar.gz: 381545548cdfd4ef862c7297c094217de18979d1
3
+ metadata.gz: e0f9c410e4a7453e0d1f528845ccacdc921b1c09
4
+ data.tar.gz: 6e1c381600809de4891b829a3854d9f8fffaae3f
5
5
  SHA512:
6
- metadata.gz: 19ee8fa8dda27709ad24efb0594f3ba0ad7b86a061adeb28007cee1beed5a87e01d94090a15e9c7678f5723d6912b1b007b0f5d3dec5fa05b123f51fb3e09d2c
7
- data.tar.gz: 5aa50c61ab6766be2984edc91a7496574032bc38348e8e9d9021af539ac41c507b7629041ece8055c74d376169f36fa7218284ac4207862be743c4881120bd24
6
+ metadata.gz: 4c29c3f14a1d3e63ebfb7a753f128cea27dbb9a1d198b77960eae50b2eaea61f05dfaedc1d9c9893b85ec4bc1573cf5190f3e2d18311b27609c4fc4e312b5001
7
+ data.tar.gz: c1bdd77882b73f6bcd15fd1a1646b6851a9bdcd93dd2b44b14e04e047ecb78966cdefc522f2e50ae891424e496b269e6f8a0cadfe4fe02a406c5266a9752715e
data/README.md CHANGED
@@ -65,6 +65,10 @@ foo=1
65
65
  bar=2
66
66
  ```
67
67
 
68
+ ## CLI
69
+
70
+ $ secret_env config/secret_env.yml production your_command --option
71
+
68
72
  ## Contributing
69
73
 
70
74
  Bug reports and pull requests are welcome on GitHub at https://github.com/adorechic/secret_env.
data/exe/secret_env CHANGED
@@ -1,3 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "secret_env"
4
+ require 'open3'
5
+ config, env = ARGV.shift(2)
6
+ SecretEnv.load(env: env, secrets_file: config)
7
+ stdin, stdoe, t = Open3.popen2e(*ARGV)
8
+ stdin.close
9
+ stdoe.each do |line|
10
+ puts line
11
+ end
12
+ exit t.value.exitstatus
@@ -1,3 +1,3 @@
1
1
  module SecretEnv
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/secret_env.rb CHANGED
@@ -3,10 +3,8 @@ require 'secret_env/storage'
3
3
  require 'yaml'
4
4
 
5
5
  module SecretEnv
6
- SECRETS_FILE = 'config/secret_env.yml'
7
-
8
- def self.load(env: 'development')
9
- config = YAML.load_file(SECRETS_FILE).fetch(env)
6
+ def self.load(env: 'development', secrets_file: 'config/secret_env.yml')
7
+ config = YAML.load_file(secrets_file).fetch(env)
10
8
 
11
9
  storage = Storage.setup(config['storage'])
12
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secret_env
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - adorechic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.6.10
112
+ rubygems_version: 2.6.12
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: SecretEnv retrieves secrets and export to ENV