mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-14 14:41:28 +00:00
Merge branch 'refs/heads/0.9.8'
This commit is contained in:
@@ -26,10 +26,7 @@
|
||||
@import "CPNull.j"
|
||||
@import "CPObject.j"
|
||||
|
||||
//FIXME: After release of 0.9.7 remove below variable
|
||||
var CPDictionaryShowNilDeprecationMessage = YES,
|
||||
|
||||
CPDictionaryMaxDescriptionRecursion = 10;
|
||||
var CPDictionaryMaxDescriptionRecursion = 10;
|
||||
|
||||
/*!
|
||||
@class CPDictionary
|
||||
@@ -238,28 +235,10 @@ var CPDictionaryShowNilDeprecationMessage = YES,
|
||||
key = keyArray[i];
|
||||
|
||||
if (value === nil)
|
||||
{
|
||||
CPDictionaryShowNilDeprecationMessage = NO;
|
||||
CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil object from objects[%d]", [self className], _cmd, i]);
|
||||
|
||||
if (typeof(objj_backtrace_print) === "function")
|
||||
objj_backtrace_print(CPLog.warn);
|
||||
|
||||
// FIXME: After release of 0.9.7 change this block to:
|
||||
// [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + i + @"]"];
|
||||
}
|
||||
[CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + i + @"]"];
|
||||
|
||||
if (key === nil)
|
||||
{
|
||||
CPDictionaryShowNilDeprecationMessage = NO;
|
||||
CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil key from keys[%d]", [self className], _cmd, i]);
|
||||
|
||||
if (typeof(objj_backtrace_print) === "function")
|
||||
objj_backtrace_print(CPLog.warn);
|
||||
|
||||
// FIXME: After release of 0.9.7 change this block to:
|
||||
// [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + i + @"]"];
|
||||
}
|
||||
[CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + i + @"]"];
|
||||
|
||||
[self setObject:value forKey:key];
|
||||
}
|
||||
@@ -302,28 +281,10 @@ var CPDictionaryShowNilDeprecationMessage = YES,
|
||||
key = arguments[index + 1];
|
||||
|
||||
if (value === nil)
|
||||
{
|
||||
CPDictionaryShowNilDeprecationMessage = NO;
|
||||
CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil object from objects[%d]", [self className], _cmd, (index / 2) - 1]);
|
||||
|
||||
if (typeof(objj_backtrace_print) === "function")
|
||||
objj_backtrace_print(CPLog.warn);
|
||||
|
||||
// FIXME: After release of 0.9.7 change 3 lines above to this:
|
||||
// [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + ((index / 2) - 1) + @"]"];
|
||||
}
|
||||
[CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil object from objects[" + ((index / 2) - 1) + @"]"];
|
||||
|
||||
if (key === nil)
|
||||
{
|
||||
CPDictionaryShowNilDeprecationMessage = NO;
|
||||
CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: Attempt to insert nil key from keys[%d]", [self className], _cmd, (index / 2) - 1]);
|
||||
|
||||
if (typeof(objj_backtrace_print) === "function")
|
||||
objj_backtrace_print(CPLog.warn);
|
||||
|
||||
// FIXME: After release of 0.9.7 change 3 lines above to this:
|
||||
// [CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + ((index / 2) - 1) + @"]"];
|
||||
}
|
||||
[CPException raise:CPInvalidArgumentException reason:@"Attempt to insert nil key from keys[" + ((index / 2) - 1) + @"]"];
|
||||
|
||||
[self setObject:value forKey:key];
|
||||
}
|
||||
@@ -634,34 +595,11 @@ var CPDictionaryShowNilDeprecationMessage = YES,
|
||||
*/
|
||||
- (void)setObject:(id)anObject forKey:(id)aKey
|
||||
{
|
||||
// FIXME: After release of 0.9.7, remove this test and leave the contents of its block
|
||||
if (CPDictionaryShowNilDeprecationMessage)
|
||||
{
|
||||
if (aKey === nil)
|
||||
{
|
||||
CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: key cannot be nil", [self className], _cmd]);
|
||||
if (aKey === nil)
|
||||
[CPException raise:CPInvalidArgumentException reason:@"key cannot be nil"];
|
||||
|
||||
if (typeof(objj_backtrace_print) === "function")
|
||||
objj_backtrace_print(CPLog.warn);
|
||||
|
||||
// FIXME: After release of 0.9.7 change this block to:
|
||||
// [CPException raise:CPInvalidArgumentException reason:@"key cannot be nil"];
|
||||
}
|
||||
|
||||
if (anObject === nil)
|
||||
{
|
||||
CPLog.warn([CPString stringWithFormat:@"[%s %s] DEPRECATED: object cannot be nil (key: %s)", [self className], _cmd, aKey]);
|
||||
|
||||
if (typeof(objj_backtrace_print) === "function")
|
||||
objj_backtrace_print(CPLog.warn);
|
||||
|
||||
// FIXME: After release of 0.9.7 change this block to:
|
||||
// [CPException raise:CPInvalidArgumentException reason:@"object cannot be nil (key: " + aKey + @")"];
|
||||
}
|
||||
}
|
||||
// FIXME: After release of 0.9.7 remove 2 lines below.
|
||||
else
|
||||
CPDictionaryShowNilDeprecationMessage = YES;
|
||||
if (anObject === nil)
|
||||
[CPException raise:CPInvalidArgumentException reason:@"object cannot be nil (key: " + aKey + @")"];
|
||||
|
||||
self.setValueForKey(aKey, anObject);
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ Getting Started
|
||||
---------------
|
||||
To get started, download and install the current release version of Cappuccino:
|
||||
|
||||
$ curl https://raw.githubusercontent.com/cappuccino/cappuccino/v0.9.7-1/bootstrap.sh >/tmp/cappuccino_bootstrap.sh && bash /tmp/cappuccino_bootstrap.sh
|
||||
$ curl https://raw.githubusercontent.com/cappuccino/cappuccino/v0.9.8/bootstrap.sh >/tmp/cappuccino_bootstrap.sh && bash /tmp/cappuccino_bootstrap.sh
|
||||
|
||||
If you'd just like to get started using Cappuccino for your web apps, you are done.
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
|
||||
- (void)testInitWithObjectsAndKeys
|
||||
{
|
||||
var dict = [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", nil, @"Key2", @"Value3", @"Key3"];
|
||||
var dict = [[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", @"Value3", @"Key3"];
|
||||
|
||||
[self assert:2 equals:[dict count]];
|
||||
[self assert:@"Value1" equals:[dict objectForKey:@"Key1"]];
|
||||
@@ -427,6 +427,13 @@
|
||||
[self assert:@"Value3" equals:[dict objectForKey:@"Key3"]];
|
||||
}
|
||||
|
||||
- (void)testInitWithObjectsAndKeysAndNilValueShouldThrowException
|
||||
{
|
||||
[self assertThrows:function () {
|
||||
[[CPDictionary alloc] initWithObjectsAndKeys:@"Value1", @"Key1", nil, @"Key2", @"Value3", @"Key3"]
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testDictionaryLiteral
|
||||
{
|
||||
var dict = @{
|
||||
|
||||
@@ -38,7 +38,7 @@ PROJECT_NAME = " API"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.9.7-1
|
||||
PROJECT_NUMBER = 0.9.8
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>XCCLastCappuccinoReleaseURL</key>
|
||||
<string>https://github.com/cappuccino/cappuccino/archive/0.9.7.zip</string>
|
||||
<string>https://github.com/cappuccino/cappuccino/archive/0.9.8.zip</string>
|
||||
<key>XCCLastCappuccinoMasterBranchURL</key>
|
||||
<string>https://github.com/cappuccino/cappuccino/archive/master.zip</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ tmp_zip="/tmp/cappuccino.zip"
|
||||
local_distrib=""
|
||||
|
||||
github_user="cappuccino"
|
||||
github_ref="v0.9.7-1"
|
||||
github_ref="v0.9.8"
|
||||
|
||||
noprompt=""
|
||||
install_capp=""
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "0.9.7-1"
|
||||
"version": "0.9.8"
|
||||
}
|
||||
Reference in New Issue
Block a user