Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
chore(initial): initial version
Browse files Browse the repository at this point in the history
doesn't do anything - just sets the stage
  • Loading branch information
Seth Yates committed Sep 15, 2016
1 parent d81da2f commit 842039f
Show file tree
Hide file tree
Showing 16 changed files with 793 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Seth Yates (https://github.com/sethyates)
113 changes: 113 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
Krux Digital, Inc.
Contributor License Agreement ("Agreement") V1.0

In order to clarify the intellectual property license granted with Contributions
from any person or entity, Krux Digital, Inc. ("Krux") must have a Contributor
License Agreement ("CLA") agreed to by each Contributor. This license is for your
protection as a Contributor as well as the protection of Krux; it does not
change your rights to use your own Contributions for any other purpose.

Either individuals or business entities, including without limitation, all employees
or agents acting on behalf of such entity (an "Entity"), may submit Contributions to
Krux under this Agreement. If you click the checkbox below to indicate that
you are entering this Agreement on behalf of an Entity, you represent that you have
the authority to bind such Entity to this Agreement, in which case, the terms "You"
and "Your" shall refer to such Entity, as further defined below.

Please read this document carefully before agreeing to it, and print a copy for
your records.

You accept and agree to the following terms and conditions for (i) UNLESS OTHERWISE
GOVERNED BY A WRITTEN LICENSE AGREEMENT, ALL CONTRIBUTIONS THAT YOU MAY HAVE
PREVIOUSLY SUBMITTED TO KRUX and (ii) Your present and future Contributions
submitted to Krux. Except for the license granted herein to Krux
and recipients of software distributed by Krux, You reserve all right,
title, and interest in and to Your Contributions.

1. Definitions.

"You" (or "Your") shall mean the copyright owner or Entity authorized by the
copyright owner that is making this Agreement with Krux. For Entities, the
Entity making a Contribution and all other Entities that control, are controlled
by, or are under common control with that Entity are considered to be a single
Contributor. For the purposes of this definition, "control" means (i)the power,
direct or indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of
the outstanding shares, or (iii) beneficial ownership of such entity.

"Contribution" shall mean any original work of authorship, including any
modifications or additions to an existing work, that is or has been intentionally
submitted by You to Krux for inclusion in, or documentation of, any of
the products owned or managed by Krux (the "Work"). For the purposes of
this definition, "submitted" means any form of electronic, verbal, or written
communication sent to Krux or its representatives, including but not
limited to communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, Krux for
the purpose of discussing and improving the Work, but excluding communication that
is conspicuously marked or otherwise designated in writing by You
as "Not a Contribution."

2. Grant of Copyright License.

Subject to the terms and conditions of this Agreement, You hereby grant to Krux
and to recipients of software distributed by Krux a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce,
prepare derivative works of, publicly display, publicly perform, sublicense, and
distribute Your Contributions and such derivative works.

3. Grant of Patent License.

Subject to the terms and conditions of this Agreement, You hereby grant to Krux
and to recipients of software distributed by Krux a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
section) patent license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Work, where such license applies only to those patent claims
licensable by You that are necessarily infringed by Your Contribution(s) alone or
by combination of Your Contribution(s) with the Work to which such Contribution(s)
was submitted. You furthermore agree to notify Krux of any patents that you
know or come to know are likely infringed by the Contribution and/or are not
licensable by You. If any entity institutes patent litigation against You or any
other entity (including a cross-claim or counterclaim in a lawsuit) alleging that
your Contribution, or the Work to which you have contributed, constitutes direct
or contributory patent infringement, then any patent licenses granted to that
entity under this Agreement for that Contribution or Work shall terminate as of
the date such litigation is filed.

4. Representations.

a. If You are entering this Agreement as an individual, You represent that You are
legally entitled to grant the above license. If Your employer(s) has rights to
intellectual property that You create, such as your Contributions, You represent
that You have received permission to make Contributions on behalf of that employer,
that Your employer has waived such rights for Your Contributions to Krux,
or that Your employer has executed a separate Corporate CLA with Krux.

b. If You are entering this Agreement on behalf of an Entity, You represent that
You are legally entitled to grant the above license. You represent further that
each employee of the Entity that submits Contributions is authorized to submit
such Contributions on behalf of the Entity.

5. You represent that each of Your Contributions is Your original creation (see
section 7 for submissions on behalf of others). You represent that Your Contribution
submissions include complete details of any third-party license or other
restriction (including, but not limited to, related patents and trademarks) of
which You are personally aware and which are associated with any part of Your
Contributions.

6. You are not expected to provide support for Your Contributions, except to the
extent You desire to provide support. You may provide support for free, for a fee,
or not at all. Unless required by applicable law or agreed to in writing, You
provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied, including, without limitation, any warranties
or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may
submit it to Krux separately from any Contribution, identifying the
complete details of its source and of any license or other restriction (including,
but not limited to, related patents, trademarks, and license agreements) of
which You are personally aware, and conspicuously marking the work as "Submitted
on behalf of a third-party: [named here]".

8. You agree to notify Krux of any facts or circumstances of which you
become aware that would make these representations inaccurate in any respect.
88 changes: 88 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# How to contribute

Third-party patches are very welcome. We want to keep it as easy as
possible to contribute changes that get things working in your environment.
There are a few guidelines that we need contributors to follow so that
we can have a chance of keeping on top of things.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version that you know has the issue.
* Fork the repository on GitHub

