secret_service 0.1.1 → 0.1.2

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.
@@ -1,27 +1,29 @@
1
- namespace :secret_service do
2
-
3
- def _run_with_prompt(command)
4
- run command do |input, stream, out|
5
- puts out
6
- if stream == :out and out =~ /^Enter/
7
- input.send_data STDIN.gets
8
- end
1
+ def run_with_prompt(command)
2
+ run command do |input, stream, out|
3
+ puts out
4
+ if stream == :out and out =~ /^Enter/
5
+ input.send_data STDIN.gets
9
6
  end
10
7
  end
8
+ end
11
9
 
12
- desc "Store a secret using secret_service"
13
- task :store, :roles => :db, :only => { :primary => true } do
14
- rake = fetch(:rake, "rake")
15
- rails_env = fetch(:rails_env, "production")
10
+ Capistrano::Configuration.instance(:must_exist).load do
11
+ namespace :secret_service do
16
12
 
17
- _run_with_prompt("cd #{current_path} && #{rake} RAILS_ENV=#{rails_env} secret_service:store")
18
- end
13
+ desc "Store a secret using secret_service"
14
+ task :store, :roles => :db, :only => { :primary => true } do
15
+ rake = fetch(:rake, "rake")
16
+ rails_env = fetch(:rails_env, "production")
19
17
 
20
- desc "Show a secret previously stored with secret_service"
21
- task :show, :roles => :db, :only => { :primary => true } do
22
- rake = fetch(:rake, "rake")
23
- rails_env = fetch(:rails_env, "production")
18
+ run_with_prompt("cd #{current_path} && #{rake} RAILS_ENV=#{rails_env} secret_service:store")
19
+ end
20
+
21
+ desc "Show a secret previously stored with secret_service"
22
+ task :show, :roles => :db, :only => { :primary => true } do
23
+ rake = fetch(:rake, "rake")
24
+ rails_env = fetch(:rails_env, "production")
24
25
 
25
- _run_with_prompt("cd #{current_path} && #{rake} RAILS_ENV=#{rails_env} secret_service:show")
26
+ run_with_prompt("cd #{current_path} && #{rake} RAILS_ENV=#{rails_env} secret_service:show")
27
+ end
26
28
  end
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module SecretService
2
- VERSION = "0.1.1" unless defined?(SecretService::VERSION)
2
+ VERSION = "0.1.2" unless defined?(SecretService::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secret_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: