How to use the github.com/org/d function in github

To help you get started, we’ve selected a few github examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber-archive / idl / test / idl-daemon.js View on Github external
);

        assert.equal(
            data.files['idl/github.com/org/d/service.thrift'],
            thriftIdl('D'),
            'Correct thrift definition for D'
        );

        var remotes = data.meta.remotes;
        var tags = data.gittag.trim().split('\n');

        assert.equal(tags[0], 'v' + new Date(remotes['github.com/org/a'].time)
            .getTime());
        assert.equal(tags[2], 'v' + new Date(remotes['github.com/org/c'].time)
            .getTime());
        assert.equal(tags[3], 'v' + new Date(remotes['github.com/org/d'].time)
            .getTime());
        assert.equal(tags[4], 'v' + new Date(remotes['github.com/org/b'].time)
            .getTime());

        assert.end();
    }
});
github uber-archive / idl / test / idl-daemon.js View on Github external
'idl/github.com/org/d/service.thrift',
                'meta.json'
            ],
            'Upstream contains all expected files'
        );

        assert.equal(data.gitlog,
            'Updating D to latest version\n' +
            'Updating C to latest version\n' +
            'Updating B to latest version\n' +
            'Updating A to latest version\n' +
            'initial\n'
        );

        assert.equal(data.meta.time,
            data.meta.remotes['github.com/org/d'].time);
        assert.equal(new Date(data.meta.time).getTime(),
            data.meta.version);

        assert.deepEqual(
            data.meta.remotes['github.com/org/a'].shasums,
            {
                'service.thrift': 'd329c8c24d0871076a5f05180a439bccb9bebe71'
            },
            'Correct shasums for remote A'
        );
        assert.deepEqual(
            data.meta.remotes['github.com/org/b'].shasums,
            {
                'service.thrift': '424a6ca9b4660bf432045eeba7a3254ab38d5701'
            },
            'Correct shasums for remote B'
github uber-archive / idl / test / idl.js View on Github external
var upstream = data.upstream;

        assert.equal(
            upstream.meta.remotes['github.com/org/a'].time,
            list.remotes['github.com/org/a'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/b'].time,
            list.remotes['github.com/org/b'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/c'].time,
            list.remotes['github.com/org/c'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/d'].time,
            list.remotes['github.com/org/d'].time
        );

        var now = Date.now();

        var text = list.toString();

        var expectedLines = [
            ['-', 'github.com/org/a', ago('a'), '-'],
            ['-', 'github.com/org/b', ago('b'), '-'],
            ['-', 'github.com/org/c', ago('c'), '-'],
            ['-', 'github.com/org/d', ago('d'), '-']
        ];
        var headers = ['', 'SERVICE', 'REGISTRY', 'LOCAL'].map(underline);
        expectedLines.unshift(headers);
github uber-archive / idl / test / thrift-store.js View on Github external
assert.equal(
            meta.time,
            upstream.meta.remotes['github.com/org/b'].time
        );
        assert.equal(
            meta.version,
            new Date(upstream.meta.remotes['github.com/org/b'].time).getTime()
        );

        assert.deepEqual(
            meta.remotes['github.com/org/b'],
            upstream.meta.remotes['github.com/org/b']
        );
        assert.deepEqual(
            meta.remotes['github.com/org/d'],
            upstream.meta.remotes['github.com/org/d']
        );

        assert.equal(
            local.thrift['github.com'].org.b['service.thrift'],
            upstream.files['thrift/github.com/org/b/service.thrift']
        );
        assert.equal(
            local.thrift['github.com'].org.d['service.thrift'],
            upstream.files['thrift/github.com/org/d/service.thrift']
        );

        assert.end();
    }
});
github uber-archive / idl / test / idl-daemon.js View on Github external
],
            'Upstream contains all expected files'
        );

        assert.equal(data.gitlog,
            'Updating D to latest version\n' +
            'Updating C to latest version\n' +
            'Updating B to latest version\n' +
            'Updating A to latest version\n' +
            'initial\n',
            'Correct git log contents'
        );

        assert.equal(
            data.meta.time,
            data.meta.remotes['github.com/org/d'].time,
            'Correct timestamp on last update'
        );
        assert.equal(
            new Date(data.meta.time).getTime(),
            data.meta.version,
            'Version is correct and is a timestamp'
        );

        assert.deepEqual(
            data.meta.remotes['github.com/org/a'].shasums,
            {
                'service.thrift': 'd329c8c24d0871076a5f05180a439bccb9bebe71'
            },
            'Correct shasums for remote A'
        );
        assert.deepEqual(
github uber-archive / idl / test / idl-daemon.js View on Github external
assert.deepEqual(
            data.meta.remotes['github.com/org/b'].shasums,
            {
                'service.thrift': '424a6ca9b4660bf432045eeba7a3254ab38d5701'
            },
            'Correct shasums for remote B'
        );
        assert.deepEqual(
            data.meta.remotes['github.com/org/c'].shasums,
            {
                'service.thrift': '484742978a072e46ae1131d8efe7fe0377d35c54'
            },
            'Correct shasums for remote C'
        );
        assert.deepEqual(
            data.meta.remotes['github.com/org/d'].shasums,
            {
                'service.thrift': 'cf9c2141b3dbb05bcbaa31579b883697d42c7f8d'
            },
            'Correct shasums for remote D'
        );

        assert.end();
    }
});
github uber-archive / idl / test / idl-daemon.js View on Github external
assert.deepEqual(
            data.meta.remotes['github.com/org/b'].shasums,
            {
                'service.thrift': '424a6ca9b4660bf432045eeba7a3254ab38d5701'
            },
            'Correct shasums for remote B'
        );
        assert.deepEqual(
            data.meta.remotes['github.com/org/c'].shasums,
            {
                'service.thrift': '484742978a072e46ae1131d8efe7fe0377d35c54'
            },
            'Correct shasums for remote C'
        );
        assert.deepEqual(
            data.meta.remotes['github.com/org/d'].shasums,
            {
                'service.thrift': 'cf9c2141b3dbb05bcbaa31579b883697d42c7f8d'
            },
            'Correct shasums for remote D'
        );

        assert.equal(
            data.files['idl/github.com/org/a/service.thrift'],
            thriftIdl('A'),
            'Correct thrift definition for A'
        );

        assert.equal(
            data.files['idl/github.com/org/b/service.thrift'],
            thriftIdl('B'),
            'Correct thrift definition for B'
github uber-archive / idl / test / thrift-store.js View on Github external
assert.equal(
            meta.time,
            upstream.meta.remotes['github.com/org/b'].time
        );
        assert.equal(
            meta.version,
            new Date(upstream.meta.remotes['github.com/org/b'].time).getTime()
        );

        assert.deepEqual(
            meta.remotes['github.com/org/b'],
            upstream.meta.remotes['github.com/org/b']
        );
        assert.deepEqual(
            meta.remotes['github.com/org/d'],
            upstream.meta.remotes['github.com/org/d']
        );

        assert.equal(
            local.thrift['github.com'].org.b['service.thrift'],
            upstream.files['thrift/github.com/org/b/service.thrift']
        );
        assert.equal(
            local.thrift['github.com'].org.d['service.thrift'],
            upstream.files['thrift/github.com/org/d/service.thrift']
        );

        assert.end();
    }
});
github uber-archive / idl / test / thrift-store.js View on Github external
var upstream = data.upstream;

        assert.equal(
            upstream.meta.remotes['github.com/org/a'].time,
            list.remotes['github.com/org/a'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/b'].time,
            list.remotes['github.com/org/b'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/c'].time,
            list.remotes['github.com/org/c'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/d'].time,
            list.remotes['github.com/org/d'].time
        );

        var text = list.toString();

        assert.equal(
            text,
            ' - github.com/org/a  ' + upstream.meta.remotes['github.com/org/a']
                .time + '\n' +
            ' - github.com/org/b  ' + upstream.meta.remotes['github.com/org/b']
                .time + '\n' +
            ' - github.com/org/c  ' + upstream.meta.remotes['github.com/org/c']
                .time + '\n' +
            ' - github.com/org/d  ' + upstream.meta.remotes['github.com/org/d']
                .time
        );
github uber-archive / idl / test / idl.js View on Github external
var upstream = data.upstream;

        assert.equal(
            upstream.meta.remotes['github.com/org/a'].time,
            list.remotes['github.com/org/a'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/b'].time,
            list.remotes['github.com/org/b'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/c'].time,
            list.remotes['github.com/org/c'].time
        );
        assert.equal(
            upstream.meta.remotes['github.com/org/d'].time,
            list.remotes['github.com/org/d'].time
        );

        var now = Date.now();

        var text = list.toString();

        var expectedLines = [
            ['-', 'github.com/org/a', ago('a'), '-'],
            ['-', 'github.com/org/b', ago('b'), '-'],
            ['-', 'github.com/org/c', ago('c'), '-'],
            ['-', 'github.com/org/d', ago('d'), '-']
        ];
        var headers = ['', 'SERVICE', 'REGISTRY', 'LOCAL'].map(underline);
        expectedLines.unshift(headers);