From 1b600d53c9ae6bc26604337fdb9380bed5261cc1 Mon Sep 17 00:00:00 2001 From: Sergey Kuryanov Date: Thu, 20 Oct 2016 20:38:37 +0300 Subject: [PATCH 1/6] Use character set instead of regex --- librato-iOS/Categories/NSString+SanitizedForMetric.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librato-iOS/Categories/NSString+SanitizedForMetric.m b/librato-iOS/Categories/NSString+SanitizedForMetric.m index 71a215a..838b31a 100644 --- a/librato-iOS/Categories/NSString+SanitizedForMetric.m +++ b/librato-iOS/Categories/NSString+SanitizedForMetric.m @@ -12,8 +12,8 @@ @implementation NSString (SanitizedForMetric) - (NSString *)sanitizedForMetric { - NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9.:-_]" options:0 error:NULL]; - NSString *cleaned = [regex stringByReplacingMatchesInString:self options:0 range:NSMakeRange(0, self.length) withTemplate:@"-"]; + NSCharacterSet *allowedSet = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:-_"]; + NSString *cleaned = [[self componentsSeparatedByCharactersInSet:allowedSet.invertedSet] componentsJoinedByString:@"-"]; return [cleaned substringToIndex:(self.length < 255 ? self.length : 255)]; } From 3724624cb13860635c0818f85b85ca288db9fa94 Mon Sep 17 00:00:00 2001 From: Sergey Kuryanov Date: Thu, 20 Oct 2016 21:46:31 +0300 Subject: [PATCH 2/6] Tests added --- .../project.pbxproj | 5 ++- .../NSString+SanitizedForMetricTests.m | 36 +++++++++++++++++++ .../librato_iOS_DemoTests.m | 4 --- 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m diff --git a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj index 47a8310..5e85e56 100644 --- a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj +++ b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj @@ -57,6 +57,7 @@ 71FE433FB985CA1AB0DF6BDA /* Pods-librato-iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.debug.xcconfig"; sourceTree = ""; }; B3CFB32942D9D0C3245EEB4E /* Pods-librato-iOS Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.release.xcconfig"; sourceTree = ""; }; C5A2D3C7197B48C6A9ACC07D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + D9263DD61DB946660035CC6E /* NSString+SanitizedForMetricTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SanitizedForMetricTests.m"; sourceTree = ""; }; F8E7DC6EE1A84E81B6B7B7A2 /* libPods-librato-iOS Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-librato-iOS Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -147,6 +148,7 @@ isa = PBXGroup; children = ( 66922642180358B000237E77 /* librato_iOS_DemoTests.m */, + D9263DD61DB946660035CC6E /* NSString+SanitizedForMetricTests.m */, 6692263D180358B000237E77 /* Supporting Files */, ); path = "librato-iOS DemoTests"; @@ -293,7 +295,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; CF311E2286F14B79A814F7BE /* [CP] Copy Pods Resources */ = { @@ -329,6 +331,7 @@ buildActionMask = 2147483647; files = ( 66922643180358B000237E77 /* librato_iOS_DemoTests.m in Sources */, + D9263DD71DB946660035CC6E /* NSString+SanitizedForMetricTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m b/Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m new file mode 100644 index 0000000..f7323cd --- /dev/null +++ b/Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m @@ -0,0 +1,36 @@ +// +// NSString+SanitizedForMetricTests.m +// librato-iOS +// +// Created by Sergey Kuryanov on 20.10.16. +// Copyright © 2016 Amco International Education Services, LLC. All rights reserved. +// + +#import +#import "NSString+SanitizedForMetric.h" + +@interface NSString_SanitizedForMetricTests : XCTestCase +@property (nonatomic, strong) NSString *testString; +@end + +@implementation NSString_SanitizedForMetricTests + +- (void)setUp { + [super setUp]; + + self.testString = @"A-Za-z0-9.:-_<>{}[];\'\"!@#$%^&*()_+=œ∑´®†¥¨ˆøπ“‘«åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷"; +} + +- (void)tearDown { + self.testString = nil; + + [super tearDown]; +} + +- (void)testThatOnlyAllowedCharactersPresent { + NSString *expectedString = @"A-Za-z0-9.:-_-------------------_------------------------------------"; + + XCTAssertEqualObjects(self.testString.sanitizedForMetric, expectedString); +} + +@end diff --git a/Demo/librato-iOS DemoTests/librato_iOS_DemoTests.m b/Demo/librato-iOS DemoTests/librato_iOS_DemoTests.m index 780d094..7821fcc 100644 --- a/Demo/librato-iOS DemoTests/librato_iOS_DemoTests.m +++ b/Demo/librato-iOS DemoTests/librato_iOS_DemoTests.m @@ -26,9 +26,5 @@ - (void)tearDown [super tearDown]; } -- (void)testExample -{ - XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); -} @end From 06301d1d85fdc137a69c9ea00163ee2182b5fd78 Mon Sep 17 00:00:00 2001 From: Sergey Kuryanov Date: Thu, 20 Oct 2016 21:53:46 +0300 Subject: [PATCH 3/6] Prefix category name and methods --- Demo/librato-iOS Demo.xcodeproj/project.pbxproj | 5 ++--- ...Tests.m => NSString+AULSanitizedForMetricTests.m} | 2 +- librato-iOS.xcodeproj/project.pbxproj | 12 ++++++------ ...dForMetric.h => NSString+AYLSanitizedForMetric.h} | 6 +++--- ...dForMetric.m => NSString+AYLSanitizedForMetric.m} | 8 ++++---- librato-iOS/Metrics/LibratoMetric.m | 10 +++++----- 6 files changed, 21 insertions(+), 22 deletions(-) rename Demo/librato-iOS DemoTests/{NSString+SanitizedForMetricTests.m => NSString+AULSanitizedForMetricTests.m} (95%) rename librato-iOS/Categories/{NSString+SanitizedForMetric.h => NSString+AYLSanitizedForMetric.h} (62%) rename librato-iOS/Categories/{NSString+SanitizedForMetric.m => NSString+AYLSanitizedForMetric.m} (76%) diff --git a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj index 5e85e56..f1b30cc 100644 --- a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj +++ b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj @@ -57,7 +57,7 @@ 71FE433FB985CA1AB0DF6BDA /* Pods-librato-iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.debug.xcconfig"; sourceTree = ""; }; B3CFB32942D9D0C3245EEB4E /* Pods-librato-iOS Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.release.xcconfig"; sourceTree = ""; }; C5A2D3C7197B48C6A9ACC07D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - D9263DD61DB946660035CC6E /* NSString+SanitizedForMetricTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SanitizedForMetricTests.m"; sourceTree = ""; }; + D9263DD61DB946660035CC6E /* NSString+AULSanitizedForMetricTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AULSanitizedForMetricTests.m"; sourceTree = ""; }; F8E7DC6EE1A84E81B6B7B7A2 /* libPods-librato-iOS Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-librato-iOS Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -148,7 +148,7 @@ isa = PBXGroup; children = ( 66922642180358B000237E77 /* librato_iOS_DemoTests.m */, - D9263DD61DB946660035CC6E /* NSString+SanitizedForMetricTests.m */, + D9263DD61DB946660035CC6E /* NSString+AULSanitizedForMetricTests.m */, 6692263D180358B000237E77 /* Supporting Files */, ); path = "librato-iOS DemoTests"; @@ -331,7 +331,6 @@ buildActionMask = 2147483647; files = ( 66922643180358B000237E77 /* librato_iOS_DemoTests.m in Sources */, - D9263DD71DB946660035CC6E /* NSString+SanitizedForMetricTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m b/Demo/librato-iOS DemoTests/NSString+AULSanitizedForMetricTests.m similarity index 95% rename from Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m rename to Demo/librato-iOS DemoTests/NSString+AULSanitizedForMetricTests.m index f7323cd..e60daf0 100644 --- a/Demo/librato-iOS DemoTests/NSString+SanitizedForMetricTests.m +++ b/Demo/librato-iOS DemoTests/NSString+AULSanitizedForMetricTests.m @@ -7,7 +7,7 @@ // #import -#import "NSString+SanitizedForMetric.h" +#import "NSString+AULSanitizedForMetric.h" @interface NSString_SanitizedForMetricTests : XCTestCase @property (nonatomic, strong) NSString *testString; diff --git a/librato-iOS.xcodeproj/project.pbxproj b/librato-iOS.xcodeproj/project.pbxproj index 7396bdc..3f5ca57 100644 --- a/librato-iOS.xcodeproj/project.pbxproj +++ b/librato-iOS.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ 6692259917FE44B800237E77 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6692258117FE44B800237E77 /* UIKit.framework */; }; 669225A117FE44B800237E77 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6692259F17FE44B800237E77 /* InfoPlist.strings */; }; 669225A317FE44B800237E77 /* librato_iOSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225A217FE44B800237E77 /* librato_iOSTests.m */; }; - 669225B117FE457800237E77 /* NSString+SanitizedForMetric.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B017FE457800237E77 /* NSString+SanitizedForMetric.m */; }; + 669225B117FE457800237E77 /* NSString+AYLSanitizedForMetric.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B017FE457800237E77 /* NSString+AYLSanitizedForMetric.m */; }; 669225C017FE458100237E77 /* LibratoClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B317FE458100237E77 /* LibratoClient.m */; }; 669225C117FE458100237E77 /* LibratoConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B517FE458100237E77 /* LibratoConnection.m */; }; 669225C217FE458100237E77 /* LibratoDirectPersister.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B717FE458100237E77 /* LibratoDirectPersister.m */; }; @@ -57,8 +57,8 @@ 6692259E17FE44B800237E77 /* librato-iOSTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "librato-iOSTests-Info.plist"; sourceTree = ""; }; 669225A017FE44B800237E77 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 669225A217FE44B800237E77 /* librato_iOSTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = librato_iOSTests.m; sourceTree = ""; }; - 669225AF17FE457800237E77 /* NSString+SanitizedForMetric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SanitizedForMetric.h"; sourceTree = ""; }; - 669225B017FE457800237E77 /* NSString+SanitizedForMetric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SanitizedForMetric.m"; sourceTree = ""; }; + 669225AF17FE457800237E77 /* NSString+AYLSanitizedForMetric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+AYLSanitizedForMetric.h"; sourceTree = ""; }; + 669225B017FE457800237E77 /* NSString+AYLSanitizedForMetric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AYLSanitizedForMetric.m"; sourceTree = ""; }; 669225B217FE458100237E77 /* LibratoClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibratoClient.h; sourceTree = ""; }; 669225B317FE458100237E77 /* LibratoClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LibratoClient.m; sourceTree = ""; }; 669225B417FE458100237E77 /* LibratoConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibratoConnection.h; sourceTree = ""; }; @@ -184,8 +184,8 @@ 669225AC17FE454800237E77 /* Categories */ = { isa = PBXGroup; children = ( - 669225AF17FE457800237E77 /* NSString+SanitizedForMetric.h */, - 669225B017FE457800237E77 /* NSString+SanitizedForMetric.m */, + 669225AF17FE457800237E77 /* NSString+AYLSanitizedForMetric.h */, + 669225B017FE457800237E77 /* NSString+AYLSanitizedForMetric.m */, ); path = Categories; sourceTree = ""; @@ -335,7 +335,7 @@ 669225C417FE458100237E77 /* LibratoProcessor.m in Sources */, 669225C517FE458100237E77 /* LibratoQueue.m in Sources */, 6692260A17FF3C2A00237E77 /* Librato.m in Sources */, - 669225B117FE457800237E77 /* NSString+SanitizedForMetric.m in Sources */, + 669225B117FE457800237E77 /* NSString+AYLSanitizedForMetric.m in Sources */, 669225C617FE458100237E77 /* LibratoVersion.m in Sources */, 669225CC17FE458800237E77 /* LibratoMetric.m in Sources */, 669225C017FE458100237E77 /* LibratoClient.m in Sources */, diff --git a/librato-iOS/Categories/NSString+SanitizedForMetric.h b/librato-iOS/Categories/NSString+AYLSanitizedForMetric.h similarity index 62% rename from librato-iOS/Categories/NSString+SanitizedForMetric.h rename to librato-iOS/Categories/NSString+AYLSanitizedForMetric.h index 56d0fc7..71c2023 100644 --- a/librato-iOS/Categories/NSString+SanitizedForMetric.h +++ b/librato-iOS/Categories/NSString+AYLSanitizedForMetric.h @@ -1,5 +1,5 @@ // -// NSString+SanitizedForMetric.h +// NSString+AYLSanitizedForMetric.h // Librato-iOS // // Created by Adam Yanalunas on 10/3/13. @@ -8,8 +8,8 @@ #import -@interface NSString (SanitizedForMetric) +@interface NSString (AYLSanitizedForMetric) -- (NSString *)sanitizedForMetric; +- (NSString *)ayl_sanitizedForMetric; @end diff --git a/librato-iOS/Categories/NSString+SanitizedForMetric.m b/librato-iOS/Categories/NSString+AYLSanitizedForMetric.m similarity index 76% rename from librato-iOS/Categories/NSString+SanitizedForMetric.m rename to librato-iOS/Categories/NSString+AYLSanitizedForMetric.m index 838b31a..3c77958 100644 --- a/librato-iOS/Categories/NSString+SanitizedForMetric.m +++ b/librato-iOS/Categories/NSString+AYLSanitizedForMetric.m @@ -1,16 +1,16 @@ // -// NSString+SanitizedForMetric.m +// NSString+AYLSanitizedForMetric.m // Librato-iOS // // Created by Adam Yanalunas on 10/3/13. // Copyright (c) 2013 Amco International Education Services, LLC. All rights reserved. // -#import "NSString+SanitizedForMetric.h" +#import "NSString+AYLSanitizedForMetric.h" -@implementation NSString (SanitizedForMetric) +@implementation NSString (AYLSanitizedForMetric) -- (NSString *)sanitizedForMetric +- (NSString *)ayl_sanitizedForMetric { NSCharacterSet *allowedSet = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:-_"]; NSString *cleaned = [[self componentsSeparatedByCharactersInSet:allowedSet.invertedSet] componentsJoinedByString:@"-"]; diff --git a/librato-iOS/Metrics/LibratoMetric.m b/librato-iOS/Metrics/LibratoMetric.m index 50f4697..1fac810 100644 --- a/librato-iOS/Metrics/LibratoMetric.m +++ b/librato-iOS/Metrics/LibratoMetric.m @@ -7,7 +7,7 @@ // #import "LibratoMetric.h" -#import "NSString+SanitizedForMetric.h" +#import "NSString+AYLSanitizedForMetric.h" #import "MTLValueTransformer.h" NSString *const LibratoMetricMeasureTimeKey = @"measure_time"; @@ -81,9 +81,9 @@ + (NSValueTransformer *)nameJSONTransformer { return [MTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSString *name) { NSAssert(name.length > 0, @"Measurements must be named"); - return name.sanitizedForMetric; + return name.ayl_sanitizedForMetric; } reverseBlock:^id(NSString *name) { - return name.sanitizedForMetric; + return name.ayl_sanitizedForMetric; }]; } @@ -91,9 +91,9 @@ + (NSValueTransformer *)nameJSONTransformer + (NSValueTransformer *)sourceJSONTransformer { return [MTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSString *source) { - return source.sanitizedForMetric; + return source.ayl_sanitizedForMetric; } reverseBlock:^id(NSString *source) { - return (source.length ? source.sanitizedForMetric : nil); + return (source.length ? source.ayl_sanitizedForMetric : nil); }]; } From c4c63cfaf6d6feea7b6b74b889789236702eaca3 Mon Sep 17 00:00:00 2001 From: Sergey Kuryanov Date: Fri, 21 Oct 2016 18:10:08 +0300 Subject: [PATCH 4/6] Rename category prefix --- Demo/librato-iOS Demo.xcodeproj/project.pbxproj | 4 ++-- ...icTests.m => NSString+ALMSanitizedForMetricTests.m} | 8 ++++---- ...zedForMetric.h => NSString+ALMSanitizedForMetric.h} | 6 +++--- ...zedForMetric.m => NSString+ALMSanitizedForMetric.m} | 8 ++++---- librato-iOS/Metrics/LibratoMetric.m | 10 +++++----- 5 files changed, 18 insertions(+), 18 deletions(-) rename Demo/librato-iOS DemoTests/{NSString+AULSanitizedForMetricTests.m => NSString+ALMSanitizedForMetricTests.m} (74%) rename librato-iOS/Categories/{NSString+AYLSanitizedForMetric.h => NSString+ALMSanitizedForMetric.h} (62%) rename librato-iOS/Categories/{NSString+AYLSanitizedForMetric.m => NSString+ALMSanitizedForMetric.m} (76%) diff --git a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj index f1b30cc..791a551 100644 --- a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj +++ b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj @@ -57,7 +57,7 @@ 71FE433FB985CA1AB0DF6BDA /* Pods-librato-iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.debug.xcconfig"; sourceTree = ""; }; B3CFB32942D9D0C3245EEB4E /* Pods-librato-iOS Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.release.xcconfig"; sourceTree = ""; }; C5A2D3C7197B48C6A9ACC07D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - D9263DD61DB946660035CC6E /* NSString+AULSanitizedForMetricTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AULSanitizedForMetricTests.m"; sourceTree = ""; }; + D9263DD61DB946660035CC6E /* NSString+ALMSanitizedForMetricTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+ALMSanitizedForMetricTests.m"; sourceTree = ""; }; F8E7DC6EE1A84E81B6B7B7A2 /* libPods-librato-iOS Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-librato-iOS Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -148,7 +148,7 @@ isa = PBXGroup; children = ( 66922642180358B000237E77 /* librato_iOS_DemoTests.m */, - D9263DD61DB946660035CC6E /* NSString+AULSanitizedForMetricTests.m */, + D9263DD61DB946660035CC6E /* NSString+ALMSanitizedForMetricTests.m */, 6692263D180358B000237E77 /* Supporting Files */, ); path = "librato-iOS DemoTests"; diff --git a/Demo/librato-iOS DemoTests/NSString+AULSanitizedForMetricTests.m b/Demo/librato-iOS DemoTests/NSString+ALMSanitizedForMetricTests.m similarity index 74% rename from Demo/librato-iOS DemoTests/NSString+AULSanitizedForMetricTests.m rename to Demo/librato-iOS DemoTests/NSString+ALMSanitizedForMetricTests.m index e60daf0..4a71f26 100644 --- a/Demo/librato-iOS DemoTests/NSString+AULSanitizedForMetricTests.m +++ b/Demo/librato-iOS DemoTests/NSString+ALMSanitizedForMetricTests.m @@ -7,13 +7,13 @@ // #import -#import "NSString+AULSanitizedForMetric.h" +#import "NSString+ALMSanitizedForMetric.h" -@interface NSString_SanitizedForMetricTests : XCTestCase +@interface NSString_ALMSanitizedForMetricTests : XCTestCase @property (nonatomic, strong) NSString *testString; @end -@implementation NSString_SanitizedForMetricTests +@implementation NSString_ALMSanitizedForMetricTests - (void)setUp { [super setUp]; @@ -30,7 +30,7 @@ - (void)tearDown { - (void)testThatOnlyAllowedCharactersPresent { NSString *expectedString = @"A-Za-z0-9.:-_-------------------_------------------------------------"; - XCTAssertEqualObjects(self.testString.sanitizedForMetric, expectedString); + XCTAssertEqualObjects(self.testString.alm_sanitizedForMetric, expectedString); } @end diff --git a/librato-iOS/Categories/NSString+AYLSanitizedForMetric.h b/librato-iOS/Categories/NSString+ALMSanitizedForMetric.h similarity index 62% rename from librato-iOS/Categories/NSString+AYLSanitizedForMetric.h rename to librato-iOS/Categories/NSString+ALMSanitizedForMetric.h index 71c2023..d4254b3 100644 --- a/librato-iOS/Categories/NSString+AYLSanitizedForMetric.h +++ b/librato-iOS/Categories/NSString+ALMSanitizedForMetric.h @@ -1,5 +1,5 @@ // -// NSString+AYLSanitizedForMetric.h +// NSString+ALMSanitizedForMetric.h // Librato-iOS // // Created by Adam Yanalunas on 10/3/13. @@ -8,8 +8,8 @@ #import -@interface NSString (AYLSanitizedForMetric) +@interface NSString (ALMSanitizedForMetric) -- (NSString *)ayl_sanitizedForMetric; +- (NSString *)alm_sanitizedForMetric; @end diff --git a/librato-iOS/Categories/NSString+AYLSanitizedForMetric.m b/librato-iOS/Categories/NSString+ALMSanitizedForMetric.m similarity index 76% rename from librato-iOS/Categories/NSString+AYLSanitizedForMetric.m rename to librato-iOS/Categories/NSString+ALMSanitizedForMetric.m index 3c77958..b82241f 100644 --- a/librato-iOS/Categories/NSString+AYLSanitizedForMetric.m +++ b/librato-iOS/Categories/NSString+ALMSanitizedForMetric.m @@ -1,16 +1,16 @@ // -// NSString+AYLSanitizedForMetric.m +// NSString+ALMSanitizedForMetric.m // Librato-iOS // // Created by Adam Yanalunas on 10/3/13. // Copyright (c) 2013 Amco International Education Services, LLC. All rights reserved. // -#import "NSString+AYLSanitizedForMetric.h" +#import "NSString+ALMSanitizedForMetric.h" -@implementation NSString (AYLSanitizedForMetric) +@implementation NSString (ALMSanitizedForMetric) -- (NSString *)ayl_sanitizedForMetric +- (NSString *)alm_sanitizedForMetric { NSCharacterSet *allowedSet = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.:-_"]; NSString *cleaned = [[self componentsSeparatedByCharactersInSet:allowedSet.invertedSet] componentsJoinedByString:@"-"]; diff --git a/librato-iOS/Metrics/LibratoMetric.m b/librato-iOS/Metrics/LibratoMetric.m index 1fac810..667c5cb 100644 --- a/librato-iOS/Metrics/LibratoMetric.m +++ b/librato-iOS/Metrics/LibratoMetric.m @@ -7,7 +7,7 @@ // #import "LibratoMetric.h" -#import "NSString+AYLSanitizedForMetric.h" +#import "NSString+ALMSanitizedForMetric.h" #import "MTLValueTransformer.h" NSString *const LibratoMetricMeasureTimeKey = @"measure_time"; @@ -81,9 +81,9 @@ + (NSValueTransformer *)nameJSONTransformer { return [MTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSString *name) { NSAssert(name.length > 0, @"Measurements must be named"); - return name.ayl_sanitizedForMetric; + return name.alm_sanitizedForMetric; } reverseBlock:^id(NSString *name) { - return name.ayl_sanitizedForMetric; + return name.alm_sanitizedForMetric; }]; } @@ -91,9 +91,9 @@ + (NSValueTransformer *)nameJSONTransformer + (NSValueTransformer *)sourceJSONTransformer { return [MTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSString *source) { - return source.ayl_sanitizedForMetric; + return source.alm_sanitizedForMetric; } reverseBlock:^id(NSString *source) { - return (source.length ? source.ayl_sanitizedForMetric : nil); + return (source.length ? source.alm_sanitizedForMetric : nil); }]; } From 4438c2650bf8b5248a075557ba94c04be8f3c2ba Mon Sep 17 00:00:00 2001 From: Sergey Kuryanov Date: Fri, 21 Oct 2016 18:12:06 +0300 Subject: [PATCH 5/6] Rename category prefix --- librato-iOS.xcodeproj/project.pbxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/librato-iOS.xcodeproj/project.pbxproj b/librato-iOS.xcodeproj/project.pbxproj index 3f5ca57..466aebb 100644 --- a/librato-iOS.xcodeproj/project.pbxproj +++ b/librato-iOS.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ 6692259917FE44B800237E77 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6692258117FE44B800237E77 /* UIKit.framework */; }; 669225A117FE44B800237E77 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6692259F17FE44B800237E77 /* InfoPlist.strings */; }; 669225A317FE44B800237E77 /* librato_iOSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225A217FE44B800237E77 /* librato_iOSTests.m */; }; - 669225B117FE457800237E77 /* NSString+AYLSanitizedForMetric.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B017FE457800237E77 /* NSString+AYLSanitizedForMetric.m */; }; + 669225B117FE457800237E77 /* NSString+ALMSanitizedForMetric.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B017FE457800237E77 /* NSString+ALMSanitizedForMetric.m */; }; 669225C017FE458100237E77 /* LibratoClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B317FE458100237E77 /* LibratoClient.m */; }; 669225C117FE458100237E77 /* LibratoConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B517FE458100237E77 /* LibratoConnection.m */; }; 669225C217FE458100237E77 /* LibratoDirectPersister.m in Sources */ = {isa = PBXBuildFile; fileRef = 669225B717FE458100237E77 /* LibratoDirectPersister.m */; }; @@ -57,8 +57,8 @@ 6692259E17FE44B800237E77 /* librato-iOSTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "librato-iOSTests-Info.plist"; sourceTree = ""; }; 669225A017FE44B800237E77 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 669225A217FE44B800237E77 /* librato_iOSTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = librato_iOSTests.m; sourceTree = ""; }; - 669225AF17FE457800237E77 /* NSString+AYLSanitizedForMetric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+AYLSanitizedForMetric.h"; sourceTree = ""; }; - 669225B017FE457800237E77 /* NSString+AYLSanitizedForMetric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AYLSanitizedForMetric.m"; sourceTree = ""; }; + 669225AF17FE457800237E77 /* NSString+ALMSanitizedForMetric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+ALMSanitizedForMetric.h"; sourceTree = ""; }; + 669225B017FE457800237E77 /* NSString+ALMSanitizedForMetric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+ALMSanitizedForMetric.m"; sourceTree = ""; }; 669225B217FE458100237E77 /* LibratoClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibratoClient.h; sourceTree = ""; }; 669225B317FE458100237E77 /* LibratoClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LibratoClient.m; sourceTree = ""; }; 669225B417FE458100237E77 /* LibratoConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibratoConnection.h; sourceTree = ""; }; @@ -184,8 +184,8 @@ 669225AC17FE454800237E77 /* Categories */ = { isa = PBXGroup; children = ( - 669225AF17FE457800237E77 /* NSString+AYLSanitizedForMetric.h */, - 669225B017FE457800237E77 /* NSString+AYLSanitizedForMetric.m */, + 669225AF17FE457800237E77 /* NSString+ALMSanitizedForMetric.h */, + 669225B017FE457800237E77 /* NSString+ALMSanitizedForMetric.m */, ); path = Categories; sourceTree = ""; @@ -335,7 +335,7 @@ 669225C417FE458100237E77 /* LibratoProcessor.m in Sources */, 669225C517FE458100237E77 /* LibratoQueue.m in Sources */, 6692260A17FF3C2A00237E77 /* Librato.m in Sources */, - 669225B117FE457800237E77 /* NSString+AYLSanitizedForMetric.m in Sources */, + 669225B117FE457800237E77 /* NSString+ALMSanitizedForMetric.m in Sources */, 669225C617FE458100237E77 /* LibratoVersion.m in Sources */, 669225CC17FE458800237E77 /* LibratoMetric.m in Sources */, 669225C017FE458100237E77 /* LibratoClient.m in Sources */, From 31cbf4542a0928b65a257bf9e2a0582ce5f47aca Mon Sep 17 00:00:00 2001 From: Sergey Kuryanov Date: Fri, 21 Oct 2016 22:51:37 +0300 Subject: [PATCH 6/6] Make tests work --- Demo/Podfile | 4 ++ .../project.pbxproj | 60 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/Demo/Podfile b/Demo/Podfile index 3bfef12..f2d1d5e 100644 --- a/Demo/Podfile +++ b/Demo/Podfile @@ -4,4 +4,8 @@ platform :ios, '8.0' target 'librato-iOS Demo' do pod 'librato-iOS', :path => '../librato-iOS.podspec' + + target 'librato-iOS DemoTests' do + inherit! :search_paths + end end diff --git a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj index 791a551..cbfbc7c 100644 --- a/Demo/librato-iOS Demo.xcodeproj/project.pbxproj +++ b/Demo/librato-iOS Demo.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0D6D45DA41B71E92FB0B9E41 /* libPods-librato-iOS DemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C644C1E73D9E5B07F26ABA47 /* libPods-librato-iOS DemoTests.a */; }; 6692261E180358AF00237E77 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6692261D180358AF00237E77 /* Foundation.framework */; }; 66922620180358AF00237E77 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6692261F180358AF00237E77 /* CoreGraphics.framework */; }; 66922622180358AF00237E77 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66922621180358AF00237E77 /* UIKit.framework */; }; @@ -21,6 +22,7 @@ 66922643180358B000237E77 /* librato_iOS_DemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 66922642180358B000237E77 /* librato_iOS_DemoTests.m */; }; 6692264E18035E8400237E77 /* LibratoDemoEventTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 6692264D18035E8400237E77 /* LibratoDemoEventTracker.m */; }; 669C48111D8764040059EDBD /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 669C48101D8764040059EDBD /* MainStoryboard.storyboard */; }; + D953BD3F1DBAA49B005EEF1B /* NSString+ALMSanitizedForMetricTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D9263DD61DB946660035CC6E /* NSString+ALMSanitizedForMetricTests.m */; }; E83CC217E62447107D693D91 /* libPods-librato-iOS Demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E7DC6EE1A84E81B6B7B7A2 /* libPods-librato-iOS Demo.a */; }; /* End PBXBuildFile section */ @@ -55,8 +57,11 @@ 6692264D18035E8400237E77 /* LibratoDemoEventTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LibratoDemoEventTracker.m; sourceTree = ""; }; 669C48101D8764040059EDBD /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = ""; }; 71FE433FB985CA1AB0DF6BDA /* Pods-librato-iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.debug.xcconfig"; sourceTree = ""; }; + 801077638741FA5C51076C77 /* Pods-librato-iOS DemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS DemoTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS DemoTests/Pods-librato-iOS DemoTests.release.xcconfig"; sourceTree = ""; }; + 8E8188DE6A6BC172BA811B1C /* Pods-librato-iOS DemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS DemoTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS DemoTests/Pods-librato-iOS DemoTests.debug.xcconfig"; sourceTree = ""; }; B3CFB32942D9D0C3245EEB4E /* Pods-librato-iOS Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-librato-iOS Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-librato-iOS Demo/Pods-librato-iOS Demo.release.xcconfig"; sourceTree = ""; }; C5A2D3C7197B48C6A9ACC07D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + C644C1E73D9E5B07F26ABA47 /* libPods-librato-iOS DemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-librato-iOS DemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D9263DD61DB946660035CC6E /* NSString+ALMSanitizedForMetricTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+ALMSanitizedForMetricTests.m"; sourceTree = ""; }; F8E7DC6EE1A84E81B6B7B7A2 /* libPods-librato-iOS Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-librato-iOS Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -80,6 +85,7 @@ 66922637180358AF00237E77 /* XCTest.framework in Frameworks */, 66922639180358B000237E77 /* UIKit.framework in Frameworks */, 66922638180358AF00237E77 /* Foundation.framework in Frameworks */, + 0D6D45DA41B71E92FB0B9E41 /* libPods-librato-iOS DemoTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -115,6 +121,7 @@ 66922636180358AF00237E77 /* XCTest.framework */, C5A2D3C7197B48C6A9ACC07D /* libPods.a */, F8E7DC6EE1A84E81B6B7B7A2 /* libPods-librato-iOS Demo.a */, + C644C1E73D9E5B07F26ABA47 /* libPods-librato-iOS DemoTests.a */, ); name = Frameworks; sourceTree = ""; @@ -168,6 +175,8 @@ children = ( 71FE433FB985CA1AB0DF6BDA /* Pods-librato-iOS Demo.debug.xcconfig */, B3CFB32942D9D0C3245EEB4E /* Pods-librato-iOS Demo.release.xcconfig */, + 8E8188DE6A6BC172BA811B1C /* Pods-librato-iOS DemoTests.debug.xcconfig */, + 801077638741FA5C51076C77 /* Pods-librato-iOS DemoTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -199,9 +208,12 @@ isa = PBXNativeTarget; buildConfigurationList = 66922649180358B000237E77 /* Build configuration list for PBXNativeTarget "librato-iOS DemoTests" */; buildPhases = ( + 60F4CC329F21EB0D532804DC /* [CP] Check Pods Manifest.lock */, 66922631180358AF00237E77 /* Sources */, 66922632180358AF00237E77 /* Frameworks */, 66922633180358AF00237E77 /* Resources */, + BAACFE891AE2BDA71802DAB9 /* [CP] Embed Pods Frameworks */, + B8F1461E083D696A5571BDE5 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -298,6 +310,51 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; + 60F4CC329F21EB0D532804DC /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + B8F1461E083D696A5571BDE5 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-librato-iOS DemoTests/Pods-librato-iOS DemoTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + BAACFE891AE2BDA71802DAB9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-librato-iOS DemoTests/Pods-librato-iOS DemoTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; CF311E2286F14B79A814F7BE /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -330,6 +387,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + D953BD3F1DBAA49B005EEF1B /* NSString+ALMSanitizedForMetricTests.m in Sources */, 66922643180358B000237E77 /* librato_iOS_DemoTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -481,6 +539,7 @@ }; 6692264A180358B000237E77 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 8E8188DE6A6BC172BA811B1C /* Pods-librato-iOS DemoTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/librato-iOS Demo.app/librato-iOS Demo"; FRAMEWORK_SEARCH_PATHS = ( @@ -503,6 +562,7 @@ }; 6692264B180358B000237E77 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 801077638741FA5C51076C77 /* Pods-librato-iOS DemoTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/librato-iOS Demo.app/librato-iOS Demo"; FRAMEWORK_SEARCH_PATHS = (