From 651f4ff13a48e2ed2e1fe84d8378204ff6b47f7c Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Wed, 16 Oct 2013 21:07:08 -0700 Subject: [PATCH] move instruments-client into bin/ and rename helpfully --- instruments/client.js => bin/instruments-client.js | 1 + instruments/client_bin.js | 7 ------- lib/uiauto/bootstrap.js | 2 +- ...nstruments_client.js => instruments_client_launcher.js} | 4 ++-- package.json | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) rename instruments/client.js => bin/instruments-client.js (97%) mode change 100644 => 100755 delete mode 100755 instruments/client_bin.js rename lib/uiauto/lib/{instruments_client.js => instruments_client_launcher.js} (98%) diff --git a/instruments/client.js b/bin/instruments-client.js old mode 100644 new mode 100755 similarity index 97% rename from instruments/client.js rename to bin/instruments-client.js index 148916ced..cf50900ba --- a/instruments/client.js +++ b/bin/instruments-client.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node "use strict"; var net = require('net') diff --git a/instruments/client_bin.js b/instruments/client_bin.js deleted file mode 100755 index 780515d76..000000000 --- a/instruments/client_bin.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -"use strict"; - -var client = require('./client.js'); - -var args = client.parser.parseArgs(); -client.connect(args.result, args.socket); diff --git a/lib/uiauto/bootstrap.js b/lib/uiauto/bootstrap.js index 24f835e69..46d892440 100644 --- a/lib/uiauto/bootstrap.js +++ b/lib/uiauto/bootstrap.js @@ -1,5 +1,5 @@ #import "lib/console.js" -#import "lib/instruments_client.js" +#import "lib/instruments_client_launcher.js" #import "appium/base.js" // automation globals diff --git a/lib/uiauto/lib/instruments_client.js b/lib/uiauto/lib/instruments_client_launcher.js similarity index 98% rename from lib/uiauto/lib/instruments_client.js rename to lib/uiauto/lib/instruments_client_launcher.js index 905973455..df710b452 100644 --- a/lib/uiauto/lib/instruments_client.js +++ b/lib/uiauto/lib/instruments_client_launcher.js @@ -100,7 +100,7 @@ var globalPath = (function() { // figure out where instruments client is (relative to where appium is run) var clientPath = (function() { - var client = 'instruments/client.js'; + var client = 'bin/instruments-client.js'; var module = 'node_modules/appium/'; try { @@ -112,7 +112,7 @@ var clientPath = (function() { return module + client; } catch(e) { if (globalPath === null) { - console.log("WARNING: could not find instruments/client.js in its " + + console.log("WARNING: could not find bin/instruments-client.js in its " + "usual place, and global instruments_client not around " + "either. This could cause problems"); } diff --git a/package.json b/package.json index b85fc4a05..a85a717eb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "main": "./lib/server/main.js", "bin": { "appium": "./bin/appium.js", - "instruments_client": "./instruments/client_bin.js", + "instruments_client": "./bin/instruments-client.js", "authorize_ios": "./bin/authorize-ios.js" }, "directories": {