# File lib/gemnasium.rb, line 123
    def create_project options
      @config = load_config(options[:project_path])
      ensure_config_is_up_to_date!

      if has_project_slug?
        quit_because_of("You already have a project slug refering to an existing project. Please remove this project slug from your configuration file to create a new project.")
      end

      project_params = { name: @config.project_name, branch: @config.project_branch}

      result = request("#{connection.api_path_for('projects')}", project_params)
      project_name, project_slug, remaining_slot_count = result.values_at 'name', 'slug', 'remaining_slot_count'

      notify "Project `#{ project_name }` successfully created.", :green
      notify "Project slug is `#{ project_slug }`.", :green
      notify "Remaining private slots: #{ remaining_slot_count }", :blue

      if @config.writable?
        @config.store_value!(:project_slug, project_slug, "This unique project slug has been set by `gemnasium create`.")
        notify "Your configuration file has been updated."
      else
        notify "Configuration file cannot be updated. Please edit the file and update the project slug manually."
      end

    rescue => exception
      quit_because_of(exception.message)
    end