text:
/** \file kill.c
  The killring.

  Works like the killring in emacs and readline. The killring is cut
  and paste with a memory of previous cuts. It supports integration
  with the X clipboard.
*/

#include "config.h"

#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <termios.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <algorithm>

#include "fallback.h"
#include "util.h"

#include "wutil.h"
#include "kill.h"
#include "proc.h"
#include "sanity.h"
#include "common.h"
#include "env.h"
#include "exec.h"
#include "path.h"

/**
   Maximum entries in killring
*/
#define KILL_MAX 8192

/** Last kill string */
//static ll_node_t *kill_last=0;

/** Current kill string */
//static ll_node_t *kill_current=0;

/** Kill ring */
typedef std::list<wcstring> kill_list_t;
static kill_list_t kill_list;

/**
   Contents of the X clipboard, at last time we checked it
*/
static wchar_t *cut_buffer=0;

/**
   Test if the xsel command is installed.  Since this is called often,
   cache the result.
*/
static int has_xsel()
{
    static signed char res=-1;
    if (res < 0)
    {
        res = !! path_get_path(L"xsel", NULL);
    }

    return res;
}

void kill_add(const wcstring &str)
{
    ASSERT_IS_MAIN_THREAD();
    if (str.empty())
        return;

    wcstring cmd;
    wchar_t *escaped_str = NULL;
    kill_list.push_front(str);

    /*
       Check to see if user has set the FISH_CLIPBOARD_CMD variable,
       and, if so, use it instead of checking the display, etc.

       I couldn't think of a safe way to allow overide of the echo
       command too, so, the command used must accept the input via stdin.
    */

    const env_var_t clipboard_wstr = env_get_string(L"FISH_CLIPBOARD_CMD");
    if (!clipboard_wstr.missing())
    {
        escaped_str = escape(str.c_str(), 1);
        cmd.assign(L"echo -n ");
        cmd.append(escaped_str);
        cmd.append(clipboard_wstr);
    }
    else
    {
        /* This is for sending the kill to the X copy-and-paste buffer */
        if (!has_xsel())
        {
            return;
        }

        const env_var_t disp_wstr = env_get_string(L"DISPLAY");
        if (!disp_wstr.missing())
        {
            escaped_str = escape(str.c_str(), ESCAPE_ALL);
            cmd.assign(L"echo -n ");
            cmd.append(escaped_str);
            cmd.append(L" | xsel -i -b");
        }
    }

    if (! cmd.empty())
    {
        if (exec_subshell(cmd, false /* do not apply exit status */) == -1)
        {
            /*
               Do nothing on failiure
            */
        }

        free(cut_buffer);

        cut_buffer = escaped_str;
    }
}

/**
   Remove first match for specified string from circular list
*/
static void kill_remove(const wcstring &s)
{
    ASSERT_IS_MAIN_THREAD();
    kill_list_t::iterator iter = std::find(kill_list.begin(), kill_list.end(), s);
    if (iter != kill_list.end())
        kill_list.erase(iter);
}

void kill_replace(const wcstring &old, const wcstring &newv)
{
    kill_remove(old);
    kill_add(newv);
}

const wchar_t *kill_yank_rotate()
{
    ASSERT_IS_MAIN_THREAD();
    // Move the first element to the end
    if (kill_list.empty())
    {
        return NULL;
    }
    else
    {
        kill_list.splice(kill_list.end(), kill_list, kill_list.begin());
        return kill_list.front().c_str();
    }
}

