Browse Source

Merge pull request #182 from grpc/move-examples

move examples under Sources/Examples
Tim Burks 8 years ago
parent
commit
975822c1dc

+ 3 - 3
Examples/EchoXcode/Echo.xcodeproj/project.pbxproj

@@ -84,9 +84,9 @@
 
 /* Begin PBXFileReference section */
 		D315DEDF1EE8B29A007670CE /* SwiftProtobuf.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftProtobuf.xcodeproj; path = "../../third_party/swift-protobuf/SwiftProtobuf.xcodeproj"; sourceTree = "<group>"; };
-		D353581D1E219963007FA223 /* echo.grpc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = echo.grpc.swift; path = ../../Sources/EchoExample/Generated/echo.grpc.swift; sourceTree = "<group>"; };
-		D353581E1E219963007FA223 /* echo.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = echo.pb.swift; path = ../../Sources/EchoExample/Generated/echo.pb.swift; sourceTree = "<group>"; };
-		D35358241E219980007FA223 /* EchoProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EchoProvider.swift; path = ../../Sources/EchoExample/EchoProvider.swift; sourceTree = "<group>"; };
+		D353581D1E219963007FA223 /* echo.grpc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = echo.grpc.swift; path = ../../Sources/Examples/Echo/Generated/echo.grpc.swift; sourceTree = "<group>"; };
+		D353581E1E219963007FA223 /* echo.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = echo.pb.swift; path = ../../Sources/Examples/Echo/Generated/echo.pb.swift; sourceTree = "<group>"; };
+		D35358241E219980007FA223 /* EchoProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EchoProvider.swift; path = ../../Sources/Examples/Echo/EchoProvider.swift; sourceTree = "<group>"; };
 		D35C9FA81D74B079000443CD /* Echo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Echo.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		D35C9FAB1D74B079000443CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 		D35C9FAD1D74B079000443CD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };

+ 3 - 3
Makefile

@@ -20,11 +20,11 @@ test-echo:	all
 	./Echo collect | tee -a test.out
 	./Echo update | tee -a test.out
 	kill -9 `cat echo.pid`
-	diff -u test.out Sources/EchoExample/test.gold
+	diff -u test.out Sources/Examples/Echo/test.gold
 
 test-plugin: all
-	protoc Sources/EchoExample/echo.proto --proto_path=Sources/EchoExample --plugin=.build/debug/protoc-gen-swift --plugin=.build/debug/protoc-gen-swiftgrpc --swiftgrpc_out=/tmp --swiftgrpc_opt=TestStubs=true
-	diff -u /tmp/echo.grpc.swift Sources/EchoExample/Generated/echo.grpc.swift
+	protoc Sources/Examples/Echo/echo.proto --proto_path=Sources/Examples/Echo --plugin=.build/debug/protoc-gen-swift --plugin=.build/debug/protoc-gen-swiftgrpc --swiftgrpc_out=/tmp --swiftgrpc_opt=TestStubs=true
+	diff -u /tmp/echo.grpc.swift Sources/Examples/Echo/Generated/echo.grpc.swift
 
 clean:
 	rm -rf Packages

+ 3 - 4
Package.swift

@@ -43,11 +43,10 @@ let package = Package(
             dependencies: [
               "SwiftGRPC",
               "SwiftProtobuf",
-              "Commander"
-            ],
-            path: "Sources/EchoExample"),
+              "Commander"],
+            path: "Sources/Examples/Echo"),
     .target(name: "Simple",
             dependencies: ["SwiftGRPC", "Commander"],
-            path: "Sources/SimpleExample"),
+            path: "Sources/Examples/Simple"),
     .testTarget(name: "SwiftGRPCTests", dependencies: ["SwiftGRPC"])
   ])

+ 0 - 0
Sources/EchoExample/EchoProvider.swift → Sources/Examples/Echo/EchoProvider.swift


+ 0 - 0
Sources/EchoExample/Generated/echo.grpc.swift → Sources/Examples/Echo/Generated/echo.grpc.swift


+ 0 - 0
Sources/EchoExample/Generated/echo.pb.swift → Sources/Examples/Echo/Generated/echo.pb.swift


+ 0 - 0
Sources/EchoExample/Makefile → Sources/Examples/Echo/Makefile


+ 0 - 0
Sources/EchoExample/README.md → Sources/Examples/Echo/README.md


+ 0 - 0
Sources/EchoExample/RUNME → Sources/Examples/Echo/RUNME


+ 0 - 0
Sources/EchoExample/echo.proto → Sources/Examples/Echo/echo.proto


+ 0 - 0
Sources/EchoExample/main.swift → Sources/Examples/Echo/main.swift


+ 0 - 0
Sources/EchoExample/ssl.crt → Sources/Examples/Echo/ssl.crt


+ 0 - 0
Sources/EchoExample/ssl.key → Sources/Examples/Echo/ssl.key


+ 0 - 0
Sources/EchoExample/test.gold → Sources/Examples/Echo/test.gold


+ 0 - 0
Sources/SimpleExample/README.md → Sources/Examples/Simple/README.md


+ 0 - 0
Sources/SimpleExample/main.swift → Sources/Examples/Simple/main.swift


+ 1 - 1
Tests/SwiftGRPCTests/EchoProvider.swift

@@ -1 +1 @@
-../../Sources/EchoExample/EchoProvider.swift
+../../Sources/Examples/Echo/EchoProvider.swift

+ 1 - 1
Tests/SwiftGRPCTests/echo.grpc.swift

@@ -1 +1 @@
-../../Sources/EchoExample/Generated/echo.grpc.swift
+../../Sources/Examples/Echo/Generated/echo.grpc.swift

+ 1 - 1
Tests/SwiftGRPCTests/echo.pb.swift

@@ -1 +1 @@
-../../Sources/EchoExample/Generated/echo.pb.swift
+../../Sources/Examples/Echo/Generated/echo.pb.swift