cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [07/12] ios commit: Merge branch 'master' into 4.0.x (node-based scripts)
Date Tue, 27 Jan 2015 17:00:49 GMT
Merge branch 'master' into 4.0.x (node-based scripts)

Conflicts:
	CordovaLib/Classes/CDVJSON.h
	CordovaLib/Classes/CDVJSON.m


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/e2c2bbba
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/e2c2bbba
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/e2c2bbba

Branch: refs/heads/4.0.x
Commit: e2c2bbba064e3d29a7d0156e07c249b337931413
Parents: 0aade95 3815e83
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Jan 27 11:44:44 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Jan 27 11:44:44 2015 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVCommandQueue.m            |   1 +
 CordovaLib/Classes/CDVInvokedUrlCommand.m       |   2 +-
 CordovaLib/Classes/CDVJSON.h                    |  14 +-
 CordovaLib/Classes/CDVJSON.m                    |  49 +-
 CordovaLib/Classes/CDVJSON_private.h            |  31 +
 CordovaLib/Classes/CDVJSON_private.m            |  91 ++
 CordovaLib/Classes/CDVPluginResult.m            |   4 +-
 CordovaLib/Classes/NSArray+Comparisons.h        |   3 +-
 CordovaLib/Classes/NSData+Base64.h              |   9 +-
 CordovaLib/Classes/NSData+Base64.m              |  14 +-
 CordovaLib/Classes/NSDictionary+Extensions.h    |  26 +-
 CordovaLib/Classes/UIDevice+Extensions.h        |   3 +-
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |   6 +
 bin/apple_xcode_version                         |   6 +-
 bin/check_reqs                                  |  58 +-
 bin/check_reqs.bat                              |  25 +
 bin/create                                      |  27 +-
 bin/lib/check_reqs.js                           |  94 +++
 bin/lib/create.js                               | 192 +++--
 bin/lib/update.js                               |  72 --
 bin/lib/versions.js                             |  95 ++-
 bin/node_modules/.bin/shjs                      |  51 --
 bin/node_modules/nopt/LICENSE                   |  23 +
 bin/node_modules/nopt/lib/nopt.js               | 414 ++++++++++
 .../nopt/node_modules/abbrev/LICENSE            |  23 +
 .../nopt/node_modules/abbrev/abbrev.js          |  62 ++
 .../nopt/node_modules/abbrev/package.json       |  31 +
 bin/node_modules/nopt/package.json              |  41 +
 bin/node_modules/q/CONTRIBUTING.md              |  40 -
 bin/node_modules/q/README.md                    | 820 -------------------
 .../q/benchmark/compare-with-callbacks.js       |  71 --
 bin/node_modules/q/benchmark/scenarios.js       |  36 -
 bin/node_modules/shelljs/.documentup.json       |   6 -
 bin/node_modules/shelljs/.npmignore             |   1 -
 bin/node_modules/shelljs/.travis.yml            |   5 -
 bin/node_modules/shelljs/README.md              | 513 ------------
 bin/node_modules/shelljs/bin/shjs               |  51 --
 bin/node_modules/shelljs/global.js              |   3 -
 bin/node_modules/shelljs/jshint.json            |   4 -
 bin/node_modules/shelljs/make.js                |  48 --
 bin/node_modules/shelljs/scripts/docs.js        |  15 -
 bin/node_modules/shelljs/scripts/run-tests.js   |  50 --
 bin/node_modules/which/LICENSE                  |  23 -
 bin/node_modules/which/README.md                |   5 -
 bin/node_modules/which/bin/which                |  14 -
 bin/node_modules/which/package.json             |  31 -
 bin/node_modules/which/which.js                 | 104 ---
 bin/templates/scripts/cordova/build             |  92 +--
 bin/templates/scripts/cordova/clean             |  69 +-
 bin/templates/scripts/cordova/clean.bat         |  25 +
 bin/templates/scripts/cordova/emulate           |  59 --
 bin/templates/scripts/cordova/lib/build.js      | 147 ++++
 bin/templates/scripts/cordova/lib/clean.js      |  46 ++
 .../scripts/cordova/lib/install-device          |  52 --
 .../scripts/cordova/lib/install-emulator        |  91 --
 bin/templates/scripts/cordova/lib/list-devices  |  85 +-
 .../scripts/cordova/lib/list-emulator-images    |  92 ++-
 .../scripts/cordova/lib/list-started-emulators  |  81 +-
 bin/templates/scripts/cordova/lib/run.js        | 177 ++++
 bin/templates/scripts/cordova/lib/spawn.js      |  50 ++
 bin/templates/scripts/cordova/run               | 222 +----
 bin/templates/scripts/cordova/run.bat           |  25 +
 bin/update                                      |  22 +-
 tests/spec/create.spec.js                       |   4 +
 64 files changed, 1901 insertions(+), 2745 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/e2c2bbba/CordovaLib/Classes/CDVJSON.m
----------------------------------------------------------------------
diff --cc CordovaLib/Classes/CDVJSON.m
index 68cf3d4,85db545..97dc6e8
--- a/CordovaLib/Classes/CDVJSON.m
+++ b/CordovaLib/Classes/CDVJSON.m
@@@ -22,70 -21,32 +21,32 @@@
  
  @implementation NSArray (CDVJSONSerializing)
  
 -- (NSString*)JSONString
 +- (NSString*)cdv_JSONString
  {
-     NSError* error = nil;
-     NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
-                                                        options:0
-                                                          error:&error];
- 
-     if (error != nil) {
-         NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
-         return nil;
-     } else {
-         return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-     }
+     return [self cdv_JSONString];
  }
  
  @end
  
  @implementation NSDictionary (CDVJSONSerializing)
  
 -- (NSString*)JSONString
 +- (NSString*)cdv_JSONString
  {
-     NSError* error = nil;
-     NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
-                                                        options:NSJSONWritingPrettyPrinted
-                                                          error:&error];
- 
-     if (error != nil) {
-         NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
-         return nil;
-     } else {
-         return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-     }
+     return [self cdv_JSONString];
  }
  
  @end
  
  @implementation NSString (CDVJSONSerializing)
  
 -- (id)JSONObject
 +- (id)cdv_JSONObject
  {
-     NSError* error = nil;
-     id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
-                                                 options:NSJSONReadingMutableContainers
-                                                   error:&error];
- 
-     if (error != nil) {
-         NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
-     }
- 
-     return object;
+     return [self cdv_JSONObject];
  }
  
 -- (id)JSONFragment
 +- (id)cdv_JSONFragment
  {
-     NSError* error = nil;
-     id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
-                                                 options:NSJSONReadingAllowFragments
-                                                   error:&error];
- 
-     if (error != nil) {
-         NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
-     }
- 
-     return object;
+     return [self cdv_JSONFragment];
  }
  
  @end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message