terraspace 0.5.2 → 0.5.3

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
  SHA256:
3
- metadata.gz: f6a2a88fa818f4181306424fffdba0416c2df409e464b632ea941e761b8ed275
4
- data.tar.gz: eaf2ce61be5ff4b72f01e6f4ca9da7eb4ee573f42e5865319a90630659544c2e
3
+ metadata.gz: 3046cd50c2a592878bc84dce2fdf21f00fbcf93e4a4fd47a57fe59fbab87adf5
4
+ data.tar.gz: 154ec374284a4758b3e45111653e67d7540ad0ed02661cabd2b5dfa1f79ad35c
5
5
  SHA512:
6
- metadata.gz: b6b38903334e7855e19517ec79059dd9887d85aa44819ed811af0deedaae8fbed5d8502546e675302c786604a7c110313a27b312a5489cff26071a9c784e8bd0
7
- data.tar.gz: f117135d46f25c238e89a459666ade7fe4ef944726abae05fe9af4e6101e42198d5f91d39e06f42bfbb20f987f172ac4b677d08e3bf66c84272c0746751fdcfe
6
+ metadata.gz: ab3def1c9c10a952aef42cbea27de2c645627c69af0ae452baceef36c15ed6f87abd43ab2cda16b0d1f76bc0080a50eb75d802ef6f540e77c13a7796a46ba78f
7
+ data.tar.gz: 2b6e9314e91cd27ef3e19e3a827006dbc081ae8a7ad0d38da445482bc503f978d38575470836f91b1a9a10799fb707d8dacb895818b94a513e46a64f14cbf1da
@@ -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.3] - 2020-11-27
7
+ - [#60](https://github.com/boltops-tools/terraspace/pull/60) fix terraspace check_setup, use type and allow to run outside project
8
+ - improve terraform is not installed message
9
+
6
10
  ## [0.5.2] - 2020-11-27
7
11
  - [#59](https://github.com/boltops-tools/terraspace/pull/59) only run bundler/setup within terraspace project and check standalone install
8
12
  - fix terraspace help
@@ -17,7 +17,7 @@ class Terraspace::CLI
17
17
  puts "Detected #{terraform_version_message}"
18
18
  check_required_version!
19
19
  else
20
- puts "Terraform not installed. Unable to detect a terraform command. Please double check that terraform is installed."
20
+ puts terraform_is_not_installed
21
21
  exit 1
22
22
  end
23
23
  end
@@ -38,9 +38,16 @@ class Terraspace::CLI
38
38
  ARGV[0] == "check_setup"
39
39
  end
40
40
 
41
+ def terraform_is_not_installed
42
+ <<~EOL
43
+ Terraform not installed. Unable to detect a terraform command. Please double check that terraform is installed.
44
+ See: https://terraform.cloud/docs/install/terraform/
45
+ EOL
46
+ end
47
+
41
48
  def ok?
42
49
  unless terraform_bin
43
- puts "Terraform not installed. Unable to detect a terraform command. Please double check that terraform is installed."
50
+ puts terraform_is_not_installed
44
51
  exit 1
45
52
  end
46
53
 
@@ -57,7 +64,8 @@ class Terraspace::CLI
57
64
  end
58
65
 
59
66
  def terraform_bin
60
- bin_path = `which terraform 2>&1`.strip
67
+ out = `type terraform 2>&1`.strip
68
+ bin_path = out.match(/is (.*)/)[1]
61
69
  bin_path if $?.success?
62
70
  end
63
71
  memoize :terraform_bin
@@ -94,7 +94,7 @@ module Terraspace
94
94
  def check_project!(command_name)
95
95
  return if subcommand?
96
96
  return if command_name.nil?
97
- return if %w[-h -v completion completion_script help new test version].include?(command_name)
97
+ return if %w[-h -v check_setup completion completion_script help new test version].include?(command_name)
98
98
  return if File.exist?("#{Terraspace.root}/config/app.rb")
99
99
  logger.error "ERROR: It doesnt look like this is a terraspace project. Are you sure you are in a terraspace project?".color(:red)
100
100
  ENV['TS_TEST'] ? raise : exit(1)
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen