We have been discouraging the single rb directly in the SU plugin directory since around v7 and more strongly since the Extension Warehouse came online for v2013.
So, the only file of your plugin set that goes in the SU plugin directory, is the
SketchupExtension instance registration script. This allows the user to switch the plugin off or on in the Extensions panel of the Preferences dialog.
All other files, button images etc. should go in the plugin’s subdirectory.
The extension registration script and the plugin’s subdirectory must share the same name, and should be your toplevel author (or company) module name + “_” + the plugin name (often an exact match for the plugin’s submodule name.)
Let’s say your plugin was called DeckWizard, and all your various plugin modules are inside a toplevel module named “Chickering”. The name of the extension regisration script would be “Chickering_DeckWizard.rb” and it’s sub-dir would be “Chickering_DeckWizard”.
See the API’s SketchupExtension class:
Updated with newer more detailed requirements from:
… especially under “Packaging”
The #1 rule of extensions, regardless of any examples your may come across, is, that there is never any good reason for a plugin to have any code evaluating outside it’s plugin sub-module (which should be inside your personal unique toplevel module.)
I say this because the examples in the API documentation are only the “meat” and are shown unwrapped in any module or class namespace.