Class: Gokart::Environment
Instance Method Summary collapse
- #directories ⇒ Object
-
#initialize(root, app_name) ⇒ Environment
constructor
A new instance of Environment.
Methods inherited from Base
#app_name_valid?, #build_app, #copy_files, #create_dirs
Constructor Details
#initialize(root, app_name) ⇒ Environment
Returns a new instance of Environment.
8 9 10 11 12 13 14 15 16 |
# File 'lib/gokart/environment.rb', line 8 def initialize(root, app_name) @logger = Logger.new($stderr) @logger.level = Logger::FATAL @app_parent_path = Pathname(Dir.pwd.to_s) @app_base_path = @app_parent_path.join(app_name) @app_name = app_name @assets_path = Pathname(root).join('assets') end |
Instance Method Details
#directories ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/gokart/environment.rb', line 18 def directories paths = [ File.join(@app_name,'bin'), File.join(@app_name,'config'), File.join(@app_name,'lib'), File.join(@app_name,'pkg'), File.join(@app_name,'spec'), File.join(@app_name,'src','server','config'), File.join(@app_name,'src','server','controller'), File.join(@app_name,'src','server','view'), File.join(@app_name,'src','www','app','erb_helpers'), File.join(@app_name,'src','www','app','images'), File.join(@app_name,'src','www','app','sass'), File.join(@app_name,'src','www','app','scripts','controllers'), File.join(@app_name,'src','www','app','scripts','models'), File.join(@app_name,'src','www','app','scripts','pages'), File.join(@app_name,'src','www','app','scripts','utilities'), File.join(@app_name,'src','www','app','scripts','views'), File.join(@app_name,'src','www','app','templates','pages'), File.join(@app_name,'src','www','app','templates','partials'), File.join(@app_name,'src','www','spec','helpers'), File.join(@app_name,'src','www','spec','support'), File.join(@app_name,'src','www','spec','utilities'), File.join(@app_name,'src','www','vendor','css'), File.join(@app_name,'src','www','vendor','images'), File.join(@app_name,'src','www','vendor','js'), File.join(@app_name,'tasks'), ] end |