<commit_before>Package.describe({
  name: 'cultofcoders:grapher',
  version: '1.3.7_3',
  // Brief, one-line summary of the package.
  summary: 'Grapher is a data fetching layer on top of Meteor',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/cult-of-coders/grapher',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md',
});

Npm.depends({
  sift: '3.2.6',
  'dot-object': '1.5.4',
  'lodash.clonedeep': '4.5.0',
  'deep-extend': '0.5.0',
});

Package.onUse(function(api) {
  api.versionsFrom('1.3');

  var packages = [
    'ecmascript',
    'underscore',
    'promise',
    'check',
    'reactive-var',
    'mongo',
    'matb33:collection-hooks@0.8.4',
    'reywood:publish-composite@1.5.2',
    'dburles:mongo-collection-instances@0.3.5',
    'herteby:denormalize@0.6.5',
  ];

  api.use(packages);

  api.mainModule('main.client.js', 'client');
  api.mainModule('main.server.js', 'server');
});

Package.onTest(function(api) {
  api.use('cultofcoders:grapher');

  var packages = [
    'ecmascript',
    'underscore',
    'matb33:collection-hooks@0.8.4',
    'reywood:publish-composite@1.5.2',
    'dburles:mongo-collection-instances@0.3.5',
    'herteby:denormalize@0.6.5',
    'mongo',
  ];

  api.use(packages);
  api.use('tracker');

  api.use(['cultofcoders:mocha', 'practicalmeteor:chai']);

  // LINKS
  api.addFiles('lib/links/tests/main.js', 'server');

  // EXPOSURE
  api.addFiles('lib/exposure/testing/server.js', 'server');
  api.addFiles('lib/exposure/testing/client.js', 'client');

  // QUERY
  api.addFiles('lib/query/testing/bootstrap/index.js');

  // When you play with tests you should comment this to make tests go faster.
  api.addFiles('lib/query/testing/bootstrap/fixtures.js', 'server');

  api.addFiles('lib/query/testing/server.test.js', 'server');
  api.addFiles('lib/query/testing/client.test.js', 'client');

  // NAMED QUERY
  api.addFiles('lib/namedQuery/testing/bootstrap/both.js');
  api.addFiles('lib/namedQuery/testing/bootstrap/client.js', 'client');
  api.addFiles('lib/namedQuery/testing/bootstrap/server.js', 'server');

  // REACTIVE COUNTS
  api.addFiles('lib/query/counts/testing/server.test.js', 'server');
  api.addFiles('lib/query/counts/testing/client.test.js', 'client');

  // NAMED QUERIES
  api.addFiles('lib/namedQuery/testing/server.test.js', 'server');
  api.addFiles('lib/namedQuery/testing/client.test.js', 'client');

  // GRAPHQL
  api.addFiles('lib/graphql/testing/index.js', 'server');
});
<commit_msg>Bump to 1.3.7_4<commit_after>Package.describe({
    name: 'cultofcoders:grapher',
    version: '1.3.7_4',
    // Brief, one-line summary of the package.
    summary: 'Grapher is a data fetching layer on top of Meteor',
    // URL to the Git repository containing the source code for this package.
    git: 'https://github.com/cult-of-coders/grapher',
    // By default, Meteor will default to using README.md for documentation.
    // To avoid submitting documentation, set this field to null.
    documentation: 'README.md',
});

Npm.depends({
    sift: '3.2.6',
    'dot-object': '1.5.4',
    'lodash.clonedeep': '4.5.0',
    'deep-extend': '0.5.0',
});

Package.onUse(function(api) {
    api.versionsFrom('1.3');

    var packages = [
        'ecmascript',
        'underscore',
        'promise',
        'check',
        'reactive-var',
        'mongo',
        'matb33:collection-hooks@0.8.4',
        'reywood:publish-composite@1.5.2',
        'dburles:mongo-collection-instances@0.3.5',
        'herteby:denormalize@0.6.5',
    ];

    api.use(packages);

    api.mainModule('main.client.js', 'client');
    api.mainModule('main.server.js', 'server');
});

Package.onTest(function(api) {
    api.use('cultofcoders:grapher');

    var packages = [
        'ecmascript',
        'underscore',
        'matb33:collection-hooks@0.8.4',
        'reywood:publish-composite@1.5.2',
        'dburles:mongo-collection-instances@0.3.5',
        'herteby:denormalize@0.6.5',
        'mongo',
    ];

    api.use(packages);
    api.use('tracker');

    api.use(['cultofcoders:mocha', 'practicalmeteor:chai']);

    // LINKS
    api.addFiles('lib/links/tests/main.js', 'server');

    // EXPOSURE
    api.addFiles('lib/exposure/testing/server.js', 'server');
    api.addFiles('lib/exposure/testing/client.js', 'client');

    // QUERY
    api.addFiles('lib/query/testing/bootstrap/index.js');

    // When you play with tests you should comment this to make tests go faster.
    api.addFiles('lib/query/testing/bootstrap/fixtures.js', 'server');

    api.addFiles('lib/query/testing/server.test.js', 'server');
    api.addFiles('lib/query/testing/client.test.js', 'client');

    // NAMED QUERY
    api.addFiles('lib/namedQuery/testing/bootstrap/both.js');
    api.addFiles('lib/namedQuery/testing/bootstrap/client.js', 'client');
    api.addFiles('lib/namedQuery/testing/bootstrap/server.js', 'server');

    // REACTIVE COUNTS
    api.addFiles('lib/query/counts/testing/server.test.js', 'server');
    api.addFiles('lib/query/counts/testing/client.test.js', 'client');

    // NAMED QUERIES
    api.addFiles('lib/namedQuery/testing/server.test.js', 'server');
    api.addFiles('lib/namedQuery/testing/client.test.js', 'client');

    // GRAPHQL
    api.addFiles('lib/graphql/testing/index.js', 'server');
});
<|endoftext|>


<commit_before>/*
    Copyright 2015, Quixey Inc.
    All rights reserved.

    Licensed under the Modified BSD License found in the
    LICENSE file in the root directory of this source tree.
*/

Package.describe({
    summary: "JFramework for Meteor + React",
    name: "quixey:jframework",
    version: "1.3.9",
    git: "https://github.com/quixey/jframework.git"
});

Npm.depends({
    "react-router": "0.11.6"
});

Package.onUse(function(api) {
    api.versionsFrom("1.0.2.1");

    // Sets up window.ReactRouter
    api.addFiles(
        '.npm/package/node_modules/react-router/dist/react-router.js', 'client'
    );

    /*
        For used packages like "mongo" which use Tracker, we monkey patch it to
        use our version of the Tracker.* functions.
        For users of jframework, they only see our exported version of Tracker.
    */
    api.use("tracker");

    api.use([
        "meteor",
        "webapp",
        "logging",
        "ddp",
        "mongo",
        "check",
        "underscore",
        "jquery",
        "random",
        "ejson",
        "coffeescript",
        "reload",
        "autoupdate",
        "quixey:react@0.12.2"
    ]);

    api.imply([
        "meteor",
        "webapp",
        "logging",
        "ddp",
        "mongo",
        "check",
        "underscore",
        "jquery",
        "random",
        "ejson",
        "quixey:react@0.12.2"
    ]);

    api.addFiles([
        "lib/date.js",
        "lib/URI.js",
        "tracker.coffee",
        "j.coffee",
        "util.coffee",
        "var.coffee",
        "autovar.coffee",
        "dict.coffee",
        "list.coffee",
        "autodict.coffee",
        "autolist.coffee",
        "components.coffee",
        "proptypes.coffee",
        "models.coffee",
        "fetching.coffee",
        "routing.coffee",
        "dom.coffee"
    ]);

    api.addFiles([
        "components/AreYouSure.coffee",
        "components/Button.coffee",
        "components/CancelButton.coffee",
        "components/Dropdown.coffee",
        "components/DeleteButton.coffee",
        "components/EditButton.coffee",
        "components/Expandable.coffee",
        "components/KeyValueTable.coffee",
        "components/LinkButton.coffee",
        "components/Loader.coffee",
        "components/SubmitCancelDelete.coffee",
        "components/TableRow.coffee",
        "components/TextBox.coffee"
    ]);

    api.addFiles([
        "publish.coffee",
        "denorm.coffee"
    ], "server");

    api.addFiles([
    ], "client");

    api.export("Tracker");
    api.export("J");
    api.export("$$");
});

Package.onTest(function(api) {
    api.use([
        "tinytest",
        "quixey:jframework",
        "coffeescript",
        "insecure"
    ]);

    api.imply([
        "tinytest",
        "quixey:jframework"
    ]);

    api.addFiles([
        "tests/test-models.coffee",
        "tests/util-tests.coffee",
        "tests/autovar-tests.coffee",
        "tests/list-tests.coffee",
        "tests/dict-tests.coffee",
        "tests/jframework-tests.coffee",
        "tests/queryspec-tests.coffee",
        "tests/denorm-tests.coffee"
    ]);

    api.addFiles([
        "tests/publish-tests.coffee",
        "tests/jframework-client-tests.coffee"
    ], "client");
});
<commit_msg>Bump to 1.4.0 for fixed publisher<commit_after>/*
    Copyright 2015, Quixey Inc.
    All rights reserved.

    Licensed under the Modified BSD License found in the
    LICENSE file in the root directory of this source tree.
*/

Package.describe({
    summary: "JFramework for Meteor + React",
    name: "quixey:jframework",
    version: "1.4.0",
    git: "https://github.com/quixey/jframework.git"
});

Npm.depends({
    "react-router": "0.11.6"
});

Package.onUse(function(api) {
    api.versionsFrom("1.0.2.1");

    // Sets up window.ReactRouter
    api.addFiles(
        '.npm/package/node_modules/react-router/dist/react-router.js', 'client'
    );

    /*
        For used packages like "mongo" which use Tracker, we monkey patch it to
        use our version of the Tracker.* functions.
        For users of jframework, they only see our exported version of Tracker.
    */
    api.use("tracker");

    api.use([
        "meteor",
        "webapp",
        "logging",
        "ddp",
        "mongo",
        "check",
        "underscore",
        "jquery",
        "random",
        "ejson",
        "coffeescript",
        "reload",
        "autoupdate",
        "quixey:react@0.12.2"
    ]);

    api.imply([
        "meteor",
        "webapp",
        "logging",
        "ddp",
        "mongo",
        "check",
        "underscore",
        "jquery",
        "random",
        "ejson",
        "quixey:react@0.12.2"
    ]);

    api.addFiles([
        "lib/date.js",
        "lib/URI.js",
        "tracker.coffee",
        "j.coffee",
        "util.coffee",
        "var.coffee",
        "autovar.coffee",
        "dict.coffee",
        "list.coffee",
        "autodict.coffee",
        "autolist.coffee",
        "components.coffee",
        "proptypes.coffee",
        "models.coffee",
        "fetching.coffee",
        "routing.coffee",
        "dom.coffee"
    ]);

    api.addFiles([
        "components/AreYouSure.coffee",
        "components/Button.coffee",
        "components/CancelButton.coffee",
        "components/Dropdown.coffee",
        "components/DeleteButton.coffee",
        "components/EditButton.coffee",
        "components/Expandable.coffee",
        "components/KeyValueTable.coffee",
        "components/LinkButton.coffee",
        "components/Loader.coffee",
        "components/SubmitCancelDelete.coffee",
        "components/TableRow.coffee",
        "components/TextBox.coffee"
    ]);

    api.addFiles([
        "publish.coffee",
        "denorm.coffee"
    ], "server");

    api.addFiles([
    ], "client");

    api.export("Tracker");
    api.export("J");
    api.export("$$");
});

Package.onTest(function(api) {
    api.use([
        "tinytest",
        "quixey:jframework",
        "coffeescript",
        "insecure"
    ]);

    api.imply([
        "tinytest",
        "quixey:jframework"
    ]);

    api.addFiles([
        "tests/test-models.coffee",
        "tests/util-tests.coffee",
        "tests/autovar-tests.coffee",
        "tests/list-tests.coffee",
        "tests/dict-tests.coffee",
        "tests/jframework-tests.coffee",
        "tests/queryspec-tests.coffee",
        "tests/denorm-tests.coffee"
    ]);

    api.addFiles([
        "tests/publish-tests.coffee",
        "tests/jframework-client-tests.coffee"
    ], "client");
});
<|endoftext|>


