terraspace 0.5.8 → 0.5.9

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
  SHA256:
3
- metadata.gz: ff60ae09b5f5278378d1d0343e68e19bd697825e3206a981fc3023d914b7710a
4
- data.tar.gz: a036994bf09c8ef78323b64b234dd083d438bb63d552444178a611ac05cc886e
3
+ metadata.gz: bc9e2f5079f389bf4c52871ff21d07fd768a72c63b246d770b95c378f0d5a8ad
4
+ data.tar.gz: f8e957d00f64e54a789f2237161a35c8f9cfbb3af903e40c929829c4ca4d4136
5
5
  SHA512:
6
- metadata.gz: 16e8f2ff6676201c697480a8c25f50b32a3a84c6fe7ee18d8517bef1ddf177f86cbbfcf3112e116e7ef93a7cf201e73c924306614a4f8061c9b8c75e13b75be7
7
- data.tar.gz: 1cc236483836d3453216559c2ce378716b5352ddb482ff6ba03f6a4f2a58251b3e6f44f2f6dc56acac0be49ffed7bb683d572a8df5176ca2557165b2b16778eb
6
+ metadata.gz: 2cf81a81351b8dd8134d19ea9e5ff19644c9ef7470d64e2b54d10d9d35fd69fbc2f5da96a6c34f9e1fb547383d0721d30b49e63df6fbd5958c7b88c3d48dd47f
7
+ data.tar.gz: f2e202040a50b4a2123ff8e4e177fda89b9ff04d46ba6b759266ea98b75c12e7258ee3a8f424596718875b074155b01319d60107bccfbb43d75d777abda1b56e
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.5.9] - 2020-12-11
7
+ - [#68](https://github.com/boltops-tools/terraspace/pull/68) require singleton
8
+ - fix graphviz check for format text, improve graphviz install help message
9
+
6
10
  ## [0.5.8] - 2020-12-04
7
11
  - [#67](https://github.com/boltops-tools/terraspace/pull/67) fix find placeholder stack so config/terraform only builds for stacks
8
12
 
@@ -109,13 +109,12 @@ module Terraspace::All
109
109
 
110
110
  # Check if Graphiz is installed and prints a user friendly message if it is not installed.
111
111
  def check_graphviz!
112
+ return if @options[:format] == 'text'
113
+
112
114
  installed = system("type dot > /dev/null 2>&1") # dot is a command that is part of the graphviz package
113
115
  return if installed
114
116
  logger.error "ERROR: It appears that the Graphviz is not installed. Please install it to use the graph command.".color(:red)
115
- if RUBY_PLATFORM =~ /darwin/
116
- logger.error "You can install Graphviz with homebrew:"
117
- logger.error " brew install graphviz"
118
- end
117
+ install_instructions
119
118
  logger.info <<~EOL
120
119
  Also consider:
121
120
 
@@ -125,5 +124,23 @@ module Terraspace::All
125
124
  EOL
126
125
  exit 1
127
126
  end
127
+
128
+ def install_instructions
129
+ installer = if RUBY_PLATFORM =~ /darwin/
130
+ "brew"
131
+ elsif system("type yum > /dev/null 2>&1")
132
+ "yum"
133
+ elsif system("type apt-get > /dev/null 2>&1")
134
+ "apt-get"
135
+ end
136
+
137
+ return unless installer
138
+ logger.error <<~EOL
139
+ You can install Graphviz with:
140
+
141
+ #{installer} install graphviz
142
+
143
+ EOL
144
+ end
128
145
  end
129
146
  end
@@ -1,3 +1,5 @@
1
+ require "singleton"
2
+
1
3
  module Terraspace
2
4
  class App
3
5
  include Singleton
@@ -26,7 +26,7 @@ module Terraspace::CLI::Build
26
26
 
27
27
  # Used by: terraspace build placeholder
28
28
  def find_stack
29
- mod_path = Dir.glob("{app,vendor}/{stacks}/*").last
29
+ mod_path = Dir.glob("{app,vendor}/stacks/*").last
30
30
  unless mod_path
31
31
  logger.info "No stacks found."
32
32
  exit 0
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2020-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport