{"size": 1651, "ext": "js", "max_stars_repo_path": "lib/transferer/transferer.js", "max_stars_repo_name": "kristianmandrup/libraries", "max_stars_repo_stars_event_min_datetime": "2015-04-15T20:28:20.000Z", "max_stars_repo_stars_event_max_datetime": "2015-04-22T22:39:57.000Z", "max_issues_repo_path": "lib/transferer/transferer.js", "max_issues_repo_name": "kristianmandrup/libraries", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/transferer/transferer.js", "max_forks_repo_name": "kristianmandrup/libraries", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.6290322581, "max_line_length": 80, "alphanum_fraction": 0.5639006663}
// Generated by LiveScript 1.2.0
(function(){
  var FileIO, GlobalConfig, gconf, Transferer;
  FileIO = require('../util/file-io');
  GlobalConfig = require('../global-config');
  gconf = new GlobalConfig;
  module.exports = Transferer = (function(){
    Transferer.displayName = 'Transferer';
    var prototype = Transferer.prototype, constructor = Transferer;
    importAll$(prototype, arguments[0]);
    function Transferer(env){
      this.env = env;
      this.path = gconf.dir();
    }
    prototype.transfer = function(){
      this.copySelect();
      return this.copyConfig();
    };
    prototype.copySelect = function(env){
      var err;
      env || (env = this.env);
      try {
        return fs.copySync(this.selected(env), this.selected(this.target(env)));
      } catch (e$) {
        err = e$;
        this.error(err);
      }
    };
    prototype.copyConfig = function(env){
      var err;
      env || (env = this.env);
      try {
        return fs.copySync(this.config(env), this.config(this.target(env)));
      } catch (e$) {
        err = e$;
        this.error(err);
      }
    };
    prototype.target = function(env){
      switch (env) {
      case 'dev':
        return 'test';
      case 'test':
        return 'prod';
      default:
        return 'prod';
      }
    };
    prototype.selected = function(env){
      return [this.path, env, 'selected'].join('/');
    };
    prototype.config = function(env){
      return [this.path, env, 'config'].join('/');
    };
    return Transferer;
  }(FileIO));
  function importAll$(obj, src){
    for (var key in src) obj[key] = src[key];
    return obj;
  }
}).call(this);