<commit_before>Package.describe({
	name:    'mologie:reactive-selectize',
	summary: 'Keeps selectize.js\'s options in sync with a reactive data source',
	version: '0.1.3',
	git:     'https://github.com/mologie/meteor-reactive-selectize'
});

var clientDependencies = [
	'coffeescript',
	'jquery',
	'underscore',
	'mologie:computation-observer@1.0.0'
];

var clientFiles = [
	'reactive-selectize.coffee',
	'reactive-selectize-jquery.coffee'
];

var clientExports = [
	'ReactiveSelectizeController'
];

Package.onUse(function(api) {
	api.versionsFrom('1.0');
	api.use(clientDependencies, 'client');
	api.addFiles(clientFiles, 'client');
	api.export(clientExports, 'client');
});
<commit_msg>Bump version to 0.1.4<commit_after>Package.describe({
	name:    'mologie:reactive-selectize',
	summary: 'Keeps selectize.js\'s options in sync with a reactive data source',
	version: '0.1.4',
	git:     'https://github.com/mologie/meteor-reactive-selectize'
});

var clientDependencies = [
	'coffeescript',
	'jquery',
	'underscore',
	'mologie:computation-observer@1.0.0'
];

var clientFiles = [
	'reactive-selectize.coffee',
	'reactive-selectize-jquery.coffee'
];

var clientExports = [
	'ReactiveSelectizeController'
];

Package.onUse(function(api) {
	api.versionsFrom('1.0');
	api.use(clientDependencies, 'client');
	api.addFiles(clientFiles, 'client');
	api.export(clientExports, 'client');
});
<|endoftext|>


<commit_before>
Package.describe({
	summary: "Batch (fast) TypeScript compiler for Meteor"
});

Package._transitional_registerBuildPlugin({
	name: "compileTsc",
	use: [],
	sources: [
		'plugin/compile-tsc.js'
	],
	npmDependencies: {"ts-compiler": "2.0.0"}
});
<commit_msg>Add dep on node-persist<commit_after>
Package.describe({
	summary: "Batch (fast) TypeScript compiler for Meteor"
});

Package._transitional_registerBuildPlugin({
	name: "compileTsc",
	use: [],
	sources: [
		'plugin/compile-tsc.js'
	],
	npmDependencies: {
		"ts-compiler": "2.0.0",
		"node-persist": "0.0.2"
	}
});
<|endoftext|>


<commit_before>Package.describe({
  name: 'planettraining:angular-meteor-platform',
  version: '0.0.1',
  // Brief, one-line summary of the package.
  summary: '',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/planet-training/angular-meteor-platform.git',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md',
  summary : "Similar to the meteor-platform package but without blaze, templating, spacebars and jQuery"
});

Package.onUse(function(api) {
  // The "imply" here means that if your app uses "meteor-platform", it is
  // treated as if it also directly included all of these packages (and it gets
  // their exports, plugins, etc).
  //
  // If you want, you can "meteor remove meteor-platform" and add some of
  // these back in individually. We haven't tested every subset, though :)
  api.imply([
    // The normal "every package uses 'meteor'" rule only applies to packages
    // built from a package source directory, so we make sure apps get it too.
    // Meteor.isServer! The CSS extension handler! And so much more!
    'meteor@1.1.5',
    // A standard Meteor app is a web app. (Without this, there will be no
    // 'main' function unless you define one yourself.)
    'webapp@1.2.0',
    // It's Log! It's better than bad, it's good!
    'logging@1.0.7',
    // Tracker.autorun and friends. What's Meteor without reactivity?
    'tracker@1.0.6',
    'deps@1.0.7', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0.
    // The easiest way to get a little reactivity into your app.
    'session@1.1.0',
    // DDP: Meteor's client/server protocol.
    'ddp@1.1.0',
    'livedata@1.0.13', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0.
    // You want to keep your data somewhere? How about MongoDB?
    'mongo@1.1.0',
    // Easy type assertions? check.
    'check@1.0.5',
    // _.isUseful(true)
    'underscore@1.0.3',
    // Life isn't always predictable.
    'random@1.0.3',
    // People like being able to clone objects.
    'ejson@1.0.6',
    // rock'n'roll
    'urigo:angular@0.3.5'
  ]);

  // These are useful too!  But you don't have to see their exports
  // unless you want to.
  api.use([
    // We can reload the client without messing up methods in flight.
    'reload@1.1.3',
    // And update automatically when new client code is available!
    'autoupdate@1.2.0'
  ], ['client', 'server']);

  // More mobile specific implies
  api.imply([
    // Remove the 300ms click delay on mobile
    'fastclick@1.0.3',
    // Good defaults for the mobile status bar
    'mobile-status-bar@1.0.3'
  ], 'web.cordova');

  api.imply([
    // Launch screen configuration. Currently only on mobile but we include the
    // no-op browser version anyway.
    'launch-screen@1.0.2'
  ], 'web');
});
<commit_msg>initial work on 1.2<commit_after>Package.describe({
  name: 'planettraining:angular-meteor-platform',
  version: '0.0.1',
  // Brief, one-line summary of the package.
  summary: '',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/planet-training/angular-meteor-platform.git',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md',
  summary : "Similar to the meteor-platform package but without blaze, templating, spacebars and jQuery"
});

Package.onUse(function(api) {
  // The "imply" here means that if your app uses "meteor-platform", it is
  // treated as if it also directly included all of these packages (and it gets
  // their exports, plugins, etc).
  //
  // If you want, you can "meteor remove meteor-platform" and add some of
  // these back in individually. We haven't tested every subset, though :)
  api.imply([
    // The normal "every package uses 'meteor'" rule only applies to packages
    // built from a package source directory, so we make sure apps get it too.
    // Meteor.isServer! The CSS extension handler! And so much more!
    'meteor@1.1.5',
    // A standard Meteor app is a web app. (Without this, there will be no
    // 'main' function unless you define one yourself.)
    'webapp@1.2.0',
    // It's Log! It's better than bad, it's good!
    'logging@1.0.7',
    // Tracker.autorun and friends. What's Meteor without reactivity?
    'tracker@1.0.6',
    'deps@1.0.7', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0.
    // The easiest way to get a little reactivity into your app.
    'session@1.1.0',
    // DDP: Meteor's client/server protocol.
    'ddp@1.1.0',
    'livedata@1.0.13', // XXX COMPAT WITH PACKAGES BUILT FOR 0.9.0.
    // You want to keep your data somewhere? How about MongoDB?
    'mongo@1.1.0',
    // Easy type assertions? check.
    'check@1.0.5',
    // _.isUseful(true)
    'underscore@1.0.3',
    // Life isn't always predictable.
    'random@1.0.3',
    // People like being able to clone objects.
    'ejson@1.0.6',
    // I really don't know anything funny I could write about static files
    'static-html@1.0.0-rc.4',
    // rock'n'roll
    'angular@1.0.0-rc.5'

  ]);

  // These are useful too!  But you don't have to see their exports
  // unless you want to.
  api.use([
    // We can reload the client without messing up methods in flight.
    'reload@1.1.3',
    // And update automatically when new client code is available!
    'autoupdate@1.2.0'
  ], ['client', 'server']);

  // More mobile specific implies
  api.imply([
    // Remove the 300ms click delay on mobile
    'fastclick@1.0.3',
    // Good defaults for the mobile status bar
    'mobile-status-bar@1.0.3'
  ], 'web.cordova');

  api.imply([
    // Launch screen configuration. Currently only on mobile but we include the
    // no-op browser version anyway.
    'launch-screen@1.0.2'
  ], 'web');
});
<|endoftext|>


<commit_before>Package.describe({
  name: 'aur0r:accounts-learninglayers',
  version: '0.0.6',
  summary: 'Login service for LearningLayers accounts',
  git: 'https://github.com/Aur0r/accounts-learninglayers',
  documentation: 'README.md'
});

Package.onUse(function(api) {
  api.versionsFrom('1.2.1');
  api.use('ecmascript');
  api.use('oauth2', ['client', 'server']);
  api.use('oauth', ['client', 'server']);
  api.use('http', ['server']);
  api.use('underscore', 'client');
  api.use('templating', 'client');
  api.use('random', 'client');
  api.use('service-configuration', ['client', 'server']);
  api.use('accounts-base', ['client', 'server']);
  // Export Accounts (etc) to packages using this one.
  api.imply('accounts-base', ['client', 'server']);
  api.use('accounts-oauth', ['client', 'server']);

  api.export('Learninglayers');

  api.addFiles('learninglayers_login_button.css', 'client');

  api.addFiles(['learninglayers_configure.html', 'learninglayers_configure.js'], 'client');
  api.addFiles('accounts-learninglayers.js');
});

Package.onTest(function(api) {
  api.use('ecmascript');
  api.use('tinytest');
  api.use('aur0r:accounts-learninglayers');
  api.addFiles('accounts-learninglayers-tests.js');
});
<commit_msg>Updated version<commit_after>Package.describe({
  name: 'aur0r:accounts-learninglayers',
  version: '0.0.7',
  summary: 'Login service for LearningLayers accounts',
  git: 'https://github.com/Aur0r/accounts-learninglayers',
  documentation: 'README.md'
});

Package.onUse(function(api) {
  api.versionsFrom('1.2.1');
  api.use('ecmascript');
  api.use('oauth2', ['client', 'server']);
  api.use('oauth', ['client', 'server']);
  api.use('http', ['server']);
  api.use('underscore', 'client');
  api.use('templating', 'client');
  api.use('random', 'client');
  api.use('service-configuration', ['client', 'server']);
  api.use('accounts-base', ['client', 'server']);
  // Export Accounts (etc) to packages using this one.
  api.imply('accounts-base', ['client', 'server']);
  api.use('accounts-oauth', ['client', 'server']);

  api.export('Learninglayers');

  api.addFiles('learninglayers_login_button.css', 'client');

  api.addFiles(['learninglayers_configure.html', 'learninglayers_configure.js'], 'client');
  api.addFiles('accounts-learninglayers.js');
});

Package.onTest(function(api) {
  api.use('ecmascript');
  api.use('tinytest');
  api.use('aur0r:accounts-learninglayers');
  api.addFiles('accounts-learninglayers-tests.js');
});
<|endoftext|>


<commit_before>/* eslint strict: 0, no-shadow: 0, no-unused-vars: 0, no-console: 0 */
'use strict';

require('babel-polyfill');
const os = require('os');
const webpack = require('webpack');
const electronCfg = require('./webpack.config.electron.js');
const cfg = require('./webpack.config.production.js');
const packager = require('electron-packager');
const del = require('del');
const exec = require('child_process').exec;
const argv = require('minimist')(process.argv.slice(2));
const pkg = require('./package.json');
const deps = Object.keys(pkg.dependencies);
const devDeps = Object.keys(pkg.devDependencies);

const appName = argv.name || argv.n || pkg.productName;
const shouldUseAsar = argv.asar || argv.a || false;
const shouldBuildAll = argv.all || false;

const DEFAULT_OPTS = {
  dir: './',
  name: appName,
  asar: shouldUseAsar,
  ignore: [
    '^/test($|/)',
    '^/tools($|/)',
    '^/release($|/)',
    '^/main.development.js'
  ].concat(devDeps.map(name => `/node_modules/${name}($|/)`))
  .concat(
    deps.filter(name => !electronCfg.externals.includes(name))
      .map(name => `/node_modules/${name}($|/)`)
  )
};

const icon = argv.icon || argv.i || 'app/app';

if (icon) {
  DEFAULT_OPTS.icon = icon;
}

const version = argv.version || argv.v;

if (version) {
  DEFAULT_OPTS.version = version;
  startPack();
} else {
  // use the same version as the currently-installed electron-prebuilt
  exec('npm list electron-prebuilt --dev', (err, stdout) => {
    if (err) {
      DEFAULT_OPTS.version = '0.37.6';
    } else {
      DEFAULT_OPTS.version = stdout.split('electron-prebuilt@')[1].replace(/\s/g, '');
    }

    startPack();
  });
}

function build(cfg) {
  return new Promise((resolve, reject) => {
    webpack(cfg, (err, stats) => {
      if (err) return reject(err);
      resolve(stats);
    });
  });
}

