diff --git a/Defaults.podspec b/Defaults.podspec index 1460024..8f23063 100644 --- a/Defaults.podspec +++ b/Defaults.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.social_media_url = 'https://twitter.com/sindresorhus' s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' } s.source = { :git => 'https://github.com/sindresorhus/Defaults.git', :tag => "v#{s.version}" } - s.source_files = 'Sources/*.swift' + s.source_files = 'Sources/**/*.swift' s.swift_version = '5.0' s.macos.deployment_target = '10.12' s.ios.deployment_target = '10.0' diff --git a/Defaults.xcodeproj/project.pbxproj b/Defaults.xcodeproj/project.pbxproj index 0e05184..0c7dfe4 100644 --- a/Defaults.xcodeproj/project.pbxproj +++ b/Defaults.xcodeproj/project.pbxproj @@ -160,9 +160,7 @@ 8933C7811EB5B7E0000D00A4 /* Sources */ = { isa = PBXGroup; children = ( - 8933C7841EB5B820000D00A4 /* Defaults.swift */, - E3EB3E34216507AE0033B089 /* Observation.swift */, - E3EB3E32216505920033B089 /* util.swift */, + E30E93D822E9425E00530C8F /* Defaults */, ); path = Sources; sourceTree = ""; @@ -192,6 +190,16 @@ name = Tests; sourceTree = ""; }; + E30E93D822E9425E00530C8F /* Defaults */ = { + isa = PBXGroup; + children = ( + 8933C7841EB5B820000D00A4 /* Defaults.swift */, + E3EB3E34216507AE0033B089 /* Observation.swift */, + E3EB3E32216505920033B089 /* util.swift */, + ); + path = Defaults; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ diff --git a/Sources/Defaults.swift b/Sources/Defaults/Defaults.swift similarity index 100% rename from Sources/Defaults.swift rename to Sources/Defaults/Defaults.swift diff --git a/Sources/Observation.swift b/Sources/Defaults/Observation.swift similarity index 100% rename from Sources/Observation.swift rename to Sources/Defaults/Observation.swift diff --git a/Sources/util.swift b/Sources/Defaults/util.swift similarity index 100% rename from Sources/util.swift rename to Sources/Defaults/util.swift diff --git a/Tests/DefaultsTests/DefaultsTests.swift b/Tests/DefaultsTests/DefaultsTests.swift index d0e4ee9..3ee1439 100644 --- a/Tests/DefaultsTests/DefaultsTests.swift +++ b/Tests/DefaultsTests/DefaultsTests.swift @@ -17,7 +17,7 @@ extension Defaults.Keys { static let key = Key("key", default: false) static let url = Key("url", default: fixtureURL) static let `enum` = Key("enum", default: .oneHour) - static let data = Key("data", default: Data(bytes: [])) + static let data = Key("data", default: Data([])) static let date = Key("date", default: fixtureDate) } @@ -88,9 +88,9 @@ final class DefaultsTests: XCTestCase { } func testDataType() { - XCTAssertEqual(defaults[.data], Data(bytes: [])) + XCTAssertEqual(defaults[.data], Data([])) - let newData = Data(bytes: [0xFF]) + let newData = Data([0xFF]) defaults[.data] = newData XCTAssertEqual(defaults[.data], newData) }