Skip to content

Commit 6839075

Browse files
committed
[CHEF-2178] don't scrub the .rb extension from site-plugins now
1 parent 9e8ad51 commit 6839075

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

chef/lib/chef/knife/core/subcommand_loader.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def site_subcommands
5050
# finally search ~/.chef/plugins/knife/*.rb
5151
user_specific_files.concat Dir.glob(File.join(env['HOME'], '.chef', 'plugins', 'knife', '*.rb'))
5252

53-
user_specific_files.map! { |path| path[/(.+).rb/, 1] }
5453
user_specific_files
5554
end
5655

chef/spec/unit/knife/core/subcommand_loader_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
end
4444

4545
it "finds user-specific subcommands in the user's ~/.chef directory" do
46-
expected_command = File.join(@home, '.chef', 'plugins', 'knife', 'example_home_subcommand')
46+
expected_command = File.join(@home, '.chef', 'plugins', 'knife', 'example_home_subcommand.rb')
4747
@loader.site_subcommands.should include(expected_command)
4848
end
4949

5050
it "finds repo specific subcommands by searching for a .chef directory" do
51-
expected_command = File.join(CHEF_SPEC_DATA, 'knife-site-subcommands', 'plugins', 'knife', 'example_subcommand')
51+
expected_command = File.join(CHEF_SPEC_DATA, 'knife-site-subcommands', 'plugins', 'knife', 'example_subcommand.rb')
5252
@loader.site_subcommands.should include(expected_command)
5353
end
5454
end

0 commit comments

Comments
 (0)