From 9af6a7c3cc56acf6f195cb77499cd4a453e93306 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Wed, 8 Nov 2017 19:29:13 +0900 Subject: [PATCH] bonsai --- .rubocop.yml | 2 +- lib/awspec/generator/template.rb | 1 - lib/awspec/type/ec2.rb | 8 ++++---- lib/awspec/type/security_group.rb | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a33f5cfcb..ee72370d8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,7 +11,7 @@ Metrics/AbcSize: Max: 50 Metrics/ClassLength: - Max: 120 + Max: 130 Metrics/BlockLength: Max: 60 diff --git a/lib/awspec/generator/template.rb b/lib/awspec/generator/template.rb index d7b22aa26..9dd6d6e93 100644 --- a/lib/awspec/generator/template.rb +++ b/lib/awspec/generator/template.rb @@ -1,5 +1,4 @@ module Awspec::Generator - # rubocop:disable Metrics/ClassLength class Template def self.generate(type) @type = type diff --git a/lib/awspec/type/ec2.rb b/lib/awspec/type/ec2.rb index ac0dab36a..73fd9155f 100644 --- a/lib/awspec/type/ec2.rb +++ b/lib/awspec/type/ec2.rb @@ -16,6 +16,10 @@ def id @id ||= resource_via_client.instance_id if resource_via_client end + def security_group_count + resource_via_client.security_groups.count + end + STATES = %w( pending running shutting-down terminated stopping stopped @@ -141,9 +145,5 @@ def match_group_names?(sg_names) def resource_security_groups resource_via_client.security_groups end - - def security_group_count - resource_via_client.security_groups.count - end end end diff --git a/lib/awspec/type/security_group.rb b/lib/awspec/type/security_group.rb index 4a6ef7aee..c126f81b1 100644 --- a/lib/awspec/type/security_group.rb +++ b/lib/awspec/type/security_group.rb @@ -1,5 +1,4 @@ module Awspec::Type - # rubocop:disable Metrics/ClassLength class SecurityGroup < ResourceBase aws_resource Aws::EC2::SecurityGroup tags_allowed