jack-eb 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/jack.rb +1 -0
- data/lib/jack/cli.rb +3 -2
- data/lib/jack/cli/help.rb +1 -1
- data/lib/jack/command.rb +23 -0
- data/lib/jack/config.rb +1 -1
- data/lib/jack/config/diff.rb +1 -1
- data/lib/jack/config/download.rb +1 -1
- data/lib/jack/config/sort.rb +1 -1
- data/lib/jack/config/transmit.rb +1 -1
- data/lib/jack/config/upload.rb +1 -1
- data/lib/jack/config/yaml_formatter.rb +1 -1
- data/lib/jack/version.rb +1 -1
- data/spec/fixtures/project/jack/cfg/hi-web-stag-1.cfg.yml +1 -1
- data/spec/lib/config/yaml_formatter_spec.rb +5 -5
- data/spec/spec_helper.rb +0 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a047e679f12ee31c5d0c3a86a974adcc8ad8f30f
|
4
|
+
data.tar.gz: 2cad48d93339fd87951e8d0ab5f619e0280ca71e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32f05d8317963876587a365b9e82f57a6e9ad6aad44f823c2619b7c8e8258c7b42550a7befebb918739d759b2f77a01c781914ace6678aff37501a63bdbd714f
|
7
|
+
data.tar.gz: 909ff57870b2cf7137f444489edb1b90b39b1aaedbf4d643bbe12c2bfff031b3afd644e998bd6403ecec1080b2222fa9349a29f7354af48dd79eba80b1642fa7
|
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 *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.0.0]
|
7
|
+
- allow --help or -h at the end of the command
|
8
|
+
- major version bump. been in used and tested for a while now
|
9
|
+
|
6
10
|
## [0.3.0]
|
7
11
|
|
8
12
|
- Change the default app name convention to: [app]-[role]-[env]. This is a breaking change with version 0.2.0, if you need to use old app name convention override the conventions.app_name_pattern with `jack/settings.yml`.
|
data/README.md
CHANGED
@@ -9,6 +9,8 @@ Jack is a wrapper tool around the [aws eb cli3](http://docs.aws.amazon.com/elast
|
|
9
9
|
|
10
10
|
Jack provides a `jack config upload` command to update the EB environment. Before uploading the new configuration to EB jack first downloads the current configuration and then does a diff on the changes that are about to be applied. This gives a very helpful preview of exactly what you are intending to change. This particularly helpful when changes are made through the EB GUI and are out of sync with what is stored in the `jack/cfg` files. The demo video is available [here](https://www.youtube.com/watch?v=t7EcAOf8h1o).
|
11
11
|
|
12
|
+
This blog post also provides a good introduction and shows some useful examples of what you can do with the jack tool: [Jack and the Elastic Beanstalk — Tool to Manage AWS Elastic Beanstalk Environments](https://medium.com/@tongueroo/jack-and-the-elastic-beanstalk-easily-manage-aws-environments-3ab496f08ad2#.o7w3x0yd9).
|
13
|
+
|
12
14
|
For things that this tool does not cover like deploying code, it is recommended that you use use the underlying aws `eb` tool directly. `eb deploy` provides a good deploy command already. This tool has been tested with `EB CLI 3.8.3 (Python 2.7.1)`.
|
13
15
|
|
14
16
|
## Use Cases
|
data/lib/jack.rb
CHANGED
data/lib/jack/cli.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require 'thor'
|
2
|
+
require 'jack/command'
|
2
3
|
require 'jack/cli/help'
|
3
4
|
require 'jack/version_checker'
|
4
5
|
Jack::VersionChecker.new.run unless ENV['TEST']
|
5
6
|
|
6
7
|
module Jack
|
7
|
-
class Config <
|
8
|
+
class Config < Command
|
8
9
|
desc "upload ENV_NAME", "upload and apply jack config changes to EB environment"
|
9
10
|
long_desc Jack::CLI::Help.upload
|
10
11
|
option :force, aliases: :f, type: :boolean, desc: "skip prompt"
|
@@ -33,7 +34,7 @@ module Jack
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
|
-
class CLI <
|
37
|
+
class CLI < Command
|
37
38
|
class_option :verbose, type: :boolean
|
38
39
|
class_option :mute, type: :boolean, desc: "mute all output, useful for specs"
|
39
40
|
class_option :noop, type: :boolean, desc: "dont run any destructive commands"
|
data/lib/jack/cli/help.rb
CHANGED
data/lib/jack/command.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Jack
|
2
|
+
class Command < Thor
|
3
|
+
class << self
|
4
|
+
def dispatch(m, args, options, config)
|
5
|
+
# Allow calling for help via:
|
6
|
+
# ufo docker help
|
7
|
+
# ufo docker -h
|
8
|
+
# ufo docker --help
|
9
|
+
# ufo docker -D
|
10
|
+
#
|
11
|
+
# as well thor's nomral setting as
|
12
|
+
#
|
13
|
+
# ufo help docker
|
14
|
+
help_flags = Thor::HELP_MAPPINGS + ["help"]
|
15
|
+
if args.length > 1 && !(args & help_flags).empty?
|
16
|
+
args -= help_flags
|
17
|
+
args.insert(-2, "help")
|
18
|
+
end
|
19
|
+
super
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/jack/config.rb
CHANGED
data/lib/jack/config/diff.rb
CHANGED
data/lib/jack/config/download.rb
CHANGED
data/lib/jack/config/sort.rb
CHANGED
data/lib/jack/config/transmit.rb
CHANGED
data/lib/jack/config/upload.rb
CHANGED
data/lib/jack/version.rb
CHANGED
@@ -6,7 +6,7 @@ describe Jack::Config::YamlFormatter do
|
|
6
6
|
describe "sorter" do
|
7
7
|
it "process should sort the keys" do
|
8
8
|
input = <<-EOL
|
9
|
-
EnvironmentConfigurationMetadata:
|
9
|
+
EnvironmentConfigurationMetadata:
|
10
10
|
Description: test.
|
11
11
|
Foo: 1
|
12
12
|
AWSConfigurationTemplateVersion: 1.1.0.0
|
@@ -19,7 +19,7 @@ EOL
|
|
19
19
|
|
20
20
|
expect(output).to eq <<-EOL
|
21
21
|
AWSConfigurationTemplateVersion: 1.1.0.0
|
22
|
-
EnvironmentConfigurationMetadata:
|
22
|
+
EnvironmentConfigurationMetadata:
|
23
23
|
Description: test.
|
24
24
|
Foo: 1
|
25
25
|
EOL
|
@@ -27,7 +27,7 @@ EOL
|
|
27
27
|
|
28
28
|
it "process should strip date modified and created" do
|
29
29
|
input = <<-EOL
|
30
|
-
EnvironmentConfigurationMetadata:
|
30
|
+
EnvironmentConfigurationMetadata:
|
31
31
|
DateModified: '1425215243000'
|
32
32
|
Description: test.
|
33
33
|
DateCreated: '1425215243000'
|
@@ -41,9 +41,9 @@ EOL
|
|
41
41
|
|
42
42
|
expect(output).to eq <<-EOL
|
43
43
|
AWSConfigurationTemplateVersion: 1.1.0.0
|
44
|
-
EnvironmentConfigurationMetadata:
|
44
|
+
EnvironmentConfigurationMetadata:
|
45
45
|
Description: test.
|
46
46
|
EOL
|
47
47
|
end
|
48
48
|
end
|
49
|
-
end
|
49
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jack-eb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/jack.rb
|
159
159
|
- lib/jack/cli.rb
|
160
160
|
- lib/jack/cli/help.rb
|
161
|
+
- lib/jack/command.rb
|
161
162
|
- lib/jack/config.rb
|
162
163
|
- lib/jack/config/diff.rb
|
163
164
|
- lib/jack/config/download.rb
|
@@ -214,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
215
|
version: '0'
|
215
216
|
requirements: []
|
216
217
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.
|
218
|
+
rubygems_version: 2.6.11
|
218
219
|
signing_key:
|
219
220
|
specification_version: 4
|
220
221
|
summary: Wrapper tool to manage AWS Elastic Beanstalk environments
|