summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-10-30 09:36:25 -0700
committerGitHub <noreply@github.com>2018-10-30 09:36:25 -0700
commit3dbfd1a69e3873a3773c21bfa6c2560748f93692 (patch)
tree335f37c3810e4dcfd5cc5e56d9fc66b949e15e0d
parent678f326b6f41be8f4b0d71c8b5d45185f0be01bc (diff)
parentf18b33c24a6c180fcf4fede84c67d13ba335602a (diff)
downloadohai-3dbfd1a69e3873a3773c21bfa6c2560748f93692.tar.gz
Merge pull request #1281 from chef/misc_cleanup
Misc cleanup backported from Ohai 14
-rw-r--r--.expeditor/config.yml13
-rw-r--r--.github/CODEOWNERS5
-rw-r--r--.travis.yml13
-rw-r--r--Gemfile13
-rw-r--r--OHAI_MVPS.md26
-rw-r--r--README.md19
-rw-r--r--Rakefile39
-rw-r--r--appveyor.yml13
-rw-r--r--docs/man/man1/ohai.197
-rw-r--r--ohai.gemspec3
10 files changed, 96 insertions, 145 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index 327cb820..d1a9640a 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -8,8 +8,13 @@ rubygems:
- ohai
github:
+ # This deletes the GitHub PR branch after successfully merged into the release branch
+ delete_branch_on_merge: true
# The tag format to use (e.g. v1.0.0)
version_tag_format: "v{{version}}"
+ # allow bumping the minor release via label
+ minor_bump_labels:
+ - "Expeditor: Bump Minor Version"
# Which Github branches to build Omnibus releases from, and what versions
# (as determined by the value in the VERSION file) those branches are responsible
# for building.
@@ -18,26 +23,22 @@ github:
version_constraint: 14.*
- 13-stable:
version_constraint: 13.*
- - 8-stable:
- version_constraint: 8.*
promote:
- action:
- - built_in:publish_rubygems
+ actions:
- built_in:rollover_changelog
+ - built_in:publish_rubygems
# These actions are taken, in order they are specified, anytime a Pull Request is merged.
merge_actions:
- built_in:bump_version:
ignore_labels:
- - "Version: Skip Bump"
- "Expeditor: Skip Version Bump"
- "Expeditor: Skip All"
- bash:.expeditor/update_version.sh:
only_if: built_in:bump_version
- built_in:update_changelog:
ignore_labels:
- - "Meta: Exclude From Changelog"
- "Expeditor: Exclude From Changelog"
- "Expeditor: Skip All"
- built_in:build_gem:
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 59c6d932..421f226f 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1,4 @@
-* @chef/client-maintainers
+* @chef/client-maintainers
+.expeditor/** @chef/jex-team
+README.md @chef/docs-team
+RELEASE_NOTES.md @chef/docs-team
diff --git a/.travis.yml b/.travis.yml
index d018382c..034cf72d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
language: ruby
cache: bundler
-dist: trusty
sudo: false
@@ -9,6 +8,8 @@ branches:
- master
- 13-stable
+bundler_args: --jobs 7 --without docs debug
+
before_install:
- gem --version
- rvm @global do gem uninstall bundler -a -x -I || true
@@ -16,9 +17,9 @@ before_install:
- bundle --version
- rm -f .bundle/config
rvm:
- - 2.3.7
- - 2.4.4
- - 2.5.1
+ - 2.3.8
+ - 2.4.5
+ - 2.5.3
- ruby-head
matrix:
@@ -26,6 +27,6 @@ matrix:
- rvm: ruby-head
script:
- - bundle exec chefstyle
- - bundle exec rake spec
+ - bundle exec chefstyle -v
+ - bundle exec rake
- bundle exec ohai
diff --git a/Gemfile b/Gemfile
index 5f0ce7a0..2116d8c0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -17,6 +17,19 @@ group :ci do
gem "rspec_junit_formatter"
end
+group :docs do
+ gem "yard"
+ gem "redcarpet"
+ gem "github-markup"
+end
+
+group :debug 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,
diff --git a/OHAI_MVPS.md b/OHAI_MVPS.md
index fb7c6b5b..3d6df923 100644
--- a/OHAI_MVPS.md
+++ b/OHAI_MVPS.md
@@ -6,20 +6,28 @@ Every release of Chef and Ohai we pick someone from the community to name as the
After receiving three MVP awards from Chef and Ohai releases, we add someone to the hall of fame. We want to express our gratitude to their continuing participation and give newer community members the opportunity to be recognized.
-The [MVP list](https://github.com/opscode/chef/blob/master/CHEF_MVPS.md) is kept in the Chef project.
+The [MVP list](https://github.com/chef/chef/blob/master/CHEF_MVPS.md) is kept in the Chef project.
#### Ohai Release MVP Recipients
| Release | Date | MVP |
|---------|------|-----|
-| Ohai 8.22.0 | 2016-11-30 | Chris Dituri |
-| Ohai 8.21.0 | 2016-10-18 | Phil Dibowitz |
-| Ohai 8.20.0 | 2016-09-07 | Davide Cavalca |
-| Ohai 8.19.0 | 2016-08-11 | Jere Julian |
-| Ohai 8.18.0 | 2016-08-04 | Nate Walck |
-| Ohai 8.17.0 | 2016-06-20 | John Bellone |
-| Ohai 8.16.0 | 2016-05-12 | Elan Ruusamäe |
-| Ohai 8.14.0 | 2016-04-08 | Shahul Khajamohideen |
+| Ohai 13.7 | 2017-12-04 | Zeal Jagannatha |
+| Ohai 13.6 | 2017-10-24 | Phil Dibowitz |
+| Ohai 13.4 | 2017-09-11 | Jeune Asuncion |
+| Ohai 13.3 | 2017-08-10 | Richard McLeod |
+| Ohai 13.2 | 2017-06-29 | Phil Dibowitz |
+| Ohai 13.1 | 2017-05-12 | Akira Kitada |
+| Ohai 13.0 | 2017-04-06 | Sean Escriva |
+| Ohai 8.23 | 2017-01-24 | Bob Dean |
+| Ohai 8.22 | 2016-11-30 | Chris Dituri |
+| Ohai 8.21 | 2016-10-18 | Phil Dibowitz |
+| Ohai 8.20 | 2016-09-07 | Davide Cavalca |
+| Ohai 8.19 | 2016-08-11 | Jere Julian |
+| Ohai 8.18 | 2016-08-04 | Nate Walck |
+| Ohai 8.17 | 2016-06-20 | John Bellone |
+| Ohai 8.16 | 2016-05-12 | Elan Ruusamäe |
+| Ohai 8.14 | 2016-04-08 | Shahul Khajamohideen |
| [Ohai 6.20.0](https://www.chef.io/blog/2013/10/31/release-chef-client-11-8-0-ohai-6-20-0/) | 2013-10-31 | Paul Rossman |
| [Ohai 6.18.0](http://www.chef.io/blog/2013/07/23/chef-client-11-6-0-ohai-6-18-0-and-more/) | 2013-07-19 | Joseph Anthony Pasquale Holsten |
| [Ohai 6.16.0](http://www.chef.io/blog/2013/01/17/ohai-6-16-0-released/) | 2013-01-17 | Sascha Bates |
diff --git a/README.md b/README.md
index 626f596e..fdff54c3 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Ohai will print out a JSON data blob for all the known data about your system. W
Chef distributes ohai as a RubyGem. This README is for developers who want to modify the Ohai source code. For users who want to write plugins for Ohai, see the docs:
- General documentation: <https://docs.chef.io/ohai.html>
-- Custom plugin documentation: <https://docs.chef.io/ohai_custom.html>
+- Writing Ohai Plugins documentation: <https://docs.chef.io/ohai_custom.html>
## Development Environment:
@@ -37,11 +37,16 @@ Ohai has some Rake tasks for doing various things.
```
rake -T
-rake build # Build the gem file ohai-$VERSION.gem
-rake install # install the gem locally
-rake install:local # install the gem locally without network access
-rake release # Create tag $VERSION, build gem, and push to Rubygems
-rake spec # Run RSpec tests
+rake build # Build ohai-$VERSION.gem into the pkg directory
+rake clean # Remove any temporary products
+rake clobber # Remove any generated files
+rake docs # Generate YARD Documentation
+rake install # Build and install ohai-$VERSION.gem into system gems
+rake install:local # Build and install ohai-$VERSION.gem into system gems without network access
+rake release[remote] # Create tag $VERSION and build and push ohai-$VERSION.gem to rubygems.org
+rake spec # Run RSpec code examples
+rake style # Run Chefstyle tests
+rake style:auto_correct # Auto-correct RuboCop offenses
($VERSION is the current version, from the GemSpec in Rakefile)
```
@@ -65,7 +70,7 @@ For information on contributing to this project see <https://github.com/chef/che
Ohai - system information application
- Author:: Adam Jacob ([adam@chef.io](mailto:adam@chef.io))
-- Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
+- Copyright:: Copyright (c) 2008-2018 Chef Software, Inc.
- License:: Apache License, Version 2.0
```text
diff --git a/Rakefile b/Rakefile
index 58c0d419..83e36d8f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,4 @@
require "bundler/gem_tasks"
-require "date"
-require "ohai/version"
begin
require "rspec/core/rake_task"
@@ -11,25 +9,34 @@ begin
rescue LoadError
desc "rspec is not installed, this task is disabled"
task :spec do
- abort "rspec is not installed. `(sudo) gem install rspec` to run unit tests"
+ abort "rspec is not installed. bundle install first to make sure all dependencies are installed."
end
end
-task :default => :spec
-
-require "chefstyle"
-require "rubocop/rake_task"
-RuboCop::RakeTask.new(:style) do |task|
- task.options += ["--display-cop-names", "--no-color"]
+begin
+ require "chefstyle"
+ require "rubocop/rake_task"
+ desc "Run Chefstyle tests"
+ RuboCop::RakeTask.new(:style) do |task|
+ task.options += ["--display-cop-names", "--no-color"]
+ end
+rescue LoadError
+ puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed."
end
begin
- require "github_changelog_generator/task"
-
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
- config.future_release = Ohai::VERSION
- config.max_issues = 0
- config.add_issues_wo_labels = false
- end
+ 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 "ohai"
+ ARGV.clear
+ IRB.start
end
+
+task default: [:style, :spec]
diff --git a/appveyor.yml b/appveyor.yml
index d10cf7be..0883b614 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,6 +10,17 @@ environment:
clone_folder: c:\projects\ohai
clone_depth: 1
+
+skip_commits:
+ # version bumps by Expeditor happen as a separate commit after the merge, we can skip
+ author: Chef Expeditor
+ # if ONLY the files listed below are changed in a commit, skip
+ files:
+ - MAINTAINERS.md
+ - MAINTAINERS.toml
+ - CHANGELOG.md
+ - RELEASE_NOTES.md
+
skip_tags: true
branches:
only:
@@ -24,7 +35,7 @@ install:
- bundler --version
build_script:
- - bundle install
+ - bundle install || bundle install || bundle install
test_script:
- bundle exec rspec
diff --git a/docs/man/man1/ohai.1 b/docs/man/man1/ohai.1
deleted file mode 100644
index 2a255eb7..00000000
--- a/docs/man/man1/ohai.1
+++ /dev/null
@@ -1,97 +0,0 @@
-.\" Man page generated from reStructuredText.
-.
-.TH "OHAI" "1" "Ohai 7.0.0" "" "ohai"
-.SH NAME
-ohai \- The man page for the ohai command line tool.
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.sp
-Ohai is a tool that is used to detect attributes on a node, and then provide these attributes to the chef\-client at the start of every chef\-client run. Ohai is required by the chef\-client and must be present on a node. (Ohai is installed on a node as part of the chef\-client install process.)
-.sp
-The types of attributes Ohai collects include (but are not limited to):
-.INDENT 0.0
-.IP \(bu 2
-Platform details
-.IP \(bu 2
-Network usage
-.IP \(bu 2
-Memory usage
-.IP \(bu 2
-Processor usage
-.IP \(bu 2
-Kernel data
-.IP \(bu 2
-Host names
-.IP \(bu 2
-Fully qualified domain names
-.IP \(bu 2
-Other configuration details
-.UNINDENT
-.sp
-Attributes that are collected by Ohai are automatic attributes, in that these attributes are used by the chef\-client to ensure that these attributes remain unchanged after the chef\-client is done configuring the node.
-.sp
-ohai is the command\-line interface for Ohai, a tool that is used to detect attributes on a node, and then provide these attributes to the chef\-client at the start of every chef\-client run.
-.SH OPTIONS
-.sp
-This command has the following syntax:
-.INDENT 0.0
-.INDENT 3.5
-.sp
-.nf
-.ft C
-ohai OPTION
-.ft P
-.fi
-.UNINDENT
-.UNINDENT
-.sp
-This tool has the following options:
-.INDENT 0.0
-.TP
-.B \fBATTRIBUTE_NAME ATTRIBUTE NAME ...\fP
-Use to have Ohai show only output for named attributes.
-.TP
-.B \fB\-d PATH\fP, \fB\-\-directory PATH\fP
-The directory in which Ohai plugins are located. For example: \fB/etc/ohai/plugins\fP\&.
-.TP
-.B \fB\-h\fP, \fB\-\-help\fP
-Shows help for the command.
-.TP
-.B \fB\-l LEVEL\fP, \fB\-\-log_level LEVEL\fP
-The level of logging that will be stored in a log file.
-.TP
-.B \fB\-L LOGLOCATION\fP, \fB\-\-logfile c\fP
-The location in which log file output files will be saved. If this location is set to something other than \fBSTDOUT\fP, standard output logging will still be performed (otherwise there would be no output other than to a file).
-.TP
-.B \fB\-v\fP, \fB\-\-version\fP
-The version of Ohai\&.
-.UNINDENT
-.SH AUTHOR
-Opscode
-.\" Generated by docutils manpage writer.
-.
diff --git a/ohai.gemspec b/ohai.gemspec
index 108b9fbf..422d9ef7 100644
--- a/ohai.gemspec
+++ b/ohai.gemspec
@@ -5,7 +5,6 @@ require "ohai/version"
Gem::Specification.new do |s|
s.name = "ohai"
s.version = Ohai::VERSION
- s.platform = Gem::Platform::RUBY
s.summary = "Ohai profiles your system and emits JSON"
s.description = s.summary
s.license = "Apache-2.0"
@@ -35,5 +34,5 @@ Gem::Specification.new do |s|
s.executables = %w{ohai}
s.require_path = "lib"
- s.files = %w{LICENSE README.md Gemfile Rakefile} + Dir.glob("*.gemspec") + Dir.glob("{docs,lib,spec}/**/*")
+ s.files = %w{LICENSE README.md Gemfile Rakefile} + Dir.glob("*.gemspec") + Dir.glob("{lib,spec}/**/*")
end