Author |
Kurt Yoder (ktyopscode@yoderhome.com) |
Copyright |
Copyright © 2010 Kurt Yoder |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Adam Jacob (<adam@opscode.com>) |
Copyright |
Copyright © 2008 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Adam Jacob (<adam@opscode.com>) |
Copyright |
Copyright © 2008 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Serdar Sutay (<serdar@opscode.com>) |
Copyright |
Copyright © 2014 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Serdar Sutay (<serdar@opscode.com>) |
Copyright |
Copyright © 2014 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Adam Jacob (<adam@opscode.com>) |
Copyright |
Copyright © 2008 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Serdar Sutay (<serdar@opscode.com>) |
Copyright |
Copyright © 2013 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Serdar Sutay (<serdar@opscode.com>) |
Copyright |
Copyright © 2013 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author |
Serdar Sutay (<serdar@opscode.com>) |
Copyright |
Copyright © 2013 Opscode, Inc. |
License |
Apache License, Version 2.0 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Extracted abs_path to support testability: This method gets overridden at test time, to force the shell to check ohai/spec/unit/path/original/absolute/path/to/exe
# File lib/ohai/dsl/plugin.rb, line 74 def self.abs_path( abs_path ) abs_path end
Cross platform /dev/null to support testability
# File lib/ohai/dsl/plugin.rb, line 63 def self.dev_null if RUBY_PLATFORM =~ /mswin|mingw|windows/ "NUL" else "/dev/null" end end
# File lib/ohai/dsl/plugin.rb, line 46 def self.plugin(name, &block) raise Ohai::Exceptions::InvalidPluginName, "#{name} is not a valid plugin name. A valid plugin name is a symbol which begins with a capital letter and contains no underscores" unless NamedPlugin.valid_name?(name) plugin = nil if NamedPlugin.strict_const_defined?(name) plugin = NamedPlugin.const_get(name) plugin.class_eval(&block) else klass = Class.new(DSL::Plugin::VersionVII, &block) plugin = NamedPlugin.const_set(name, klass) end plugin end
Generated with the Darkfish Rdoc Generator 2.