function startPack() {
  console.log('start pack...');
  build(electronCfg)
    .then(() => build(cfg))
    .then(() => del('release'))
    .then(paths => {
      if (shouldBuildAll) {
        // build for all platforms
        const archs = ['ia32', 'x64'];
        const platforms = ['linux', 'win32', 'darwin'];

        platforms.forEach(plat => {
          archs.forEach(arch => {
            pack(plat, arch, log(plat, arch));
          });
        });
      } else {
        // build for current platform only
        pack(os.platform(), os.arch(), log(os.platform(), os.arch()));
      }
    })
    .catch(err => {
      console.error(err);
    });
}

function pack(plat, arch, cb) {
  // there is no darwin ia32 electron
  if (plat === 'darwin' && arch === 'ia32') return;

  const iconObj = {
    icon: DEFAULT_OPTS.icon + (() => {
      let extension = '.png';
      if (plat === 'darwin') {
        extension = '.icns';
      } else if (plat === 'win32') {
        extension = '.ico';
      }
      return extension;
    })()
  };

  const opts = Object.assign({}, DEFAULT_OPTS, iconObj, {
    platform: plat,
    arch,
    prune: true,
    'app-version': pkg.version || DEFAULT_OPTS.version,
    out: `release/${plat}-${arch}`
  });

  packager(opts, cb);
}

function log(plat, arch) {
  return (err, filepath) => {
    if (err) return console.error(err);
    console.log(`${plat}-${arch} finished!`);
  };
}
<commit_msg>Added gulp to release task<commit_after>/* eslint strict: 0, no-shadow: 0, no-unused-vars: 0, no-console: 0 */
'use strict';

require('babel-polyfill');
const os = require('os');
const webpack = require('webpack');
const electronCfg = require('./webpack.config.electron.js');
const cfg = require('./webpack.config.production.js');
const packager = require('electron-packager');
const del = require('del');
const exec = require('child_process').exec;
const argv = require('minimist')(process.argv.slice(2));
const pkg = require('./package.json');
const deps = Object.keys(pkg.dependencies);
const devDeps = Object.keys(pkg.devDependencies);

const appName = argv.name || argv.n || pkg.productName;
const shouldUseAsar = argv.asar || argv.a || false;
const shouldBuildAll = argv.all || false;

const DEFAULT_OPTS = {
  dir: './',
  name: appName,
  asar: shouldUseAsar,
  ignore: [
    '^/test($|/)',
    '^/tools($|/)',
    '^/release($|/)',
    '^/main.development.js'
  ].concat(devDeps.map(name => `/node_modules/${name}($|/)`))
  .concat(
    deps.filter(name => !electronCfg.externals.includes(name))
      .map(name => `/node_modules/${name}($|/)`)
  )
};

const icon = argv.icon || argv.i || 'app/app';

if (icon) {
  DEFAULT_OPTS.icon = icon;
}

const version = argv.version || argv.v;

if (version) {
  DEFAULT_OPTS.version = version;
  startPack();
} else {
  // use the same version as the currently-installed electron-prebuilt
  exec('npm list electron-prebuilt --dev', (err, stdout) => {
    if (err) {
      DEFAULT_OPTS.version = '0.37.6';
    } else {
      DEFAULT_OPTS.version = stdout.split('electron-prebuilt@')[1].replace(/\s/g, '');
    }

    startPack();
  });
}

function build(cfg) {
  return new Promise((resolve, reject) => {
    exec('gulp', (err, stdout) => {
      webpack(cfg, (err, stats) => {
        if (err) return reject(err);
        resolve(stats);
      });
    });
  });
}

function startPack() {
  console.log('start pack...');
  build(electronCfg)
    .then(() => build(cfg))
    .then(() => del('release'))
    .then(paths => {
      if (shouldBuildAll) {
        // build for all platforms
        const archs = ['ia32', 'x64'];
        const platforms = ['linux', 'win32', 'darwin'];

        platforms.forEach(plat => {
          archs.forEach(arch => {
            pack(plat, arch, log(plat, arch));
          });
        });
      } else {
        // build for current platform only
        pack(os.platform(), os.arch(), log(os.platform(), os.arch()));
      }
    })
    .catch(err => {
      console.error(err);
    });
}

function pack(plat, arch, cb) {
  // there is no darwin ia32 electron
  if (plat === 'darwin' && arch === 'ia32') return;

  const iconObj = {
    icon: DEFAULT_OPTS.icon + (() => {
      let extension = '.png';
      if (plat === 'darwin') {
        extension = '.icns';
      } else if (plat === 'win32') {
        extension = '.ico';
      }
      return extension;
    })()
  };

  const opts = Object.assign({}, DEFAULT_OPTS, iconObj, {
    platform: plat,
    arch,
    prune: true,
    'app-version': pkg.version || DEFAULT_OPTS.version,
    out: `release/${plat}-${arch}`
  });

  packager(opts, cb);
}

function log(plat, arch) {
  return (err, filepath) => {
    if (err) return console.error(err);
    console.log(`${plat}-${arch} finished!`);
  };
}
<|endoftext|>


<commit_before>Package.describe({
    summary: "Famo.us wrapper for Accounts Templates.",
    version: "0.1.7",
    name: "splendido:accounts-templates-famous-wrapper",
    git: "https://github.com/splendido/accounts-templates-famous.git",
});

Package.on_use(function(api, where) {
    api.versionsFrom("METEOR@0.9.2.2");

    api.use([
        "reactive-dict",
        "templating",
    ], "client");

    api.use([
        "check",
        "underscore",
        "splendido:accounts-templates-core",
        "gadicohen:famous-views",
        "aldeed:template-extension"
    ], ["client", "server"]);

    api.imply([
        "splendido:accounts-templates-core@0.9.14",
        "gadicohen:famous-views@0.1.14",
        "aldeed:template-extension@2.0.0",
    ], ["client", "server"]);

    //api.use('mjnetworks:famous@0.2.2-1', ['client']/*, { weak: true }*/);

    api.use("splendido:accounts-templates-unstyled@0.9.14", ["client", "server"], { weak: true });
    api.use("splendido:accounts-templates-bootstrap@0.9.14", ["client", "server"], { weak: true });
    api.use("splendido:accounts-templates-foundation@0.9.14", ["client", "server"], { weak: true });
    api.use("splendido:accounts-templates-semantic-ui@0.9.14", ["client", "server"], { weak: true });

    api.add_files([
        "lib/at_famous_form.html",
        "lib/at_famous_form.js",
        "lib/at_famous_oauth.html",
        "lib/at_famous_oauth.js",
        "lib/at_pwd_form_btn.js",
        "lib/full_page_at_famous_form.html",
        "lib/full_page_at_famous_form.js",
        "lib/default_animations.js",
        "lib/famous_wrapper.js",
    ], ["client"]);

    api.add_files([
        "lib/at_configure_anim.js",
    ], ["client", "server"]);
});

Package.on_test(function(api) {
    api.use([
        "splendido:accounts-templates-core@0.9.14",
    ]);
    api.use(["tinytest", "test-helpers"], ["client", "server"]);
    api.add_files("tests/tests.js", ["client", "server"]);
});
<commit_msg>updated to core version 0.9.15<commit_after>Package.describe({
    summary: "Famo.us wrapper for Accounts Templates.",
    version: "0.1.7",
    name: "splendido:accounts-templates-famous-wrapper",
    git: "https://github.com/splendido/accounts-templates-famous.git",
});

Package.on_use(function(api, where) {
    api.versionsFrom("METEOR@0.9.2.2");

    api.use([
        "reactive-dict",
        "templating",
    ], "client");

    api.use([
        "check",
        "underscore",
        "splendido:accounts-templates-core",
        "gadicohen:famous-views",
        "aldeed:template-extension"
    ], ["client", "server"]);

    api.imply([
        "splendido:accounts-templates-core@0.9.15",
        "gadicohen:famous-views@0.1.14",
        "aldeed:template-extension@2.0.0",
    ], ["client", "server"]);

    //api.use('mjnetworks:famous@0.2.2-1', ['client']/*, { weak: true }*/);

    api.use("splendido:accounts-templates-unstyled@0.9.15", ["client", "server"], { weak: true });
    api.use("splendido:accounts-templates-bootstrap@0.9.15", ["client", "server"], { weak: true });
    api.use("splendido:accounts-templates-foundation@0.9.15", ["client", "server"], { weak: true });
    api.use("splendido:accounts-templates-semantic-ui@0.9.15", ["client", "server"], { weak: true });

    api.add_files([
        "lib/at_famous_form.html",
        "lib/at_famous_form.js",
        "lib/at_famous_oauth.html",
        "lib/at_famous_oauth.js",
        "lib/at_pwd_form_btn.js",
        "lib/full_page_at_famous_form.html",
        "lib/full_page_at_famous_form.js",
        "lib/default_animations.js",
        "lib/famous_wrapper.js",
    ], ["client"]);

    api.add_files([
        "lib/at_configure_anim.js",
    ], ["client", "server"]);
});

Package.on_test(function(api) {
    api.use([
        "splendido:accounts-templates-core@0.9.15",
    ]);
    api.use(["tinytest", "test-helpers"], ["client", "server"]);
    api.add_files("tests/tests.js", ["client", "server"]);
});
<|endoftext|>


<commit_before>Package.describe({
	name: 'kenken:meteor-utilities',
	summary: 'A collection of common utilities for general app development.',
	version: '1.0.0',
	git: 'https://github.com/kenken17/meteor-utilities'
});

Package.onUse(function(api) {
	api.versionsFrom('1.0');

	// Meteor dependencies
	api.use('ui');
	api.use('underscore', ['client', 'server']);

	// Main file
	api.addFiles('utilities.js');

	if (api.export) {
		api.export('MUtil');
	}
});

Package.onTest(function(api) {
	api.use('tinytest');
	api.use('kenken:meteor-utilities');
	api.addFiles('utilities-tests.js');
});
<commit_msg>bump up patch version<commit_after>Package.describe({
	name: 'kenken:meteor-utilities',
	summary: 'A collection of common utilities for general app development.',
	version: '2.0.1',
	git: 'https://github.com/kenken17/meteor-utilities'
});

Package.onUse(function(api) {
	api.versionsFrom('1.0');

	// Meteor dependencies
	api.use('ui');
	api.use('templating');
	api.use('underscore');

	// Both client and server file
	api.addFiles('lib/helpers_utilities.js');
	api.addFiles('lib/helpers_format.js');

	// Client
	api.addFiles('client/helpers_class.js');
	api.addFiles('client/helpers_format.js');

	if (api.export) {
		api.export('MUtilities');
	}
});

Package.onTest(function(api) {
	api.use('tinytest');
	api.use('kenken:meteor-utilities');
	api.addFiles('tests/utilities-tests.js');
});
<|endoftext|>


<commit_before>import React, { Fragment } from 'react'
import {
  Box,
  Flex,
  Container,
  Text,
  Heading,
  Button,
  LargeButton,
  Link as A,
  Card
} from '@hackclub/design-system'
import Link from 'gatsby-link'
import Helmet from 'react-helmet'
import Nav from 'components/Nav'
import Module from 'components/Module'

const Base = Box.extend`
  background-color: #111;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  color: ${({ theme }) => theme.colors.gray[2]};
  background-image: radial-gradient(circle, #333, #333 1px, #111 1px, #111);
  background-size: 2rem 2rem;
`

const CTA = Button.extend`
  text-transform: uppercase;
`
CTA.defaultProps = {
  bg: 'teal.6',
  color: 'white',
  py: 3,
  px: 4,
  f: 2
}

const Modules = Container.extend`
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  grid-gap: ${({ theme }) => theme.space[3]}px;
  h3,
  svg {
    color: ${({ theme }) => theme.colors.white};
  }
  ${({ theme }) => theme.mediaQueries.md} {
    grid-gap: ${({ theme }) => theme.space[4]}px;
    > div {
      align-items: center;
    }
  }
`
Modules.defaultProps = {
  py: 0,
  px: 3,
  my: 3,
  mx: 'auto',
  maxWidth: 64,
  align: ['left', 'center']
}

const Internal = A.withComponent(Link).extend.attrs({ color: 'inherit' })``

const Alt = Container.withComponent(Flex).extend.attrs({
  maxWidth: 64,
  px: 3,
  flexDirection: 'column'
})`text-align: left;`
const AltBox = Box.extend.attrs({ my: 4 })`max-width: 36rem;`
const AltLeft = AltBox.extend``
const AltRight = AltBox.extend.attrs({ ml: 'auto' })``

const Headline = Heading.h2.extend.attrs({
  f: [5, 6],
  mb: 3,
  color: 'snow',
  bold: true
})`line-height: 1.125;`
const subhline = { f: [3, 4], style: { lineHeight: '1.375' } }
const subtext = { f: [3, 4], style: { lineHeight: '1.5' } }

const Lead = Container.withComponent(Text)
Lead.defaultProps = { f: 3, mx: 'auto' }

const Banner = Container.extend``
Banner.defaultProps = {
  maxWidth: 48,
  mt: 5,
  mb: [3, 4],
  mx: 'auto',
  px: 3,
  align: ['left', 'center']
}

const Join = Card.withComponent(Container).extend`
  display: grid;
  grid-gap: ${({ theme }) => theme.space[3]}px;
  align-items: flex-start;
  ${({ theme }) => theme.mediaQueries.md} {
    grid-template-columns: 32rem auto;
  }
`

const Breakdown = Box.extend`
  div {
    width: 100%;
    display: block;
    text-align: left !important;
  }
  span:before {
    content: '$';
    font-size: ${({ theme }) => theme.fontSizes[4]}px;
    margin-left: -12px;
    vertical-align: super;
  }
  p {
    color: ${({ theme }) => theme.colors.red[1]};
  }
`

export default () => (
  <Base align="center">
    <Helmet title="Hack Club Bank – High school hackathon fiscal sponsorship" />
    <Nav color="smoke" />
    <Heading.h1 f={[6, 7]} pt={[4, 5]} color="white">
      The bank for student hackers.
    </Heading.h1>
    <Lead px={3} maxWidth={48} my={[3, 4]}>
      {/*High schoolers running hackathons can now store their money through Hack
      Club with the full benefits of the backing of a 501(c)(3) non-profit.
      Event organizers can check their real-time account balance and transaction
      history, collect payments from sponsors, issue physical debit cards to
      their team.*/}
      Hack Club Bank is the best place for high school hackers to store money
      for hackathons. Student organizers can invoice sponsors, issue physical
      debit cards, and get access to their event's financials through a
      real-time dashboard all with the benefits of the backing of a 501(c)(3)
      nonprofit.
    </Lead>
    <Flex justify="center">
      <CTA
        href="https://medium.com/@zrl/e5d894ea5375"
        target="_blank"
        scale
        chevronRight
      >
        Read the announcement
      </CTA>
    </Flex>
    <Banner>
      <Headline>Finances, done right.</Headline>
      <Lead maxWidth={36}>
        No waiting days for an email reply about your balance. Everything is
        immediately available and easy to see.
      </Lead>
    </Banner>
    <Modules>
      <Module
        icon="account_balance"
        name="Bank account"
        body="Get a 501(c)(3) non-profit bank account (contributions will be tax-deductible)."
      />
      <Module
        icon="history"
        name="Balance + history"
        body="Check real-time account balance and transaction history any time."
      />
      <Module
        icon="receipt"
        name="Manage your finances"
        body="Add notes to transactions, export data, issue reimbursements. Easy."
      />
    </Modules>
    <Banner>
      <Headline>A powerful toolbox for organizing your event.</Headline>
      <Lead maxWidth={32}>
        We’ve got all the tools to start getting your event ready, from domain
        email to legal forms.
      </Lead>
    </Banner>
    <Modules>
      <Module
        icon="description"
        name="Pre-written forms"
        body="Download free consent and photo release forms for your event. No lawyers needed."
      />
      <Module
        icon="credit_card"
        name="Debit cards"
        body="Issue physical debit cards to all your team members—no need for reimbursements."
      />
      <Module
        icon="cloud"
        name="G Suite"
        body="Get free G Suite + email addresses (like megan@hackchicago.io) for everyone."
      />
    </Modules>
    <Banner>
      <Headline>We’re here to help out.</Headline>
      <Lead maxWidth={36}>
        Planning your event is enough work. Let us answer questions and do the
        background work.
      </Lead>
    </Banner>
    <Modules>
      <Module
        icon="local_atm"
        name="Taxes + accounting"
        body="We’ll handle end-of-year taxes and accounting in the background."
      />
      <Module
        icon="live_help"
        name="Support anytime"
        body="Questions? We’ll never leave you dark. Best-effort 12hr response time."
      />
      <Module
        icon="forum"
        name="Community"
        body="Talk to our community of experienced event organizers anytime."
      />
    </Modules>
    <Container maxWidth={48} pt={[4, 5]} pb={[5, 6]} px={3}>
      <Join align="left" bg="black" p={[3, 4]}>
        <Container maxWidth={32} mx={0}>
          <Heading.h2 {...subhline} color="white">
            Ready to join Hack Club Bank?
          </Heading.h2>
          <Text>
            You can join immediately with an invitation from an existing Bank
            user or a member of the Hack Club community. Otherwise, tell us
            about your event and we’ll get back to you within two weeks.
          </Text>
        </Container>
        <CTA
          href="https://goo.gl/forms/1UzFR4zkljL7dHQ32"
          target="_blank"
          scale
          chevronRight
        >
          Apply
        </CTA>
      </Join>
      <Text color="slate" f={1} mt={3}>
        *Hack Club is not a real bank.
      </Text>
    </Container>
  </Base>
)
<commit_msg>Update Medium link<commit_after>import React, { Fragment } from 'react'
import {
  Box,
  Flex,
  Container,
  Text,
  Heading,
  Button,
  LargeButton,
  Link as A,
  Card
} from '@hackclub/design-system'
import Link from 'gatsby-link'
import Helmet from 'react-helmet'
import Nav from 'components/Nav'
import Module from 'components/Module'

const Base = Box.extend`
  background-color: #111;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  color: ${({ theme }) => theme.colors.gray[2]};
  background-image: radial-gradient(circle, #333, #333 1px, #111 1px, #111);
  background-size: 2rem 2rem;
`

const CTA = Button.extend`
  text-transform: uppercase;
`
CTA.defaultProps = {
  bg: 'teal.6',
  color: 'white',
  py: 3,
  px: 4,
  f: 2
}

const Modules = Container.extend`
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  grid-gap: ${({ theme }) => theme.space[3]}px;
  h3,
  svg {
    color: ${({ theme }) => theme.colors.white};
  }
  ${({ theme }) => theme.mediaQueries.md} {
    grid-gap: ${({ theme }) => theme.space[4]}px;
    > div {
      align-items: center;
    }
  }
`
Modules.defaultProps = {
  py: 0,
  px: 3,
  my: 3,
  mx: 'auto',
  maxWidth: 64,
  align: ['left', 'center']
}

const Internal = A.withComponent(Link).extend.attrs({ color: 'inherit' })``

const Alt = Container.withComponent(Flex).extend.attrs({
  maxWidth: 64,
  px: 3,
  flexDirection: 'column'
})`text-align: left;`
const AltBox = Box.extend.attrs({ my: 4 })`max-width: 36rem;`
const AltLeft = AltBox.extend``
const AltRight = AltBox.extend.attrs({ ml: 'auto' })``

const Headline = Heading.h2.extend.attrs({
  f: [5, 6],
  mb: 3,
  color: 'snow',
  bold: true
})`line-height: 1.125;`
const subhline = { f: [3, 4], style: { lineHeight: '1.375' } }
const subtext = { f: [3, 4], style: { lineHeight: '1.5' } }

const Lead = Container.withComponent(Text)
Lead.defaultProps = { f: 3, mx: 'auto' }

const Banner = Container.extend``
Banner.defaultProps = {
  maxWidth: 48,
  mt: 5,
  mb: [3, 4],
  mx: 'auto',
  px: 3,
  align: ['left', 'center']
}

const Join = Card.withComponent(Container).extend`
  display: grid;
  grid-gap: ${({ theme }) => theme.space[3]}px;
  align-items: flex-start;
  ${({ theme }) => theme.mediaQueries.md} {
    grid-template-columns: 32rem auto;
  }
`

const Breakdown = Box.extend`
  div {
    width: 100%;
    display: block;
    text-align: left !important;
  }
  span:before {
    content: '$';
    font-size: ${({ theme }) => theme.fontSizes[4]}px;
    margin-left: -12px;
    vertical-align: super;
  }
  p {
    color: ${({ theme }) => theme.colors.red[1]};
  }
`

export default () => (
  <Base align="center">
    <Helmet title="Hack Club Bank – High school hackathon fiscal sponsorship" />
    <Nav color="smoke" />
    <Heading.h1 f={[6, 7]} pt={[4, 5]} color="white">
      The bank for student hackers.
    </Heading.h1>
    <Lead px={3} maxWidth={48} my={[3, 4]}>
      {/*High schoolers running hackathons can now store their money through Hack
      Club with the full benefits of the backing of a 501(c)(3) non-profit.
      Event organizers can check their real-time account balance and transaction
      history, collect payments from sponsors, issue physical debit cards to
      their team.*/}
      Hack Club Bank is the best place for high school hackers to store money
      for hackathons. Student organizers can invoice sponsors, issue physical
      debit cards, and get access to their event's financials through a
      real-time dashboard all with the benefits of the backing of a 501(c)(3)
      nonprofit.
    </Lead>
    <Flex justify="center">
      <CTA
        href="https://medium.com/hackclub/a-bank-for-student-hackers-e5d894ea5375"
        target="_blank"
        scale
        chevronRight
      >
        Read the announcement
      </CTA>
    </Flex>
    <Banner>
      <Headline>Finances, done right.</Headline>
      <Lead maxWidth={36}>
        No waiting days for an email reply about your balance. Everything is
        immediately available and easy to see.
      </Lead>
    </Banner>
    <Modules>
      <Module
        icon="account_balance"
        name="Bank account"
        body="Get a 501(c)(3) non-profit bank account (contributions will be tax-deductible)."
      />
      <Module
        icon="history"
        name="Balance + history"
        body="Check real-time account balance and transaction history any time."
      />
      <Module
        icon="receipt"
        name="Manage your finances"
        body="Add notes to transactions, export data, issue reimbursements. Easy."
      />
    </Modules>
    <Banner>
      <Headline>A powerful toolbox for organizing your event.</Headline>
      <Lead maxWidth={32}>
        We’ve got all the tools to start getting your event ready, from domain
        email to legal forms.
      </Lead>
    </Banner>
    <Modules>
      <Module
        icon="description"
        name="Pre-written forms"
        body="Download free consent and photo release forms for your event. No lawyers needed."
      />
      <Module
        icon="credit_card"
        name="Debit cards"
        body="Issue physical debit cards to all your team members—no need for reimbursements."
      />
      <Module
        icon="cloud"
        name="G Suite"
        body="Get free G Suite + email addresses (like megan@hackchicago.io) for everyone."
      />
    </Modules>
    <Banner>
      <Headline>We’re here to help out.</Headline>
      <Lead maxWidth={36}>
        Planning your event is enough work. Let us answer questions and do the
        background work.
      </Lead>
    </Banner>
    <Modules>
      <Module
        icon="local_atm"
        name="Taxes + accounting"
        body="We’ll handle end-of-year taxes and accounting in the background."
      />
      <Module
        icon="live_help"
        name="Support anytime"
        body="Questions? We’ll never leave you dark. Best-effort 12hr response time."
      />
      <Module
        icon="forum"
        name="Community"
        body="Talk to our community of experienced event organizers anytime."
      />
    </Modules>
    <Container maxWidth={48} pt={[4, 5]} pb={[5, 6]} px={3}>
      <Join align="left" bg="black" p={[3, 4]}>
        <Container maxWidth={32} mx={0}>
          <Heading.h2 {...subhline} color="white">
            Ready to join Hack Club Bank?
          </Heading.h2>
          <Text>
            You can join immediately with an invitation from an existing Bank
            user or a member of the Hack Club community. Otherwise, tell us
            about your event and we’ll get back to you within two weeks.
          </Text>
        </Container>
        <CTA
          href="https://goo.gl/forms/1UzFR4zkljL7dHQ32"
          target="_blank"
          scale
          chevronRight
        >
          Apply
        </CTA>
      </Join>
      <Text color="slate" f={1} mt={3}>
        *Hack Club is not a real bank.
      </Text>
    </Container>
  </Base>
)
<|endoftext|>


<commit_before>Package.describe({
    summary: "Cordova contacts plugin integration for Meteor",
    version: "0.0.1",
    name: "erdal:cordova-contacts",
    git: "https://github.com/Erdou/cordova-plugin-contacts.git"
});

