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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e095571181846a04003b3a1d75d240db355159c5
4
- data.tar.gz: c7512eca5ecc54afcf6d60ee49ab31fc6904a906
3
+ metadata.gz: a047e679f12ee31c5d0c3a86a974adcc8ad8f30f
4
+ data.tar.gz: 2cad48d93339fd87951e8d0ab5f619e0280ca71e
5
5
  SHA512:
6
- metadata.gz: 7294c1c20b0e20bbb57f5f5c7e541aca79e8616004db23551e8b3ffc7b1023bef5351dd1a29600948f5e038dfe2994a05893f840bb5f4511462e948aacae53e7
7
- data.tar.gz: 5c546e4064b4f95993d87220ecf9095ac26b1adf4706105ca3d06e6f096a461fb18da610ee45ede3e75b773e40949b7600f3afee89b3b8586655f3f382be8b1a
6
+ metadata.gz: 32f05d8317963876587a365b9e82f57a6e9ad6aad44f823c2619b7c8e8258c7b42550a7befebb918739d759b2f77a01c781914ace6678aff37501a63bdbd714f
7
+ data.tar.gz: 909ff57870b2cf7137f444489edb1b90b39b1aaedbf4d643bbe12c2bfff031b3afd644e998bd6403ecec1080b2222fa9349a29f7354af48dd79eba80b1642fa7
@@ -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
@@ -5,6 +5,7 @@ require "aws-sdk"
5
5
  require File.expand_path("../jack/ext/hash", __FILE__)
6
6
 
7
7
  module Jack
8
+ autoload :Command, 'jack/command'
8
9
  autoload :CLI, 'jack/cli'
9
10
  autoload :Create, 'jack/create'
10
11
  autoload :Settings, 'jack/settings'
@@ -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 < Thor
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 < Thor
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"
@@ -1,5 +1,5 @@
1
1
  module Jack
2
- class CLI < Thor
2
+ class CLI < Command
3
3
  class Help
4
4
  class << self
5
5
  def convention
@@ -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
@@ -2,7 +2,7 @@ require 'fileutils'
2
2
  require 'thor'
3
3
 
4
4
  module Jack
5
- class Config < Thor
5
+ class Config < Command
6
6
  autoload :Base, 'jack/config/base'
7
7
  autoload :Diff, 'jack/config/diff'
8
8
  autoload :Download, 'jack/config/download'
@@ -1,5 +1,5 @@
1
1
  module Jack
2
- class Config < Thor
2
+ class Config < Command
3
3
  class Diff
4
4
  attr_reader :transmit
5
5
  def initialize(options={})
@@ -2,7 +2,7 @@ require 'fileutils'
2
2
  require 'yaml'
3
3
 
4
4
  module Jack
5
- class Config < Thor
5
+ class Config < Command
6
6
  class Download < Transmit
7
7
  include Util
8
8
 
@@ -1,7 +1,7 @@
1
1
  require 'fileutils'
2
2
 
3
3
  module Jack
4
- class Config < Thor
4
+ class Config < Command
5
5
  class Sort < Transmit # for the local_config_path method
6
6
  include Util
7
7
 
@@ -2,7 +2,7 @@ require 'fileutils'
2
2
  require 'yaml'
3
3
 
4
4
  module Jack
5
- class Config < Thor
5
+ class Config < Command
6
6
  class Transmit
7
7
  include Util
8
8
 
@@ -1,7 +1,7 @@
1
1
  require 'fileutils'
2
2
 
3
3
  module Jack
4
- class Config < Thor
4
+ class Config < Command
5
5
  class Upload < Transmit
6
6
  include Util
7
7
 
@@ -1,7 +1,7 @@
1
1
  require "yaml"
2
2
 
3
3
  module Jack
4
- class Config < Thor
4
+ class Config < Command
5
5
  # Class does very specific formatting for the eb config files:
6
6
  #
7
7
  # * Makes sure that the keys are sorted so we can compare them
@@ -1,3 +1,3 @@
1
1
  module Jack
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  AWSConfigurationTemplateVersion: 1.1.0.0
2
- EnvironmentConfigurationMetadata:
2
+ EnvironmentConfigurationMetadata:
3
3
  Description: test.
@@ -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
@@ -1,8 +1,5 @@
1
1
  ENV['TEST'] = '1'
2
2
 
3
- require "codeclimate-test-reporter"
4
- CodeClimate::TestReporter.start
5
-
6
3
  require "pp"
7
4
  require 'ostruct'
8
5
  require 'pry'
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.3.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: 2016-11-30 00:00:00.000000000 Z
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.5.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