From 2879a75bd75a1b16b6e02b44de2d3f6c8e683c2b Mon Sep 17 00:00:00 2001 From: k1LoW Date: Wed, 22 Mar 2017 20:27:08 +0900 Subject: [PATCH 1/2] Update aws_config to 0.1.0 --- awsecrets.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awsecrets.gemspec b/awsecrets.gemspec index a90c79f..b1b17f3 100644 --- a/awsecrets.gemspec +++ b/awsecrets.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_runtime_dependency 'aws-sdk', '~> 2' - spec.add_runtime_dependency 'aws_config', '0.0.4' + spec.add_runtime_dependency 'aws_config', '~> 0.1.0' spec.add_development_dependency 'bundler', '~> 1.9' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec' From 306d1b6e4006a6ae3f3cc26ae6adb28d64df0cf8 Mon Sep 17 00:00:00 2001 From: k1LoW Date: Wed, 22 Mar 2017 20:38:02 +0900 Subject: [PATCH 2/2] Fight to rubocop --- Rakefile | 11 ++++++++--- lib/awsecrets.rb | 5 +---- spec/configration_spec.rb | 1 + spec/precedence_spec.rb | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index b33d50f..65df74a 100644 --- a/Rakefile +++ b/Rakefile @@ -3,9 +3,14 @@ require 'bundler/gem_tasks' begin require 'rspec/core/rake_task' require 'octorelease' + require 'rubocop/rake_task' rescue LoadError end -RSpec::Core::RakeTask.new(:spec) - -task default: :spec +task spec: 'spec:all' +namespace :spec do + task all: ['spec:core', + 'spec:rubocop'] + RSpec::Core::RakeTask.new(:core) + RuboCop::RakeTask.new +end diff --git a/lib/awsecrets.rb b/lib/awsecrets.rb index 135d3c4..7956503 100644 --- a/lib/awsecrets.rb +++ b/lib/awsecrets.rb @@ -18,7 +18,7 @@ def self.load(profile: nil, region: nil, secrets_path: 'secrets.yml') # 3. YAML file (secrets.yml) load_yaml # 4. The AWS credentials file - load_creds + # load_creds # 5. The CLI configuration file load_config @@ -83,9 +83,6 @@ def self.load_yaml ) end - def self.load_creds - end - def self.load_config @region ||= if AWSConfig[@profile] && AWSConfig[@profile]['region'] AWSConfig[@profile]['region'] diff --git a/spec/configration_spec.rb b/spec/configration_spec.rb index dc839e8..8d5793d 100644 --- a/spec/configration_spec.rb +++ b/spec/configration_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' +# rubocop:disable Metrics/BlockLength describe Awsecrets do let(:fixtures_path) do File.expand_path(File.join(File.dirname(__FILE__), 'fixtures')) diff --git a/spec/precedence_spec.rb b/spec/precedence_spec.rb index eac28a5..f1dbaa1 100644 --- a/spec/precedence_spec.rb +++ b/spec/precedence_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' +# rubocop:disable Metrics/BlockLength describe Awsecrets do let(:fixtures_path) do File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))