## Making Changes

* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master; `git checkout -b
fix/master/my_contribution master`. Please avoid working directly on the
`master` branch.
* Make commits of logical units.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the proper format.

````
(Fixes #12) Make the example in CONTRIBUTING imperative and concrete
Without this patch applied the example commit message in the CONTRIBUTING.md
document is not a concrete example. This is a problem because the
contributor is left to imagine what the commit message should look like
based on a description rather than an example. This patch fixes the
problem by making the example concrete and imperative.
The first line is a real life imperative statement with a ticket number
from our issue tracker. The body describes the behavior without the patch,
why this is a problem, and how the patch fixes the problem when applied.
````

* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.

## Making Trivial Changes

### Documentation

For changes of a trivial nature to comments and documentation, it is not
always necessary to create a new ticket. In this case, it is
appropriate to start the first line of a commit with '(doc)' instead of
a ticket number.

````
(doc) Add documentation commit example to CONTRIBUTING
There is no example for contributing a documentation commit
to the repository. This is a problem because the contributor
is left to assume how a commit of this nature may appear.
The first line is a real life imperative statement with '(doc)' in
place of what would have been the ticket number in a
non-documentation related commit. The body describes the nature of
the new documentation or comments added.
````

## Submitting Changes

* Sign the [Contributor License Agreement](CLA.md). By opening a Pull Request,
we will assume you have signed the CLA.
* Push your changes to a topic branch in your fork of the repository.
If this is your first contribution and your name is not in [CONTRIBUTORS](./CONTRIBUTORS),
please add your name and GitHub URL (same format as AUTHORS).
* Submit a pull request to the repository in the Krux organization.
* Update your ticket to mark that you have submitted code and are ready for
it to be reviewed (Status: Ready for Merge).
* Include a link to the pull request in the ticket.
* The core team looks at Pull Requests on a regular basis.
* After feedback has been given we expect responses within two weeks. After two
weeks we may close the pull request if it isn't showing any activity.

# Additional Resources

* [Contributor License Agreement](CLA.md)
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)

Empty file added CONTRIBUTORS
Empty file.
115 changes: 113 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,113 @@
# gpt-mock
Node.js mock library for Google Publisher Tags (gpt)
# Overview

[![Version](https://img.shields.io/npm/v/gpt-mock.svg)](http://npmjs.com/package/gpt-mock)
[![License](https://img.shields.io/npm/l/gpt-mock.svg)](http://npmjs.com/package/gpt-mock)
[![Build Status](https://travis-ci.org/krux/gpt-mock.svg?branch=master)](https://travis-ci.org/krux/gpt-mock)
[![Code Climate](https://img.shields.io/codeclimate/github/krux/gpt-mock.svg)](https://codeclimate.com/github/krux/gpt-mock)
[![Coverage](https://img.shields.io/coveralls/krux/gpt-mock.svg)](https://coveralls.io/github/krux/gpt-mock)
[![Dependencies](https://img.shields.io/david/dev/krux/gpt-mock.svg)](./package.json)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Gitter](https://badges.gitter.im/krux/gpt-mock.svg)](https://gitter.im/krux/gpt-mock)

A test library to mock out the Google Publisher Tag library.

## Installation

You can include `gpt-mock` using *npm*:

```console
npm install --save-dev gpt-mock
```

## Accessing

### ES6/ES2015

```javascript
import googletag from 'gpt-mock';
```

### AMD

```javascript
define(['gpt-mock'], function(googletag) {

});
```

### CommonJS

```javascript
var googletag = require('gpt-mock');
```

# Help/Bugs/Requests

We ♥ bug reports.

Have a problem? Need help? Would you like additional functionality added? We use GitHub's ticket system for keeping track of these requests.

Please check out the [existing issues](https://github.com/krux/gpt-mock/issues), and if you don't see that your problem is already being
worked on, please [file a new issue](https://github.com/krux/gpt-mock/issues/new). The more information the better to describe your problem.

# Contributing

We ♥ [forks and pull requests](https://help.github.com/articles/using-pull-requests).

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for full details.

## Environment

The project requires nodejs (>=5.6) and npm (>=3.6.0) for development. It has no runtime dependencies.

## Developing

Check the code out and install the development dependencies using:

```console
npm install
```

### Building

To build the code, run

```console
npm run build
```

### Linting

We use ESLint and JSCS to do static analysis of the JavaScript and keep things smelling good. To run both, use:

```console
npm run lint
```

### Testing

Using [travis-ci](https://travis-ci.org), the [Mocha](http://mochajs.org) unit tests are run on every commit using PhantomJS to run the tests
with a real browser.

To test the code locally, you can use:

```console
npm test
```

To run tests in Test-Driven-Development mode, where the test will be run after every change, use:

```console
npm run tdd
```

## Issue Guidelines

Please either add a failing [unit test](./test/unit) or include a [jsfiddle](http://jsfiddle.net) that distills and reproduces the issue.

# License

See [LICENSE](LICENSE).

Some of the documentation incorporated into this source code is based on the [Google documentation](https://developers.google.com/doubleclick-gpt/reference) which is licensed under the [Creative Commons Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/). Some of the material may have been modified for use in this library. Copyright of the incorporated documentation remains Google, Inc. Google is a registered trademark of Google and/or its affiliates and this project is not intended to represent that Google endorses this library.
Loading

0 comments on commit 842039f

Please sign in to comment.