lib/sproutcore/library.rb
# Internal method loads the actual environment.  Get the ruby file and
# eval it in the context of the library object.
Internal method loads the actual environment.  Get the ruby file and
eval it in the context of the library object.
Internal method loads the actual environment . Get the ruby file and eval it in the context of the library object .
def load_environment!(opts=nil)
      env_path = File.join(root_path, 'sc-config')
      env_path = File.join(root_path, 'sc-config.rb') if !File.exists?(env_path)
      @environment = {}
      if File.exists?(env_path)
        f = File.read(env_path)
        eval(f) 
      end
      if build_numbers = @load_opts[:build_numbers]
        @load_opts.delete(:build_numbers)
        build_numbers.each do | bundle_name, build_number |
          env = @environment[bundle_name.to_sym] ||= {}
          env[:build_number] = build_number
        end
      end
      (@environment[:all] ||= {}).merge!(@load_opts)
    end
def load_environment! ( opts = nil ) env_path = File . join ( root_path , 'sc-config' ) env_path = File . join ( root_path , 'sc-config.rb' ) if ! File . exists? ( env_path ) @environment = { } if File . exists? ( env_path ) f = File . read ( env_path ) eval ( f ) end if build_numbers = @load_opts [ :build_numbers ] @load_opts . delete ( :build_numbers ) build_numbers . each do | bundle_name , build_number | env = @environment [ bundle_name . to_sym ] ||= { } env [ :build_number ] = build_number end end ( @environment [ :all ] ||= { } ) . merge! ( @load_opts ) end
Internal method loads the actual environment.
Internal method loads the actual environment .
# execute the config file as if it belongs. # Override any all options with load_opts
opts
<not_specific>