summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-06-13 12:21:25 +0100
committerThom May <thom@chef.io>2018-06-13 12:21:25 +0100
commitf1dbd1ff5c2250ba9945b6c9509f2a7bd44be770 (patch)
tree8012c7767729de1d8e8397bbc1291f13e3cad920
parent9a6bd8062ef3a379223cb90f0fd08882b6045b7e (diff)
downloadmixlib-config-tm/stylinate.tar.gz
fix style warnings with latest rubocoptm/stylinate
Signed-off-by: Thom May <thom@chef.io>
-rw-r--r--Rakefile4
-rw-r--r--features/steps/config_steps.rb16
2 files changed, 9 insertions, 11 deletions
diff --git a/Rakefile b/Rakefile
index a4dbb5d..b4e6ddb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -14,8 +14,6 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end
-gem_spec = eval(File.read("mixlib-config.gemspec"))
-
begin
require "chefstyle"
require "rubocop/rake_task"
@@ -28,7 +26,7 @@ end
RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = "rdoc"
- rdoc.title = "mixlib-config #{gem_spec.version}"
+ rdoc.title = "mixlib-config #{Mixlib::Config::VERSION}"
rdoc.rdoc_files.include("README*")
rdoc.rdoc_files.include("lib/**/*.rb")
end
diff --git a/features/steps/config_steps.rb b/features/steps/config_steps.rb
index 461ea9f..ac42082 100644
--- a/features/steps/config_steps.rb
+++ b/features/steps/config_steps.rb
@@ -16,10 +16,10 @@
# limitations under the License.
#
-Given /^a configuration class '(.+)'$/ do |classname|
+Given(/^a configuration class '(.+)'$/) do |classname|
end
-When /^I set '(.+)' to '(.+)' in configuration class '(.+)'$/ do |key, value, classname|
+When(/^I set '(.+)' to '(.+)' in configuration class '(.+)'$/) do |key, value, classname|
#ConfigIt[key.to_sym] = value
if classname == "ConfigIt"
@@ -31,11 +31,11 @@ When /^I set '(.+)' to '(.+)' in configuration class '(.+)'$/ do |key, value, cl
end
end
-Then /^config option '(.+)' is '(.+)'$/ do |key, value|
+Then(/^config option '(.+)' is '(.+)'$/) do |key, value|
ConfigIt[key.to_sym].should == value
end
-Then /^in configuration class '(.+)' config option '(.+)' is '(.+)'$/ do |classname, key, value|
+Then(/^in configuration class '(.+)' config option '(.+)' is '(.+)'$/) do |classname, key, value|
if classname == "ConfigIt"
ConfigIt[key.to_sym].should == value
elsif classname == "ConfigItToo"
@@ -45,21 +45,21 @@ Then /^in configuration class '(.+)' config option '(.+)' is '(.+)'$/ do |classn
end
end
-When /^I set '(.+)' to:$/ do |key, foo_table|
+When(/^I set '(.+)' to:$/) do |key, foo_table|
ConfigIt[key.to_sym] = Array.new
foo_table.hashes.each do |hash|
ConfigIt[key.to_sym] << hash["key"]
end
end
-Then /^an array is returned for '(.+)'$/ do |key|
+Then(/^an array is returned for '(.+)'$/) do |key|
ConfigIt[key.to_sym].should be_a_kind_of(Array)
end
-Given /^a configuration file '(.+)'$/ do |filename|
+Given(/^a configuration file '(.+)'$/) do |filename|
@config_file = File.join(File.dirname(__FILE__), "..", "support", filename)
end
-When /^I load the configuration$/ do
+When(/^I load the configuration$/) do
ConfigIt.from_file(@config_file)
end