f2y_aws_tool 0.1.6 → 0.1.7

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: 7c47a2f4fd4f9e3b09622af35e9ec20fdb6ca751
4
- data.tar.gz: ffcf80ca03f7439d4b7da3b187088a34d3c266f5
3
+ metadata.gz: 1634d466b5e4424aee9ff293191e0d7044f53d6c
4
+ data.tar.gz: 2e2aaf23e6a18bdc238e640c6efe141cb9da71a4
5
5
  SHA512:
6
- metadata.gz: 19558c265184c79a444fe1c05cd42211c93ffb258eddfe7576a5167328f34652de9840bdcf53f656768bb3f360a82cad14c8b8c7629c570991e19d5e0f19b375
7
- data.tar.gz: 1cba49ed8ad503e7396a8c0b5df17e8a3fe0340db24cac0686c9c7114d22f774dbe327a846a3b92242ce8e0354e65eede02f317bb5fc5ae05ecbe61b735f860f
6
+ metadata.gz: 17d893afff97107eae7ad01750fdc64058769108afd54a37d5521c02e76a093da8d9ceb21754fbe5e6f3415418fee69d6dd054469225c04d49ac05d60c69dfed
7
+ data.tar.gz: 1a5cc1f3f46c1dc37beaccffff7c2ed762006641f4ffade11c20a3bece3de3b6bce7d6e08842624a72faa9be2785c6e0cbf3a1800347776d1baaea7d4f804bf8
data/bin/f2y-aws-tool CHANGED
@@ -4,14 +4,15 @@ require_relative '../lib/f2y_aws_tool'
4
4
  require 'thor'
5
5
 
6
6
  class F2yAwsToolCli < Thor
7
- method_option :stack_id, aliases: "-s", desc: "Opsworks stack Id", required: true, type: :string
8
- method_option :app_id, aliases: "-a", desc: "Opsworks app Id", required: true, type: :string
7
+ method_option :stack_id, aliases: "-s", desc: "AWS Opsworks Stack Id", required: true, type: :string
8
+ method_option :app_id, aliases: "-a", desc: "AWS Opsworks App Id", required: true, type: :string
9
+ method_option :region, aliases: "-r", desc: "AWS Opsworks Region", required: true, type: :string
9
10
  method_option :wait, aliases: "-w", desc: "Wait until deploy is completed", type: :boolean, default: true
10
11
  method_option :migrate, aliases: "-m", desc: "Migrate database", type: :boolean, default: true
11
- method_option :access_key_id, aliases: "-k", desc: "Access Key Id", type: :string, default: ENV['AWS_ACCESS_KEY_ID']
12
- method_option :secret_access_key, aliases: "-p", desc: "Secret Access Key", type: :string, default: ENV['AWS_SECRET_ACCESS_KEY']
12
+ method_option :access_key_id, aliases: "-k", desc: "AWS Access Key Id", type: :string, default: ENV['AWS_ACCESS_KEY_ID']
13
+ method_option :secret_access_key, aliases: "-p", desc: "AWS Secret Access Key", type: :string, default: ENV['AWS_SECRET_ACCESS_KEY']
13
14
  method_option :log_level, aliases: "-l", desc: "Log level", type: :string, default: 'INFO', enum: ['DEBUG', 'INFO', 'ERROR']
14
- method_option :log_aws, aliases: "-s", type: :boolean, default: false
15
+ method_option :log_aws, aliases: "-s", desc: "Enable AWS Log", type: :boolean, default: false
15
16
 
16
17
  desc "deploy", "Deploy Opsworks App"
17
18
  def deploy
@@ -19,6 +19,7 @@ module F2yAwsTool
19
19
 
20
20
  def client
21
21
  @client ||= Aws::OpsWorks::Client.new(
22
+ region: region,
22
23
  access_key_id: access_key_id,
23
24
  secret_access_key: secret_access_key,
24
25
  logger: aws_logger,
@@ -49,6 +50,10 @@ module F2yAwsTool
49
50
  @app_id ||= @options.fetch(:app_id)
50
51
  end
51
52
 
53
+ def region
54
+ @region ||= @options.fetch(:region){ENV.fetch('AWS_REGION')}
55
+ end
56
+
52
57
  def migrate?
53
58
  @migrate ||= @options.fetch(:migrate)
54
59
  end
@@ -1,3 +1,3 @@
1
1
  module F2yAwsTool
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: f2y_aws_tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - nakedmoon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-12 00:00:00.000000000 Z
11
+ date: 2017-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler