Skip to content
Browse files

[refactor] Remove unused files post refactor

  • Loading branch information...
1 parent 6eb2abf commit 61a1460d303e4298fe6f08b0490f82abb8f06fec @indexzero indexzero committed Jan 17, 2012
Showing with 0 additions and 104 deletions.
  1. +0 −23 lib/conf.js
  2. +0 −81 lib/dispatcher.js
View
23 lib/conf.js
@@ -1,23 +0,0 @@
-/*!
- * GitHub Issues from the CLI.
- *
- * Veselin Todorov <hi@vesln.com>
- * MIT License.
- */
-
-/**
- * Dependencies.
- */
-var path = require('path');
-
-/**
- * Path to config file.
- *
- * @param {String}
- */
-var conf = path.dirname(__dirname) + '/data/config.json';
-
-/**
- * Exposing `conf`.
- */
-module.exports = require('nconf').file({ file: conf });
View
81 lib/dispatcher.js
@@ -1,81 +0,0 @@
-/*!
- * GitHub Issues from the CLI.
- *
- * Veselin Todorov <hi@vesln.com>
- * MIT License.
- */
-
-/**
- * Dependencies.
- */
-var commands = require('./commands');
-var package = require('package')(module);
-var Request = require('./request');
-var reporters = require('./reporters');
-
-/**
- * Dispatcher constructor.
- *
- * @param {Object} argv
- */
-function Dispatcher(argv) {
- argv || (argv = {});
- this.argv = argv;
-};
-
-/**
- * Dispatches the request.
- */
-Dispatcher.prototype.run = function() {
- var cmds = Object.keys(commands);
- var username = this.argv._[0];
- var repository = this.argv._[1];
- var self = this;
- var request = null;
- var command = null;
-
- for (var i = -1, len = cmds.length; ++i < len;) {
- command = cmds[i];
- if (this.argv[command]) {
- return commands[command](this.argv);
- }
- }
-
- if (this.argv._.length === 0) {
- return commands.help();
- }
-
- request = new Request(username, repository);
-
- request.on('end', function(err, results) {
- if (err) throw err;
- self.handle(results);
- });
-};
-
-/**
- * Handles results from GitHub.
- *
- * @param {Object} results
- */
-Dispatcher.prototype.handle = function(results) {
- var Reporter = reporters.get[this.argv.reporter];
- var reporter = null;
-
- if (!Reporter) {
- throw new Error('Invalid reporter.');
- }
-
- reporter = new Reporter(results);
- reporter.print();
-};
-
-/**
- * Exporting the lib.
- */
-module.exports = Dispatcher;
-
-/**
- * Exports the version.
- */
-module.exports.version = package.version;

0 comments on commit 61a1460

Please sign in to comment.
Something went wrong with that request. Please try again.