cloudstrap 0.47.8.pre → 0.48.0.pre

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 818531945ffc9f9c3db09176937ea322e7060d4e
4
- data.tar.gz: 49d3a75aaf23bb4d79dfae48b619469de7724b7e
3
+ metadata.gz: 9161f77af65087f75fb97234f9f26f391a99f986
4
+ data.tar.gz: d33e309ea99901e6cdfa6f82b86abda1651dcf0a
5
5
  SHA512:
6
- metadata.gz: 0b71abbe44f46e31bf55e67bb5d409dcd4890fccdf6be99eba05201868c830190cde50e63c12a2598e93fe742a62a3a1e792f4f017b666d71ce2f29a9d845fb8
7
- data.tar.gz: bf64e108e866c9999cbffc25925a0e5066e1d39bdeef9de51e30b26ab1d0db19cdfe5835edc7410254bbcb68403377de21ba392d4eee98975fe5d5494d30a29a
6
+ metadata.gz: 2b91af1f9431c530d5f123b3fe51227bd872992d4368349ef6eb2425f50b6b03f38098124f0e419674be71a5ef393284cb2a8acd27b50e732c8e1f2ed760023b
7
+ data.tar.gz: 8192774fbf4f67c273bd12aaa56caa3a90d658f65ee2c0f53bc0a182e510ceb3145decab02b60499a8025f0e277b847b60dfaf8ff697b2abe4841328228b00bb
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tty-table'
4
+ require 'pastel'
5
+
6
+ if ENV['HACKING']
7
+ require_relative '../lib/cloudstrap/cache'
8
+ require_relative '../lib/cloudstrap/config'
9
+ else
10
+ require 'cloudstrap/cache'
11
+ require 'cloudstrap/config'
12
+ end
13
+
14
+ PROGRAM_NAME = File.basename $PROGRAM_NAME
15
+
16
+ config = Cloudstrap::Config.new
17
+ cache = Cloudstrap::Cache.new
18
+
19
+ KEYS = Dir
20
+ .entries(config.cache_path)
21
+ .reject { |entry| %w(. .. .keys).include? entry }
22
+ .map { |key| key.gsub(/^(%[0-9A-F]{2,2})+/, '') }
23
+ .map(&:to_sym)
24
+ .sort
25
+
26
+ table = TTY::Table.new(headers: %w(key value)) do |table|
27
+ KEYS.each { |key| table << [key, cache.get(key)] }
28
+ end
29
+
30
+ puts table.render(STDOUT.tty? ? :unicode : :basic)
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'faraday'
4
+ require 'tty-table'
5
+ require 'pastel'
6
+
3
7
  if ENV['HACKING']
4
8
  require_relative '../lib/cloudstrap'
5
9
  else
6
10
  require 'cloudstrap'
7
11
  end
8
12
 
9
- require 'faraday'
10
- require 'tty-table'
11
- require 'pastel'
12
-
13
13
  CLOUDSTRAP_VERSION = $LOADED_FEATURES
14
14
  .map { |f| f.match %r{cloudstrap-(?<version>[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(\.pre)?)} }
15
15
  .compact
@@ -25,7 +25,7 @@ config = Cloudstrap::Config.new
25
25
  green = Pastel.new.green.detach
26
26
  red = Pastel.new.red.detach
27
27
 
28
- cloudstrap = (CLOUDSTRAP_VERSION.end_with?('pre') ? red : green).call CLOUDSTRAP_VERSION
28
+ cloudstrap = ((CLOUDSTRAP_VERSION.nil? || CLOUDSTRAP_VERSION.end_with?('pre')) ? red : green).call CLOUDSTRAP_VERSION
29
29
  latest = ->(component) { config.send(:latest).send(component) }
30
30
  using = ->(component) { config.send("#{component}_version") }
31
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.47.8.pre
4
+ version: 0.48.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-12 00:00:00.000000000 Z
11
+ date: 2017-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -334,6 +334,7 @@ description:
334
334
  email: chris@olstrom.com
335
335
  executables:
336
336
  - cloudstrap
337
+ - cloudstrap-cache
337
338
  - cloudstrap-config
338
339
  - cloudstrap-dns
339
340
  - cloudstrap-env
@@ -346,6 +347,7 @@ files:
346
347
  - LICENSE.txt
347
348
  - README.org
348
349
  - bin/cloudstrap
350
+ - bin/cloudstrap-cache
349
351
  - bin/cloudstrap-config
350
352
  - bin/cloudstrap-dns
351
353
  - bin/cloudstrap-env