var both        = ['client', 'server'];
var client      = ['client'];
var server      = ['server'];
var browser     = ['web.browser'];

Cordova.depends({
    'org.apache.cordova.contacts': '1.1.0-dev'
});

Package.on_use(function(api) {
    api.versionsFrom('1.0');

    // import packages
    api.use(['underscore'], both);
});

Package.on_test(function (api) {
    api.use(['test-helpers', 'tinytest', 'erdal:cordova-contacts']);

    api.add_files([
        'tests/test.js'
    ], browser);
});
<commit_msg>Fixed Cordova package version<commit_after>Package.describe({
    summary: "Cordova contacts plugin integration for Meteor",
    version: "0.0.1",
    name: "erdal:cordova-contacts",
    git: "https://github.com/Erdou/cordova-plugin-contacts.git"
});

var both        = ['client', 'server'];
var client      = ['client'];
var server      = ['server'];
var browser     = ['web.browser'];

Cordova.depends({
    'org.apache.cordova.contacts': '1.1.0'
});

Package.on_use(function(api) {
    api.versionsFrom('1.0');

    // import packages
    api.use(['underscore'], both);
});

Package.on_test(function (api) {
    api.use(['test-helpers', 'tinytest', 'erdal:cordova-contacts']);

    api.add_files([
        'tests/test.js'
    ], browser);
});
<|endoftext|>


<commit_before>/**
 * XadillaX created at 2016-06-06 21:40:48 With ♥
 *
 * Copyright (c) 2016 Souche.com, all rights
 * reserved.
 */
"use strict";

require("should");

var config = require("./config");

describe("#consumer", function() {
    var consumer = require("./common").consumer;
    var date = new Date();
    var DATE = "" + date.getUTCFullYear() + date.getUTCMonth() + date.getUTCDate();
    var ack = [];
    var message = [];
    var leftReconsume = true;

    this.timeout(0);

    function listener(_message, _ack) {
        // console.log(_message, _ack);
        // console.log(message, ack);
        message.push(_message);
        ack.push(_ack);

        if(ack.length >= 3) {
            _ack.done();
        }
    }

    it("should start consumer", function(done) {
        consumer.on("message", listener);
        consumer.init(function() {
            consumer.listen();
            done();
        });
    });

    it("should get one message", function(done) {
        function verify() {
            if(ack.length < 1) return setTimeout(verify, 500);

            var _message = message[0];
            var _ack = ack[0];

            // console.log(_message);

            _ack.done(false);

            _message.topic.should.be.eql(config.topic);
            _message.tag.should.be.eql("tagA");
            _message.key.should.be.eql("");
            _message.msgId.should.match(/^[0-9A-Z]{32}$/);
            _message.body.should.be.eql("Hello " + DATE);
            _message.reconsumeTimes.should.be.eql(0);
            _message.startDeliverTime.should.be.eql(0);

            done();
        }

        setTimeout(verify, 500);
    });

    it("should get another message", function(done) {
        function verify() {
            if(ack.length < 2) return setTimeout(verify, 500);

            var _message = message[1];
            var _ack = ack[1];

            // console.log(_message);

            _ack.done(true);

            _message.topic.should.be.eql(config.topic);
            _message.tag.should.be.eql("tagA");
            _message.key.should.be.eql("");
            _message.msgId.should.match(/^[0-9A-Z]{32}$/);

            if(_message.reconsumeTimes === 0) {
                _message.body.should.be.eql("World " + DATE);
                _message.reconsumeTimes.should.be.eql(0);
                _message.startDeliverTime.should.not.be.eql(0);
            } else {
                _message.body.should.be.eql("Hello " + DATE);
                _message.reconsumeTimes.should.be.eql(1);
                _message.startDeliverTime.should.be.eql(0);
                leftReconsume = false;
            }

            done();
        }

        setTimeout(verify, 500);
    });

    it("should reconsume", function(done) {
        function verify() {
            if(ack.length < 3) return setTimeout(verify, 500);

            var _message = message[2];
            var _ack = ack[2];

            // console.log(_message);

            _ack.done();

            _message.topic.should.be.eql(config.topic);
            _message.tag.should.be.eql("tagA");
            _message.key.should.be.eql("");
            _message.msgId.should.match(/^[0-9A-Z]{32}$/);

            if(leftReconsume) {
                _message.body.should.be.eql("Hello " + DATE);
                _message.reconsumeTimes.should.be.eql(1);
                _message.startDeliverTime.should.be.eql(0);
            } else {
                _message.body.should.be.eql("World " + DATE);
                _message.reconsumeTimes.should.be.eql(0);
                _message.startDeliverTime.should.not.be.eql(0);
            }

            done();
        }

        setTimeout(verify, 500);
    });
});
<commit_msg>test: add a new test case for consumer with no option<commit_after>/**
 * XadillaX created at 2016-06-06 21:40:48 With ♥
 *
 * Copyright (c) 2016 Souche.com, all rights
 * reserved.
 */
"use strict";

require("should");

var config = require("./config");

describe("#consumer", function() {
    var consumer = require("./common").consumer;
    var date = new Date();
    var DATE = "" + date.getUTCFullYear() + date.getUTCMonth() + date.getUTCDate();
    var ack = [];
    var message = [];
    var leftReconsume = true;

    this.timeout(1000);

    function listener(_message, _ack) {
        // console.log(_message, _ack);
        // console.log(message, ack);
        message.push(_message);
        ack.push(_ack);

        if(ack.length >= 3) {
            _ack.done();
        }
    }

    it("should start consumer", function(done) {
        consumer.on("message", listener);
        consumer.init(function() {
            consumer.listen();
            done();
        });
    });

    it("should get one message", function(done) {
        function verify() {
            if(ack.length < 1) return setTimeout(verify, 500);

            var _message = message[0];
            var _ack = ack[0];

            // console.log(_message);

            _ack.done(false);

            _message.topic.should.be.eql(config.topic);
            _message.tag.should.be.eql("tagA");
            _message.key.should.be.eql("");
            _message.msgId.should.match(/^[0-9A-Z]{32}$/);
            _message.body.should.be.eql("Hello " + DATE);
            _message.reconsumeTimes.should.be.eql(0);
            _message.startDeliverTime.should.be.eql(0);

            done();
        }

        setTimeout(verify, 500);
    });

    it("should get another message", function(done) {
        function verify() {
            if(ack.length < 2) return setTimeout(verify, 500);

            var _message = message[1];
            var _ack = ack[1];

            // console.log(_message);

            _ack.done(true);

            _message.topic.should.be.eql(config.topic);
            _message.tag.should.be.eql("tagA");
            _message.key.should.be.eql("");
            _message.msgId.should.match(/^[0-9A-Z]{32}$/);

            if(_message.reconsumeTimes === 0) {
                _message.body.should.be.eql("World " + DATE);
                _message.reconsumeTimes.should.be.eql(0);
                _message.startDeliverTime.should.not.be.eql(0);
            } else {
                _message.body.should.be.eql("Hello " + DATE);
                _message.reconsumeTimes.should.be.eql(1);
                _message.startDeliverTime.should.be.eql(0);
                leftReconsume = false;
            }

            done();
        }

        setTimeout(verify, 500);
    });

    it("should reconsume", function(done) {
        function verify() {
            if(ack.length < 3) return setTimeout(verify, 500);

            var _message = message[2];
            var _ack = ack[2];

            // console.log(_message);

            _ack.done();

            _message.topic.should.be.eql(config.topic);
            _message.tag.should.be.eql("tagA");
            _message.key.should.be.eql("");
            _message.msgId.should.match(/^[0-9A-Z]{32}$/);

            if(leftReconsume) {
                _message.body.should.be.eql("Hello " + DATE);
                _message.reconsumeTimes.should.be.eql(1);
                _message.startDeliverTime.should.be.eql(0);
            } else {
                _message.body.should.be.eql("World " + DATE);
                _message.reconsumeTimes.should.be.eql(0);
                _message.startDeliverTime.should.not.be.eql(0);
            }

            done();
        }

        setTimeout(verify, 500);
    });

    it("should use default options", function(done) {
        const consumer = new require("../").Consumer(config.consumerId, config.topic, "*", config.accessKey, config.secretKey);
        consumer.stop(function() {
            done();
        });
    });
});
<|endoftext|>


<commit_before>import React from 'react'
import styled from 'styled-components'
import {
  Section,
  Heading,
  Text,
  Container,
  theme
} from '@hackclub/design-system'
import Helmet from 'react-helmet'
import Layout from 'components/Layout'
import Nav from 'components/Nav'
import Name from 'components/Name'
import Bio from 'components/Bio'
import Footer from 'components/Footer'

const Header = styled(Section)`
  background: url('/pattern.svg'),
    linear-gradient(-64deg, ${theme.colors.orange[5]}, ${theme.colors.red[5]});
  background-repeat: repeat;
`

const Base = styled(Container)`
  display: grid;
  grid-gap: 1rem;
  ${theme.mediaQueries.md} {
    grid-gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
  }
`

const title = 'Hack Club Team'
const description =
  'Meet the team that runs Hack Club, a global nonprofit network of high school computer science clubs.'

export default () => (
  <Layout bg="snow">
    <Helmet
      title={title}
      meta={[
        { name: 'twitter:title', content: title },
        { name: 'description', content: description },
        { name: 'twitter:description', content: description },
        { property: 'og:title', content: title },
        { property: 'og:description', content: description },
        { property: 'og:url', content: 'https://hackclub.com/team' }
      ]}
    />
    <Nav />
    <Header color="white">
      <Container maxWidth={36} align="center" py={[3, 4]}>
        <Heading.h1 fontSize={[3, 4]} regular caps mt={4} mb={2}>
          Hack Club Team
        </Heading.h1>
        <Name fontSize={6}>We the students.</Name>
        <Text fontSize={3} my={3}>
          We believe in a world where every young person is empowered to be the
          change they want to see around them. At Hack Club, we’re working hard
          to make it reality.
        </Text>
      </Container>
    </Header>
    <Base px={3} py={[4, 5]}>
      <Bio
        img="/team/zach.jpg"
        name="Zach Latta"
        teamRole="Executive Director"
        text="Zach dropped out of high school after his freshman year to work in the technology industry and had over 5 million people using his software by the time he turned 17. He founded Hack Club to build the program he wish he had in high school and has been awarded the Thiel Fellowship and Forbes 30 Under 30 for his work."
        pronouns="he/him"
      />
      <Bio
        img="/team/max.jpg"
        name="Max Wofford"
        teamRole="Operations"
        text="After teaching himself to code in junior year of high school, Max joined a group of nomadic hackers in Costa Rica to experience coding in a real-world setting. He has been with Hack Club since day one and is now working full-time in San Francisco to grow the movement."
        pronouns="he/him"
      />
      <Bio
        img="/team/lachlan.jpg"
        name="Lachlan Campbell"
        teamRole="Web/Design"
        text="Lachlan, an active club leader from State College, PA, joined to work on hackclub.com. 1.5 years later, they make Hack Club’s website, design (system), & branding, and work on projects including Bank & Leaders. They will soon study Interactive Media Arts @ NYU, fall 2019."
        pronouns="they/them"
      />
      <Bio
        img="/team/mingjie.jpg"
        name="Mingjie Jiang"
        teamRole="Community"
        text="Mingjie is a club leader from Rockville, Maryland. He started working with Hack Club in July 2017, currently working with community engagement and public identity of the organization. He also ran various programs like Hack Chicago & CodeDay DC to spread his passion for technology to fellow students."
        pronouns="he/him"
      />
      <Bio
        img="/team/chris.jpg"
        name="Chris Walker"
        teamRole="Hacker Resources"
        text="Chris started programming games in middle school, and eventually left college to make educational software. In 2013 he accepted a Thiel Fellowship and moved to San Francisco, where he watched Hack Club grow from an early stage. He now works full-time on Hack Club’s learning resources."
        pronouns="he/him"
      />
      <Bio
        img="/team/athul.jpg"
        name="Athul Blesson"
        teamRole="Indian Region"
        text="Athul leads some of the largest Hack Clubs in India. After graduating from high school, he joined as the Regional Manager in India, where he actively leads 30+ clubs."
        pronouns="he/him"
      />
      <Bio
        img="/team/michael.png"
        name="Michael Destefanis"
        teamRole="Hack Club Bank"
        text="After graduating high school, Michael moved to California where he began working with Hack Club. He now leads Hack Club Bank and loves helping passionate people bring their ideas to reality."
        pronouns="he/him"
      />
      <Bio
        img="/team/orpheus.jpg"
        name="Prophet Orpheus"
        teamRole="Mascot"
        text="Prophet Orpheus is Hack Club’s mascot who takes the form of a nondescript dinosaur. She is always working to help more students to learn to code, and has always been the most active contributor of Hack Club."
        pronouns="she/her"
      />
    </Base>
    <Footer />
  </Layout>
)
<commit_msg>Update bio for Chris, closes #539<commit_after>import React from 'react'
import styled from 'styled-components'
import {
  Section,
  Heading,
  Text,
  Container,
  theme
} from '@hackclub/design-system'
import Helmet from 'react-helmet'
import Layout from 'components/Layout'
import Nav from 'components/Nav'
import Name from 'components/Name'
import Bio from 'components/Bio'
import Footer from 'components/Footer'

