diff options
author | Tim Smith <tsmith@chef.io> | 2015-12-09 19:37:14 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2015-12-09 19:37:14 -0800 |
commit | e6e1ada2e1a65da4b7bf6d12d6c1ad8eccaf2d19 (patch) | |
tree | 48702c594f39148ad1d6c664d5bd1be7480cb900 | |
parent | 9377836dc0a5487474038ec727f02f9b33facfa6 (diff) | |
parent | b95b102b140a5555b095b882349ea428efd210d2 (diff) | |
download | wmi-lite-e6e1ada2e1a65da4b7bf6d12d6c1ad8eccaf2d19.tar.gz |
Merge pull request #4 from tas50/master
Swap pry-debugger for pry-byebug and add readme badges
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | CONTRIBUTING.md | 2 | ||||
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | lib/wmi-lite.rb | 2 | ||||
-rw-r--r-- | lib/wmi-lite/wmi.rb | 2 | ||||
-rw-r--r-- | lib/wmi-lite/wmi_exception.rb | 4 | ||||
-rw-r--r-- | lib/wmi-lite/wmi_instance.rb | 2 | ||||
-rw-r--r-- | spec/functional/wmi_spec.rb | 14 | ||||
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/unit/wmi_spec.rb | 2 | ||||
-rw-r--r-- | wmi-lite.gemspec | 4 |
11 files changed, 27 insertions, 21 deletions
diff --git a/.travis.yml b/.travis.yml index 6af3a67..de8b4fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ +language: ruby +cache: bundler +sudo: false + rvm: - - 1.9.3 - - 2.0.0 + - 2.0 - 2.1 + - 2.2 bundler_args: --jobs 7 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be7ffbe..0849724 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ # Contributing to WMI-Lite We are glad you want to contribute to WMI-Lite. Please see contribution guidelines for -[Chef](http://wiki.opscode.com/display/chef/How+to+Contribute) for information on contributing to this project. +[Chef](https://docs.chef.io/community_contributions.html) for information on contributing to this project. @@ -1,6 +1,9 @@ Wmi-Lite ======== +[![Build Status](https://travis-ci.org/chef/wmi-lite.svg?branch=master)](https://travis-ci.org/chef/wmi-lite) +[![Gem Version](https://badge.fury.io/rb/wmi-lite.svg)](https://badge.fury.io/rb/wmi-lite) + `wmi-lite` is a lightweight Ruby gem utility library for accessing basic [Windows Management Instrumentation (WMI)](http://msdn.microsoft.com/en-us/library/aa394582(v=vs.85).aspx) functionality on Windows. It has no dependencies outside of the Ruby interpreter @@ -93,8 +96,8 @@ puts License & Authors ----------------- -Author:: Adam Edwards (<adamed@getchef.com>) -Copyright:: Copyright (c) 2014 Chef Software, Inc. +Author:: Adam Edwards (<adamed@chef.io>) +Copyright:: Copyright (c) 2014-2015 Chef Software, Inc. License:: Apache License, Version 2.0 Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/wmi-lite.rb b/lib/wmi-lite.rb index dcc916e..8c94317 100644 --- a/lib/wmi-lite.rb +++ b/lib/wmi-lite.rb @@ -1,5 +1,5 @@ # -# Author:: Adam Edwards (<adamed@getchef.com>) +# Author:: Adam Edwards (<adamed@chef.io>) # Copyright:: Copyright 2014 Chef Software, Inc. # License:: Apache License, Version 2.0 # diff --git a/lib/wmi-lite/wmi.rb b/lib/wmi-lite/wmi.rb index 6c39479..9f7c07c 100644 --- a/lib/wmi-lite/wmi.rb +++ b/lib/wmi-lite/wmi.rb @@ -1,5 +1,5 @@ # -# Author:: Adam Edwards (<adamed@getchef.com>) +# Author:: Adam Edwards (<adamed@chef.io>) # Copyright:: Copyright 2014 Chef Software, Inc. # License:: Apache License, Version 2.0 # diff --git a/lib/wmi-lite/wmi_exception.rb b/lib/wmi-lite/wmi_exception.rb index 9b23247..4ea3a41 100644 --- a/lib/wmi-lite/wmi_exception.rb +++ b/lib/wmi-lite/wmi_exception.rb @@ -1,5 +1,5 @@ # -# Author:: Adam Edwards (<adamed@getchef.com>) +# Author:: Adam Edwards (<adamed@chef.io>) # Copyright:: Copyright 2014 Chef Software, Inc. # License:: Apache License, Version 2.0 # @@ -74,4 +74,4 @@ module WmiLite end end end - + diff --git a/lib/wmi-lite/wmi_instance.rb b/lib/wmi-lite/wmi_instance.rb index ff0e9c6..947b3fa 100644 --- a/lib/wmi-lite/wmi_instance.rb +++ b/lib/wmi-lite/wmi_instance.rb @@ -1,5 +1,5 @@ # -# Author:: Adam Edwards (<adamed@getchef.com>) +# Author:: Adam Edwards (<adamed@chef.io>) # Copyright:: Copyright 2014 Chef Software, Inc. # License:: Apache License, Version 2.0 # diff --git a/spec/functional/wmi_spec.rb b/spec/functional/wmi_spec.rb index 0be3778..cf16f44 100644 --- a/spec/functional/wmi_spec.rb +++ b/spec/functional/wmi_spec.rb @@ -1,5 +1,5 @@ # -# Author:: Adam Edwards (<adamed@getchef.com>) +# Author:: Adam Edwards (<adamed@chef.io>) # # Copyright:: 2014, Chef Software, Inc. # @@ -76,18 +76,18 @@ describe WmiLite::Wmi, :windows_only do let(:cardinality_transform) { lambda{|x| x} } context 'using first_of' do let(:cardinality_transform) { lambda{|x| x.nil? ? [] : [x] } } - let(:query_method) { :first_of } + let(:query_method) { :first_of } it_behaves_like 'a valid WMI query' end context 'using instances_of' do - let(:query_method) { :instances_of } + let(:query_method) { :instances_of } it_behaves_like 'a valid WMI query' end context 'using query' do let(:wmi_query) { "select * from #{wmi_class}" } - let(:query_method) { :query } + let(:query_method) { :query } it_behaves_like 'a valid WMI query' end end @@ -132,13 +132,13 @@ describe WmiLite::Wmi, :windows_only do # Turn %SYSTEMROOT% into c:\windows # so we can compare with what's in ENV - evaluated_value = `echo #{value}`.strip + evaluated_value = `echo #{value}`.strip expect(evaluated_value).to eql(`echo #{ENV[name]}`.strip) verified_count += 1 end end - + # There are at least 3 variables we could verify in a default # Windows configuration, make sure we saw some expect(verified_count).to be >= 3 @@ -151,7 +151,7 @@ describe WmiLite::Wmi, :windows_only do caption_mixed = result['Caption'] caption_lower = result['caption'] - expect(caption_mixed.nil?).to eql(false) + expect(caption_mixed.nil?).to eql(false) expect(caption_lower.nil?).to eql(false) expect(caption_mixed.length).to be > 0 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ee9e966..58036cc 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,7 +4,6 @@ require 'wmi-lite' RSpec.configure do |config| config.include(RSpec::Matchers) - config.treat_symbols_as_metadata_keys_with_true_values = true config.filter_run :focus => true config.filter_run_excluding :windows_only => true if ! (RUBY_PLATFORM =~ /mswin|mingw32|windows/) config.run_all_when_everything_filtered = true diff --git a/spec/unit/wmi_spec.rb b/spec/unit/wmi_spec.rb index 0408322..a116ec9 100644 --- a/spec/unit/wmi_spec.rb +++ b/spec/unit/wmi_spec.rb @@ -1,5 +1,5 @@ # -# Author:: Adam Edwards (<adamed@getchef.com>) +# Author:: Adam Edwards (<adamed@chef.io>) # # Copyright:: 2014, Chef Software, Inc. # diff --git a/wmi-lite.gemspec b/wmi-lite.gemspec index ea2aa21..3d2482f 100644 --- a/wmi-lite.gemspec +++ b/wmi-lite.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.name = 'wmi-lite' spec.version = WmiLite::VERSION spec.authors = ['Adam Edwards'] - spec.email = ['dev@getchef.com'] + spec.email = ['dev@chef.io'] spec.description = 'A lightweight utility over win32ole for accessing basic ' \ 'WMI (Windows Management Instrumentation) functionality ' \ 'in the Microsoft Windows operating system. It has no ' \ @@ -27,5 +27,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec' spec.add_development_dependency 'rake' spec.add_development_dependency 'pry' - spec.add_development_dependency 'pry-debugger' + spec.add_development_dependency 'pry-byebug' end |