awful 0.0.122 → 0.0.123
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/dynamodb.rb +8 -0
- data/lib/awful/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ac58fbe8958ed29b75df1651a75b6520b34a13
|
4
|
+
data.tar.gz: f85c89e3090f72b66b9db4a4dc59cf89e832d700
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e542565c50d2f0f9b990b0a4dae4e211b4ec36f5b987421fc33e87f5bc17ed9866d68e51b595eadf13f38da6442d22ba3e7c4fde8ce0f5e33f6a33920e1853a8
|
7
|
+
data.tar.gz: a5fdb3ddebdc701b93091cecc75cf266d6c0ea6396047e4b611554cd6f746f0406c9eb58a085b14e8b6daf69906d2dbf786a7be4f35e94af6aef9081bcec10db
|
data/lib/awful/dynamodb.rb
CHANGED
@@ -67,6 +67,14 @@ module Awful
|
|
67
67
|
dynamodb.describe_table(table_name: name).table.table_status.tap(&method(:puts))
|
68
68
|
end
|
69
69
|
|
70
|
+
desc 'key NAME', 'get hash or range key of named table'
|
71
|
+
method_option :type, aliases: '-t', type: :string, default: :hash, desc: 'type of key to get: hash or range'
|
72
|
+
def key(name)
|
73
|
+
dynamodb.describe_table(table_name: name).table.key_schema.find do |schema|
|
74
|
+
schema.key_type == options[:type].to_s.upcase
|
75
|
+
end.attribute_name.output(&method(:puts))
|
76
|
+
end
|
77
|
+
|
70
78
|
desc 'create_table NAME', 'create table with NAME'
|
71
79
|
def create_table(name, file = nil)
|
72
80
|
opt = load_cfg(options, file)
|
data/lib/awful/version.rb
CHANGED