Skip to content

Commit

Permalink
Ship the license file and not the gemfile/gemspec (#32)
Browse files Browse the repository at this point in the history
Ship the license file and not the gemfile/gemspec
  • Loading branch information
clintoncwolfe authored Nov 15, 2019
2 parents a3efcc2 + 7a8b5e1 commit cddec30
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 44 deletions.
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Chef Projects are built to last. We strive to ensure high quality throughout the

1. **Tests:** To ensure high quality code and protect against future regressions, we require all the code in Chef Projects to have appropriate test coverage. If a new feature is being added, that means unit tests that check internal correctness, and functional tests that verify user experience. For bug fixes, that means tests that clearly demonstrate the defect, fail prior to the change, and pass after the change. See the [test](https://github.com/inspec/train-aws/tree/master/test)
directory for the existing tests and use ```bundle exec rake test``` to run them.
2. **Green CI Tests:** We use [Travis CI](https://travis-ci.org/) and/or [AppVeyor](https://www.appveyor.com/) CI systems to test all pull requests. We require these test runs to succeed on every pull request before being merged.
2. **Green CI Tests:** We use Buildkite CI to test all pull requests. We require these test runs to succeed on every pull request before being merged.

In addition to this it would be nice to include the description of the problem you are solving
with your change. You can use [Issue Template](https://github.com/inspec/train-aws/tree/master/ISSUE_TEMPLATE.md) in the description section
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#------------------------------------------------------------------#

# Do not run integration by default
task default: [:'test:unit', :'test:functional']
task default: %i{test:unit test:functional}

#------------------------------------------------------------------#
# Test Runner Tasks
Expand Down
1 change: 1 addition & 0 deletions lib/train-aws/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def initialize(options)
# We support caching on the aws_client call, but not the aws_resource call
def aws_client(klass)
return klass.new unless cache_enabled?(:api_call)

@cache[:api_call][klass.to_s.to_sym] ||= klass.new
end

Expand Down
16 changes: 8 additions & 8 deletions test/unit/connection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
end

# Since this is an API-type connection, we MUST NOT implement these three.
[
:file_via_connection,
:run_command_via_connection,
].each do |method_name|
%i{
file_via_connection
run_command_via_connection
}.each do |method_name|
it "should NOT provide a #{method_name}() method" do
# false passed to instance_methods says 'don't use inheritance'
connection_class.instance_methods(false).wont_include(method_name)
Expand All @@ -49,10 +49,10 @@
# a client-based approach (which focuses on explicit API calls) and a
# resource-based approach (which allows you to ask for all EC2 instances,
# and the SDK will handle pagination, etc.)
[
:aws_client,
:aws_resource,
].each do |method_name|
%i{
aws_client
aws_resource
}.each do |method_name|
it "should provide a #{method_name}() method" do
# false passed to instance_methods says 'don't use inheritance'
connection_class.instance_methods(false).must_include(method_name)
Expand Down
14 changes: 7 additions & 7 deletions test/unit/transport_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
let(:transport) { plugin_class.new }

it "should have the correct options" do
[
:access_key_id,
:profile,
:region,
:secret_access_key,
:session_token,
].each do |option_name|
%i{
access_key_id
profile
region
secret_access_key
session_token
}.each do |option_name|
transport.options.keys.must_include(option_name)
end
end
Expand Down
4 changes: 1 addition & 3 deletions train-aws.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Gem::Specification.new do |spec|
# Though complicated-looking, this is pretty standard for a gemspec.
# It just filters what will actually be packaged in the gem (leaving
# out tests, etc)
spec.files = %w{
train-aws.gemspec Gemfile
} + Dir.glob(
spec.files = %w{ LICENSE } + Dir.glob(
"lib/**/*", File::FNM_DOTMATCH
).reject { |f| File.directory?(f) }
spec.require_paths = ["lib"]
Expand Down

0 comments on commit cddec30

Please sign in to comment.