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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb0baf3ba2651e052ce2259d7495a43c3391575c
4
- data.tar.gz: dcfa81feb089d645cf4a1cf5b8a0121062505d3b
3
+ metadata.gz: a8ac58fbe8958ed29b75df1651a75b6520b34a13
4
+ data.tar.gz: f85c89e3090f72b66b9db4a4dc59cf89e832d700
5
5
  SHA512:
6
- metadata.gz: 4c7b2aa817311f522ee58fe346ead64a76cdcf712f00d50f165057986b536ff63731a12916aca8c4c105c296d249db1d7382fa8a20b9fd2e7d7d27349e97274a
7
- data.tar.gz: 8dda804f8cd2168e84221f6b1ad30b01efb65da85751d1d8ff152b1fe4ac0229d059b5840f27b23e07510807b86db5ae4e2f92972572ac8ac642c4c97d864b8b
6
+ metadata.gz: e542565c50d2f0f9b990b0a4dae4e211b4ec36f5b987421fc33e87f5bc17ed9866d68e51b595eadf13f38da6442d22ba3e7c4fde8ce0f5e33f6a33920e1853a8
7
+ data.tar.gz: a5fdb3ddebdc701b93091cecc75cf266d6c0ea6396047e4b611554cd6f746f0406c9eb58a085b14e8b6daf69906d2dbf786a7be4f35e94af6aef9081bcec10db
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.122'
2
+ VERSION = '0.0.123'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.122
4
+ version: 0.0.123
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister