aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Firestore/Example/Tests/SpecTests/FSTMockDatastore.h12
-rw-r--r--Firestore/Firestore.podspec23
-rw-r--r--Firestore/src/.clang-format8
-rwxr-xr-xscripts/style.sh3
4 files changed, 36 insertions, 10 deletions
diff --git a/Firestore/Example/Tests/SpecTests/FSTMockDatastore.h b/Firestore/Example/Tests/SpecTests/FSTMockDatastore.h
index f091a53..8d65529 100644
--- a/Firestore/Example/Tests/SpecTests/FSTMockDatastore.h
+++ b/Firestore/Example/Tests/SpecTests/FSTMockDatastore.h
@@ -22,12 +22,16 @@ NS_ASSUME_NONNULL_BEGIN
@interface FSTMockDatastore : FSTDatastore
-/** A count of the total number of requests sent to the watch stream since the beginning of the test
- * case. */
+/**
+ * A count of the total number of requests sent to the watch stream since the beginning of the test
+ * case.
+ */
@property(nonatomic) int watchStreamRequestCount;
-/** A count of the total number of requests sent to the write stream since the beginning of the test
- * case. */
+/**
+ * A count of the total number of requests sent to the write stream since the beginning of the test
+ * case.
+ */
@property(nonatomic) int writeStreamRequestCount;
+ (instancetype)mockDatastoreWithWorkerDispatchQueue:(FSTDispatchQueue *)workerDispatchQueue;
diff --git a/Firestore/Firestore.podspec b/Firestore/Firestore.podspec
index c589fbf..32aae55 100644
--- a/Firestore/Firestore.podspec
+++ b/Firestore/Firestore.podspec
@@ -24,10 +24,23 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
s.ios.deployment_target = '8.0'
- s.source_files = 'Source/**/*', 'Port/**/*', 'Protos/objc/**/*.[hm]', 'third_party/**/*.[mh]'
- s.requires_arc = 'Source/**/*', 'third_party/**/*.[mh]'
- s.exclude_files = 'Port/*test.cc', 'third_party/**/Tests/**'
+ s.source_files = [
+ 'Source/**/*',
+ 'Port/**/*',
+ 'Protos/objc/**/*.[hm]',
+ 'src/core/**/*.{h,cc}',
+ 'third_party/**/*.[mh]'
+ ]
+ s.requires_arc = [
+ 'Source/**/*',
+ 'third_party/**/*.[mh]'
+ ]
+ s.exclude_files = [
+ 'Port/*test.cc',
+ 'third_party/**/Tests/**'
+ ]
s.public_header_files = 'Source/Public/*.h'
+
s.frameworks = 'MobileCoreServices'
s.dependency 'gRPC-ProtoRPC'
s.dependency 'leveldb-library'
@@ -36,8 +49,8 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
s.dependency 'FirebaseCommunity/Auth'
s.library = 'c++'
- s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' =>
- 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ',
+ s.pod_target_xcconfig = {
+ 'GCC_PREPROCESSOR_DEFINITIONS' => 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ',
'OTHER_CFLAGS' => '-DFIRFirestore_VERSION=' + s.version.to_s
}
end
diff --git a/Firestore/src/.clang-format b/Firestore/src/.clang-format
new file mode 100644
index 0000000..7a0e321
--- /dev/null
+++ b/Firestore/src/.clang-format
@@ -0,0 +1,8 @@
+BasedOnStyle: Google
+Standard: Cpp11
+ColumnLimit: 80
+BinPackParameters: false
+AllowAllParametersOfDeclarationOnNextLine: true
+SpacesInContainerLiterals: true
+PointerAlignment: Left
+AllowShortFunctionsOnASingleLine: None
diff --git a/scripts/style.sh b/scripts/style.sh
index 9ebb775..7113177 100755
--- a/scripts/style.sh
+++ b/scripts/style.sh
@@ -19,7 +19,8 @@ find . \
-name 'FirebaseCommunity.h' -prune -o \
-name 'Messaging' -prune -o \
-name 'Pods' -prune -o \
- \( -name '*.[mh]' -o -name '*.mm' \) \
+ -path '*/Firestore/Port/*' -prune -o \
+ \( -name '*.[mh]' -o -name '*.mm' -o -name '*.cc' \) \
-not -name '*.pbobjc.*' \
-not -name '*.pbrpc.*' \
-print0 | xargs -0 clang-format -style=file -i