Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got some more bug fixes #43

Merged
merged 2 commits into from
Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/chef-workstation/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GIT
PATH
remote: .
specs:
chef-workstation (0.1.0)
chef-workstation (0.1.19)
mixlib-cli
mixlib-config
mixlib-install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run(params)
end

# TODO raise wrapped errors that get formatted and displayed appropriately IE SHACK-105
ATTRIBUTE_MATCHER = /^([a-zA-Z0-9]+)=(\w+)$/
ATTRIBUTE_MATCHER = /^([a-zA-Z0-9]+)=(.+)$/
def validate_params(params)
if params.size < 3
raise OptionValidationError.new("CHEFVAL002")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
module ChefWorkstation::UI
# TODO - thi sis more of an error formatter...
class ErrorPrinter
attr_reader :pastel, :show_log, :show_stack, :exception
attr_reader :pastel, :show_log, :show_stack, :exception, :conn
# TODO define 't' as a method is a temporary workaround
# to ensure that text key lookups are testable.
def t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@

describe "#format_attributes" do
it "parses attributes into a hash" do
provided = %w{key1=value key2=1 key3=true key4=FaLsE key5=0777}
provided = %w{key1=value key2=1 key3=true key4=FaLsE key5=0777 key6=https://some.website}
expected = {
"key1" => "value",
"key2" => 1,
"key3" => true,
"key4" => false,
"key5" => "0777"
"key5" => "0777",
"key6" => "https://some.website",
}
expect(cmd.format_attributes(provided)).to eq(expected)
end
Expand Down