/**
   Check the X clipboard. If it has been changed, add the new
   clipboard contents to the fish killring.
*/
static void kill_check_x_buffer()
{
    if (!has_xsel())
        return;

    const env_var_t disp = env_get_string(L"DISPLAY");
    if (! disp.missing())
    {
        size_t i;
        wcstring cmd = L"xsel -t 500 -b";
        wcstring new_cut_buffer=L"";
        wcstring_list_t list;
        if (exec_subshell(cmd, list, false /* do not apply exit status */) != -1)
        {

            for (i=0; i<list.size(); i++)
            {
                wcstring next_line = escape_string(list.at(i), 0);
                if (i > 0) new_cut_buffer += L"\\n";
                new_cut_buffer += next_line;
            }

            if (new_cut_buffer.size() > 0)
            {
                /*
                  The buffer is inserted with backslash escapes,
                  since we don't really like tabs, newlines,
                  etc. anyway.
                */

                if (cut_buffer == NULL || cut_buffer != new_cut_buffer)
                {
                    free(cut_buffer);
                    cut_buffer = wcsdup(new_cut_buffer.c_str());
                    kill_list.push_front(new_cut_buffer);
                }
            }
        }
    }
}

const wchar_t *kill_yank()
{
    kill_check_x_buffer();
    if (kill_list.empty())
    {
        return L"";
    }
    else
    {
        return kill_list.front().c_str();
    }
}

void kill_sanity_check()
{
}

void kill_init()
{
}

void kill_destroy()
{
    if (cut_buffer)
        free(cut_buffer);
}


text:
exports.isOpenTagOnly = function(tagName) {
    if (tagName === 'bar-img') {
        return true;
    } else if (tagName === 'link') {
        return false;
    } else {
        return undefined;
    }
};

redpajama_set_name: RedPajamaGithub


text:
const mongo = require('mongoose');
const userSchema = require('./user.js');
const partySchema = require('./party.js');
const emailTokenSchema = require('./emailTokens.js');
const mongoDbConfig = require('./../config').MongoDb;

mongo.connect(mongoDbConfig.dbUrl);
mongo.connection.on('error', (err) => console.error.bind(console, err));
mongo.Promise = global.Promise;

const partyModel = mongo.model('Party', partySchema);
const userModel = mongo.model('User', userSchema);
const tokenModel = mongo.model('Token', emailTokenSchema);

module.exports.UserModel = userModel;
module.exports.PartyModel = partyModel;
module.exports.TokenModel = tokenModel;


text:
package org.apache.camel.model;

import javax.xml.bind.annotation.XmlTransient;

/**
 * Temporary model used internally by advice-with
 */
@XmlTransient
public class AdviceWithDefinition extends OutputDefinition<AdviceWithDefinition> {

    public AdviceWithDefinition() {
    }

    @Override
    public String getShortName() {
        return "adviceWith";
    }

    @Override
    public String getLabel() {
        return "adviceWith";
    }

}


text:
(function () {
  var ns = $.namespace('pskl.devtools');

  ns.init = function () {
    var href = document.location.href.toLowerCase();
    // test tools
    var testModeOn = href.indexOf('test=true') !== -1;
    if (testModeOn) {
      this.testRecorder = new pskl.devtools.DrawingTestRecorder(pskl.app.piskelController);
      this.testRecorder.init();

      this.testRecordController = new pskl.devtools.TestRecordController(this.testRecorder);
      this.testRecordController.init();
    }

    // test tools
    var runTestModeOn = href.indexOf('test-run=') !== -1;
    if (runTestModeOn) {
      var testPath = href.split('test-run=')[1];
      this.testRunner = new pskl.devtools.DrawingTestRunner(testPath);
      this.testRunner.start();
    }

    // test tools
    var runSuiteModeOn = href.indexOf('test-suite=') !== -1;
    if (runSuiteModeOn) {
      var suitePath = href.split('test-suite=')[1];
      this.testSuiteController = new pskl.devtools.DrawingTestSuiteController(suitePath);
      this.testSuiteController.init();
      this.testSuiteController.start();
    }
  };

})();


text:
package com.wangshan.service;

import com.wangshan.models.User;

/**
 * Created by Administrator on 2015/11/15.
 */
public interface AdminService {
    public User getUser(Long id);
    public Integer addUser(User user);
    public Integer updateUser(User user);
    public Integer deleteUser(Long id);
}


text:
.field-selectbox_link_plus .sblp-view-multilingual_autocomplete select.target {
	display: none;
}

