Sha256: 78114ec4a6bdde3f36fc812a8848096716c737f91d8f993f098e1fdb6e22fa2a

Contents?: true

Size: 1.52 KB

Versions: 18

Compression:

Stored size: 1.52 KB

Contents

# ===========================================================================
# Project:   Abbot - SproutCore Build Tools
# Copyright: ©2009 Apple Inc.
#            portions copyright @2006-2009 Sprout Systems, Inc.
#            and contributors
# ===========================================================================

module SC

  class Tools

    desc "server", "Starts the development server"
    method_options  :daemonize  => false,
                    :pid        => :string,
                    :port       => :string,
                    :host       => :string,
                    :irb        => false,
                    :filesystem => true
    def server
      prepare_mode!('debug') # set mode again, using debug as default

      SC.env[:build_prefix]   = options[:buildroot] if options[:buildroot]
      SC.env[:staging_prefix] = options[:stageroot] if options[:stageroot]

      # get project and start service.
      project = requires_project!

      # start shell if passed
      if options[:irb]
        require 'irb'
        require 'irb/completion'
        if File.exists? ".irbrc"
          ENV['IRBRC'] = ".irbrc"
        end

        SC.project = project
        SC.logger << "SproutCore v#{SC::VERSION} Interactive Shell\n"
        SC.logger << "SC.project = #{project.project_root}\n"
        ARGV.clear # do not pass onto IRB
        IRB.start
      else
        SC.logger << "SproutCore v#{SC::VERSION} Development Server\n"
        SC::Rack::Service.start(options.merge(:project => project))
      end
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sproutcore-1.4.4-java lib/sproutcore/tools/server.rb
sproutcore-1.4.4 lib/sproutcore/tools/server.rb
sproutcore-1.4.3.1 lib/sproutcore/tools/server.rb
sproutcore-1.4.3-java lib/sproutcore/tools/server.rb
sproutcore-1.4.3 lib/sproutcore/tools/server.rb
sproutcore-1.4.2-java lib/sproutcore/tools/server.rb
sproutcore-1.4.2 lib/sproutcore/tools/server.rb
sproutcore-1.4.1-java lib/sproutcore/tools/server.rb
sproutcore-1.4.1 lib/sproutcore/tools/server.rb
sproutcore-1.4.0-java lib/sproutcore/tools/server.rb
sproutcore-1.4.0 lib/sproutcore/tools/server.rb
sproutcore-1.4.0.rc.5 lib/sproutcore/tools/server.rb
sproutcore-1.4.0.rc.4 lib/sproutcore/tools/server.rb
sproutcore-1.4.0.rc.3 lib/sproutcore/tools/server.rb
sproutcore-1.4.0.rc.2 lib/sproutcore/tools/server.rb
sproutcore-1.4.0.rc lib/sproutcore/tools/server.rb
sproutcore-1.0.1049.pre.2 lib/sproutcore/tools/server.rb
sproutcore-1.0.1049.pre.1 lib/sproutcore/tools/server.rb