mux_tf 0.2.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/tf_current +10 -3
- data/exe/tf_mux +10 -3
- data/exe/tf_plan_summary +10 -3
- data/lib/deps.rb +5 -0
- data/lib/mux_tf.rb +28 -25
- data/lib/mux_tf/cli/current.rb +92 -65
- data/lib/mux_tf/cli/mux.rb +47 -24
- data/lib/mux_tf/cli/plan_summary.rb +20 -246
- data/lib/mux_tf/plan_formatter.rb +100 -52
- data/lib/mux_tf/plan_summary_handler.rb +258 -0
- data/lib/mux_tf/terraform_helpers.rb +30 -29
- data/lib/mux_tf/tmux.rb +13 -13
- data/lib/mux_tf/version.rb +1 -1
- data/lib/mux_tf/version_check.rb +6 -6
- data/lib/mux_tf/yaml_cache.rb +1 -1
- data/mux_tf.gemspec +24 -25
- metadata +4 -7
- data/.gitignore +0 -10
- data/Gemfile +0 -8
- data/LICENSE.txt +0 -21
- data/README.md +0 -52
- data/Rakefile +0 -4
data/lib/mux_tf/version.rb
CHANGED
data/lib/mux_tf/version_check.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
module MuxTf
|
2
2
|
module VersionCheck
|
3
3
|
def has_updates?
|
4
|
-
current_gem_version < latest_gem_version
|
4
|
+
current_gem_version < latest_gem_version
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def latest_gem_version
|
8
|
-
value = cache.fetch("latest_gem_version")
|
8
|
+
value = cache.fetch("latest_gem_version") {
|
9
9
|
fetcher = Gem::SpecFetcher.fetcher
|
10
10
|
dependency = Gem::Dependency.new "mux_tf"
|
11
11
|
remotes, = fetcher.search_for_dependency dependency
|
12
|
-
remotes.map(&:first).map(&:version).
|
13
|
-
|
12
|
+
remotes.map(&:first).map(&:version).max.to_s
|
13
|
+
}
|
14
14
|
|
15
15
|
Gem::Version.new(value)
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def current_gem_version
|
19
19
|
Gem::Version.new(MuxTf::VERSION)
|
20
20
|
end
|
data/lib/mux_tf/yaml_cache.rb
CHANGED
data/mux_tf.gemspec
CHANGED
@@ -1,40 +1,39 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative "lib/mux_tf/version"
|
4
|
+
require "rake"
|
4
5
|
|
5
6
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
7
|
+
spec.name = "mux_tf"
|
8
|
+
spec.version = MuxTf::VERSION
|
9
|
+
spec.authors = ["Piotr Banasik"]
|
10
|
+
spec.email = ["piotr@jane.app"]
|
10
11
|
|
11
|
-
spec.summary
|
12
|
+
spec.summary = "Terraform Multiplexing Scripts"
|
12
13
|
# spec.description = 'TODO: Write a longer description or delete this line.'
|
13
|
-
spec.homepage
|
14
|
-
spec.license
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(
|
14
|
+
spec.homepage = "https://github.com/piotrb/mux_tf"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
16
17
|
|
17
18
|
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
18
19
|
|
19
|
-
spec.metadata[
|
20
|
-
spec.metadata[
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
21
22
|
# spec.metadata['changelog_uri'] = "TODO: Put your gem's CHANGELOG.md URL here."
|
22
23
|
|
23
24
|
# Specify which files should be added to the gem when it is released.
|
24
25
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
-
spec.files =
|
26
|
-
|
27
|
-
|
28
|
-
spec.
|
29
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
-
spec.require_paths = ['lib']
|
26
|
+
spec.files = Rake::FileList["exe/*", "lib/**/*.rb", "*.gemspec"]
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
31
30
|
|
32
|
-
spec.add_dependency
|
33
|
-
spec.add_dependency
|
34
|
-
spec.add_dependency
|
35
|
-
spec.add_dependency
|
36
|
-
spec.add_dependency
|
37
|
-
spec.add_dependency
|
38
|
-
spec.add_dependency
|
39
|
-
spec.add_dependency
|
31
|
+
spec.add_dependency "activesupport"
|
32
|
+
spec.add_dependency "dotenv"
|
33
|
+
spec.add_dependency "paint"
|
34
|
+
spec.add_dependency "pastel"
|
35
|
+
spec.add_dependency "piotrb_cli_utils", "~> 0.1.0"
|
36
|
+
spec.add_dependency "stateful_parser", "~> 0.1.1"
|
37
|
+
spec.add_dependency "tty-prompt"
|
38
|
+
spec.add_dependency "tty-table"
|
40
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mux_tf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Banasik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -132,20 +132,17 @@ executables:
|
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files: []
|
134
134
|
files:
|
135
|
-
- ".gitignore"
|
136
|
-
- Gemfile
|
137
|
-
- LICENSE.txt
|
138
|
-
- README.md
|
139
|
-
- Rakefile
|
140
135
|
- exe/tf_current
|
141
136
|
- exe/tf_mux
|
142
137
|
- exe/tf_plan_summary
|
138
|
+
- lib/deps.rb
|
143
139
|
- lib/mux_tf.rb
|
144
140
|
- lib/mux_tf/cli.rb
|
145
141
|
- lib/mux_tf/cli/current.rb
|
146
142
|
- lib/mux_tf/cli/mux.rb
|
147
143
|
- lib/mux_tf/cli/plan_summary.rb
|
148
144
|
- lib/mux_tf/plan_formatter.rb
|
145
|
+
- lib/mux_tf/plan_summary_handler.rb
|
149
146
|
- lib/mux_tf/terraform_helpers.rb
|
150
147
|
- lib/mux_tf/tmux.rb
|
151
148
|
- lib/mux_tf/version.rb
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2020 Piotr Banasik
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# MuxTf
|
2
|
-
|
3
|
-
Terraform Module Multiplexer
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
```shell
|
8
|
-
gem install mux_tf
|
9
|
-
```
|
10
|
-
|
11
|
-
## Usage
|
12
|
-
|
13
|
-
At the root folder of your terraform modules eg:
|
14
|
-
|
15
|
-
```text
|
16
|
-
ROOT/
|
17
|
-
production/ << == HERE
|
18
|
-
group1/
|
19
|
-
cluster1/
|
20
|
-
main.tf
|
21
|
-
cluster2/
|
22
|
-
main.tf
|
23
|
-
group2/
|
24
|
-
cluster3/
|
25
|
-
main.tf
|
26
|
-
cluster4/
|
27
|
-
main.tf
|
28
|
-
sandbox/ << == OR HERE
|
29
|
-
{SIMILLAR STRUCTURE}
|
30
|
-
```
|
31
|
-
|
32
|
-
## Development
|
33
|
-
|
34
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
35
|
-
|
36
|
-
## Releasing
|
37
|
-
|
38
|
-
To release a new version, first bump the version number by running:
|
39
|
-
|
40
|
-
```shell
|
41
|
-
gem bump -v major|minor|patch
|
42
|
-
```
|
43
|
-
|
44
|
-
And then run `rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
45
|
-
|
46
|
-
## Contributing
|
47
|
-
|
48
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/piotrb/mux_tf.
|
49
|
-
|
50
|
-
## License
|
51
|
-
|
52
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
DELETED