div.sblp-multilingual_autocomplete {
	max-height: 332px;
	overflow-y: auto;
	overflow-x: hidden;
	border: 1px solid #ccc;
	margin-top: 5px;
	position: relative;
}

div.sblp-multilingual_autocomplete h3 {
	padding: 5px;
}

div.sblp-multilingual_autocomplete h3 em {
	font-size: 10px;
	font-weight: normal;
	font-style: normal;
}

div.sblp-multilingual_autocomplete label {
	margin: 0;
	padding: 5px;
	border-bottom: 1px solid #ccc;
	position: relative;
}

div.sblp-multilingual_autocomplete label input {
	float: left;
}

div.sblp-multilingual_autocomplete span.text {
	display: block;
	margin-left: 20px;
}

div.sblp-multilingual_autocomplete label .sblp-multilingual_autocomplete-actions {
	/*display: none;*/
	display: inline;
	position: absolute;
	right: 0;
	top: 3px;
	background: transparent;
	padding: 0 0 0 10px;
}

div.sblp-multilingual_autocomplete label:hover {
	background-color: #eee;
}

div.sblp-multilingual_autocomplete span.hide-others {
	position: absolute;
	top: 5px;
	right: 5px;
}

div.sblp-multilingual_autocomplete label .sblp-multilingual_autocomplete-actions a {
	border: none;
}

div.sblp-multilingual_autocomplete label .sblp-multilingual_autocomplete-actions a .icon {
	font-size: 15px;
	margin-right: 10px;
}

div.sblp-multilingual_autocomplete label .sblp-multilingual_autocomplete-actions a:hover .icon {
	color: #333;
}

.sblp_autocomplete_results {
	padding: 0px;
	border: 1px solid #999;
	background-color: white;
	overflow: hidden;
	z-index: 99999;
}

.sblp_autocomplete_results ul {
	width: 100%;
	list-style-position: outside;
	list-style: none;
	padding: 0;
	margin: 0;
	font-family: Lucida Grande, Leelawadee, Lucida Sans Unicode, sans-serif;
	font-size: 1em;
	color: #343434;
}

.sblp_autocomplete_results li {
	margin: 0px;
	padding: 5px;
	cursor: default;
	display: block;
	line-height: 2.15;
	overflow: hidden;
	border-bottom: 1px solid #ddd;
}

.sblp_autocomplete_loading {
	/*background: white url('loading.gif') right center no-repeat;*/
}

.sblp_autocomplete_odd {
	background-color: #f2f2f2;
}

.sblp_autocomplete_over {
	background-color: #5273C0;
	color: white;
}

.sblp_autocomplete_over a {
	color: white;
}

.sblp_autocomplete_list {
	width: 100%;
	padding: 0;
	margin: .5em 0;
	list-style: none;
}

.sblp_autocomplete_list li {
	margin-top: -1px;
	padding: .5em;
	border: 1px solid #ddd;
}

.sblp_autocomplete_list li a.deselect {
	margin-right: 2em;
}

span.sblp-buttons a.sblp-add .icon {
	color: #fff;
}


text: -1}">{{ item[valueString] }}


text:
<?php

class airport_model extends CI_Model
{

	public function __construct()
	{
	parent::__construct();

	}

	function check_location($loc_id){
		$sql = "select * from LOCATIONS WHERE LOCATION_ID= ?";
		$query = $this->db->query($sql,array($loc_id));
		foreach ($query->result() as $row){
			if($row->LOCATION_ID == $loc_id) return 0;

		}
		return 1;
	}

	function add_new_airport($name,$loc_id,$status){

       $sql="INSERT INTO AIRPORTS(AIRPORT_CODE ,AIRPORT_NAME ,AIRPORT_LOCATION_ID ,STATUS) VALUES (SEQ_AIR_ID.nextval,?,?,?)";
	   $query = $this->db->query($sql,array($name,$loc_id,$status));
	}