const Header = styled(Section)`
  background: url('/pattern.svg'),
    linear-gradient(-64deg, ${theme.colors.orange[5]}, ${theme.colors.red[5]});
  background-repeat: repeat;
`

const Base = styled(Container)`
  display: grid;
  grid-gap: 1rem;
  ${theme.mediaQueries.md} {
    grid-gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
  }
`

const title = 'Hack Club Team'
const description =
  'Meet the team that runs Hack Club, a global nonprofit network of high school computer science clubs.'

export default () => (
  <Layout bg="snow">
    <Helmet
      title={title}
      meta={[
        { name: 'twitter:title', content: title },
        { name: 'description', content: description },
        { name: 'twitter:description', content: description },
        { property: 'og:title', content: title },
        { property: 'og:description', content: description },
        { property: 'og:url', content: 'https://hackclub.com/team' }
      ]}
    />
    <Nav />
    <Header color="white">
      <Container maxWidth={36} align="center" py={[3, 4]}>
        <Heading.h1 fontSize={[3, 4]} regular caps mt={4} mb={2}>
          Hack Club Team
        </Heading.h1>
        <Name fontSize={6}>We the students.</Name>
        <Text fontSize={3} my={3}>
          We believe in a world where every young person is empowered to be the
          change they want to see around them. At Hack Club, we’re working hard
          to make it reality.
        </Text>
      </Container>
    </Header>
    <Base px={3} py={[4, 5]}>
      <Bio
        img="/team/zach.jpg"
        name="Zach Latta"
        teamRole="Executive Director"
        text="Zach dropped out of high school after his freshman year to work in the technology industry and had over 5 million people using his software by the time he turned 17. He founded Hack Club to build the program he wish he had in high school and has been awarded the Thiel Fellowship and Forbes 30 Under 30 for his work."
        pronouns="he/him"
      />
      <Bio
        img="/team/max.jpg"
        name="Max Wofford"
        teamRole="Operations"
        text="After teaching himself to code in junior year of high school, Max joined a group of nomadic hackers in Costa Rica to experience coding in a real-world setting. He has been with Hack Club since day one and is now working full-time in San Francisco to grow the movement."
        pronouns="he/him"
      />
      <Bio
        img="/team/lachlan.jpg"
        name="Lachlan Campbell"
        teamRole="Web/Design"
        text="Lachlan, an active club leader from State College, PA, joined to work on hackclub.com. 1.5 years later, they make Hack Club’s website, design (system), & branding, and work on projects including Bank & Leaders. They will soon study Interactive Media Arts @ NYU, fall 2019."
        pronouns="they/them"
      />
      <Bio
        img="/team/mingjie.jpg"
        name="Mingjie Jiang"
        teamRole="Community"
        text="Mingjie is a club leader from Rockville, Maryland. He started working with Hack Club in July 2017, currently working with community engagement and public identity of the organization. He also ran various programs like Hack Chicago & CodeDay DC to spread his passion for technology to fellow students."
        pronouns="he/him"
      />
      <Bio
        img="/team/chris.jpg"
        name="Chris Walker"
        teamRole="Hacker Resources"
        text="Chris started programming games in middle school, a hobby that developed into a deep passion for educational software. In 2013 he accepted a Thiel Fellowship and moved to San Francisco, where he watched Hack Club grow from an early stage. He now works full-time on Hack Club’s learning resources."
        pronouns="he/him"
      />
      <Bio
        img="/team/athul.jpg"
        name="Athul Blesson"
        teamRole="Indian Region"
        text="Athul leads some of the largest Hack Clubs in India. After graduating from high school, he joined as the Regional Manager in India, where he actively leads 30+ clubs."
        pronouns="he/him"
      />
      <Bio
        img="/team/michael.png"
        name="Michael Destefanis"
        teamRole="Hack Club Bank"
        text="After graduating high school, Michael moved to California where he began working with Hack Club. He now leads Hack Club Bank and loves helping passionate people bring their ideas to reality."
        pronouns="he/him"
      />
      <Bio
        img="/team/orpheus.jpg"
        name="Prophet Orpheus"
        teamRole="Mascot"
        text="Prophet Orpheus is Hack Club’s mascot who takes the form of a nondescript dinosaur. She is always working to help more students to learn to code, and has always been the most active contributor of Hack Club."
        pronouns="she/her"
      />
    </Base>
    <Footer />
  </Layout>
)
<|endoftext|>


<commit_before>Package.describe({
  name: 'heaven7:wsl-i18n',
  version: '0.0.1',
  summary: 'I18n package',
  git: 'https://github.com/heaven7/wsl-tasks.git',
  documentation: 'README.md'
});

both = ['client','server'];

Package.onUse(function(api) {
    api.versionsFrom('1.1.0.2');

    api.use(['heaven7:wsl-core'], both);
    api.imply(['heaven7:wsl-core']);

    api.use('session', 'client');

    api.addFiles('lib/both/i18n.js', both);
});
<commit_msg>tap:i18n package<commit_after>Package.describe({
  name: 'heaven7:wsl-i18n',
  version: '0.0.1',
  summary: 'I18n package',
  git: 'https://github.com/heaven7/wsl-tasks.git',
  documentation: 'README.md'
});

both = ['client','server'];

Package.onUse(function(api) {
    api.versionsFrom('1.1.0.2');

    var packages = [
        'heaven7:wsl-core',
        'tap:i18n@1.5.1'
    ];

    api.use(packages, both);
    api.imply(packages);

    api.use('session', 'client');

    api.addFiles('lib/both/i18n.js', both);
});
<|endoftext|>


<commit_before>import { default as React, Component } from 'react';
import { storageService } from '../service/StorageService';
import { render } from 'react-dom';
import { Modal } from 'react-bootstrap';
import { authOperation, authEmitter } from '../service/authOperation';

export class SubscribeModal extends Component {
	constructor(props) {
		super(props);
		this.state = {
			showModal: false,
			profile: false,
			subscribeOption: 'major'
		};
		this.options = {
			option1: {
				value: 'major',
				text: 'New GEM releases'
			},
			option2: {
				value: 'all',
				text: 'Limited major updates'
			}
		}
		this.countdown = 0;
		this.timer = 1;
		this.activetab = true;
		this.holdSubscribe = false;
		this.internalClose = false;
		this.init();
	}
	init() {
		authEmitter.addListener('profile', (data) => {
			this.setState({
				profile: data
			});
		});
		storageService.set('subPopuptimerAlreadyOpen', 'no');
		let popupInterval = setInterval(() => {
			this.countdown++;
			if (!this.state.profile) {
				let subPopuptimer = storageService.get('subPopuptimer');
				if (subPopuptimer && subPopuptimer !== 'NaN') {
					this.timer = parseInt(storageService.get('subPopuptimer'), 10);
				}
				if(this.countdown === this.timer) {
					this.open();
				}
			} else {
				popupInterval();
			}
		}, 1000 * 60);

		$(window).focus(function() {
			this.activetab = true;
			setTimeout(() => {
				if (!this.state.profile && this.holdSubscribe && !this.internalClose) {
					this.open();
				}
			}, 1000 * 10 * this.timer);
		}.bind(this));

		$(window).blur(function() {
			this.activetab = false;
		}.bind(this));
	}
	close() {
		this.internalClose = true;
		storageService.set('subPopuptimer', this.timer + 5);
		storageService.set('subPopuptimerAlreadyOpen', 'no');
		this.setState({ showModal: false });
	}
	open() {
		if (!this.state.profile) {
			if (!$('.fade.in.modal').length) {
				if(this.activetab) {
					if(storageService.get('subPopuptimerAlreadyOpen') == 'no') {
						this.setState({ showModal: true });
						storageService.set('subPopuptimerAlreadyOpen', 'yes');
					}
				} else {
					this.holdSubscribe = true;
				}
			} else {
				setTimeout(() => {
					this.open();
				}, 1000 * 10);
			}
		}
	}
	subscribe() {
		authOperation.login(this.state.subscribeOption);
	}
	subscribeOptionChange(value) {
		this.setState({
			subscribeOption: value
		});
	}
	showIcon() {
		let icon = ();
		if (this.state.profile) {
			icon = ();
		}
		return icon;
	}
	setOption(options) {
		return options.map((opt, index) => {
			return (

					<input type="radio"
						checked={this.state.subscribeOption === opt.value}
						onChange={() => this.subscribeOptionChange(opt.value)}
						name="subscribeOption" id={"subscribeOption"+index} value={opt.value} /> {opt.text}

			);
		});
	}
	render() {
		return (

			 this.open()}>
				{this.showIcon()}

			<Modal className="modal-info" show={this.state.showModal} onHide={() => this.close()}>
			<Modal.Header closeButton>
				<Modal.Title>Be in the know about major updates!</Modal.Title>
			</Modal.Header>
			<Modal.Body>

							{this.setOption([this.options.option1, this.options.option2])}

					<button className="btn btn-primary" onClick={() => this.subscribe()}>
						 Subscribe with Github
					</button>

				</Modal.Body>
			</Modal>

		)
	}
}
<commit_msg>Fix error when building locally.<commit_after>import { default as React, Component } from 'react';
import { storageService } from '../service/StorageService';
import { render } from 'react-dom';
import { Modal } from 'react-bootstrap';
import { authOperation, authEmitter } from '../service/AuthOperation';

export class SubscribeModal extends Component {
	constructor(props) {
		super(props);
		this.state = {
			showModal: false,
			profile: false,
			subscribeOption: 'major'
		};
		this.options = {
			option1: {
				value: 'major',
				text: 'New GEM releases'
			},
			option2: {
				value: 'all',
				text: 'Limited major updates'
			}
		}
		this.countdown = 0;
		this.timer = 1;
		this.activetab = true;
		this.holdSubscribe = false;
		this.internalClose = false;
		this.init();
	}
	init() {
		authEmitter.addListener('profile', (data) => {
			this.setState({
				profile: data
			});
		});
		storageService.set('subPopuptimerAlreadyOpen', 'no');
		let popupInterval = setInterval(() => {
			this.countdown++;
			if (!this.state.profile) {
				let subPopuptimer = storageService.get('subPopuptimer');
				if (subPopuptimer && subPopuptimer !== 'NaN') {
					this.timer = parseInt(storageService.get('subPopuptimer'), 10);
				}
				if(this.countdown === this.timer) {
					this.open();
				}
			} else {
				popupInterval();
			}
		}, 1000 * 60);

		$(window).focus(function() {
			this.activetab = true;
			setTimeout(() => {
				if (!this.state.profile && this.holdSubscribe && !this.internalClose) {
					this.open();
				}
			}, 1000 * 10 * this.timer);
		}.bind(this));

		$(window).blur(function() {
			this.activetab = false;
		}.bind(this));
	}
	close() {
		this.internalClose = true;
		storageService.set('subPopuptimer', this.timer + 5);
		storageService.set('subPopuptimerAlreadyOpen', 'no');
		this.setState({ showModal: false });
	}
	open() {
		if (!this.state.profile) {
			if (!$('.fade.in.modal').length) {
				if(this.activetab) {
					if(storageService.get('subPopuptimerAlreadyOpen') == 'no') {
						this.setState({ showModal: true });
						storageService.set('subPopuptimerAlreadyOpen', 'yes');
					}
				} else {
					this.holdSubscribe = true;
				}
			} else {
				setTimeout(() => {
					this.open();
				}, 1000 * 10);
			}
		}
	}
	subscribe() {
		authOperation.login(this.state.subscribeOption);
	}
	subscribeOptionChange(value) {
		this.setState({
			subscribeOption: value
		});
	}
	showIcon() {
		let icon = ();
		if (this.state.profile) {
			icon = ();
		}
		return icon;
	}
	setOption(options) {
		return options.map((opt, index) => {
			return (

					<input type="radio"
						checked={this.state.subscribeOption === opt.value}
						onChange={() => this.subscribeOptionChange(opt.value)}
						name="subscribeOption" id={"subscribeOption"+index} value={opt.value} /> {opt.text}

			);
		});
	}
	render() {
		return (

			 this.open()}>
				{this.showIcon()}

			<Modal className="modal-info" show={this.state.showModal} onHide={() => this.close()}>
			<Modal.Header closeButton>
				<Modal.Title>Be in the know about major updates!</Modal.Title>
			</Modal.Header>
			<Modal.Body>

							{this.setOption([this.options.option1, this.options.option2])}

					<button className="btn btn-primary" onClick={() => this.subscribe()}>
						 Subscribe with Github
					</button>

				</Modal.Body>
			</Modal>

		)
	}
}
<|endoftext|>


