Sha256: 789dbf6f42a6a093691dcb03d71236351ba52b2eafbc8509c780d416ed68b877

Contents?: true

Size: 696 Bytes

Versions: 17

Compression:

Stored size: 696 Bytes

Contents

module Nucleon
module Extension
class CorlConfig < Nucleon.plugin_class(:nucleon, :extension)
  
  def configuration_file_base(config)
    plugin      = config[:plugin]
    file_bases  = [ :build, :vagrant] 
    translators = Nucleon.loaded_plugins(:nucleon, :translator).keys
    
    Dir.glob(File.join(plugin.directory, '*.*')).each do |file|
      file_ext = File.extname(file)
      
      if translators.include?(file_ext.sub('.', '').to_sym)
        file_base = File.basename(file).gsub(/#{file_ext}$/, '').to_sym
        
        unless file_base == :corl || file_bases.include?(file_base)
          file_bases << file_base
        end
      end
    end
    file_bases
  end
end
end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
corl-0.5.18 lib/nucleon/extension/corl_config.rb
corl-0.5.17 lib/nucleon/extension/corl_config.rb
corl-0.5.16 lib/nucleon/extension/corl_config.rb
corl-0.5.15 lib/nucleon/extension/corl_config.rb
corl-0.5.14 lib/nucleon/extension/corl_config.rb
corl-0.5.13 lib/nucleon/extension/corl_config.rb
corl-0.5.12 lib/nucleon/extension/corl_config.rb
corl-0.5.11 lib/nucleon/extension/corl_config.rb
corl-0.5.10 lib/nucleon/extension/corl_config.rb
corl-0.5.9 lib/nucleon/extension/corl_config.rb
corl-0.5.8 lib/nucleon/extension/corl_config.rb
corl-0.5.7 lib/nucleon/extension/corl_config.rb
corl-0.5.6 lib/nucleon/extension/corl_config.rb
corl-0.5.5 lib/nucleon/extension/corl_config.rb
corl-0.5.4 lib/nucleon/extension/corl_config.rb
corl-0.5.3 lib/nucleon/extension/corl_config.rb
corl-0.5.2 lib/nucleon/extension/corl_config.rb