	function show_all()
		{
		$query=$this->db->query('SELECT * FROM AIRPORTS ORDER BY AIRPORT_CODE ASC');
		return $query->result_array();
		}
}

?>


text:
package cd.synapsehub.smartgeotools.extras;

/**
 * Created by Windows on 18-02-2015.
 */
public interface SortListener {

    public void onSortByName();
    public void onSortByDate();
    public void onSortByRating();
}


text:
<?php

namespace RandomLib\Source;

use SecurityLib\Strength;

/**
 * The Rand Random Number Source
 *
 * This source generates low strength random numbers by using the internal
 * rand() function.  By itself it is quite weak.  However when combined with
 * other sources it does provide significant benefit.
 *
 * @category   PHPCryptLib
 * @package    Random
 * @subpackage Source
 * @author     Anthony Ferrara <ircmaxell@ircmaxell.com>
 * @codeCoverageIgnore
 */
class Rand implements \RandomLib\Source {

    /**
     * Return an instance of Strength indicating the strength of the source
     *
     * @return Strength An instance of one of the strength classes
     */
    public static function getStrength() {
        // Detect if Suhosin Hardened PHP patch is applied
        if (defined('S_ALL')) {
            return new Strength(Strength::LOW);
        } else {
            return new Strength(Strength::VERYLOW);
        }
    }

    /**
     * Generate a random string of the specified size
     *
     * @param int $size The size of the requested random string
     *
     * @return string A string of the requested size
     */
    public function generate($size) {
        $result = '';
        for ($i = 0; $i < $size; $i++) {
            $result .= chr((rand() ^ rand()) % 256);
        }
        return $result;
    }

}


text:
var exports = {};

var _ = (function () {
  var _ = {};
  _.isObject = function (obj) {
    return typeof obj === 'object';
  };

  _.isUndefined = function (obj) {
    return typeof obj === 'undefined';
  };

  _.isArray = function (obj) {
    return obj instanceof Array;
  };

  _.has = function (obj, key) {
    return obj !== null && hasOwnProperty.call(obj, key);
  };

  _.isEmptyObject = function (obj) {
    for (var key in obj) if (_.has(obj, key)) return false;
    return true;
  };

  _.each = function (obj, callback) {
    var i, len;
    if (_.isArray(obj)) {
      for (i =0, len = obj.length; i < len; i++) {
        callback(obj[i], i, obj);
      }
    } else {
      for (i in obj) {
        callback(obj[i], i, obj);
      }
    }
    return obj;
  };

  _.deepClone = function (obj) {
    return JSON.parse(JSON.stringify(obj));
  };

  return _;
})();

exports._ = _;

exports.isUnchange = function (increment) {
  return _.isEmptyObject(increment['-']) && _.isEmptyObject(increment['+']);
};

module.exports = exports;


text:
struct X {
  X(const X&) = delete; // expected-note 2{{explicitly marked deleted}}
  X(X&);
};

void test_capture(X x) {
  [x] { }(); // okay: non-const copy ctor

  [x] {
    [x] { // expected-error{{call to deleted constructor of 'X'}}
    }();
  }();

  [x] {
    [&x] {
      [x] { // expected-error{{call to deleted constructor of 'const X'}}
      }();
    }();
  }();

  int a;
  [=]{
    [&] {
      int &x = a;  // expected-error{{binding of reference to type 'int' to a value of type 'const int' drops qualifiers}}
      int &x2 = a;  // expected-error{{binding of reference to type 'int' to a value of type 'const int' drops qualifiers}}
    }();
  }();

  [=]{
    [&a] {
      [&] {
        int &x = a;  // expected-error{{binding of reference to type 'int' to a value of type 'const int' drops qualifiers}}
        int &x2 = a;  // expected-error{{binding of reference to type 'int' to a value of type 'const int' drops qualifiers}}
      }();
    }();
  }();
}


text:
require 'spec/unit/unit_spec_helper'