<commit_before>var chai = require('chai'),
    should = chai.should(),
    expect = chai.expect,
    _ = require('underscore'),
    testRunner = require('..').TestRunner.setup();

var C = {};

describe('js.data.Entity', function () {

    var EntityClass;

    before(function (done) {
        testRunner.requireClasses({
            Entity: 'js/data/Entity',
            List: 'js/core/List'
        }, C, done);

        EntityClass = C.Entity.inherit('app.entity.Entity', {
            schema: {
                name: String
            }
        });
    });

    describe('#validate', function () {

        it('should validate required fields', function () {
            var entity = new EntityClass();

            entity.validate({}, function (err) {
                expect(err).not.to.exist;
                expect(entity.isValid()).to.be.equal(false);
                expect(entity.fieldError('name')).to.exist;
            });
        });

        it('should validate the types of the attributes', function () {
            EntityClass = C.Entity.inherit('app.entity.Entity', {
                schema: {
                    name: String,
                    isMale: Boolean,
                    birthDate: Date,
                    age: Number,
                    subEntity: C.Entity
                }
            });

            var entity = new EntityClass({
                name: 123,
                isMale: "asd",
                birthDate: '123123',
                age: "12",
                subEntity: "asd"
            });

            entity.validate({}, function (err) {
                expect(err).not.to.exist;
                expect(entity.isValid()).to.be.equal(false);
                expect(entity.fieldError('name')).to.exist;
                expect(entity.fieldError('isMale')).to.exist;
                expect(entity.fieldError('birthDate')).to.exist;
                expect(entity.fieldError('age')).to.exist;
                expect(entity.fieldError('subEntity')).to.exist;
            });

        });

        it('should validate sub entity', function(){
            var SubEntityClass = C.Entity.inherit('app.entity.SubEntity', {
                schema: {
                    name: String
                }
            });

            EntityClass = C.Entity.inherit('app.entity.Entity', {
                schema: {
                    name: String,
                    subEntity: SubEntityClass
                }
            });

            var subEntity  = new SubEntityClass({

            });
            var entity = new EntityClass({
                name: "Test",
                subEntity: subEntity
            });

            entity.validate({}, function(err){
                expect(err).not.to.exist;
                expect(entity.isValid()).to.be.equal(false);
                expect(entity.fieldError('name')).not.to.exist;
                expect(entity.fieldError('subEntity')).to.exist;
            });
        });

    });

});<commit_msg>fixed EntityTest<commit_after>var chai = require('chai'),
    should = chai.should(),
    expect = chai.expect,
    _ = require('underscore'),
    testRunner = require('..').TestRunner.setup();

var C = {};

describe('js.data.Entity', function () {

    var EntityClass;

    before(function (done) {
        testRunner.requireClasses({
            Entity: 'js/data/Entity',
            List: 'js/core/List'
        }, C, function(err) {

            EntityClass = C.Entity.inherit('app.entity.Entity', {
                schema: {
                    name: String
                }
            });

            done(err);
        });

    });

    describe('#validate', function () {

        it('should validate required fields', function () {
            var entity = new EntityClass();

            entity.validate({}, function (err) {
                expect(err).not.to.exist;
                expect(entity.isValid()).to.be.equal(false);
                expect(entity.fieldError('name')).to.exist;
            });
        });

        it('should validate the types of the attributes', function () {
            EntityClass = C.Entity.inherit('app.entity.Entity', {
                schema: {
                    name: String,
                    isMale: Boolean,
                    birthDate: Date,
                    age: Number,
                    subEntity: C.Entity
                }
            });

            var entity = new EntityClass({
                name: 123,
                isMale: "asd",
                birthDate: '123123',
                age: "12",
                subEntity: "asd"
            });

            entity.validate({}, function (err) {
                expect(err).not.to.exist;
                expect(entity.isValid()).to.be.equal(false);
                expect(entity.fieldError('name')).to.exist;
                expect(entity.fieldError('isMale')).to.exist;
                expect(entity.fieldError('birthDate')).to.exist;
                expect(entity.fieldError('age')).to.exist;
                expect(entity.fieldError('subEntity')).to.exist;
            });

        });

        it('should validate sub entity', function(){
            var SubEntityClass = C.Entity.inherit('app.entity.SubEntity', {
                schema: {
                    name: String
                }
            });

            EntityClass = C.Entity.inherit('app.entity.Entity', {
                schema: {
                    name: String,
                    subEntity: SubEntityClass
                }
            });

            var subEntity  = new SubEntityClass({

            });
            var entity = new EntityClass({
                name: "Test",
                subEntity: subEntity
            });

            entity.validate({}, function(err){
                expect(err).not.to.exist;
                expect(entity.isValid()).to.be.equal(false);
                expect(entity.fieldError('name')).not.to.exist;
                expect(entity.fieldError('subEntity')).to.exist;
            });
        });

    });

});<|endoftext|>


<commit_before>var Package = require('auto-package')

