Skip to content

Commit

Permalink
Fix Rightpoint#41: Create separate podspecs for Core, Mock, and Test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbrown-eg committed Sep 4, 2018
1 parent 8e2fad3 commit 84724a3
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 35 deletions.
25 changes: 3 additions & 22 deletions RZBluetooth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,8 @@ RZBluetooth is a Core Bluetooth helper with 3 primary goals:
s.source = { :git => "https://github.com/Raizlabs/RZBluetooth.git", :tag => s.version }
s.requires_arc = true

s.default_subspec = "Core"
s.source_files = "RZBluetooth/**/*.{h,m}"
s.public_header_files = "RZBluetooth/**/*.h"
s.private_header_files = "RZBluetooth/**/*+Private.h", "RZBluetooth/Command/*.h", "RZBluetooth/RZBCentralManager+CommandHelper.h"

s.subspec "Core" do |core|
core.source_files = "RZBluetooth/**/*.{h,m}"
core.public_header_files = "RZBluetooth/**/*.h"
core.private_header_files = "RZBluetooth/**/*+Private.h", "RZBluetooth/Command/*.h", "RZBluetooth/RZBCentralManager+CommandHelper.h"
end

s.subspec "Mock" do |mock|
mock.dependency "RZBluetooth/Core"
mock.source_files = "RZMockBluetooth/**/*.{h,m}"
mock.public_header_files = "RZMockBluetooth/**/*.h"
mock.private_header_files = "RZMockBluetooth/**/*+Private.h"
end

s.subspec "Test" do |test|
test.dependency "RZBluetooth/Mock"
test.frameworks = "XCTest"
test.source_files = "RZBluetoothTests/RZBTestDefines.h",
"RZBluetoothTests/RZBSimulatedTestCase.{h,m}",
"RZBluetoothTests/Helpers/NSRunLoop+RZBWaitFor.{h,m}"
test.public_header_files = "RZBluetoothTests/RZBSimulatedTestCase.h", "RZBluetoothTests/RZBTestDefines.h"
end
end
4 changes: 4 additions & 0 deletions RZBluetooth.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
0F659176213734E500A3122A /* RZBluetoothMock.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = RZBluetoothMock.podspec; sourceTree = "<group>"; };
0F659177213734F100A3122A /* RZBluetoothTest.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = RZBluetoothTest.podspec; sourceTree = "<group>"; };
15930BDA1D1C2032009C269C /* libRZBluetooth-OSX.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRZBluetooth-OSX.a"; sourceTree = BUILT_PRODUCTS_DIR; };
AB056E461CBBD55E00145E87 /* RZBSimulationObjectTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZBSimulationObjectTests.m; sourceTree = "<group>"; };
AB0E299B1B7E19E100A1ADA9 /* RZBPeripheral+RZBHeartRate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RZBPeripheral+RZBHeartRate.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -296,6 +298,8 @@
children = (
AB45C5481B6C0B8900CC0166 /* README.md */,
ABCD83AB1B7ACD5900DA1162 /* RZBluetooth.podspec */,
0F659176213734E500A3122A /* RZBluetoothMock.podspec */,
0F659177213734F100A3122A /* RZBluetoothTest.podspec */,
AB45C49B1B6BF70B00CC0166 /* RZBluetooth */,
AB45C4E51B6BF8BA00CC0166 /* RZMockBluetooth */,
AB45C4A81B6BF70B00CC0166 /* RZBluetoothTests */,
Expand Down
27 changes: 27 additions & 0 deletions RZBluetoothMock.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
Pod::Spec.new do |s|
s.name = "RZBluetoothMock"
s.version = "1.2.2"
s.summary = "A Core Bluetooth helper library to simplify the development and testing of Core Bluetooth applications."

s.description = <<-DESC
RZBluetooth is a Core Bluetooth helper with 3 primary goals:
- Simplify the delegate callbacks and encourage best practices
- Provide a pattern for Profile level APIs, with support for public profiles
- Simplify and encourage testing - including unit tests, automated integration tests, and manual tests.
DESC