describe Nucleus::Adapters::GitDeployer do
  let(:repo_name) { 'my_repository' }
  let(:repo_url) { 'http://repo.example.org' }
  let(:user_email) { 'myuser@example.org' }
  let(:repo) { double(Git::Base) }
  let(:zip) { 'zip' }
  let(:file) { File.join('random', 'file', 'path') }

  it '#deploy fails early with invalid format' do
    subject = Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email)
    extractor = double(Nucleus::ArchiveExtractor)
    expect(Nucleus::ArchiveExtractor).to receive(:new).with(any_args).once { extractor }
    # we assume format is supported
    expect(extractor).to receive(:supports?).with(kind_of(String)).once { false }
    # call should fail
    expect { subject.deploy(nil, 'xyz') }.to raise_error(Nucleus::Errors::AdapterRequestError)
  end

  describe 'repository actions' do
    before do
      # every action needs to clone the repository
      expect(Git).to receive(:clone).with(repo_url, repo_name, path: kind_of(String)).once { repo }
      # verify cleanup is performed for each method call
      expect(FileUtils).to receive(:rm_rf).with(File.join(Dir.tmpdir, repo_name)).once
    end

    describe '#download' do
      let!(:exclude_git) { true }

      context 'with master branch' do
        subject { Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email) }
        let(:repo_branch) { 'master' }
        it 'returns archived repository' do
          # verify archiver is called to return the response
          archiver = double(Nucleus::Archiver)
          expect(Nucleus::Archiver).to receive(:new).with(exclude_git) { archiver }
          expect(archiver).to receive(:compress).with(kind_of(String), zip).once { 'response' }

          # execute the call
          response = subject.download(zip, exclude_git)
          expect(response).to eql('response')
        end
      end

      context 'with nucleus branch' do
        let(:repo_branch) { 'nucleus' }
        subject { Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email, repo_branch) }
        it 'returns archived repository' do
          branch_mock = double(Git::Branch)
          expect(repo).to receive(:branch).with(repo_branch).once { branch_mock }
          expect(repo).to receive(:checkout).with(branch_mock).once { repo }

          # verify archiver is called to return the response
          archiver = double(Nucleus::Archiver)
          expect(Nucleus::Archiver).to receive(:new).with(exclude_git) { archiver }
          expect(archiver).to receive(:compress).with(kind_of(String), zip).once { 'response' }

          # execute the call
          response = subject.download(zip, exclude_git)
          expect(response).to eql('response')
        end

        it 'returns archived repository even if master did not contain any commit' do
          # branch fails for master without commits
          expect(repo).to receive(:branch).with(repo_branch).once { raise StandardError, 'No commit for master' }
          # then we rely on the fallback, checkout new branch
          expect(repo).to receive(:checkout).with(repo_branch, new_branch: true).once { repo }

          # verify archiver is called to return the response
          archiver = double(Nucleus::Archiver)
          expect(Nucleus::Archiver).to receive(:new).with(exclude_git) { archiver }
          expect(archiver).to receive(:compress).with(kind_of(String), zip).once { 'response' }

          # execute the call
          response = subject.download(zip, exclude_git)
          expect(response).to eql('response')
        end
      end
    end

    describe '#trigger_build' do
      # set username and email
      before { expect(repo).to receive(:config).with(kind_of(String), kind_of(String)).twice }

      it 'succeeds for master branch' do
        subject = Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email)
        expect(repo).to receive(:add).with(all: true).once
        expect(repo).to receive(:commit).with(kind_of(String)).once
        expect(repo).to receive(:repack).with(no_args).once
        expect(repo).to receive(:push).with(kind_of(String), 'master', force: true).once

        # there shall be the attempt to write a file to the repository
        expect(Nucleus::Adapters::FileManager).to receive(:save_file_from_data).with(any_args).once
        # trigger the method
        subject.trigger_build
      end

      it 'succeeds for nucleus branch' do
        subject = Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email, 'nucleus')
        expect(repo).to receive(:add).with(all: true).once
        expect(repo).to receive(:commit).with(kind_of(String)).once
        expect(repo).to receive(:repack).with(no_args).once
        expect(repo).to receive(:push).with(kind_of(String), 'nucleus', force: true).once

        branch_mock = double(Git::Branch)
        expect(repo).to receive(:branch).with('nucleus').once { branch_mock }
        expect(repo).to receive(:checkout).with(branch_mock).once { repo }

        # there shall be the attempt to write a file to the repository
        expect(Nucleus::Adapters::FileManager).to receive(:save_file_from_data)
        # trigger the method
        subject.trigger_build
      end
    end

    describe '#deploy', memfs: true do
      before { expect(repo).to receive(:config).with(kind_of(String), kind_of(String)).twice }
      context 'with master branch' do
        let(:repo_branch) { 'master' }
        subject { Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email) }

        describe 'fails' do
          it 'if no files were extracted' do
            extractor = double(Nucleus::ArchiveExtractor)
            expect(Nucleus::ArchiveExtractor).to receive(:new).once { extractor }
            # we assume format is supported
            expect(extractor).to receive(:supports?).with(kind_of(String)).once { true }
            # assumes number of extracted files
            expect(extractor).to receive(:extract).with(file, kind_of(String), zip) { 0 }

            # write files to disk, as the extractor would do
            repo_dir = File.join(Dir.tmpdir, repo_name)
            git_dir = File.join(repo_dir, '.git')
            FileUtils.mkdir_p(git_dir)
            FileUtils.touch(File.join(git_dir, 'some_git_file.txt'))

            # make sure files actually exist
            expect(File.file?(File.join(git_dir, 'some_git_file.txt'))).to eql(true)
            expect(File.directory?(git_dir)).to eql(true)

            # call should fail
            expect { subject.deploy(file, zip) }.to raise_error(Nucleus::Errors::AdapterRequestError)
          end
        end

        it 'succeeds' do
          expect(repo).to receive(:add).with(all: true).once
          expect(repo).to receive(:commit).with(kind_of(String)).once
          expect(repo).to receive(:repack).with(no_args).once
          expect(repo).to receive(:push).with(kind_of(String), repo_branch, force: true).once

          extractor = double(Nucleus::ArchiveExtractor)
          expect(Nucleus::ArchiveExtractor).to receive(:new).once { extractor }
          # we assume format is supported
          expect(extractor).to receive(:supports?).with(kind_of(String)).once { true }
          # assumes number of extracted files
          expect(extractor).to receive(:extract).with(file, kind_of(String), zip) { 9 }

          # write files to disk, as the extractor would do
          repo_dir = File.join(Dir.tmpdir, repo_name)
          git_dir = File.join(repo_dir, '.git')
          other_dir = File.join(repo_dir, 'another_dir')
          FileUtils.mkdir_p(git_dir)
          FileUtils.mkdir_p(other_dir)
          FileUtils.touch(File.join(repo_dir, 'file_1.txt'))
          FileUtils.touch(File.join(other_dir, 'file_2.txt'))
          FileUtils.touch(File.join(git_dir, 'some_git_file.txt'))

          # make sure files actually exist
          expect(File.file?(File.join(repo_dir, 'file_1.txt'))).to eql(true)
          expect(File.file?(File.join(other_dir, 'file_2.txt'))).to eql(true)
          expect(File.file?(File.join(git_dir, 'some_git_file.txt'))).to eql(true)
          expect(File.directory?(git_dir)).to eql(true)
          expect(File.directory?(other_dir)).to eql(true)

          # expect(Find).to receive(:find).with(kind_of(String)).once
          expect(FileUtils).to receive(:rm_rf).with(other_dir).once.and_call_original
          expect(FileUtils).to receive(:rm_f).with(File.join(repo_dir, 'file_1.txt')).once.and_call_original

          sanitizer = double(Nucleus::ApplicationRepoSanitizer)
          expect(Nucleus::ApplicationRepoSanitizer).to receive(:new).once { sanitizer }
          # we assume format is supported
          expect(sanitizer).to receive(:sanitize).with(kind_of(String)).once

          # call should succeed
          subject.deploy(file, zip)

          # normal files should be deleted
          expect(File.exist?(File.join(repo_dir, 'file_1.txt'))).to eql(false)
          expect(File.exist?(File.join(other_dir, 'file_2.txt'))).to eql(false)
          expect(File.exist?(other_dir)).to eql(false)

          # whereas git files should still exist
          expect(File.exist?(File.join(git_dir, 'some_git_file.txt'))).to eql(true)
          expect(File.exist?(git_dir)).to eql(true)
        end
      end

      context 'with nucleus branch' do
        let(:repo_branch) { 'nucleus' }
        subject { Nucleus::Adapters::GitDeployer.new(repo_name, repo_url, user_email, repo_branch) }
        it 'succeeds' do
          expect(repo).to receive(:add).with(all: true).once
          expect(repo).to receive(:commit).with(kind_of(String)).once
          expect(repo).to receive(:repack).with(no_args).once
          expect(repo).to receive(:push).with(kind_of(String), repo_branch, force: true).once

          branch_mock = double(Git::Branch)
          expect(repo).to receive(:branch).with(repo_branch).once { branch_mock }
          expect(repo).to receive(:checkout).with(branch_mock).once { repo }

          extractor = double(Nucleus::ArchiveExtractor)
          expect(Nucleus::ArchiveExtractor).to receive(:new).once { extractor }
          # we assume format is supported
          expect(extractor).to receive(:supports?).with(kind_of(String)).once { true }
          # assumes number of extracted files
          expect(extractor).to receive(:extract).with(file, kind_of(String), zip) { 9 }

          # write files to disk, as the extractor would do
          repo_dir = File.join(Dir.tmpdir, repo_name)
          git_dir = File.join(repo_dir, '.git')
          other_dir = File.join(repo_dir, 'another_dir')
          FileUtils.mkdir_p(git_dir)
          FileUtils.mkdir_p(other_dir)
          FileUtils.touch(File.join(repo_dir, 'file_1.txt'))
          FileUtils.touch(File.join(other_dir, 'file_2.txt'))
          FileUtils.touch(File.join(git_dir, 'some_git_file.txt'))

          # make sure files actually exist
          expect(File.file?(File.join(repo_dir, 'file_1.txt'))).to eql(true)
          expect(File.file?(File.join(other_dir, 'file_2.txt'))).to eql(true)
          expect(File.file?(File.join(git_dir, 'some_git_file.txt'))).to eql(true)
          expect(File.directory?(git_dir)).to eql(true)
          expect(File.directory?(other_dir)).to eql(true)

          # expect(Find).to receive(:find).with(kind_of(String)).once
          expect(FileUtils).to receive(:rm_rf).with(other_dir).once.and_call_original
          expect(FileUtils).to receive(:rm_f).with(File.join(repo_dir, 'file_1.txt')).once.and_call_original

          sanitizer = double(Nucleus::ApplicationRepoSanitizer)
          expect(Nucleus::ApplicationRepoSanitizer).to receive(:new).once { sanitizer }
          # we assume format is supported
          expect(sanitizer).to receive(:sanitize).with(kind_of(String)).once

          # call should succeed
          subject.deploy(file, zip)

          # normal files should be deleted
          expect(File.exist?(File.join(repo_dir, 'file_1.txt'))).to eql(false)
          expect(File.exist?(File.join(other_dir, 'file_2.txt'))).to eql(false)
          expect(File.exist?(other_dir)).to eql(false)

          # whereas git files should still exist
          expect(File.exist?(File.join(git_dir, 'some_git_file.txt'))).to eql(true)
          expect(File.exist?(git_dir)).to eql(true)
        end
      end
    end
  end
end


text:
Links should be more descriptive than `here <https://example.com>`_. here is okay.

`this place <https://example.com>`_ is okay.

here is okay. Links should be more descriptive than `here <https://example.com>`_.