Package.name = 'combokeys'
Package.versionFile()
Package.description = 'Handles keyboard shortcuts in the browser'
Package.main = 'Combokeys/index.js'
Package.implements = ['CommonJS/Modules/1.0']
Package.scripts = {
  lint: 'standard',
  unit: './node_modules/zuul/bin/zuul --phantom -- test/test.combokeys.js test/plugins/test.*.js',
  build: 'mkdir -p dist && browserify index.js -o dist/combokeys.js --standalone Combokeys',
  test: 'npm run lint && npm run unit && npm run build'

}
Package.githubRepo('PolicyStat/combokeys')
Package.keywords = [
  'keyboard',
  'shortcuts',
  'events',
  'browser'
]
Package.contributors = [
  {
    'name': 'Shahar Or',
    'email': 'mightyiampresence@gmail.com',
    'web': 'https://github.com/mightyiam'
  },
  {
    'name': 'Craig Campbell',
    'web': 'http://craig.is'
  }
]
Package.bugs = 'https://github.com/mightyiam/combokeys/issues'
Package.license = {
  'type': 'Apache 2.0',
  'url': 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
Package.devDependencies = {
  standard: '*',
  'auto-package': '^1.0.0',
  'browserify': '~7.0.3',
  'chai': '^1.10.0',
  'es5-shim': '^4.0.3',
  'grunt': '~0.4.1',
  'grunt-complexity': '~0.1.2',
  'grunt-eslint': '^2.0.0',
  'load-grunt-tasks': '^1.0.0',
  'mocha': '^2.0.1',
  'phantomjs': '^1.9.12',
  'sinon': '^1.12.1',
  'zuul': '^2.1.1'
}
Package.dependencies = {
  'add-event-handler': '^1.0.0'
}
Package.standard = {
  ignore: [
    'dist/**'
  ]
}
<commit_msg>Update browserify<commit_after>var Package = require('auto-package')

Package.name = 'combokeys'
Package.versionFile()
Package.description = 'Handles keyboard shortcuts in the browser'
Package.main = 'Combokeys/index.js'
Package.implements = ['CommonJS/Modules/1.0']
Package.scripts = {
  lint: 'standard',
  unit: './node_modules/zuul/bin/zuul --phantom -- test/test.combokeys.js test/plugins/test.*.js',
  build: 'mkdir -p dist && browserify index.js -o dist/combokeys.js --standalone Combokeys',
  test: 'npm run lint && npm run unit && npm run build'

}
Package.githubRepo('PolicyStat/combokeys')
Package.keywords = [
  'keyboard',
  'shortcuts',
  'events',
  'browser'
]
Package.contributors = [
  {
    'name': 'Shahar Or',
    'email': 'mightyiampresence@gmail.com',
    'web': 'https://github.com/mightyiam'
  },
  {
    'name': 'Craig Campbell',
    'web': 'http://craig.is'
  }
]
Package.bugs = 'https://github.com/mightyiam/combokeys/issues'
Package.license = {
  'type': 'Apache 2.0',
  'url': 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
Package.devDependencies = {
  standard: '*',
  'auto-package': '^1.0.0',
  'browserify': '^9.0.3',
  'chai': '^1.10.0',
  'es5-shim': '^4.0.3',
  'grunt': '~0.4.1',
  'grunt-complexity': '~0.1.2',
  'grunt-eslint': '^2.0.0',
  'load-grunt-tasks': '^1.0.0',
  'mocha': '^2.0.1',
  'phantomjs': '^1.9.12',
  'sinon': '^1.12.1',
  'zuul': '^2.1.1'
}
Package.dependencies = {
  'add-event-handler': '^1.0.0'
}
Package.standard = {
  ignore: [
    'dist/**'
  ]
}
<|endoftext|>


<commit_before>/** @jsx React.DOM */

var React = require('react/addons');

var Formatter = require('../modules/Formatter');

require('../stylesheets/Block.scss');

var Block = React.createClass({
  propTypes: {
    content: React.PropTypes.object
  },

  getDefaultProps() {
    return {
      content: { type: "p", text: "", meta: {}, blocks: [], markups: {} }
    }
  },

  formattedText() {
    if (this.isEmpty()) { return '
'; }

    var text    = this.props.content.text;
    var markups = this.props.content.markups || {};
    if (!text) { return text; }

    var formatter = new Formatter(text);
    var formatted = formatter.applyMarkup(markups);

    return formatted;
  },

  // add meta info to custom attributes
  buildAttr() {
    var attr = {
      "className": this.blockClasses(),
      "name": this.props.content.id
    }
    var meta = this.props.content.meta || {};
    for (var property in meta) {
      if (meta.hasOwnProperty(property)) {
        attr[`data-${property}`] = meta[property];
      }
    }
    return attr;
  },

  isEmpty() {
    var text   = this.props.content.text   || "";
    var blocks = this.props.content.blocks || [];
    return text.length == 0 && blocks.length == 0
  },

  // add class modifiers
  blockClasses() {
    var type = this.props.content.type;
    var classes = {
      'ic-Editor-Block': true,
      'ic-Editor-Block--empty': this.isEmpty(),
      'ic-Editor-Block--header': ['h2', 'h3', 'h4'].indexOf(type) != -1,
      'ic-Editor-Block--list': ['ol', 'ul'].indexOf(type) != -1,
      'ic-Editor-Block--first': this.props.first,
    };
    classes[`ic-Editor-Block--${this.props.content.id}`] = true;
    classes[`ic-Editor-Block--${type}`] = true;

    return React.addons.classSet(classes)
  },

  // build the block list-items for lists
  children() {
    var type = this.props.content.type;
    if (type == "ul" || type == "ol") {
      var blocks = this.props.content.blocks || [];
      return blocks.map( (block) => {
        return <Block key={block.id} content={block} />
      });
    } else {
      return this.props.content.text;
    }
  },

  render() {
    var attr = this.buildAttr();
    var reactDom = React.DOM[this.props.content.type];
    var markups = this.props.content.markups || {};

    if (Object.keys(markups).length > 0 || this.isEmpty()) {
      attr.dangerouslySetInnerHTML = { __html: this.formattedText() }
      return reactDom(attr)

    } else {
      return reactDom(attr, this.children())
    }
  }
});

module.exports = Block;

<commit_msg>small refactoring<commit_after>/** @jsx React.DOM */

var React = require('react/addons');

var Formatter = require('../modules/Formatter');

require('../stylesheets/Block.scss');

var Block = React.createClass({
  propTypes: {
    content: React.PropTypes.object
  },

  getDefaultProps() {
    return {
      content: { type: "p", text: "", meta: {}, blocks: [], markups: {} }
    }
  },

  formattedText() {
    if (this.isEmpty()) { return '
'; }

    var text = this.props.content.text;
    if (!text) { return text; }

    var formatter = new Formatter(text);
    var formatted = formatter.applyMarkup(this.props.content.markups);

    return formatted;
  },

  // add meta info to custom attributes
  buildAttr() {
    var attr = {
      "className": this.blockClasses(),
      "name": this.props.content.id
    }
    var meta = this.props.content.meta || {};
    for (var property in meta) {
      if (meta.hasOwnProperty(property)) {
        attr[`data-${property}`] = meta[property];
      }
    }
    return attr;
  },

  isEmpty() {
    var text   = this.props.content.text   || "";
    var blocks = this.props.content.blocks || [];
    return text.length == 0 && blocks.length == 0
  },

  // add class modifiers
  blockClasses() {
    var type = this.props.content.type;
    var classes = {
      'ic-Editor-Block': true,
      'ic-Editor-Block--empty': this.isEmpty(),
      'ic-Editor-Block--header': ['h2', 'h3', 'h4'].indexOf(type) != -1,
      'ic-Editor-Block--list': ['ol', 'ul'].indexOf(type) != -1,
      'ic-Editor-Block--first': this.props.first,
    };
    classes[`ic-Editor-Block--${this.props.content.id}`] = true;
    classes[`ic-Editor-Block--${type}`] = true;

    return React.addons.classSet(classes)
  },

  // build the block list-items for lists
  children() {
    var type = this.props.content.type;
    if (type == "ul" || type == "ol") {
      var blocks = this.props.content.blocks || [];
      return blocks.map( (block) => {
        return <Block key={block.id} content={block} />
      });
    } else {
      return this.props.content.text;
    }
  },

  render() {
    var attr = this.buildAttr();
    var reactDom = React.DOM[this.props.content.type];
    var markups = this.props.content.markups || {};

    if (Object.keys(markups).length > 0 || this.isEmpty()) {
      attr.dangerouslySetInnerHTML = { __html: this.formattedText() }
      return reactDom(attr)

    } else {
      return reactDom(attr, this.children())
    }
  }
});

module.exports = Block;

<|endoftext|>


<commit_before>var fs = Npm.require('fs');
var path = Npm.require('path');

Package.describe({
  "summary": "Render your app before the DDP connection even comes alive - magic?",
  "version": "2.6.0",
  "git": "https://github.com/meteorhacks/fast-render",
  "name": "meteorhacks:fast-render"
});

Npm.depends({
  "connect": "2.13.0"
});

Package.onUse(function(api) {
  configure(api);
  api.export('FastRender', ['client', 'server']);
  api.export('__init_fast_render', ['client']);
});

Package.onTest(function(api) {
  configure(api);
  api.use('tinytest', ['client', 'server']);
  api.use('http', 'server');

  api.addFiles([
    'tests/utils.js'
  ], ['client', 'server']);

  api.addFiles([
    'tests/client/fast_render.js',
    'tests/client/ddp_update.js'
  ], 'client');

  api.addFiles([
    'tests/server/context.js',
    'tests/server/integration.js'
  ], 'server');
});

function configure (api) {
  api.versionsFrom('METEOR@0.9.3');
  api.use('meteorhacks:inject-data@1.3.0', ['client', 'server']);
  api.use('iron:router@0.9.0 || 1.0.0', ['client', 'server'], {weak: true});
  api.use('chuangbo:cookie@1.1.0', 'client');
  api.use('meteorhacks:picker@1.0.3', 'server');

  api.use(['minimongo', 'livedata', 'ejson', 'underscore', 'webapp', 'routepolicy', 'accounts-base'], ['server']);
  api.use(['minimongo', 'underscore', 'deps', 'ejson', 'accounts-base'], ['client']);

  api.addFiles([
    'lib/utils.js'
  ], ['client', 'server']);

  api.addFiles([
    'lib/server/namespace.js',
    'lib/server/utils.js',
    'lib/server/routes.js',
    'lib/server/publish_context.js',
    'lib/server/context.js',
    'lib/server/iron_router_support.js',
  ], 'server');

  api.addFiles([
    'lib/client/fast_render.js',
    'lib/client/debugger.js',
    'lib/client/ddp_update.js',
    'lib/client/auth.js',
    'lib/client/boot.js'
  ], 'client');

}
<commit_msg>v2.7.0<commit_after>var fs = Npm.require('fs');
var path = Npm.require('path');

Package.describe({
  "summary": "Render your app before the DDP connection even comes alive - magic?",
  "version": "2.7.0",
  "git": "https://github.com/meteorhacks/fast-render",
  "name": "meteorhacks:fast-render"
});

Npm.depends({
  "connect": "2.13.0"
});

Package.onUse(function(api) {
  configure(api);
  api.export('FastRender', ['client', 'server']);
  api.export('__init_fast_render', ['client']);
});

Package.onTest(function(api) {
  configure(api);
  api.use('tinytest', ['client', 'server']);
  api.use('http', 'server');

  api.addFiles([
    'tests/utils.js'
  ], ['client', 'server']);

  api.addFiles([
    'tests/client/fast_render.js',
    'tests/client/ddp_update.js'
  ], 'client');

  api.addFiles([
    'tests/server/context.js',
    'tests/server/integration.js'
  ], 'server');
});

function configure (api) {
  api.versionsFrom('METEOR@0.9.3');
  api.use('meteorhacks:inject-data@1.3.0', ['client', 'server']);
  api.use('iron:router@0.9.0 || 1.0.0', ['client', 'server'], {weak: true});
  api.use('chuangbo:cookie@1.1.0', 'client');
  api.use('meteorhacks:picker@1.0.3', 'server');

  api.use(['minimongo', 'livedata', 'ejson', 'underscore', 'webapp', 'routepolicy', 'accounts-base'], ['server']);
  api.use(['minimongo', 'underscore', 'deps', 'ejson', 'accounts-base'], ['client']);

  api.addFiles([
    'lib/utils.js'
  ], ['client', 'server']);

  api.addFiles([
    'lib/server/namespace.js',
    'lib/server/utils.js',
    'lib/server/routes.js',
    'lib/server/publish_context.js',
    'lib/server/context.js',
    'lib/server/iron_router_support.js',
  ], 'server');

  api.addFiles([
    'lib/client/fast_render.js',
    'lib/client/debugger.js',
    'lib/client/ddp_update.js',
    'lib/client/auth.js',
    'lib/client/boot.js'
  ], 'client');

}
<|endoftext|>


<commit_before>Package.describe({
  summary: "Publish pageviews and events to Google Analytics using the new analytics.js code."
  version: "0.2.1",
  name: "datariot:ganalytics"
});

Package.onUse(function (api) {

  api.addFiles(['ganalytics.js'], 'client');

  api.export(['GAnalytics'], 'client');
  }
});<commit_msg>whoops<commit_after>Package.describe({
  summary: "Publish pageviews and events to Google Analytics using the new analytics.js code.",
  version: "0.2.1",
  name: "datariot:ganalytics"
});

Package.onUse(function (api) {

  api.addFiles(['ganalytics.js'], 'client');

  api.export(['GAnalytics'], 'client');
  }
});<|endoftext|>


<commit_before>Package.describe({
    name: 'basgrani:bas-meteor-imgix',
    version: '0.1.0',
    summary: 'imgix server/client wrapped for meteor',
    git: 'https://github.com/Basgrani-Org/bas-meteor-imgix'
});

Npm.depends({
    "imgix-core-js": "1.0.3"
});

Package.onUse(function(api) {
    api.versionsFrom('1.2.1');

    // Vendor
    api.addFiles('imgix.js/dist/imgix.min.js', ['client']);
    api.addFiles('imgix.js/dist/imgix.jquery.min.js', ['client']);

    // Server
    api.addFiles('server.js', ['server']);

    // Export
    api.export('imgix', 'client');
    api.export('imgix', 'server');
});<commit_msg>Update<commit_after>Package.describe({
    name: 'basgrani:bas-meteor-imgix',
    version: '0.1.1',
    summary: 'imgix server/client wrapped for meteor',
    git: 'https://github.com/Basgrani-Org/bas-meteor-imgix'
});

Npm.depends({
    "imgix-core-js": "1.0.3"
});

Package.onUse(function(api) {
    api.versionsFrom('1.2.1');

    // Vendor
    api.addFiles('imgix.js/dist/imgix.min.js', ['client']);
    api.addFiles('imgix.js/dist/imgix.jquery.min.js', ['client']);

    // Server
    api.addFiles('server.js', ['server']);

    // Export
    api.export('imgix', 'client');
    api.export('imgix', 'server');
});<|endoftext|>


<commit_before>import React, { Component } from 'react';
import { Input, Button, ProgressBar } from 'react-bootstrap';

export default class Timer extends Component {
  state = {
    secondsRemaining: 60,
    selectedSeconds: 60,
    timerRunning: false
  }
  setInitialTime = (event) => {
    if (!this.state.timerRunning) {
      this.setState({
      	selectedSeconds: event.target.options[event.target.selectedIndex].value,
      	secondsRemaining: event.target.options[event.target.selectedIndex].value
    });
    }
  }
  startCountdown = () => {
    if(!this.state.timerRunning) {
      this.setState({timerRunning: true});
      this.interval = setInterval(this.tick, 1000);
    }
  }
  resetCountdown = () => {
    clearInterval(this.interval);
    this.setState({timerRunning: false, secondsRemaining: this.state.selectedSeconds});
    this.startCountdown();
  }
  tick = () => {
    this.setState({secondsRemaining: this.state.secondsRemaining - 1});
    if (this.state.secondsRemaining <= 0) {
      clearInterval(this.interval);
      this.setState({timerRunning: false, secondsRemaining: this.state.selectedSeconds});
    }
  }
	render = () => {
    let button, progressBar, select;
    if(!this.state.timerRunning) {
      select = (
        <Input type="select" value={this.state.selectedSeconds} onChange={this.setInitialTime}>
          <option value="60">60 seconds</option>
          <option value="120">120 seconds</option>
          <option value="180">180 seconds</option>
        </Input>
      );
      button = <Button block onClick={this.startCountdown}>Start Timer</Button>;
    } else {
      button = <Button block onClick={this.resetCountdown}>Stop Timer</Button>;
      progressBar = <ProgressBar max={this.state.selectedSeconds} now={this.state.secondsRemaining} label={this.state.secondsRemaining}></ProgressBar>;
    }
		return (

Stop slacking! Time your breaks!

          {select}

          {progressBar}
          {button}

		);
	}
}
<commit_msg>Cleaned up timer.<commit_after>import React, { Component } from 'react';
import { Input, Button, ProgressBar } from 'react-bootstrap';

export default class Timer extends Component {
  state = {
    secondsRemaining: 60,
    selectedSeconds: 60,
    timerRunning: false
  }
  setInitialTime = (event) => {
    this.setState({
    	selectedSeconds: event.target.options[event.target.selectedIndex].value,
    	secondsRemaining: event.target.options[event.target.selectedIndex].value
    });
  }
  startCountdown = () => {
    this.setState({timerRunning: true});
    this.interval = setInterval(this.tick, 1000);
  }
  resetCountdown = () => {
    clearInterval(this.interval);
    this.setState({timerRunning: false, secondsRemaining: this.state.selectedSeconds});
  }
  tick = () => {
    this.setState({secondsRemaining: this.state.secondsRemaining - 1});
    if (this.state.secondsRemaining <= 0) {
      this.resetCountdown();
    }
  }
  componentWillUnmount() {
    clearInterval(this.interval);
  }
	render() {
		return (

Stop slacking! Time your breaks!

        {this.state.timerRunning
          ?
          <ProgressBar max={this.state.selectedSeconds} now={this.state.secondsRemaining} label={this.state.secondsRemaining} />
          :
          <Input type="select" value={this.state.selectedSeconds} onChange={this.setInitialTime}>
            <option value="60">60 seconds</option>
            <option value="120">120 seconds</option>
            <option value="180">180 seconds</option>
          </Input>
        }
        <Button block onClick={this.state.timerRunning ? this.resetCountdown : this.startCountdown}>
          {this.state.timerRunning ? 'Stop' : 'Start'} Timer
        </Button>

		);
	}
}
<|endoftext|>