terraspace 2.1.4 → 2.1.5

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: 2409bdde16554e4640220d326b2905ebef223d15b06a9ee92e679b8e4da5d228
4
- data.tar.gz: 2aac87334644fdb9c7d0d1de547796a8d4719b0c090d9be506fc99494de2ab87
3
+ metadata.gz: 786aaa7595dab99d8ffb03635a1bbdac8ac8f05f9bf8d54ac233df032e2656e8
4
+ data.tar.gz: bdc2ac26c76de54170a7627b9437e4a08535de61a81d868e0b29c8606db80c7a
5
5
  SHA512:
6
- metadata.gz: a3579aef360d7557f69eb4f5db1c3e548b9f8fe788f8bb4a2b13b3e473f3ab0ae6e1d9c0737b7f1e46732b0b81f1b20f7a487baf3d08d936644fc6abb4307448
7
- data.tar.gz: cedfeb838b20c0c5e4dbf5cc8d9140013c1f8309c43c1e665a85fd375e65310d20e25f837cfa77748c2ccb1a7edc8483427b3ffd3b850cfa1e596d5a4c7d157e
6
+ metadata.gz: 2f57094e1b29721f0948e1e94ac264cafa2b57dde3c55e4d5c5807cfff5c4ebf5ef044f8ca8a2b1132be13294c03f5a350ccc70db6fc4642226445fc4346c9c1
7
+ data.tar.gz: 8b700ec6b2543b0388d6be8989cee3bdeb14e814b927c93b6aa6855a00e31cf6117587d8300cf875b44771bd24e4d5a6aa0d260456f453a8ee73625cefa32a91
data/CHANGELOG.md CHANGED
@@ -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
+ ## [2.1.5] - 2022-07-21
7
+ - [#255](https://github.com/boltops-tools/terraspace/pull/255) dont compute git info when not cloud not enabled and warn message improvement
8
+ - pin terraspace to major version in initially generated Gemfile
9
+
6
10
  ## [2.1.4] - 2022-07-16
7
11
  - [#252](https://github.com/boltops-tools/terraspace/pull/252) puts friendlier user message with terraspace force_unlock suggestion
8
12
  - [#253](https://github.com/boltops-tools/terraspace/pull/253) azure repo local git support
@@ -13,7 +13,8 @@ class Terraspace::CLI::New
13
13
 
14
14
  def gem_line(name)
15
15
  if name == "terraspace"
16
- %Q|gem "#{name}", '~> #{Terraspace::VERSION}'|
16
+ major_version = Terraspace::VERSION.split('.').first
17
+ %Q|gem "#{name}", '~> #{major_version}'|
17
18
  else
18
19
  %Q|gem "#{name}"|
19
20
  end
@@ -46,6 +46,7 @@ class Terraspace::Cloud::Vcs
46
46
  # pr_url
47
47
  #
48
48
  def vcs_vars
49
+ return {} unless Terraspace.cloud?
49
50
  ci_env = CiEnv.new
50
51
  local_git = LocalGit.new
51
52
  local_env = LocalEnv.new
@@ -1,7 +1,7 @@
1
1
  class Terraspace::Cloud::Vcs
2
2
  class LocalGit < Base
3
3
  def vars
4
- if git_repo? && git_installed?
4
+ if git_repo? && git_installed? && host
5
5
  provider_vars = vcs_class ? vcs_class.new(base_vars, git_url).vars : {}
6
6
  base_vars.merge(provider_vars).compact # remove items with nil values
7
7
  else
@@ -36,6 +36,15 @@ class Terraspace::Cloud::Vcs
36
36
  return nil if git_url.blank?
37
37
  uri = URI(git_url)
38
38
  "#{uri.scheme}://#{uri.host}"
39
+ rescue URI::InvalidURIError => e
40
+ logger.info "WARN: #{e.class} #{e.message}".color(:yellow)
41
+ logger.info <<~EOL
42
+ Unable to get the host info from your local .git/config
43
+ Will not be able to determine local git info.
44
+ If possible, it would be a useful to provide the remote.url in your .git/config
45
+ as an issue report or email to improve help improve this logic.
46
+ EOL
47
+ nil
39
48
  end
40
49
 
41
50
  def full_repo
@@ -1,3 +1,3 @@
1
1
  module Terraspace
2
- VERSION = "2.1.4"
2
+ VERSION = "2.1.5"
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: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-16 00:00:00.000000000 Z
11
+ date: 2022-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport