rcredstash 0.6.0 → 0.7.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: b93824e08980e91459009d284538674f30024423
4
- data.tar.gz: 34e5e97871003ec2da31e92a96629d5fbd0b3d1c
3
+ metadata.gz: ea3cd7ba405a9a440dc66ddf26379e904c484e94
4
+ data.tar.gz: 23fb203668882a96ea148386e6a5ea35e6652a52
5
5
  SHA512:
6
- metadata.gz: b500d8725b3404cc2deed45a3d0a68e5fc4d4b9383f4310cd4f7856bcdf158b55cfbc8f74428a554c800d0ee9521fbf853cdf041ab1bb7c354e4c8de3ebb7f52
7
- data.tar.gz: e132dd8ff5873cccaa77f72e295c2875ad4b7d36da0eaa62a9db986fa593b3f78a203150d57f1660a4ccc53c47c0c9fea950aa2a5650d2cee8e44d02dddb40b1
6
+ metadata.gz: b61ee691050374e84cb9ad0daa23f2d048c277ffc71ab6c866e4d8edbcabe9a44d079dfeaa6df3f243d79c5166b3a4fa6553ddbfd9ae9fd25d74035313b01b57
7
+ data.tar.gz: cc7ba804a45cce07e2067909195c03a427ae90c9eec031f115cf55ef1f3fcf034a23d35430356a5d5ed74dbcade98d2f4e5733b0c7651b191b6918e8b6544777
data/README.md CHANGED
@@ -32,6 +32,22 @@ CredStash.list
32
32
  CredStash.delete(key)
33
33
  ```
34
34
 
35
+ ### CLI
36
+ rcredstash cli requires an aws credential for aws-sdk such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
37
+
38
+ ```sh
39
+ $ rcredstash help
40
+
41
+ Commands:
42
+ rcredstash delete [key name] # Delete a key
43
+ rcredstash get [key name] # Show a value for key name
44
+ rcredstash help [COMMAND] # Describe available commands or one specific command
45
+ rcredstash list # Show all stored keys
46
+ rcredstash put [key name] # Put a value for key name
47
+ rcredstash setup # Setup credstash repository on DynamoDB
48
+ ```
49
+
50
+
35
51
  ### AWS credentials
36
52
  RCredStash uses [aws-sdk v2](https://github.com/aws/aws-sdk-ruby), so configuration options provided by aws-sdk such as `ENV['AWS_ACCESS_KEY_ID']` and `ENV['AWS_SECRET_ACCESS_KEY']` are available.
37
53
 
@@ -1,3 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "rcredstash"
4
+ require "cred_stash/cli"
5
+
6
+ CredStash::CLI.start(ARGV)
@@ -0,0 +1,34 @@
1
+ require 'thor'
2
+
3
+ module CredStash
4
+ class CLI < Thor
5
+ desc "get [key name]", "Show a value for key name"
6
+ def get(name)
7
+ puts CredStash.get(name)
8
+ end
9
+
10
+ desc "put [key name]", "Put a value for key name"
11
+ def put(name)
12
+ value = Readline.readline("secret value> ")
13
+ CredStash.put(name, value)
14
+ puts "#{name} has stored."
15
+ end
16
+
17
+ desc "list", "Show all stored keys"
18
+ def list
19
+ puts CredStash.list.keys
20
+ end
21
+
22
+ desc "delete [key name]", "Delete a key"
23
+ def delete(name)
24
+ CredStash.delete(name)
25
+ puts "#{name} has deleted."
26
+ end
27
+
28
+ desc "setup", "Setup credstash repository on DynamoDB"
29
+ def setup
30
+ CredStash.setup
31
+ puts "Set up successfully"
32
+ end
33
+ end
34
+ end
@@ -1,3 +1,3 @@
1
1
  module CredStash
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency 'aws-sdk', ">= 2"
23
+ spec.add_dependency 'thor'
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.12"
25
26
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcredstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.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-01-19 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,6 +100,7 @@ files:
86
100
  - lib/cred_stash.rb
87
101
  - lib/cred_stash/cipher.rb
88
102
  - lib/cred_stash/cipher_key.rb
103
+ - lib/cred_stash/cli.rb
89
104
  - lib/cred_stash/config.rb
90
105
  - lib/cred_stash/error.rb
91
106
  - lib/cred_stash/repository.rb
@@ -115,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
130
  version: '0'
116
131
  requirements: []
117
132
  rubyforge_project:
118
- rubygems_version: 2.6.8
133
+ rubygems_version: 2.6.10
119
134
  signing_key:
120
135
  specification_version: 4
121
136
  summary: A Ruby port of CredStash