Sha256: 8a126ec000b60b201d912638d5dbeebc2a121c2d1112d5a815b391a018676684
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
class String def capitalize_without_downcasing self[0,1].capitalize + self[1..-1] end def downcase_first_letter self[0,1].downcase + self[1..-1] end end module RubossOnRuby module Configuration APP_ROOT = defined?(RAILS_ROOT) ? RAILS_ROOT : Merb.root def extract_names project_name = APP_ROOT.split("/").last.camelcase project_name_downcase = project_name.downcase begin config = YAML.load(File.open("#{APP_ROOT}/config/ruboss.yml")) base_package = config['base-package'] || project_name_downcase base_folder = base_package.gsub('.', '/') controller_name = config['controller-name'] || "#{project_name}Controller" rescue base_folder = base_package = project_name_downcase controller_name = "#{project_name}Controller" end [project_name, project_name_downcase, controller_name, base_package, base_folder] end def list_as_files(dir_name) Dir.entries(dir_name).grep(/\.as$/).map { |name| name.sub(/\.as$/, "") }.join(", ") end def list_mxml_files(dir_name) Dir.entries(dir_name).grep(/\.mxml$/).map { |name| name.sub(/\.mxml$/, "") } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruboss_on_ruby-1.0.1 | lib/ruboss_on_ruby/configuration.rb |