From 5ddb22e68b5dbf7128879f2710fcc7bcbec44f15 Mon Sep 17 00:00:00 2001 From: Marco Guerrieri Date: Mon, 18 Mar 2019 14:37:43 +0000 Subject: [PATCH] fix to group and target --- .../Extensions/CharacterSet+Additions.swift | 38 +++++++++++++++++++ TABResourceLoader.xcodeproj/project.pbxproj | 2 +- .../Helpers/CharacterSet+Additions.swift | 18 --------- 3 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift delete mode 100644 Tests/TABResourceLoaderTests/Helpers/CharacterSet+Additions.swift diff --git a/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift b/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift new file mode 100644 index 0000000..c86c8d2 --- /dev/null +++ b/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift @@ -0,0 +1,38 @@ +// +// CharacterSet+Additions.swift +// TABResourceLoader +// +// Created by Marco Guerrieri on 14/03/2019. +// +// The MIT License (MIT) +// +// Copyright (c) 2016 Luciano Marisi +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import Foundation + +public extension CharacterSet { + public static var improvedUrlQueryAllowed: CharacterSet { + var characterSet = CharacterSet.urlQueryAllowed + characterSet.remove("&") + characterSet.remove("=") + return characterSet + } +} diff --git a/TABResourceLoader.xcodeproj/project.pbxproj b/TABResourceLoader.xcodeproj/project.pbxproj index 937260e..84adeb7 100644 --- a/TABResourceLoader.xcodeproj/project.pbxproj +++ b/TABResourceLoader.xcodeproj/project.pbxproj @@ -325,6 +325,7 @@ 4F079D381D8458A000D08DA0 /* Extensions */ = { isa = PBXGroup; children = ( + 90B62B47223A5F6C00640CE9 /* CharacterSet+Additions.swift */, 4F079D361D84585E00D08DA0 /* NSThread+Additions.swift */, ); path = Extensions; @@ -356,7 +357,6 @@ 4F4BE52B1ECB415500C2CC56 /* String+Error.swift */, EA1EE0D41F881CF000902527 /* String+Additions.swift */, 4FF581741F051F23008D0A20 /* Result+Additions.swift */, - 90B62B47223A5F6C00640CE9 /* CharacterSet+Additions.swift */, ); path = Helpers; sourceTree = ""; diff --git a/Tests/TABResourceLoaderTests/Helpers/CharacterSet+Additions.swift b/Tests/TABResourceLoaderTests/Helpers/CharacterSet+Additions.swift deleted file mode 100644 index aab51c3..0000000 --- a/Tests/TABResourceLoaderTests/Helpers/CharacterSet+Additions.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CharacterSet+Additions.swift -// TABResourceLoader -// -// Created by Marco Guerrieri on 14/03/2019. -// Copyright © 2019 Luciano Marisi. All rights reserved. -// - -import Foundation - -extension CharacterSet { - public static var improvedUrlQueryAllowed: CharacterSet { - var characterSet = CharacterSet.urlQueryAllowed - characterSet.remove("&") - characterSet.remove("=") - return characterSet - } -}