Module: CKick
- Defined in:
- lib/ckick.rb,
lib/ckick/path.rb,
lib/ckick/cflag.rb,
lib/ckick/plugin.rb,
lib/ckick/target.rb,
lib/ckick/cxxflag.rb,
lib/ckick/library.rb,
lib/ckick/project.rb,
lib/ckick/version.rb,
lib/ckick/hashable.rb,
lib/ckick/ckickfile.rb,
lib/ckick/executable.rb,
lib/ckick/find_plugin.rb,
lib/ckick/dependencies.rb,
lib/ckick/include_path.rb,
lib/ckick/library_link.rb,
lib/ckick/library_path.rb,
lib/ckick/compiler_flag.rb,
lib/ckick/path_delegate.rb,
lib/ckick/sub_directory.rb,
lib/ckick/plugin_delegate.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Hashable, PathDelegate, PluginDelegate Classes: BadFileContentError, BadFlagError, BadIncludePathError, BadLibError, BadLibraryPathError, BadProjectNameError, BadSourceError, BadSubDirectoryError, CFlag, CXXFlag, CompilerFlag, Dependencies, Error, Executable, IllegalInitializationError, IncludePath, Library, LibraryLink, LibraryPath, NoNameError, NoParentDirError, NoSourceError, NoSuchDirectoryError, Path, Plugin, Project, SubDirectory, Target
Constant Summary collapse
- RESOURCE_DIR =
location of the resource directory.
RESOURCE_DIR
contains default project files and non-code utilities File.join(File.dirname(File.dirname(__FILE__)), "resource")
- VERSION =
gem version
"0.1.1"
Class Method Summary collapse
-
.find_builtin_plugins ⇒ Object
finds ruby source files in $PLUGIN_PATH.
-
.load_builtin_plugins ⇒ Object
requires all ruby source files in $PLUGIN_PATH.
-
.load_ckickfile(dir = Dir.pwd, filename = "CKickfile") ⇒ Object
loads a CKickfile in
dir
*dir
- directory containing file, defaults to Dir.pwd *filename
- filename, defaults to “CKickfile”.
Class Method Details
.find_builtin_plugins ⇒ Object
finds ruby source files in $PLUGIN_PATH
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ckick/find_plugin.rb', line 11 def self.find_builtin_plugins res = [] $PLUGIN_PATH.each do |dir| files = Dir.entries(dir).select { |entry| entry.length > 3 && entry[-3..-1] == '.rb'} files.each do |file| res << File.join(dir, file) end end res.flatten(1) end |
.load_builtin_plugins ⇒ Object
requires all ruby source files in $PLUGIN_PATH
23 24 25 26 27 |
# File 'lib/ckick/find_plugin.rb', line 23 def self.load_builtin_plugins find_builtin_plugins.each do |file| require file[0..-4] end end |
.load_ckickfile(dir = Dir.pwd, filename = "CKickfile") ⇒ Object
loads a CKickfile in dir
-
dir
- directory containing file, defaults to Dir.pwd -
filename
- filename, defaults to “CKickfile”
11 12 13 |
# File 'lib/ckick/ckickfile.rb', line 11 def self.load_ckickfile(dir=Dir.pwd, filename="CKickfile") JSON.parse(File.read(File.join(dir, filename)), symbolize_names: true) end |