diff options
-rw-r--r-- | .github/ISSUE_TEMPLATE.md | 21 | ||||
-rw-r--r-- | .gitignore | 29 | ||||
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | Gemfile | 28 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | Rakefile | 26 | ||||
-rw-r--r-- | lib/mixlib/authentication.rb | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/digester.rb | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/http_authentication_request.rb | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/signatureverification.rb | 6 | ||||
-rw-r--r-- | lib/mixlib/authentication/signedheaderauth.rb | 6 | ||||
-rw-r--r-- | lib/mixlib/authentication/version.rb | 3 | ||||
-rw-r--r-- | mixlib-authentication.gemspec | 5 | ||||
-rw-r--r-- | spec/mixlib/authentication/digester_spec.rb | 17 | ||||
-rw-r--r-- | spec/mixlib/authentication/http_authentication_request_spec.rb | 5 | ||||
-rw-r--r-- | spec/mixlib/authentication/mixlib_authentication_spec.rb | 8 | ||||
-rw-r--r-- | spec/spec_helper.rb | 6 |
17 files changed, 157 insertions, 41 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..f229e13 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ +# Version: + +[Version of the project installed] + +# Environment: [Details about the environment such as the Operating System, cookbook details, etc...] + +# Scenario: + +[What you are trying to achieve and you can't?] + +# Steps to Reproduce: + +[If you are filing an issue what are the things we need to do in order to repro your problem?] + +# Expected Result: + +[What are you expecting to happen as the consequence of above reproduction steps?] + +# Actual Result: + +[What actually happens after the reproduction steps?] @@ -1,4 +1,27 @@ -pkg/ -*.swp - +_yardoc +.bundle +.config +.DS_Store +.idea +.rake_tasks~ +.rspec +.ruby-version +.rvmrc +.yardoc +.yardopts +*.gem +*.rbc +*.sw? +bin/ +coverage +doc +Gemfile.local Gemfile.lock +InstalledFiles +lib/bundler/man +pkg +spec/reports +test/tmp +test/version_tmp +tmp +vendor diff --git a/.travis.yml b/.travis.yml index d5193e2..8134b8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,10 @@ before_install: matrix: include: - - rvm: 2.5.1 + - rvm: 2.2.10 + - rvm: 2.3.7 - rvm: 2.4.4 + - rvm: 2.5.1 - rvm: ruby-head allow_failures: - rvm: ruby-head @@ -19,4 +21,6 @@ branches: only: - master -script: bundle exec rake ci +bundler_args: --without docs development + +script: bundle exec rake @@ -1,8 +1,32 @@ source "https://rubygems.org" + gemspec -group(:development) do - gem "pry" +group :docs do + gem "yard" + gem "redcarpet" + gem "github-markup" +end + +group :test do + gem "chefstyle", "=0.4.0" # pin needed until we drop Ruby 2.0/2.1 support + gem "rspec-core", "~> 3.2" + gem "rspec-mocks", "~> 3.2" + gem "rspec-expectations", "~> 3.2" + gem "rake" gem "mixlib-log", "~> 2" gem "net-ssh" end + +group :development do + gem "pry" + gem "pry-byebug" + gem "pry-stack_explorer" + gem "rb-readline" +end + +instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"] + +# If you want to load debugging tools into the bundle exec sandbox, +# add these additional dependencies into Gemfile.local +eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local") @@ -3,9 +3,21 @@ Mixlib::Authentication provides a class-based header signing authentication object, like the one used in Chef. -## License -- Author:: Christopher Brown ([cb@chef.io](mailto:cb@chef.io)) -- Copyright:: Copyright (c) 2009-2016 Chef Software, Inc. +## Documentation + +All documentation is written using YARD. You can generate a by running: + +``` +rake docs +``` + +## Contributing + +For information on contributing to this project please see our [Contributing Documentation](https://github.com/chef/chef/blob/master/CONTRIBUTING.md) + +## License & Copyright + +- Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. - License:: Apache License, Version 2.0 ```text @@ -1,9 +1,14 @@ require "bundler/gem_tasks" require "rspec/core/rake_task" -RSpec::Core::RakeTask.new(:spec) +task default: [:style, :spec] -task default: :spec +Bundler::GemHelper.install_tasks + +desc "Run specs" +RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = "spec/**/*_spec.rb" +end begin require "chefstyle" @@ -12,7 +17,20 @@ begin task.options += ["--display-cop-names", "--no-color"] end rescue LoadError - puts "chefstyle/rubocop is not available." + puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed." end -task ci: [:style, :spec] +begin + require "yard" + YARD::Rake::YardocTask.new(:docs) +rescue LoadError + puts "yard is not available. bundle install first to make sure all dependencies are installed." +end + +task :console do + require "irb" + require "irb/completion" + require "mixlib/authentication" + ARGV.clear + IRB.start +end diff --git a/lib/mixlib/authentication.rb b/lib/mixlib/authentication.rb index b27e06e..167ed22 100644 --- a/lib/mixlib/authentication.rb +++ b/lib/mixlib/authentication.rb @@ -1,6 +1,6 @@ # -# Author:: Christopher Brown (<cb@opscode.com>) -# Copyright:: Copyright (c) 2009 Opscode, Inc. +# Author:: Christopher Brown (<cb@chef.io>) +# Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/mixlib/authentication/digester.rb b/lib/mixlib/authentication/digester.rb index f826b4c..a4d6c5d 100644 --- a/lib/mixlib/authentication/digester.rb +++ b/lib/mixlib/authentication/digester.rb @@ -1,6 +1,6 @@ # -# Author:: Christopher Brown (<cb@opscode.com>) -# Copyright:: Copyright (c) 2009 Opscode, Inc. +# Author:: Christopher Brown (<cb@chef.io>) +# Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/mixlib/authentication/http_authentication_request.rb b/lib/mixlib/authentication/http_authentication_request.rb index 32b8e72..967c0e3 100644 --- a/lib/mixlib/authentication/http_authentication_request.rb +++ b/lib/mixlib/authentication/http_authentication_request.rb @@ -1,6 +1,6 @@ # -# Author:: Daniel DeLeo (<dan@opscode.com>) -# Copyright:: Copyright (c) 2010 Opscode, Inc. +# Author:: Daniel DeLeo (<dan@chef.io>) +# Copyright:: Copyright (c) 2010-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/mixlib/authentication/signatureverification.rb b/lib/mixlib/authentication/signatureverification.rb index 33094d2..1dfafd6 100644 --- a/lib/mixlib/authentication/signatureverification.rb +++ b/lib/mixlib/authentication/signatureverification.rb @@ -1,7 +1,7 @@ # -# Author:: Christopher Brown (<cb@opscode.com>) -# Author:: Christopher Walters (<cw@opscode.com>) -# Copyright:: Copyright (c) 2009, 2010 Opscode, Inc. +# Author:: Christopher Brown (<cb@chef.io>) +# Author:: Christopher Walters (<cw@chef.io>) +# Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb index 7df3555..2a54c76 100644 --- a/lib/mixlib/authentication/signedheaderauth.rb +++ b/lib/mixlib/authentication/signedheaderauth.rb @@ -1,7 +1,7 @@ # -# Author:: Christopher Brown (<cb@opscode.com>) -# Author:: Christopher Walters (<cw@opscode.com>) -# Copyright:: Copyright (c) 2009, 2010 Opscode, Inc. +# Author:: Christopher Brown (<cb@chef.io>) +# Author:: Christopher Walters (<cw@chef.io>) +# Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/mixlib/authentication/version.rb b/lib/mixlib/authentication/version.rb index 4f8ae82..d0e4ce5 100644 --- a/lib/mixlib/authentication/version.rb +++ b/lib/mixlib/authentication/version.rb @@ -1,4 +1,5 @@ -# Copyright:: Copyright (c) 2010-2015 Chef Software, Inc. +# +# Copyright:: Copyright (c) 2010-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/mixlib-authentication.gemspec b/mixlib-authentication.gemspec index 0830546..4f2b9e3 100644 --- a/mixlib-authentication.gemspec +++ b/mixlib-authentication.gemspec @@ -4,7 +4,6 @@ require "mixlib/authentication/version" Gem::Specification.new do |s| s.name = "mixlib-authentication" s.version = Mixlib::Authentication::VERSION - s.platform = Gem::Platform::RUBY s.summary = "Mixes in simple per-request authentication" s.description = s.summary s.license = "Apache-2.0" @@ -15,8 +14,4 @@ Gem::Specification.new do |s| s.require_path = "lib" s.files = %w{LICENSE README.md Gemfile Rakefile NOTICE} + Dir.glob("*.gemspec") + Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } - - %w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_development_dependency gem, "~> 3.2" } - s.add_development_dependency "chefstyle" - s.add_development_dependency "rake", "~> 11" end diff --git a/spec/mixlib/authentication/digester_spec.rb b/spec/mixlib/authentication/digester_spec.rb index 4688d5c..c54efa5 100644 --- a/spec/mixlib/authentication/digester_spec.rb +++ b/spec/mixlib/authentication/digester_spec.rb @@ -1,3 +1,20 @@ +# +# Copyright:: Copyright (c) 2018 Chef Software, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + require "mixlib/authentication/digester" describe Mixlib::Authentication::Digester do diff --git a/spec/mixlib/authentication/http_authentication_request_spec.rb b/spec/mixlib/authentication/http_authentication_request_spec.rb index 7c45df1..d62d67e 100644 --- a/spec/mixlib/authentication/http_authentication_request_spec.rb +++ b/spec/mixlib/authentication/http_authentication_request_spec.rb @@ -1,5 +1,6 @@ -# Author:: Daniel DeLeo (<dan@opscode.com>) -# Copyright:: Copyright (c) 2010 Opscode, Inc. +# +# Author:: Daniel DeLeo (<dan@chef.io>) +# Copyright:: Copyright (c) 2010-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/spec/mixlib/authentication/mixlib_authentication_spec.rb b/spec/mixlib/authentication/mixlib_authentication_spec.rb index 6985741..7d9b484 100644 --- a/spec/mixlib/authentication/mixlib_authentication_spec.rb +++ b/spec/mixlib/authentication/mixlib_authentication_spec.rb @@ -1,8 +1,8 @@ # -# Author:: Tim Hinderliter (<tim@opscode.com>) -# Author:: Christopher Walters (<cw@opscode.com>) -# Author:: Christopher Brown (<cb@opscode.com>) -# Copyright:: Copyright (c) 2009, 2010 Opscode, Inc. +# Author:: Tim Hinderliter (<tim@chef.io>) +# Author:: Christopher Walters (<cw@chef.io>) +# Author:: Christopher Brown (<cb@chef.io>) +# Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index be55155..4fd27f0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ # -# Author:: Tim Hinderliter (<tim@opscode.com>) -# Author:: Christopher Walters (<cw@opscode.com>) -# Copyright:: Copyright (c) 2009, 2010 Opscode, Inc. +# Author:: Tim Hinderliter (<tim@chef.io>) +# Author:: Christopher Walters (<cw@chef.io>) +# Copyright:: Copyright (c) 2009-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); |