s.homepage = "http://github.com/Raizlabs/RZBluetooth"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Brian King" => "[email protected]" }
s.osx.deployment_target = "10.10"
s.ios.deployment_target = "8.0"
s.source = { :git => "https://github.com/Raizlabs/RZBluetooth.git", :tag => s.version }
s.requires_arc = true

s.source_files = "RZMockBluetooth/**/*.{h,m}", "RZBluetooth/**/*.{h,m}"
s.public_header_files = "RZMockBluetooth/**/*.h", "RZBluetooth/**/*.h"
s.private_header_files = "RZMockBluetooth/**/*+Private.h", "RZBluetooth/**/*+Private.h", "RZBluetooth/Command/*.h", "RZBluetooth/RZBCentralManager+CommandHelper.h"

end
30 changes: 30 additions & 0 deletions RZBluetoothTest.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
Pod::Spec.new do |s|
s.name = "RZBluetoothTest"
s.version = "1.2.2"
s.summary = "A Core Bluetooth helper library to simplify the development and testing of Core Bluetooth applications."

s.description = <<-DESC
RZBluetooth is a Core Bluetooth helper with 3 primary goals:
- Simplify the delegate callbacks and encourage best practices
- Provide a pattern for Profile level APIs, with support for public profiles
- Simplify and encourage testing - including unit tests, automated integration tests, and manual tests.
DESC

s.homepage = "http://github.com/Raizlabs/RZBluetooth"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Brian King" => "[email protected]" }
s.osx.deployment_target = "10.10"
s.ios.deployment_target = "8.0"
s.source = { :git => "https://github.com/Raizlabs/RZBluetooth.git", :tag => s.version }
s.requires_arc = true

s.dependency "RZBluetooth/Mock"
s.frameworks = "XCTest"
s.source_files = "RZBluetoothTests/RZBTestDefines.h",
"RZBluetoothTests/RZBSimulatedTestCase.{h,m}",
"RZBluetoothTests/Helpers/NSRunLoop+RZBWaitFor.{h,m}"
s.public_header_files = "RZBluetoothTests/RZBSimulatedTestCase.h", "RZBluetoothTests/RZBTestDefines.h"

end
20 changes: 10 additions & 10 deletions RZBluetoothTests/RZBSimulatedTestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

@import XCTest;

#import "RZBCentralManager.h"
#import "RZBPeripheral.h"
#import "RZBScanInfo.h"
#import "RZBluetooth/RZBCentralManager.h"
#import "RZBluetooth/RZBPeripheral.h"
#import "RZBluetooth/RZBScanInfo.h"

#import "RZBMockCentralManager.h"
#import "RZBMockPeripheralManager.h"
#import "RZBluetooth/RZBMockCentralManager.h"
#import "RZBluetooth/RZBMockPeripheralManager.h"

#import "RZBSimulatedDevice.h"
#import "RZBSimulatedCentral.h"
#import "RZBSimulatedConnection.h"
#import "RZBSimulatedCallback.h"
#import "RZBluetooth/RZBSimulatedDevice.h"
#import "RZBluetooth/RZBSimulatedCentral.h"
#import "RZBluetooth/RZBSimulatedConnection.h"
#import "RZBluetooth/RZBSimulatedCallback.h"

#import "NSError+RZBMock.h"
#import "RZBluetooth/NSError+RZBMock.h"

/**
* The RZBSimulatedTestCase is a convience class to assist testing bluetooth code.
Expand Down
6 changes: 3 additions & 3 deletions RZBluetoothTests/RZBSimulatedTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//

#import "RZBTestDefines.h"
#import "RZMockBluetooth.h"
#import "RZBluetooth/RZMockBluetooth.h"
#import "RZBSimulatedTestCase.h"
#import "NSRunLoop+RZBWaitFor.h"
#import "RZBCentralManager+Private.h"
#import "RZBLog.h"
#import "RZBluetooth/RZBCentralManager+Private.h"
#import "RZBluetooth/RZBLog.h"

@implementation RZBSimulatedTestCase

Expand Down

0 comments on commit 84724a3

Please sign in to comment.